]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/textdlg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxPasswordEntryDialog
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxPasswordEntryDialog
12 This class represents a dialog that requests a one-line password string from
15 It is implemented as a generic wxWidgets dialog.
20 @see @ref overview_cmndlg_password
22 class wxPasswordEntryDialog
: public wxTextEntryDialog
28 Use wxTextEntryDialog::ShowModal to show the dialog.
33 Message to show on the dialog.
35 The default value, which may be the empty string.
37 A dialog style, specifying the buttons (wxOK, wxCANCEL) and an
38 optional wxCENTRE style. You do not need to specify the wxTE_PASSWORD style,
43 wxPasswordEntryDialog(wxWindow
* parent
, const wxString
& message
,
44 const wxString
& caption
= "Enter password",
45 const wxString
& defaultValue
= wxEmptyString
,
46 long style
= wxOK
| wxCANCEL
| wxCENTRE
,
47 const wxPoint
& pos
= wxDefaultPosition
);
53 @class wxTextEntryDialog
55 This class represents a dialog that requests a one-line text string from the user.
56 It is implemented as a generic wxWidgets dialog.
61 @see @ref overview_cmndlg_textentry
63 class wxTextEntryDialog
: public wxDialog
67 Constructor. Use ShowModal() to show the dialog.
72 Message to show on the dialog.
74 The caption of the the dialog.
76 The default value, which may be the empty string.
78 A dialog style, specifying the buttons (wxOK, wxCANCEL)
79 and an optional wxCENTRE style. Additionally, wxTextCtrl styles
80 (such as wxTE_PASSWORD) may be specified here.
84 wxTextEntryDialog(wxWindow
* parent
, const wxString
& message
,
85 const wxString
& caption
= "Please enter text",
86 const wxString
& defaultValue
= "",
87 long style
= wxOK
| wxCANCEL
| wxCENTRE
,
88 const wxPoint
& pos
= wxDefaultPosition
);
93 virtual ~wxTextEntryDialog();
96 Returns the text that the user has entered if the user has pressed OK, or the
97 original value if the user has pressed Cancel.
99 wxString
GetValue() const;
102 Sets the default text value.
104 void SetValue(const wxString
& value
);
107 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
115 // ============================================================================
116 // Global functions/macros
117 // ============================================================================
119 /** @ingroup group_funcmacro_dialog */
123 Pop up a dialog box with title set to @e caption, @c message, and a
124 @c default_value. The user may type in text and press OK to return this
125 text, or press Cancel to return the empty string.
127 If @c centre is @true, the message text (which may include new line
128 characters) is centred; if @false, the message is left-justified.
130 @header{wx/textdlg.h}
132 wxString
wxGetTextFromUser(const wxString
& message
,
133 const wxString
& caption
= "Input text",
134 const wxString
& default_value
= "",
135 wxWindow
* parent
= NULL
,
136 int x
= wxDefaultCoord
,
137 int y
= wxDefaultCoord
,
141 Similar to wxGetTextFromUser() but the text entered in the dialog is not
142 shown on screen but replaced with stars. This is intended to be used for
143 entering passwords as the function name implies.
145 @header{wx/textdlg.h}
147 wxString
wxGetPasswordFromUser(const wxString
& message
,
148 const wxString
& caption
= "Input text",
149 const wxString
& default_value
= "",
150 wxWindow
* parent
= NULL
,
151 int x
= wxDefaultCoord
,
152 int y
= wxDefaultCoord
,