X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c51a665c649f7579fb39e62070cef4f66b3210d..1ec4e9c2b72a01a7ba7da569e0f8d04a81aaba10:/interface/wx/textdlg.h diff --git a/interface/wx/textdlg.h b/interface/wx/textdlg.h index a1ddf2e6ec..04157bea53 100644 --- a/interface/wx/textdlg.h +++ b/interface/wx/textdlg.h @@ -6,6 +6,18 @@ // 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 @@ -45,7 +57,7 @@ public: 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); }; @@ -66,8 +78,28 @@ class wxTextEntryDialog : public wxDialog { public: /** - Constructor. Use ShowModal() to show the dialog. + Default constructor. + + Call Create() to really create the dialog later. + + @since 2.9.5 + */ + wxTextEntryDialog(); + + /** + Constructor. + Use ShowModal() to show the dialog. + + See Create() method for parameter description. + */ + wxTextEntryDialog(wxWindow* parent, const wxString& message, + const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& value = wxEmptyString, + long style = wxTextEntryDialogStyle, + const wxPoint& pos = wxDefaultPosition); + + /** @param parent Parent window. @param message @@ -83,11 +115,13 @@ public: here. @param pos Dialog position. + + @since 2.9.5 */ - wxTextEntryDialog(wxWindow* parent, const wxString& message, + bool Create(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); /** @@ -139,7 +173,7 @@ public: @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, @@ -154,7 +188,7 @@ wxString wxGetTextFromUser(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,