[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:
parent
12cfa30457
commit
55b46fd164
@ -68,6 +68,7 @@ in an application.
|
||||
\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{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{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup 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},
|
||||
\rtfsp\helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxFileDialog}{wxfiledialog},\rtfsp
|
||||
\helpref{wxDirDialog}{wxdirdialog}, \helpref{wxTextEntryDialog}{wxtextentrydialog},\rtfsp
|
||||
\helpref{wxPasswordEntryDialog}{wxpasswordentrydialog},\rtfsp
|
||||
\helpref{wxMessageDialog}{wxmessagedialog}, \helpref{wxSingleChoiceDialog}{wxsinglechoicedialog},\rtfsp
|
||||
\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
|
||||
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}
|
||||
|
||||
Classes: \helpref{wxMessageDialog}{wxmessagedialog}
|
||||
|
@ -28,6 +28,7 @@
|
||||
class WXDLLEXPORT wxTextCtrl;
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxGetPasswordFromUserPromptStr;
|
||||
|
||||
#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE | wxWS_EX_VALIDATE_RECURSIVELY)
|
||||
|
||||
@ -69,6 +70,24 @@ private:
|
||||
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
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -84,7 +103,7 @@ wxGetTextFromUser(const wxString& message,
|
||||
|
||||
wxString WXDLLEXPORT
|
||||
wxGetPasswordFromUser(const wxString& message,
|
||||
const wxString& caption = wxGetTextFromUserPromptStr,
|
||||
const wxString& caption = wxGetPasswordFromUserPromptStr,
|
||||
const wxString& default_value = wxEmptyString,
|
||||
wxWindow *parent = (wxWindow *) NULL,
|
||||
wxCoord x = wxDefaultCoord,
|
||||
|
Loading…
Reference in New Issue
Block a user