wxGenericDirCtrl(3erl)
π NAME π
wxGenericDirCtrl(3erl) β Functions for wxGenericDirCtrl class. This is the Erlang Module Definition manual, bestie, and we're folding that header info right in here like a lil name tag π.
β¨ DESCRIPTION β¨
Okay so picture this: wxGenericDirCtrl is a control that lets you place a directory listing (with optional files) on an arbitrary window. Literally main character energy for file trees.
The control contains a wxTreeCtrl window representing the directory hierarchy, and optionally, a wxChoice window containing a list of filters. Iconic.
πΈ Styles πΈ
This class supports the following styles:
- The original says this class supports the following styles: and then gives us no bullets, so there is no styles list to enumerate, bestie π«
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. That's the whole vibe check.
π¦ DATA TYPES π¦
wxGenericDirCtrl() = wx:wx_object()
π EXPORTS π
Here's every export, no cap. All signatures and types kept exactly as the original, because we do not mess with the facts π
new() -> wxGenericDirCtrl()β default constructor. Fresh control just dropped.new(Parent) -> wxGenericDirCtrl()β types only, bestie:
Parent = wxWindow:wxWindow()
new(Parent, Options :: [Option]) -> wxGenericDirCtrl()β main constructor. Here's the whole type situation:
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()}
destroy(This :: wxGenericDirCtrl()) -> okβ destructor. Bye bestie.create(This, Parent) -> boolean()β types:
This = wxGenericDirCtrl()
Parent = wxWindow:wxWindow()
create(This, Parent, Options :: [Option]) -> boolean()β create function for two-step construction. Seenew/2for details. Types:
This = wxGenericDirCtrl()
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()}
init(This) -> okβ initializes variables.
This = wxGenericDirCtrl()
collapseTree(This) -> okβ collapses the entire tree.
This = wxGenericDirCtrl()
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.
This = wxGenericDirCtrl()
Path = unicode:chardata()
getDefaultPath(This) -> unicode:charlist()β gets the default path.
This = wxGenericDirCtrl()
getPath(This) -> unicode:charlist()β gets the currently-selected directory or filename.
This = wxGenericDirCtrl()
getPath(This, ItemId) -> unicode:charlist()β gets the path corresponding to the given tree control item. Since:2.9.5.
This = wxGenericDirCtrl()
ItemId = integer()
getFilePath(This) -> unicode:charlist()β gets selected filename path only (else empty string). This function doesn't count a directory as a selection.
This = wxGenericDirCtrl()
getFilter(This) -> unicode:charlist()β returns the filter string.
This = wxGenericDirCtrl()
getFilterIndex(This) -> integer()β returns the current filter index (zero-based).
This = wxGenericDirCtrl()
getRootId(This) -> integer()β returns the root id for the tree control.
This = wxGenericDirCtrl()
getTreeCtrl(This) -> wxTreeCtrl:wxTreeCtrl()β returns a pointer to the tree control.
This = wxGenericDirCtrl()
reCreateTree(This) -> okβ collapse and expand the tree, thus re-creating it from scratch. May be used to update the displayed directory content.
This = wxGenericDirCtrl()
setDefaultPath(This, Path) -> okβ sets the default path.
This = wxGenericDirCtrl()
Path = unicode:chardata()
setFilter(This, Filter) -> okβ sets the filter string.
This = wxGenericDirCtrl()
Filter = unicode:chardata()
setFilterIndex(This, N) -> okβ sets the current filter index (zero-based).
This = wxGenericDirCtrl()
N = integer()
setPath(This, Path) -> okβ sets the current path.
This = wxGenericDirCtrl()
Path = unicode:chardata()
π cute sign-off: shoutout to the wxWidgets team for this page, version wx 2.2.2.1 β and the footer date is literally MIA, so no date to report, bestie π
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms