X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d82b0abce2ee3fdb17712756df59208a55962de8..38534f596974042130716a26276e9564b0b72295:/interface/wx/filectrl.h diff --git a/interface/wx/filectrl.h b/interface/wx/filectrl.h index 6b27cee9cb..f4c120eccb 100644 --- a/interface/wx/filectrl.h +++ b/interface/wx/filectrl.h @@ -3,9 +3,19 @@ // Purpose: interface of wxFileCtrl // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +enum +{ + wxFC_OPEN = 0x0001, + wxFC_SAVE = 0x0002, + wxFC_MULTIPLE = 0x0004, + wxFC_NOSHOWHIDDEN = 0x0008 +}; + +#define wxFC_DEFAULT_STYLE wxFC_OPEN + /** @class wxFileCtrl @@ -40,13 +50,14 @@ @event{EVT_FILECTRL_FOLDERCHANGED(id, func)} The current folder of the file control has been changed @event{EVT_FILECTRL_FILTERCHANGED(id, func)} - The current file filter of the file control has been changed. This - event is new in wxWidgets 2.9.1. + The current file filter of the file control has been changed. + @since 2.9.1. + @endEventTable - @library{wxbase} + @library{wxcore} @category{ctrl} - @appearance{filectrl.png} + @appearance{filectrl} @nativeimpl{wxgtk} @@ -89,7 +100,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, @@ -107,7 +118,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; @@ -168,6 +179,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. */ @@ -186,6 +207,11 @@ public: }; +wxEventType wxEVT_FILECTRL_SELECTIONCHANGED; +wxEventType wxEVT_FILECTRL_FILEACTIVATED; +wxEventType wxEVT_FILECTRL_FOLDERCHANGED; +wxEventType wxEVT_FILECTRL_FILTERCHANGED; + /** @class wxFileCtrlEvent @@ -204,7 +230,7 @@ public: The current file filter of the file control has been changed @endEventTable - @library{wxbase} + @library{wxcore} @category{events} */ class wxFileCtrlEvent : public wxCommandEvent