wxGenericDirCtrl
Description
This 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.
Styles
This class supports the following styles:
This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler
wxWidgets docs: wxGenericDirCtrl
Events
Event types emitted from this class: dirctrl_selectionchanged, dirctrl_fileactivated
new() -> wxGenericDirCtrl()
Default constructor.
new(Parent) -> wxGenericDirCtrl()
Types
new(Parent, Options :: [Option]) -> wxGenericDirCtrl()
Types
{id, integer()} |
{dir, unicode:chardata()} |
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()} |
{filter, unicode:chardata()} |
{defaultFilter, integer()}
Main constructor.
destroy(This :: wxGenericDirCtrl()) -> ok
Destructor.
create(This, Parent) -> boolean()
create(This, Parent, Options :: [Option]) -> boolean()
Types
{id, integer()} |
{dir, unicode:chardata()} |
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()} |
{filter, unicode:chardata()} |
{defaultFilter, integer()}
Create function for two-step construction.
See new/2 for details.
init(This) -> ok
Types
Initializes variables.
collapseTree(This) -> ok
Types
Collapses the entire tree.
expandPath(This, Path) -> boolean()
Tries to expand as much of the given path as possible, so that the filename or directory is visible in the tree control.
getDefaultPath(This) -> unicode:charlist()
Types
Gets the default path.
getPath(This) -> unicode:charlist()
Types
Gets the currently-selected directory or filename.
getPath(This, ItemId) -> unicode:charlist()
Gets the path corresponding to the given tree control item.
Since: 2.9.5
getFilePath(This) -> unicode:charlist()
Types
Gets selected filename path only (else empty string).
This function doesn't count a directory as a selection.
getFilter(This) -> unicode:charlist()
Types
Returns the filter string.
getFilterIndex(This) -> integer()
Types
Returns the current filter index (zero-based).
getRootId(This) -> integer()
Types
Returns the root id for the tree control.
getTreeCtrl(This) -> wxTreeCtrl:wxTreeCtrl()
Types
Returns a pointer to the tree control.
reCreateTree(This) -> ok
Types
Collapse and expand the tree, thus re-creating it from scratch.
May be used to update the displayed directory content.
setDefaultPath(This, Path) -> ok
Sets the default path.
setFilter(This, Filter) -> ok
Sets the filter string.
setFilterIndex(This, N) -> ok
Sets the current filter index (zero-based).
setPath(This, Path) -> ok
Sets the current path.