1wxGenericDirCtrl(3) Erlang Module Definition wxGenericDirCtrl(3)
2
3
4
6 wxGenericDirCtrl - Functions for wxGenericDirCtrl class
7
9 This control can be used to place a directory listing (with optional
10 files) on an arbitrary window.
11
12 The control contains a wxTreeCtrl window representing the directory hi‐
13 erarchy, and optionally, a wxChoice window containing a list of fil‐
14 ters.
15
16 Styles
17
18 This class supports the following styles:
19
20 This class is derived (and can use functions) from: wxControl wxWindow
21 wxEvtHandler
22
23 wxWidgets docs: wxGenericDirCtrl
24
26 Event types emitted from this class: dirctrl_selectionchanged, dirc‐
27 trl_fileactivated
28
30 wxGenericDirCtrl() = wx:wx_object()
31
33 new() -> wxGenericDirCtrl()
34
35 Default constructor.
36
37 new(Parent) -> wxGenericDirCtrl()
38
39 Types:
40
41 Parent = wxWindow:wxWindow()
42
43 new(Parent, Options :: [Option]) -> wxGenericDirCtrl()
44
45 Types:
46
47 Parent = wxWindow:wxWindow()
48 Option =
49 {id, integer()} |
50 {dir, unicode:chardata()} |
51 {pos, {X :: integer(), Y :: integer()}} |
52 {size, {W :: integer(), H :: integer()}} |
53 {style, integer()} |
54 {filter, unicode:chardata()} |
55 {defaultFilter, integer()}
56
57 Main constructor.
58
59 destroy(This :: wxGenericDirCtrl()) -> ok
60
61 Destructor.
62
63 create(This, Parent) -> boolean()
64
65 Types:
66
67 This = wxGenericDirCtrl()
68 Parent = wxWindow:wxWindow()
69
70 create(This, Parent, Options :: [Option]) -> boolean()
71
72 Types:
73
74 This = wxGenericDirCtrl()
75 Parent = wxWindow:wxWindow()
76 Option =
77 {id, integer()} |
78 {dir, unicode:chardata()} |
79 {pos, {X :: integer(), Y :: integer()}} |
80 {size, {W :: integer(), H :: integer()}} |
81 {style, integer()} |
82 {filter, unicode:chardata()} |
83 {defaultFilter, integer()}
84
85 Create function for two-step construction.
86
87 See new/2 for details.
88
89 init(This) -> ok
90
91 Types:
92
93 This = wxGenericDirCtrl()
94
95 Initializes variables.
96
97 collapseTree(This) -> ok
98
99 Types:
100
101 This = wxGenericDirCtrl()
102
103 Collapses the entire tree.
104
105 expandPath(This, Path) -> boolean()
106
107 Types:
108
109 This = wxGenericDirCtrl()
110 Path = unicode:chardata()
111
112 Tries to expand as much of the given path as possible, so that
113 the filename or directory is visible in the tree control.
114
115 getDefaultPath(This) -> unicode:charlist()
116
117 Types:
118
119 This = wxGenericDirCtrl()
120
121 Gets the default path.
122
123 getPath(This) -> unicode:charlist()
124
125 Types:
126
127 This = wxGenericDirCtrl()
128
129 Gets the currently-selected directory or filename.
130
131 getPath(This, ItemId) -> unicode:charlist()
132
133 Types:
134
135 This = wxGenericDirCtrl()
136 ItemId = integer()
137
138 Gets the path corresponding to the given tree control item.
139
140 Since: 2.9.5
141
142 getFilePath(This) -> unicode:charlist()
143
144 Types:
145
146 This = wxGenericDirCtrl()
147
148 Gets selected filename path only (else empty string).
149
150 This function doesn't count a directory as a selection.
151
152 getFilter(This) -> unicode:charlist()
153
154 Types:
155
156 This = wxGenericDirCtrl()
157
158 Returns the filter string.
159
160 getFilterIndex(This) -> integer()
161
162 Types:
163
164 This = wxGenericDirCtrl()
165
166 Returns the current filter index (zero-based).
167
168 getRootId(This) -> integer()
169
170 Types:
171
172 This = wxGenericDirCtrl()
173
174 Returns the root id for the tree control.
175
176 getTreeCtrl(This) -> wxTreeCtrl:wxTreeCtrl()
177
178 Types:
179
180 This = wxGenericDirCtrl()
181
182 Returns a pointer to the tree control.
183
184 reCreateTree(This) -> ok
185
186 Types:
187
188 This = wxGenericDirCtrl()
189
190 Collapse and expand the tree, thus re-creating it from scratch.
191
192 May be used to update the displayed directory content.
193
194 setDefaultPath(This, Path) -> ok
195
196 Types:
197
198 This = wxGenericDirCtrl()
199 Path = unicode:chardata()
200
201 Sets the default path.
202
203 setFilter(This, Filter) -> ok
204
205 Types:
206
207 This = wxGenericDirCtrl()
208 Filter = unicode:chardata()
209
210 Sets the filter string.
211
212 setFilterIndex(This, N) -> ok
213
214 Types:
215
216 This = wxGenericDirCtrl()
217 N = integer()
218
219 Sets the current filter index (zero-based).
220
221 setPath(This, Path) -> ok
222
223 Types:
224
225 This = wxGenericDirCtrl()
226 Path = unicode:chardata()
227
228 Sets the current path.
229
230
231
232wxWidgets team. wx 2.2.2 wxGenericDirCtrl(3)