wxGenericDirCtrlThis control can be used to place a directory listing (with optional files) on an arbitrary window. The control contains a wxTreeCtrl window representing the directory hierarchy, and optionally, a wxChoice window containing a list of filters. Derived from
wxControl Include files <wx/dirctrl.h> Window styles
See also Generic window styles. Data structures Members
wxGenericDirCtrl::wxGenericDirCtrl
wxGenericDirCtrl::wxGenericDirCtrlwxGenericDirCtrl() Default constructor. wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = -1, const wxString& dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr) Main constructor. Parameters parent
id
dir
pos
size
style
filter
Example: "All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg" defaultFilter
name
wxGenericDirCtrl::~wxGenericDirCtrl~wxGenericDirCtrl() Destructor.
wxGenericDirCtrl::Createbool Create(wxWindow* parent, const wxWindowID id = -1, const wxString& dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr) Create function for two-step construction. See wxGenericDirCtrl::wxGenericDirCtrl for details.
wxGenericDirCtrl::Initvoid Init() Initializes variables.
wxGenericDirCtrl::CollapseTreevoid CollapseTree() Collapses the entire tree.
wxGenericDirCtrl::ExpandPathbool ExpandPath(const wxString& path) Tries to expand as much of the given path as possible, so that the filename or directory is visible in the tree control.
wxGenericDirCtrl::CollapsePathbool CollapsePath(const wxString& path) Collapse the given path.
wxGenericDirCtrl::GetDefaultPathwxString GetDefaultPath() const Gets the default path.
wxGenericDirCtrl::GetPathwxString GetPath() const Gets the currently-selected directory or filename.
wxGenericDirCtrl::GetFilePathwxString GetFilePath() const Gets selected filename path only (else empty string). This function doesn't count a directory as a selection.
wxGenericDirCtrl::GetFilterwxString GetFilter() const Returns the filter string.
wxGenericDirCtrl::GetFilterIndexint GetFilterIndex() const Returns the current filter index (zero-based).
wxGenericDirCtrl::GetFilterListCtrlwxDirFilterListCtrl* GetFilterListCtrl() const Returns a pointer to the filter list control (if present).
wxGenericDirCtrl::GetRootIdwxTreeItemId GetRootId() Returns the root id for the tree control.
wxGenericDirCtrl::GetTreeCtrlwxTreeCtrl* GetTreeCtrl() const Returns a pointer to the tree control.
wxGenericDirCtrl::ReCreateTreevoid ReCreateTree() Collapse and expand the tree, thus re-creating it from scratch. May be used to update the displayed directory content.
wxGenericDirCtrl::SetDefaultPathvoid SetDefaultPath(const wxString& path) Sets the default path.
wxGenericDirCtrl::SetFiltervoid SetFilter(const wxString& filter) Sets the filter string.
wxGenericDirCtrl::SetFilterIndexvoid SetFilterIndex(int n) Sets the current filter index (zero-based).
wxGenericDirCtrl::SetPathvoid SetPath(const wxString& path) Sets the current path.
wxGenericDirCtrl::ShowHiddenvoid ShowHidden(bool show) Parameters show
|