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
|