[1001483] Added wxPasswordEntryDialog analagous to wxTextEntryDialog, allows detecting entering an empty string vs. cancel unlike the wxGetPasswordFromUser dialog function.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,6 +68,7 @@ in an application.
|
|||||||
\twocolitem{\helpref{wxMultiChoiceDialog}{wxmultichoicedialog}}{Dialog to get one or more selections from a list}
|
\twocolitem{\helpref{wxMultiChoiceDialog}{wxmultichoicedialog}}{Dialog to get one or more selections from a list}
|
||||||
\twocolitem{\helpref{wxSingleChoiceDialog}{wxsinglechoicedialog}}{Dialog to get a single selection from a list and return the string}
|
\twocolitem{\helpref{wxSingleChoiceDialog}{wxsinglechoicedialog}}{Dialog to get a single selection from a list and return the string}
|
||||||
\twocolitem{\helpref{wxTextEntryDialog}{wxtextentrydialog}}{Dialog to get a single line of text from the user}
|
\twocolitem{\helpref{wxTextEntryDialog}{wxtextentrydialog}}{Dialog to get a single line of text from the user}
|
||||||
|
\twocolitem{\helpref{wxPasswordEntryDialog}{wxpasswordentrydialog}}{Dialog to get a password from the user}
|
||||||
\twocolitem{\helpref{wxFontDialog}{wxfontdialog}}{Font chooser dialog}
|
\twocolitem{\helpref{wxFontDialog}{wxfontdialog}}{Font chooser dialog}
|
||||||
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
|
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
|
||||||
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog}
|
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog}
|
||||||
|
42
docs/latex/wx/passdlg.tex
Normal file
42
docs/latex/wx/passdlg.tex
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
\section{\class{wxPasswordEntryDialog}}\label{wxpasswordentrydialog}
|
||||||
|
|
||||||
|
This class represents a dialog that requests a one-line password string from the user.
|
||||||
|
It is implemented as a generic wxWidgets dialog.
|
||||||
|
|
||||||
|
\wxheading{Derived from}
|
||||||
|
|
||||||
|
\helpref{wxTextEntryDialog}{wxtextentrydialog}\\
|
||||||
|
\helpref{wxDialog}{wxdialog}\\
|
||||||
|
\helpref{wxWindow}{wxwindow}\\
|
||||||
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||||
|
\helpref{wxObject}{wxobject}
|
||||||
|
|
||||||
|
\wxheading{Include files}
|
||||||
|
|
||||||
|
<wx/textdlg.h>
|
||||||
|
|
||||||
|
\wxheading{See also}
|
||||||
|
|
||||||
|
\helpref{wxPassowrdEntryDialog overview}{wxpasswordentrydialogoverview}
|
||||||
|
|
||||||
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||||
|
|
||||||
|
\membersection{wxPasswordEntryDialog::wxPasswordEntryDialog}\label{wxpasswordentrydialogctor}
|
||||||
|
|
||||||
|
\func{}{wxPasswordEntryDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp
|
||||||
|
\param{const wxString\& }{caption = "Enter password"}, \param{const wxString\& }{defaultValue = ""}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE}, \param{const wxPoint\& }{pos = wxDefaultPosition}}
|
||||||
|
|
||||||
|
Constructor. Use \helpref{wxTextEntryDialog::ShowModal}{wxtextentrydialogshowmodal} to show the dialog.
|
||||||
|
|
||||||
|
\wxheading{Parameters}
|
||||||
|
|
||||||
|
\docparam{parent}{Parent window.}
|
||||||
|
|
||||||
|
\docparam{message}{Message to show on the dialog.}
|
||||||
|
|
||||||
|
\docparam{defaultValue}{The default value, which may be the empty string.}
|
||||||
|
|
||||||
|
\docparam{style}{A dialog style, specifying the buttons (wxOK, wxCANCEL)
|
||||||
|
and an optional wxCENTRE style. You do not need to specify the wxTE_PASSWORD style, it is always applied.
|
||||||
|
|
||||||
|
\docparam{pos}{Dialog position.}
|
@@ -3,6 +3,7 @@
|
|||||||
Classes: \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxFontDialog}{wxfontdialog},
|
Classes: \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxFontDialog}{wxfontdialog},
|
||||||
\rtfsp\helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxFileDialog}{wxfiledialog},\rtfsp
|
\rtfsp\helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxFileDialog}{wxfiledialog},\rtfsp
|
||||||
\helpref{wxDirDialog}{wxdirdialog}, \helpref{wxTextEntryDialog}{wxtextentrydialog},\rtfsp
|
\helpref{wxDirDialog}{wxdirdialog}, \helpref{wxTextEntryDialog}{wxtextentrydialog},\rtfsp
|
||||||
|
\helpref{wxPasswordEntryDialog}{wxpasswordentrydialog},\rtfsp
|
||||||
\helpref{wxMessageDialog}{wxmessagedialog}, \helpref{wxSingleChoiceDialog}{wxsinglechoicedialog},\rtfsp
|
\helpref{wxMessageDialog}{wxmessagedialog}, \helpref{wxSingleChoiceDialog}{wxsinglechoicedialog},\rtfsp
|
||||||
\helpref{wxMultiChoiceDialog}{wxmultichoicedialog}
|
\helpref{wxMultiChoiceDialog}{wxmultichoicedialog}
|
||||||
|
|
||||||
@@ -178,6 +179,13 @@ Classes: \helpref{wxTextEntryDialog}{wxtextentrydialog}
|
|||||||
This is a dialog with a text entry field. The value that the user
|
This is a dialog with a text entry field. The value that the user
|
||||||
entered is obtained using \helpref{wxTextEntryDialog::GetValue}{wxtextentrydialoggetvalue}.
|
entered is obtained using \helpref{wxTextEntryDialog::GetValue}{wxtextentrydialoggetvalue}.
|
||||||
|
|
||||||
|
\subsection{wxPasswordEntryDialog overview}\label{wxpasswordentrydialogoverview}
|
||||||
|
|
||||||
|
Classes: \helpref{wxPasswordEntryDialog}{wxpasswordentrydialog}
|
||||||
|
|
||||||
|
This is a dialog with a password entry field. The value that the user
|
||||||
|
entered is obtained using \helpref{wxTextEntryDialog::GetValue}{wxtextentrydialoggetvalue}.
|
||||||
|
|
||||||
\subsection{wxMessageDialog overview}\label{wxmessagedialogoverview}
|
\subsection{wxMessageDialog overview}\label{wxmessagedialogoverview}
|
||||||
|
|
||||||
Classes: \helpref{wxMessageDialog}{wxmessagedialog}
|
Classes: \helpref{wxMessageDialog}{wxmessagedialog}
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
class WXDLLEXPORT wxTextCtrl;
|
class WXDLLEXPORT wxTextCtrl;
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
|
WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
|
||||||
|
WXDLLEXPORT_DATA(extern const wxChar*) wxGetPasswordFromUserPromptStr;
|
||||||
|
|
||||||
#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE | wxWS_EX_VALIDATE_RECURSIVELY)
|
#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE | wxWS_EX_VALIDATE_RECURSIVELY)
|
||||||
|
|
||||||
@@ -69,6 +70,24 @@ private:
|
|||||||
DECLARE_NO_COPY_CLASS(wxTextEntryDialog)
|
DECLARE_NO_COPY_CLASS(wxTextEntryDialog)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxPasswordEntryDialog: dialog with password control, [ok] and [cancel]
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxPasswordEntryDialog : public wxTextEntryDialog
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxPasswordEntryDialog(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)
|
||||||
|
DECLARE_NO_COPY_CLASS(wxPasswordEntryDialog)
|
||||||
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// function to get a string from user
|
// function to get a string from user
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -84,7 +103,7 @@ wxGetTextFromUser(const wxString& message,
|
|||||||
|
|
||||||
wxString WXDLLEXPORT
|
wxString WXDLLEXPORT
|
||||||
wxGetPasswordFromUser(const wxString& message,
|
wxGetPasswordFromUser(const wxString& message,
|
||||||
const wxString& caption = wxGetTextFromUserPromptStr,
|
const wxString& caption = wxGetPasswordFromUserPromptStr,
|
||||||
const wxString& default_value = wxEmptyString,
|
const wxString& default_value = wxEmptyString,
|
||||||
wxWindow *parent = (wxWindow *) NULL,
|
wxWindow *parent = (wxWindow *) NULL,
|
||||||
wxCoord x = wxDefaultCoord,
|
wxCoord x = wxDefaultCoord,
|
||||||
|
Reference in New Issue
Block a user