Add wxPasswordEntryDialog default ctor and Create().

Allow creating wxPasswordEntryDialog in 2 steps, as most of the other classes.

Closes #15770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-12-21 12:23:59 +00:00
parent 2e4dcc645d
commit b69da09293
2 changed files with 22 additions and 9 deletions

View File

@ -96,12 +96,25 @@ private:
class WXDLLIMPEXP_CORE wxPasswordEntryDialog : public wxTextEntryDialog
{
public:
wxPasswordEntryDialog();
wxPasswordEntryDialog(wxWindow *parent,
const wxString& message,
const wxString& caption = wxGetPasswordFromUserPromptStr,
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 = wxGetPasswordFromUserPromptStr,
const wxString& value = wxEmptyString,
long style = wxTextEntryDialogStyle,
const wxPoint& pos = wxDefaultPosition);
private:
DECLARE_DYNAMIC_CLASS(wxPasswordEntryDialog)
wxDECLARE_NO_COPY_CLASS(wxPasswordEntryDialog);

View File

@ -189,16 +189,16 @@ void wxTextEntryDialog::SetTextValidator( const wxTextValidator& validator )
IMPLEMENT_CLASS(wxPasswordEntryDialog, wxTextEntryDialog)
wxPasswordEntryDialog::wxPasswordEntryDialog(wxWindow *parent,
const wxString& message,
const wxString& caption,
const wxString& value,
long style,
const wxPoint& pos)
: wxTextEntryDialog(parent, message, caption, value,
style | wxTE_PASSWORD, pos)
bool wxPasswordEntryDialog::Create(wxWindow *parent,
const wxString& message,
const wxString& caption,
const wxString& value,
long style,
const wxPoint& pos)
{
// Only change from wxTextEntryDialog is the password style
return wxTextEntryDialog::Create(parent, message, caption, value,
style | wxTE_PASSWORD, pos);
}
#endif // wxUSE_TEXTDLG