1 \section{\class{wxDirDialog
}}\label{wxdirdialog
}
3 This class represents the directory chooser dialog.
5 \wxheading{Derived from
}
7 \helpref{wxDialog
}{wxdialog
}\\
8 \helpref{wxTopLevelWindow
}{wxtoplevelwindow
}\\
9 \helpref{wxWindow
}{wxwindow
}\\
10 \helpref{wxEvtHandler
}{wxevthandler
}\\
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Include files
}
19 \helpref{wxCore
}{librarieslist
}
21 \wxheading{Window styles
}
23 \begin{twocollist
}\itemsep=
0pt
24 \twocolitem{\windowstyle{wxDD
\_DEFAULT\_STYLE}}{Equivalent to a combination of wxDEFAULT
\_DIALOG\_STYLE and wxRESIZE
\_BORDER (the last one is not used under wxWinCE).
}
25 \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.
}
26 \twocolitem{\windowstyle{wxDD
\_CHANGE\_DIR}}{Change the current working directory to the directory chosen by the user.
}
29 {\bf NB:
} on Windows the new directory button is only available with recent versions of the common dialogs.
31 See also
\helpref{Generic window styles
}{windowstyles
}.
35 \helpref{wxDirDialog overview
}{wxdirdialogoverview
},
\helpref{wxFileDialog
}{wxfiledialog
}
37 \latexignore{\rtfignore{\wxheading{Members
}}}
39 \membersection{wxDirDialog::wxDirDialog
}\label{wxdirdialogctor
}
41 \func{}{wxDirDialog
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{message = "Choose a directory"
},
\rtfsp
42 \param{const wxString\&
}{defaultPath = ""
},
\param{long
}{style = wxDD
\_DEFAULT\_STYLE},
\rtfsp
43 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
44 \param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
45 \param{const wxString\&
}{name = "wxDirCtrl"
}}
47 Constructor. Use
\helpref{wxDirDialog::ShowModal
}{wxdirdialogshowmodal
} to show
50 \wxheading{Parameters
}
52 \docparam{parent
}{Parent window.
}
54 \docparam{message
}{Message to show on the dialog.
}
56 \docparam{defaultPath
}{The default path, or the empty string.
}
58 \docparam{style
}{The dialog style. See
\helpref{wxDirDialog
}{wxdirdialog
}}
60 \docparam{pos
}{Dialog position. Ignored under Windows.
}
62 \docparam{size
}{Dialog size. Ignored under Windows.
}
64 \docparam{name
}{The dialog name, not used.
}
66 \membersection{wxDirDialog::
\destruct{wxDirDialog
}}\label{wxdirdialogdtor
}
68 \func{}{\destruct{wxDirDialog
}}{\void}
72 \membersection{wxDirDialog::GetPath
}\label{wxdirdialoggetpath
}
74 \constfunc{wxString
}{GetPath
}{\void}
76 Returns the default or user-selected path.
78 \membersection{wxDirDialog::GetMessage
}\label{wxdirdialoggetmessage
}
80 \constfunc{wxString
}{GetMessage
}{\void}
82 Returns the message that will be displayed on the dialog.
84 \membersection{wxDirDialog::SetMessage
}\label{wxdirdialogsetmessage
}
86 \func{void
}{SetMessage
}{\param{const wxString\&
}{message
}}
88 Sets the message that will be displayed on the dialog.
90 \membersection{wxDirDialog::SetPath
}\label{wxdirdialogsetpath
}
92 \func{void
}{SetPath
}{\param{const wxString\&
}{path
}}
94 Sets the default path.
96 \membersection{wxDirDialog::ShowModal
}\label{wxdirdialogshowmodal
}
98 \func{int
}{ShowModal
}{\void}
100 Shows the dialog, returning wxID
\_OK if the user pressed OK, and wxID
\_CANCEL