X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f42c23971ccc3b5c944a946695e357c2925b8ad..9e9574fe45b176ee74bba8fad7574cf9906145d1:/interface/wx/filectrl.h?ds=sidebyside diff --git a/interface/wx/filectrl.h b/interface/wx/filectrl.h index 3822ae29b6..a56f8023a5 100644 --- a/interface/wx/filectrl.h +++ b/interface/wx/filectrl.h @@ -2,10 +2,19 @@ // Name: filectrl.h // Purpose: interface of wxFileCtrl // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +enum +{ + wxFC_OPEN = 0x0001, + wxFC_SAVE = 0x0002, + wxFC_MULTIPLE = 0x0004, + wxFC_NOSHOWHIDDEN = 0x0008 +}; + +#define wxFC_DEFAULT_STYLE wxFC_OPEN + /** @class wxFileCtrl @@ -47,7 +56,7 @@ @library{wxcore} @category{ctrl} - @appearance{filectrl.png} + @appearance{filectrl} @nativeimpl{wxgtk} @@ -90,7 +99,7 @@ public: wxFileCtrl(wxWindow* parent, wxWindowID id, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFilename = wxEmptyString, - const wxPoint& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -108,7 +117,7 @@ public: const wxString& name = wxFileCtrlNameStr); /** - Returns the current directory of the file control (i.e. the directory shown by it). + Returns the current directory of the file control (i.e.\ the directory shown by it). */ virtual wxString GetDirectory() const; @@ -169,6 +178,16 @@ public: */ virtual bool SetFilename(const wxString& filename); + /** + Changes to a certain directory and selects a certain file. + + In case the filename specified isn't found/couldn't be shown with + currently selected filter, false is returned. + + @return Returns @true on success, @false otherwise + */ + virtual bool SetPath(const wxString& path); + /** Sets the current filter index, starting from zero. */ @@ -187,6 +206,11 @@ public: }; +wxEventType wxEVT_FILECTRL_SELECTIONCHANGED; +wxEventType wxEVT_FILECTRL_FILEACTIVATED; +wxEventType wxEVT_FILECTRL_FOLDERCHANGED; +wxEventType wxEVT_FILECTRL_FILTERCHANGED; + /** @class wxFileCtrlEvent @@ -205,7 +229,7 @@ public: The current file filter of the file control has been changed @endEventTable - @library{wxbase} + @library{wxcore} @category{events} */ class wxFileCtrlEvent : public wxCommandEvent