]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxDirDialog}}\label{wxdirdialog} |
2 | ||
3 | This class represents the directory chooser dialog. | |
4 | ||
5 | \wxheading{Derived from} | |
6 | ||
7 | \helpref{wxDialog}{wxdialog}\\ | |
8 | \helpref{wxWindow}{wxwindow}\\ | |
9 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
10 | \helpref{wxObject}{wxobject} | |
11 | ||
954b8ae6 JS |
12 | \wxheading{Include files} |
13 | ||
14 | <wx/dirdlg.h> | |
dabd1377 JS |
15 | |
16 | \wxheading{Window styles} | |
17 | ||
141d782d | 18 | \begin{twocollist}\itemsep=0pt |
ff3e84ff | 19 | \twocolitem{\windowstyle{wxDD\_DEFAULT\_STYLE}}{Equivalent to a combination of wxDEFAULT\_DIALOG\_STYLE and wxRESIZE\_BORDER (the last one is not used under wxWinCE).} |
6bd719f1 | 20 | \twocolitem{\windowstyle{wxDD\_DIR\_MUST\_EXIST}}{The dialog will allow the user to choose only an existing folder. When this style is not given, a "Create new directory" button is added to the dialog (on Windows) or some other way is provided to the user to type the name of a new folder.} |
141d782d | 21 | \twocolitem{\windowstyle{wxDD\_CHANGE\_DIR}}{Change the current working directory to the directory chosen by the user.} |
dabd1377 JS |
22 | \end{twocollist} |
23 | ||
ff3e84ff VZ |
24 | {\bf NB:} on Windows the new directory button is only available with recent versions of the common dialogs. |
25 | ||
dabd1377 | 26 | See also \helpref{Generic window styles}{windowstyles}. |
954b8ae6 | 27 | |
a660d684 KB |
28 | \wxheading{See also} |
29 | ||
30 | \helpref{wxDirDialog overview}{wxdirdialogoverview}, \helpref{wxFileDialog}{wxfiledialog} | |
31 | ||
32 | \latexignore{\rtfignore{\wxheading{Members}}} | |
33 | ||
6d06e061 | 34 | \membersection{wxDirDialog::wxDirDialog}\label{wxdirdialogctor} |
a660d684 KB |
35 | |
36 | \func{}{wxDirDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message = "Choose a directory"},\rtfsp | |
4bbc4bde | 37 | \param{const wxString\& }{defaultPath = ""}, \param{long }{style = wxDD\_DEFAULT\_STYLE},\rtfsp |
a079e645 VZ |
38 | \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp |
39 | \param{const wxSize\& }{size = wxDefaultSize},\rtfsp | |
40 | \param{const wxString\& }{name = "wxDirCtrl"}} | |
a660d684 | 41 | |
a079e645 VZ |
42 | Constructor. Use \helpref{wxDirDialog::ShowModal}{wxdirdialogshowmodal} to show |
43 | the dialog. | |
a660d684 KB |
44 | |
45 | \wxheading{Parameters} | |
46 | ||
47 | \docparam{parent}{Parent window.} | |
48 | ||
49 | \docparam{message}{Message to show on the dialog.} | |
50 | ||
51 | \docparam{defaultPath}{The default path, or the empty string.} | |
52 | ||
4bbc4bde | 53 | \docparam{style}{The dialog style. See \helpref{wxDirDialog}{wxdirdialog}} |
a660d684 | 54 | |
a079e645 VZ |
55 | \docparam{pos}{Dialog position. Ignored under Windows.} |
56 | ||
57 | \docparam{size}{Dialog size. Ignored under Windows.} | |
58 | ||
59 | \docparam{name}{The dialog name, not used.} | |
a660d684 | 60 | |
a203f6c0 | 61 | \membersection{wxDirDialog::\destruct{wxDirDialog}}\label{wxdirdialogdtor} |
a660d684 KB |
62 | |
63 | \func{}{\destruct{wxDirDialog}}{\void} | |
64 | ||
65 | Destructor. | |
66 | ||
67 | \membersection{wxDirDialog::GetPath}\label{wxdirdialoggetpath} | |
68 | ||
69 | \constfunc{wxString}{GetPath}{\void} | |
70 | ||
71 | Returns the default or user-selected path. | |
72 | ||
73 | \membersection{wxDirDialog::GetMessage}\label{wxdirdialoggetmessage} | |
74 | ||
75 | \constfunc{wxString}{GetMessage}{\void} | |
76 | ||
77 | Returns the message that will be displayed on the dialog. | |
78 | ||
a660d684 KB |
79 | \membersection{wxDirDialog::SetMessage}\label{wxdirdialogsetmessage} |
80 | ||
81 | \func{void}{SetMessage}{\param{const wxString\& }{message}} | |
82 | ||
83 | Sets the message that will be displayed on the dialog. | |
84 | ||
85 | \membersection{wxDirDialog::SetPath}\label{wxdirdialogsetpath} | |
86 | ||
87 | \func{void}{SetPath}{\param{const wxString\& }{path}} | |
88 | ||
89 | Sets the default path. | |
90 | ||
a660d684 KB |
91 | \membersection{wxDirDialog::ShowModal}\label{wxdirdialogshowmodal} |
92 | ||
93 | \func{int}{ShowModal}{\void} | |
94 | ||
3134f933 | 95 | Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL |
a660d684 KB |
96 | otherwise. |
97 | ||
98 |