Version: 3.0.5
Loading...
Searching...
No Matches
dirdlg.h File Reference

Classes

class  wxDirDialog
 This class represents the directory chooser dialog. More...
 

Macros

#define wxDD_CHANGE_DIR   0x0100
 
#define wxDD_DIR_MUST_EXIST   0x0200
 
#define wxDD_NEW_DIR_BUTTON   0
 
#define wxDD_DEFAULT_STYLE   (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
 

Functions

wxString wxDirSelector (const wxString &message=wxDirSelectorPromptStr, const wxString &default_path=wxEmptyString, long style=0, const wxPoint &pos=wxDefaultPosition, wxWindow *parent=NULL)
 Pops up a directory selector dialog.
 

Variables

const char wxDirDialogDefaultFolderStr [] = "/"
 Initial folder for generic directory dialog.
 
const char wxDirSelectorPromptStr [] = "Select a directory"
 Default message for directory selector dialog.
 
const char wxDirDialogNameStr [] = "wxDirCtrl"
 Default name for directory selector dialog.
 

Macro Definition Documentation

◆ wxDD_CHANGE_DIR

#define wxDD_CHANGE_DIR   0x0100

◆ wxDD_DEFAULT_STYLE

#define wxDD_DEFAULT_STYLE   (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)

◆ wxDD_DIR_MUST_EXIST

#define wxDD_DIR_MUST_EXIST   0x0200

◆ wxDD_NEW_DIR_BUTTON

#define wxDD_NEW_DIR_BUTTON   0

Function Documentation

◆ wxDirSelector()

wxString wxDirSelector ( const wxString message = wxDirSelectorPromptStr,
const wxString default_path = wxEmptyString,
long  style = 0,
const wxPoint pos = wxDefaultPosition,
wxWindow parent = NULL 
)

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:

const wxString& dir = wxDirSelector("Choose a folder");
if ( !dir.empty() )
{
...
}
String class for passing textual data to or receiving it from wxWidgets.
Definition string.h:314
bool empty() const
An 'invalid' value for string index.
wxString wxDirSelector(const wxString &message=wxDirSelectorPromptStr, const wxString &default_path=wxEmptyString, long style=0, const wxPoint &pos=wxDefaultPosition, wxWindow *parent=NULL)
Pops up a directory selector dialog.

Include file:

#include <wx/dirdlg.h> 

Variable Documentation

◆ wxDirDialogDefaultFolderStr

const char wxDirDialogDefaultFolderStr[] = "/"

Initial folder for generic directory dialog.

◆ wxDirDialogNameStr

const char wxDirDialogNameStr[] = "wxDirCtrl"

Default name for directory selector dialog.

◆ wxDirSelectorPromptStr

const char wxDirSelectorPromptStr[] = "Select a directory"

Default message for directory selector dialog.