X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec376c8fd9ff813392030426acd2317c6fa6527e..6bb29886cbf4057a9a50073eb948bc9aec904756:/docs/latex/wx/dirpicker.tex?ds=inline diff --git a/docs/latex/wx/dirpicker.tex b/docs/latex/wx/dirpicker.tex index 8c366d1918..02bf6c9c5b 100644 --- a/docs/latex/wx/dirpicker.tex +++ b/docs/latex/wx/dirpicker.tex @@ -28,11 +28,16 @@ It is only available if \texttt{wxUSE\_DIRPICKERCTRL} is set to $1$ (the default +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{Window styles} \twocolwidtha{5cm}% \begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxDIRP\_DEFAULT\_STYLE}}{Default style.} +\twocolitem{\windowstyle{wxDIRP\_DEFAULT\_STYLE}}{The default style: includes +wxDIRP\_DIR\_MUST\_EXIST and, under wxMSW only, wxDIRP\_USE\_TEXTCTRL.} \twocolitem{\windowstyle{wxDIRP\_USE\_TEXTCTRL}}{Creates a text control to the left of the picker button which is completely managed by the \helpref{wxDirPickerCtrl}{wxdirpickerctrl} and which can be used by the user to specify a path (see \helpref{SetPath}{wxdirpickerctrlsetpath}). @@ -45,9 +50,15 @@ The text control is automatically synchronized with button's value. Use function \wxheading{Event handling} +To process a directory picker event, use these event handler macros to direct input to member +functions that take a \helpref{wxFileDirPickerEvent}{wxfiledirpickerevent} argument. + \twocolwidtha{7cm}% \begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_DIRPICKER\_CHANGED(id, func)}}{The user changed the directory selected in the control either using the button or using text control (see wxDIRP_USE_TEXTCTRL; note that in this case the event is fired only if the user's input is valid, e.g. an existing directory path).} +\twocolitem{{\bf EVT\_DIRPICKER\_CHANGED(id, func)}}{The user changed the +directory selected in the control either using the button or using text control +(see wxDIRP\_USE\_TEXTCTRL; note that in this case the event is fired only if +the user's input is valid, e.g. an existing directory path).} \end{twocollist} \wxheading{See also} @@ -60,7 +71,7 @@ The text control is automatically synchronized with button's value. Use function \membersection{wxDirPickerCtrl::wxDirPickerCtrl}\label{wxdirpickerctrl} -\func{}{wxdirpickerctrl}{\param{wxWindow *}{parent},\rtfsp +\func{}{wxDirPickerCtrl}{\param{wxWindow *}{parent},\rtfsp \param{wxWindowID}{ id},\rtfsp \param{const wxString\& }{path = wxEmptyString},\rtfsp \param{const wxString\& }{message = ``Select a folder"},\rtfsp @@ -94,13 +105,13 @@ all the parameters. \docparam{path}{The initial directory shown in the control. Must be a valid path to a directory or the empty string.} -\docparam{message}{The message shown to the user in the \helpref{wxFileDialog}{wxfiledialog} shown by the control.} +\docparam{message}{The message shown to the user in the \helpref{wxDirDialog}{wxdirdialog} shown by the control.} \docparam{pos}{Initial position.} \docparam{size}{Initial size.} -\docparam{style}{The window style, see wxDIRP\_* flags.} +\docparam{style}{The window style, see {\tt wxDIRP\_*} flags.} \docparam{validator}{Validator which can be used for additional date checks.} @@ -110,18 +121,36 @@ all the parameters. \true if the control was successfully created or \false if creation failed. + +\membersection{wxFilePickerCtrl::GetDirName}\label{wxfilepickerctrlgetdirname} + +\constfunc{wxFileName}{GetDirName}{\void} + +Returns the absolute path of the currently selected directory as a \helpref{wxFileName}{wxfilename} object. +This function is equivalent to \helpref{GetPath}{wxdirpickerctrlgetpath} + \membersection{wxDirPickerCtrl::GetPath}\label{wxdirpickerctrlgetpath} \constfunc{wxString}{GetPath}{\void} -Returns the currently selected directory. +Returns the absolute path of the currently selected directory. + + +\membersection{wxFilePickerCtrl::SetDirName}\label{wxfilepickerctrlsetdirname} + +\func{void}{SetDirName}{\param{const wxFileName \&}{dirname}} + +Just like \helpref{SetPath}{wxdirpickerctrlsetpath} but this function takes a +\helpref{wxFileName}{wxfilename} object. \membersection{wxDirPickerCtrl::SetPath}\label{wxdirpickerctrlsetpath} \func{void}{SetPath}{\param{const wxString \&}{dirname}} -Sets the currently selected directory. This must be a valid directory. +Sets the absolute path of (the default converter uses current locale's +charset)the currently selected directory. This must be a valid directory if +{\tt wxDIRP\_DIR\_MUST\_EXIST} style was given.