X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80f624ec0c99878e327bfd070d6a92adf48eac14..b09857ae000a60704207d63290be937584805fb0:/interface/wx/dirctrl.h?ds=sidebyside diff --git a/interface/wx/dirctrl.h b/interface/wx/dirctrl.h index fa10290f49..37c96d45a0 100644 --- a/interface/wx/dirctrl.h +++ b/interface/wx/dirctrl.h @@ -3,9 +3,24 @@ // Purpose: interface of wxGenericDirCtrl // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +enum +{ + // Only allow directory viewing/selection, no files + wxDIRCTRL_DIR_ONLY = 0x0010, + // When setting the default path, select the first file in the directory + wxDIRCTRL_SELECT_FIRST = 0x0020, + // Use 3D borders on internal controls + wxDIRCTRL_3D_INTERNAL = 0x0080, + // Editable labels + wxDIRCTRL_EDIT_LABELS = 0x0100, + // Allow multiple selection + wxDIRCTRL_MULTIPLE = 0x0200 +}; + + /** @class wxGenericDirCtrl @@ -29,9 +44,15 @@ Allows multiple files and folders to be selected. @endStyleTable - @library{wxbase} + @library{wxcore} @category{ctrl} - @appearance{genericdirctrl.png} + @appearance{genericdirctrl} + @event{EVT_DIRCTRL_CHANGED(id, func)} + Selected directory has changed. + Processes a @c wxEVT_COMMAND_DIRCTRL_CHANGED event type. + Notice that this event is generated even for the changes done by the + program itself and not only those done by the user. + @since 2.9.5 */ class wxGenericDirCtrl : public wxControl { @@ -147,6 +168,13 @@ public: */ virtual wxString GetPath() const; + /** + Gets the path corresponding to the given tree control item. + + @since 2.9.5 + */ + wxString GetPath(wxTreeItemId itemId) const; + /** Fills the array @a paths with the selected directories and filenames. */ @@ -223,3 +251,25 @@ public: virtual void UnselectAll(); }; + + +class wxDirFilterListCtrl: public wxChoice +{ +public: + wxDirFilterListCtrl(); + wxDirFilterListCtrl(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + bool Create(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + virtual ~wxDirFilterListCtrl() {} + + void Init(); + + //// Operations + void FillFilterList(const wxString& filter, int defaultFilter); +};