X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e54c96f187f46c06bd36be8cd52b35c19884aa2b..3201a1046ba71ba8e5ef2ed694fde34d12f743f3:/interface/dirdlg.h diff --git a/interface/dirdlg.h b/interface/dirdlg.h index c5e55a3a12..4d21deac85 100644 --- a/interface/dirdlg.h +++ b/interface/dirdlg.h @@ -13,31 +13,33 @@ This class represents the directory chooser dialog. @beginStyleTable - @style{wxDD_DEFAULT_STYLE}: + @style{wxDD_DEFAULT_STYLE} Equivalent to a combination of wxDEFAULT_DIALOG_STYLE and wxRESIZE_BORDER (the last one is not used under wxWinCE). - @style{wxDD_DIR_MUST_EXIST}: + @style{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. - @style{wxDD_CHANGE_DIR}: + @style{wxDD_CHANGE_DIR} Change the current working directory to the directory chosen by the user. @endStyleTable + @note On Windows the new directory button is only available with recent + versions of the common dialogs. + @library{wxcore} @category{cmndlg} - @see @ref overview_wxdirdialogoverview "wxDirDialog overview", wxFileDialog + @see @ref overview_cmndlg_dir, wxFileDialog */ class wxDirDialog : public wxDialog { public: /** - Constructor. Use ShowModal() to show - the dialog. - + Constructor. Use ShowModal() to show the dialog. + @param parent Parent window. @param message @@ -87,8 +89,8 @@ public: void SetPath(const wxString& path); /** - Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL - otherwise. + Shows the dialog, returning wxID_OK if the user pressed OK, and + wxID_CANCEL otherwise. */ int ShowModal(); }; @@ -99,10 +101,14 @@ public: // Global functions/macros // ============================================================================ +/** @ingroup group_funcmacro_dialog */ +//@{ + /** - Pops up a directory selector dialog. The arguments have the same meaning as - those of wxDirDialog::wxDirDialog(). The message is displayed at the top, - and the default_path, if specified, is set as the initial selection. + Pops up a directory selector dialog. The arguments have the same meaning + as those of wxDirDialog::wxDirDialog(). The message is displayed at the + top, and the default_path, if specified, is set as the initial selection. + The application must check for an empty return value (if the user pressed Cancel). For example: @@ -110,9 +116,11 @@ public: const wxString& dir = wxDirSelector("Choose a folder"); if ( !dir.empty() ) { - ... + ... } @endcode + + @header{wx/dirdlg.h} */ wxString wxDirSelector(const wxString& message = wxDirSelectorPromptStr, const wxString& default_path = "", @@ -120,3 +128,5 @@ wxString wxDirSelector(const wxString& message = wxDirSelectorPromptStr, const wxPoint& pos = wxDefaultPosition, wxWindow* parent = NULL); +//@} +