Use symbolic names for them and document them separately.
Closes #14051.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70791
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+/**
+ Default width of the choice dialog.
+*/
+#define wxCHOICE_WIDTH 150
+
+/**
+ Default height of the choice dialog.
+*/
+#define wxCHOICE_HEIGHT 200
+
+/**
+ Default style of the choice dialog.
+
+ @remarks wxRESIZE_BORDER is not used under WinCE.
+*/
+#define wxCHOICEDLG_STYLE (wxDEFAULT_DIALOG_STYLE | wxOK | wxCANCEL | wxCENTRE | wxRESIZE_BORDER)
+
+
/**
@class wxMultiChoiceDialog
/**
@class wxMultiChoiceDialog
const wxString& caption,
const wxArrayString& aChoices,
wxWindow* parent = NULL,
const wxString& caption,
const wxArrayString& aChoices,
wxWindow* parent = NULL,
- int x = -1,
- int y = -1,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
- int width = 150,
- int height = 200,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT,
int initialSelection = 0);
int wxGetSingleChoiceIndex(const wxString& message,
int initialSelection = 0);
int wxGetSingleChoiceIndex(const wxString& message,
int n,
const wxString& choices[],
wxWindow* parent = NULL,
int n,
const wxString& choices[],
wxWindow* parent = NULL,
- int x = -1,
- int y = -1,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
- int width = 150,
- int height = 200,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT,
int initialSelection = 0);
int initialSelection = 0);
const wxString& caption,
const wxArrayString& aChoices,
wxWindow* parent = NULL,
const wxString& caption,
const wxArrayString& aChoices,
wxWindow* parent = NULL,
- int x = -1,
- int y = -1,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
- int width = 150,
- int height = 200
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT,
int initialSelection = 0);
wxString wxGetSingleChoice(const wxString& message,
const wxString& caption,
int n,
const wxString& choices[],
wxWindow* parent = NULL,
int initialSelection = 0);
wxString wxGetSingleChoice(const wxString& message,
const wxString& caption,
int n,
const wxString& choices[],
wxWindow* parent = NULL,
- int x = -1,
- int y = -1,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
- int width = 150,
- int height = 200
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT,
int initialSelection = 0);
int initialSelection = 0);
const wxArrayString& aChoices,
const wxString& client_data[],
wxWindow* parent = NULL,
const wxArrayString& aChoices,
const wxString& client_data[],
wxWindow* parent = NULL,
- int x = -1,
- int y = -1,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
- int width = 150,
- int height = 200
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT,
int initialSelection = 0);
wxString wxGetSingleChoiceData(const wxString& message,
int initialSelection = 0);
wxString wxGetSingleChoiceData(const wxString& message,
const wxString& choices[],
const wxString& client_data[],
wxWindow* parent = NULL,
const wxString& choices[],
const wxString& client_data[],
wxWindow* parent = NULL,
- int x = -1,
- int y = -1,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
- int width = 150,
- int height = 200
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT,
int initialSelection = 0);
void* wxGetSingleChoiceData(const wxString& message,
int initialSelection = 0);
void* wxGetSingleChoiceData(const wxString& message,
const wxString& caption,
const wxArrayString& aChoices,
wxWindow* parent = NULL,
const wxString& caption,
const wxArrayString& aChoices,
wxWindow* parent = NULL,
- int x = -1,
- int y = -1,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
- int width = 150,
- int height = 200);
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
int wxGetSelectedChoices(wxArrayInt& selections,
const wxString& message,
int wxGetSelectedChoices(wxArrayInt& selections,
const wxString& message,
int n,
const wxString& choices[],
wxWindow* parent = NULL,
int n,
const wxString& choices[],
wxWindow* parent = NULL,
- int x = -1,
- int y = -1,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
- int width = 150,
- int height = 200);
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
#define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
#define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
+/**
+ Initial folder for generic directory dialog.
+*/
+const char wxDirDialogDefaultFolderStr[] = "/";
+
+/**
+ Default message for directory selector dialog.
+*/
+const char wxDirSelectorPromptStr[] = "Select a directory";
+
+/**
+ Default name for directory selector dialog.
+*/
+const char wxDirDialogNameStr[] = "wxDirCtrl";
+
#define wxFD_DEFAULT_STYLE wxFD_OPEN
#define wxFD_DEFAULT_STYLE wxFD_OPEN
+/**
+ Default wildcard string used in wxFileDialog corresponding to all files.
+
+ It is defined as "*.*" under MSW and OS/2 and "*" everywhere else.
+*/
+const char wxFileSelectorDefaultWildcardStr[];
+
const wxString& default_path = wxEmptyString,
const wxString& default_filename = wxEmptyString,
const wxString& default_extension = wxEmptyString,
const wxString& default_path = wxEmptyString,
const wxString& default_filename = wxEmptyString,
const wxString& default_extension = wxEmptyString,
- const wxString& wildcard = ".",
+ const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
int flags = 0,
wxWindow* parent = NULL,
int flags = 0,
wxWindow* parent = NULL,
- int x = -1,
- int y = -1);
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord);
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+/**
+ Default message box caption string.
+*/
+const char wxMessageBoxCaptionStr[] = "Message";
+
+
/**
@class wxMessageDialog
/**
@class wxMessageDialog
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+/**
+ Default text dialog style.
+*/
+#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE | wxWS_EX_VALIDATE_RECURSIVELY)
+
+/// Default text dialog caption.
+const char wxGetTextFromUserPromptStr[] = "Input Text";
+
+/// Default password dialog caption.
+const char wxGetPasswordFromUserPromptStr[] = "Enter Password";
+
+
/**
@class wxPasswordEntryDialog
/**
@class wxPasswordEntryDialog
wxPasswordEntryDialog(wxWindow* parent, const wxString& message,
const wxString& caption = wxGetPasswordFromUserPromptStr,
const wxString& defaultValue = wxEmptyString,
wxPasswordEntryDialog(wxWindow* parent, const wxString& message,
const wxString& caption = wxGetPasswordFromUserPromptStr,
const wxString& defaultValue = wxEmptyString,
- long style = wxOK | wxCANCEL | wxCENTRE,
+ long style = wxTextEntryDialogStyle,
const wxPoint& pos = wxDefaultPosition);
};
const wxPoint& pos = wxDefaultPosition);
};
wxTextEntryDialog(wxWindow* parent, const wxString& message,
const wxString& caption = wxGetTextFromUserPromptStr,
const wxString& value = wxEmptyString,
wxTextEntryDialog(wxWindow* parent, const wxString& message,
const wxString& caption = wxGetTextFromUserPromptStr,
const wxString& value = wxEmptyString,
- long style = wxOK | wxCANCEL | wxCENTRE,
+ long style = wxTextEntryDialogStyle,
const wxPoint& pos = wxDefaultPosition);
/**
const wxPoint& pos = wxDefaultPosition);
/**
@header{wx/textdlg.h}
*/
wxString wxGetTextFromUser(const wxString& message,
@header{wx/textdlg.h}
*/
wxString wxGetTextFromUser(const wxString& message,
- const wxString& caption = "Input text",
+ const wxString& caption = wxGetTextFromUserPromptStr,
const wxString& default_value = wxEmptyString,
wxWindow* parent = NULL,
int x = wxDefaultCoord,
const wxString& default_value = wxEmptyString,
wxWindow* parent = NULL,
int x = wxDefaultCoord,
@header{wx/textdlg.h}
*/
wxString wxGetPasswordFromUser(const wxString& message,
@header{wx/textdlg.h}
*/
wxString wxGetPasswordFromUser(const wxString& message,
- const wxString& caption = "Input text",
+ const wxString& caption = wxGetPasswordFromUserPromptStr,
const wxString& default_value = wxEmptyString,
wxWindow* parent = NULL,
int x = wxDefaultCoord,
const wxString& default_value = wxEmptyString,
wxWindow* parent = NULL,
int x = wxDefaultCoord,
+/// Default wxStringTokenizer delimiters are the usual white space characters.
+#define wxDEFAULT_DELIMITERS " \t\r\n"
+
/**
@class wxStringTokenizer
/**
@class wxStringTokenizer
@see SetString()
*/
wxStringTokenizer(const wxString& str,
@see SetString()
*/
wxStringTokenizer(const wxString& str,
- const wxString& delims = " \t\r\n",
+ const wxString& delims = wxDEFAULT_DELIMITERS,
wxStringTokenizerMode mode = wxTOKEN_DEFAULT);
/**
wxStringTokenizerMode mode = wxTOKEN_DEFAULT);
/**
containing delimiters, and the @a mode specifying how the string
should be tokenized.
*/
containing delimiters, and the @a mode specifying how the string
should be tokenized.
*/
- void SetString(const wxString& to_tokenize,
- const wxString& delims = " \t\r\n",
+ void SetString(const wxString& str,
+ const wxString& delims = wxDEFAULT_DELIMITERS,
wxStringTokenizerMode mode = wxTOKEN_DEFAULT);
};
wxStringTokenizerMode mode = wxTOKEN_DEFAULT);
};
wxStringTokenize(const wxString& str,
const wxString& delims = wxDEFAULT_DELIMITERS,
wxStringTokenizerMode mode = wxTOKEN_DEFAULT);
wxStringTokenize(const wxString& str,
const wxString& delims = wxDEFAULT_DELIMITERS,
wxStringTokenizerMode mode = wxTOKEN_DEFAULT);