]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/dirctrl.tex
added support for binary data to wxConfig (slightly modified patch 1736788)
[wxWidgets.git] / docs / latex / wx / dirctrl.tex
CommitLineData
2f3ebe4c
JS
1\section{\class{wxGenericDirCtrl}}\label{wxgenericdirctrl}
2
3This control can be used to place a directory listing (with optional files) on an arbitrary window.
4
5The control contains a \helpref{wxTreeCtrl}{wxtreectrl} window representing the directory
6hierarchy, and optionally, a \helpref{wxChoice}{wxchoice} window containing a list of filters.
7
8\wxheading{Derived from}
9
10\helpref{wxControl}{wxcontrol}\\
11\helpref{wxWindow}{wxwindow}\\
12\helpref{wxEvtHandler}{wxevthandler}\\
13\helpref{wxObject}{wxobject}
14
15\wxheading{Include files}
16
17<wx/dirctrl.h>
18
19\wxheading{Window styles}
20
d2c2afc9 21\twocolwidtha{7cm}
2f3ebe4c 22\begin{twocollist}
76ff52f7
GT
23\twocolitem{\indexit{wxDIRCTRL\_DIR\_ONLY}}{Only show directories, and not files.}
24\twocolitem{\indexit{wxDIRCTRL\_3D\_INTERNAL}}{Use 3D borders for internal controls.}
25\twocolitem{\indexit{wxDIRCTRL\_SELECT\_FIRST}}{When setting the default path, select the first file in the directory.}
dabd1377 26\twocolitem{\indexit{wxDIRCTRL\_EDIT\_LABELS}}{Allow the folder and file labels to be editable.}
2f3ebe4c
JS
27\end{twocollist}
28
29See also \helpref{Generic window styles}{windowstyles}.
30
31\wxheading{Data structures}
32
33\latexignore{\rtfignore{\wxheading{Members}}}
34
35\membersection{wxGenericDirCtrl::wxGenericDirCtrl}\label{wxgenericdirctrlwxgenericdirctrl}
36
37\func{}{wxGenericDirCtrl}{\void}
38
39Default constructor.
40
41\func{}{wxGenericDirCtrl}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id = -1},
42 \param{const wxString\& }{dir = wxDirDialogDefaultFolderStr}, \param{const wxPoint\& }{pos = wxDefaultPosition},
43 \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxDIRCTRL\_3D\_INTERNAL|wxSUNKEN\_BORDER},
44 \param{const wxString\& }{filter = wxEmptyString},
45 \param{int }{defaultFilter = 0},
46 \param{const wxString\& }{name = wxTreeCtrlNameStr}}
47
48Main constructor.
49
50\wxheading{Parameters}
51
52\docparam{parent}{Parent window.}
53
54\docparam{id}{Window identifier.}
55
56\docparam{dir}{Initial folder.}
57
58\docparam{pos}{Position.}
59
60\docparam{size}{Size.}
61
deea56b1 62\docparam{style}{Window style. Please see \helpref{wxGenericDirCtrl}{wxgenericdirctrl} for a list of possible styles.}
2f3ebe4c
JS
63
64\docparam{filter}{A filter string, using the same syntax as that for \helpref{wxFileDialog}{wxfiledialog}. This may be empty if filters
65are not being used.
66
67Example: ``All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg"}
68
69\docparam{defaultFilter}{The zero-indexed default filter setting.}
70
71\docparam{name}{The window name.}
72
73\membersection{wxGenericDirCtrl::\destruct{wxGenericDirCtrl}}\label{wxgenericdirctrldtor}
74
75\func{}{\destruct{wxGenericDirCtrl}}{\void}
76
77Destructor.
78
79\membersection{wxGenericDirCtrl::Create}\label{wxgenericdirctrlcreate}
80
81\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id = -1}, \param{const wxString\& }{dir = wxDirDialogDefaultFolderStr}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxDIRCTRL\_3D\_INTERNAL|wxSUNKEN\_BORDER}, \param{const wxString\& }{filter = wxEmptyString}, \param{int }{defaultFilter = 0}, \param{const wxString\& }{name = wxTreeCtrlNameStr}}
82
83Create function for two-step construction. See \helpref{wxGenericDirCtrl::wxGenericDirCtrl}{wxgenericdirctrlwxgenericdirctrl} for details.
84
85\membersection{wxGenericDirCtrl::Init}\label{wxgenericdirctrlinit}
86
87\func{void}{Init}{\void}
88
89Initializes variables.
90
c06dde42
JS
91\membersection{wxGenericDirCtrl::CollapseTree}\label{wxgenericdirctrlcollapsetree}
92
93\func{void}{CollapseTree}{\void}
94
95Collapses the entire tree.
96
2f3ebe4c
JS
97\membersection{wxGenericDirCtrl::ExpandPath}\label{wxgenericdirctrlexpandpath}
98
99\func{bool}{ExpandPath}{\param{const wxString\& }{path}}
100
101Tries to expand as much of the given path as possible, so that the filename or directory is visible in the tree control.
102
f395a825
VZ
103\membersection{wxGenericDirCtrl::CollapsePath}\label{wxgenericdirctrlcollapsepath}
104
105\func{bool}{CollapsePath}{\param{const wxString\& }{path}}
106
107Collapse the given path.
108
2f3ebe4c
JS
109\membersection{wxGenericDirCtrl::GetDefaultPath}\label{wxgenericdirctrlgetdefaultpath}
110
111\constfunc{wxString}{GetDefaultPath}{\void}
112
113Gets the default path.
114
115\membersection{wxGenericDirCtrl::GetPath}\label{wxgenericdirctrlgetpath}
116
117\constfunc{wxString}{GetPath}{\void}
118
119Gets the currently-selected directory or filename.
120
121\membersection{wxGenericDirCtrl::GetFilePath}\label{wxgenericdirctrlgetfilepath}
122
123\constfunc{wxString}{GetFilePath}{\void}
124
125Gets selected filename path only (else empty string).
126
2edb0bde 127This function doesn't count a directory as a selection.
2f3ebe4c
JS
128
129\membersection{wxGenericDirCtrl::GetFilter}\label{wxgenericdirctrlgetfilter}
130
131\constfunc{wxString}{GetFilter}{\void}
132
133Returns the filter string.
134
135\membersection{wxGenericDirCtrl::GetFilterIndex}\label{wxgenericdirctrlgetfilterindex}
136
137\constfunc{int}{GetFilterIndex}{\void}
138
139Returns the current filter index (zero-based).
140
141\membersection{wxGenericDirCtrl::GetFilterListCtrl}\label{wxgenericdirctrlgetfilterlistctrl}
142
143\constfunc{wxDirFilterListCtrl*}{GetFilterListCtrl}{\void}
144
145Returns a pointer to the filter list control (if present).
146
147\membersection{wxGenericDirCtrl::GetRootId}\label{wxgenericdirctrlgetrootid}
148
149\func{wxTreeItemId}{GetRootId}{\void}
150
151Returns the root id for the tree control.
152
153\membersection{wxGenericDirCtrl::GetTreeCtrl}\label{wxgenericdirctrlgettreectrl}
154
155\constfunc{wxTreeCtrl*}{GetTreeCtrl}{\void}
156
157Returns a pointer to the tree control.
158
c06dde42
JS
159\membersection{wxGenericDirCtrl::ReCreateTree}\label{wxgenericdirctrlrecreatetree}
160
161\func{void}{ReCreateTree}{\void}
162
163Collapse and expand the tree, thus re-creating it from scratch.
164May be used to update the displayed directory content.
165
2f3ebe4c
JS
166\membersection{wxGenericDirCtrl::SetDefaultPath}\label{wxgenericdirctrlsetdefaultpath}
167
168\func{void}{SetDefaultPath}{\param{const wxString\& }{path}}
169
170Sets the default path.
171
172\membersection{wxGenericDirCtrl::SetFilter}\label{wxgenericdirctrlsetfilter}
173
174\func{void}{SetFilter}{\param{const wxString\& }{filter}}
175
176Sets the filter string.
177
178\membersection{wxGenericDirCtrl::SetFilterIndex}\label{wxgenericdirctrlsetfilterindex}
179
180\func{void}{SetFilterIndex}{\param{int }{n}}
181
182Sets the current filter index (zero-based).
183
184\membersection{wxGenericDirCtrl::SetPath}\label{wxgenericdirctrlsetpath}
185
186\func{void}{SetPath}{\param{const wxString\& }{path}}
187
188Sets the current path.
189
338b2a02
VZ
190\membersection{wxGenericDirCtrl::ShowHidden}\label{wxgenericdirctrlShowHidden}
191
192\func{void}{ShowHidden}{\param{bool }{show}}
193
194\wxheading{Parameters}
195
196\docparam{show}{If true, hidden folders and files will be displayed by the
197control. If false, they will not be displayed.}
198