// Purpose: interface of wxPasswordEntryDialog
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// 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
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);
};
@param message
Message to show on the dialog.
@param caption
- The caption of the the dialog.
+ The caption of the dialog.
@param value
The default value, which may be the empty string.
@param style
A dialog style, specifying the buttons (wxOK, wxCANCEL)
and an optional wxCENTRE style. Additionally, wxTextCtrl styles
- (such as wxTE_PASSWORD) may be specified here.
+ (such as @c wxTE_PASSWORD or @c wxTE_MULTILINE) may be specified
+ here.
@param pos
Dialog position.
*/
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);
/**
If @c centre is @true, the message text (which may include new line
characters) is centred; if @false, the message is left-justified.
+ This function is a wrapper around wxTextEntryDialog and while it is usually
+ more convenient to use, using the dialog directly is more flexible, e.g. it
+ allows you to specify the @c wxTE_MULTILINE to allow the user enter
+ multiple lines of text while this function is limited to single line entry
+ only.
+
@header{wx/textdlg.h}
*/
wxString wxGetTextFromUser(const wxString& message,
- const wxString& caption = "Input text",
- const wxString& default_value = "",
+ const wxString& caption = wxGetTextFromUserPromptStr,
+ const wxString& default_value = wxEmptyString,
wxWindow* parent = NULL,
int x = wxDefaultCoord,
int y = wxDefaultCoord,
@header{wx/textdlg.h}
*/
wxString wxGetPasswordFromUser(const wxString& message,
- const wxString& caption = "Input text",
- const wxString& default_value = "",
+ const wxString& caption = wxGetPasswordFromUserPromptStr,
+ const wxString& default_value = wxEmptyString,
wxWindow* parent = NULL,
int x = wxDefaultCoord,
int y = wxDefaultCoord,