table of contents
wxGenericDirCtrl(3erl) | Erlang Module Definition | wxGenericDirCtrl(3erl) |
NAME¶
wxGenericDirCtrl - Functions for wxGenericDirCtrl class
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
DATA TYPES¶
wxGenericDirCtrl() = wx:wx_object()
EXPORTS¶
new() -> wxGenericDirCtrl()
Default constructor.
new(Parent) -> wxGenericDirCtrl()
Types:
new(Parent, Options :: [Option]) -> wxGenericDirCtrl()
Types:
Option =
{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()
Types:
Parent = wxWindow:wxWindow()
create(This, Parent, Options :: [Option]) -> boolean()
Types:
Parent = wxWindow:wxWindow()
Option =
{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()
Types:
Path = unicode:chardata()
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()
Types:
ItemId = integer()
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
Types:
Path = unicode:chardata()
Sets the default path.
setFilter(This, Filter) -> ok
Types:
Filter = unicode:chardata()
Sets the filter string.
setFilterIndex(This, N) -> ok
Types:
N = integer()
Sets the current filter index (zero-based).
setPath(This, Path) -> ok
Types:
Path = unicode:chardata()
Sets the current path.
wx 2.2.2.1 | wxWidgets team. |