X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..8e77fd8bca165aab9709649d79a7cbc6a172d4e1:/include/wx/generic/textdlgg.h diff --git a/include/wx/generic/textdlgg.h b/include/wx/generic/textdlgg.h index fab6bfeaf4..bbd7c70de5 100644 --- a/include/wx/generic/textdlgg.h +++ b/include/wx/generic/textdlgg.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: textdlgg.h +// Name: wx/generic/textdlgg.h // Purpose: wxTextEntryDialog class // Author: Julian Smart // Modified by: @@ -37,16 +37,33 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxGetPasswordFromUserPromptStr[]; class WXDLLIMPEXP_CORE wxTextEntryDialog : public wxDialog { public: + wxTextEntryDialog() + { + m_textctrl = NULL; + } + wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, - const wxPoint& pos = wxDefaultPosition); + const wxPoint& pos = wxDefaultPosition) + { + Create(parent, message, caption, value, style, pos); + } + + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& value = wxEmptyString, + long style = wxTextEntryDialogStyle, + const wxPoint& pos = wxDefaultPosition); void SetValue(const wxString& val); wxString GetValue() const { return m_value; } + void SetMaxLength(unsigned long len); + #if wxUSE_VALIDATORS void SetTextValidator( const wxTextValidator& validator ); #if WXWIN_COMPATIBILITY_2_8 @@ -54,8 +71,10 @@ public: #endif void SetTextValidator( wxTextValidatorStyle style = wxFILTER_NONE ); wxTextValidator* GetTextValidator() { return (wxTextValidator*)m_textctrl->GetValidator(); } -#endif - // wxUSE_VALIDATORS +#endif // wxUSE_VALIDATORS + + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); // implementation only void OnOK(wxCommandEvent& event);