#include </home/zeitlin/src/wx/github/interface/wx/dirdlg.h>
This class represents the directory chooser dialog.
This class supports the following styles:
Notice that wxRESIZE_BORDER
has special side effect under recent (i.e. later than Win9x) Windows where two different directory selection dialogs are available and this style also implicitly selects the new version as the old one always has fixed size. As the new version is almost always preferable, it is recommended that wxRESIZE_BORDER
style be always used. This is the case if the dialog is created with the default style value but if you need to use any additional styles you should still specify wxDD_DEFAULT_STYLE
unless you explicitly need to use the old dialog version under Windows. E.g. do
wxDirDialog dlg(NULL, "Choose input directory", "", wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
instead of just using wxDD_DIR_MUST_EXIST
style alone.
Public Member Functions | |
wxDirDialog (wxWindow *parent, const wxString &message=wxDirSelectorPromptStr, const wxString &defaultPath=wxEmptyString, long style=wxDD_DEFAULT_STYLE, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, const wxString &name=wxDirDialogNameStr) | |
Constructor. | |
virtual | ~wxDirDialog () |
Destructor. | |
virtual wxString | GetMessage () const |
Returns the message that will be displayed on the dialog. | |
virtual wxString | GetPath () const |
Returns the default or user-selected path. | |
virtual void | SetMessage (const wxString &message) |
Sets the message that will be displayed on the dialog. | |
virtual void | SetPath (const wxString &path) |
Sets the default path. | |
int | ShowModal () |
Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL otherwise. |
wxDirDialog::wxDirDialog | ( | wxWindow * | parent, |
const wxString & | message = wxDirSelectorPromptStr , |
||
const wxString & | defaultPath = wxEmptyString , |
||
long | style = wxDD_DEFAULT_STYLE , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
const wxString & | name = wxDirDialogNameStr |
||
) |
Constructor.
Use ShowModal() to show the dialog.
parent | Parent window. |
message | Message to show on the dialog. |
defaultPath | The default path, or the empty string. |
style | The dialog style. See wxDirDialog |
pos | Dialog position. Ignored under Windows. |
size | Dialog size. Ignored under Windows. |
name | The dialog name, not used. |
virtual wxDirDialog::~wxDirDialog | ( | ) | [virtual] |
Destructor.
virtual wxString wxDirDialog::GetMessage | ( | ) | const [virtual] |
Returns the message that will be displayed on the dialog.
virtual wxString wxDirDialog::GetPath | ( | ) | const [virtual] |
Returns the default or user-selected path.
virtual void wxDirDialog::SetMessage | ( | const wxString & | message | ) | [virtual] |
Sets the message that will be displayed on the dialog.
virtual void wxDirDialog::SetPath | ( | const wxString & | path | ) | [virtual] |
Sets the default path.
int wxDirDialog::ShowModal | ( | ) | [virtual] |
Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL otherwise.
Reimplemented from wxDialog.