Version: 2.9.4
Public Member Functions
wxDirDialog Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/dirdlg.h>

Inheritance diagram for wxDirDialog:

Detailed Description

This class represents the directory chooser dialog.

Styles

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.

Library:  wxCore
Category:  Common Dialogs
参照:
wxDirDialog Overview, wxFileDialog

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.

List of all members.


Constructor & Destructor Documentation

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.

Parameters:
parentParent window.
messageMessage to show on the dialog.
defaultPathThe default path, or the empty string.
styleThe dialog style. See wxDirDialog
posDialog position. Ignored under Windows.
sizeDialog size. Ignored under Windows.
nameThe dialog name, not used.
virtual wxDirDialog::~wxDirDialog ( ) [virtual]

Destructor.


Member Function Documentation

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.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines