X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7e59b88579c7a1e8b4da0827be75dc5d2a84ec73..f9afe2fece164276af2154ad5046de810f32933f:/interface/wx/dirctrl.h diff --git a/interface/wx/dirctrl.h b/interface/wx/dirctrl.h index 60910dbbbc..244d9891d5 100644 --- a/interface/wx/dirctrl.h +++ b/interface/wx/dirctrl.h @@ -3,7 +3,7 @@ // Purpose: interface of wxGenericDirCtrl // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -25,9 +25,11 @@ directory. @style{wxDIRCTRL_EDIT_LABELS} Allow the folder and file labels to be editable. + @style{wxDIRCTRL_MULTIPLE} + Allows multiple files and folders to be selected. @endStyleTable - @library{wxbase} + @library{wxcore} @category{ctrl} @appearance{genericdirctrl.png} */ @@ -38,6 +40,7 @@ public: Default constructor. */ wxGenericDirCtrl(); + /** Main constructor. @@ -63,11 +66,11 @@ public: @param name The window name. */ - wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = -1, + wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = wxID_ANY, const wxString& dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDIRCTRL_3D_INTERNAL|wxBORDER_SUNKEN, + long style = wxDIRCTRL_3D_INTERNAL, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr); @@ -117,6 +120,13 @@ public: */ virtual wxString GetFilePath() const; + /** + Fills the array @a paths with the currently selected filepaths. + + This function doesn't count a directory as a selection. + */ + virtual void GetFilePaths(wxArrayString& paths) const; + /** Returns the filter string. */ @@ -137,6 +147,11 @@ public: */ virtual wxString GetPath() const; + /** + Fills the array @a paths with the selected directories and filenames. + */ + virtual void GetPaths(wxArrayString& paths) const; + /** Returns the root id for the tree control. */ @@ -184,5 +199,27 @@ public: control. If @false, they will not be displayed. */ virtual void ShowHidden(bool show); + + /** + Selects the given item. + + In multiple selection controls, can be also used to deselect a + currently selected item if the value of @a select is false. + Existing selections are not changed. Only visible items can be + (de)selected, otherwise use ExpandPath(). + */ + virtual void SelectPath(const wxString& path, bool select = true); + + /** + Selects only the specified paths, clearing any previous selection. + + Only supported when wxDIRCTRL_MULTIPLE is set. + */ + virtual void SelectPaths(const wxArrayString& paths); + + /** + Removes the selection from all currently selected items. + */ + virtual void UnselectAll(); };