]>
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 default value, which may be the empty string.
76 A dialog style, specifying the buttons (wxOK, wxCANCEL)
77 and an optional wxCENTRE style. Additionally, wxTextCtrl styles
78 (such as wxTE_PASSWORD) may be specified here.
82 wxTextEntryDialog(wxWindow
* parent
, const wxString
& message
,
83 const wxString
& caption
= "Please enter text",
84 const wxString
& defaultValue
= "",
85 long style
= wxOK
| wxCANCEL
| wxCENTRE
,
86 const wxPoint
& pos
= wxDefaultPosition
);
91 virtual ~wxTextEntryDialog();
94 Returns the text that the user has entered if the user has pressed OK, or the
95 original value if the user has pressed Cancel.
97 wxString
GetValue() const;
100 Sets the default text value.
102 void SetValue(const wxString
& value
);
105 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
113 // ============================================================================
114 // Global functions/macros
115 // ============================================================================
117 /** @ingroup group_funcmacro_dialog */
121 Pop up a dialog box with title set to @e caption, @c message, and a
122 @c default_value. The user may type in text and press OK to return this
123 text, or press Cancel to return the empty string.
125 If @c centre is @true, the message text (which may include new line
126 characters) is centred; if @false, the message is left-justified.
128 @header{wx/textdlg.h}
130 wxString
wxGetTextFromUser(const wxString
& message
,
131 const wxString
& caption
= "Input text",
132 const wxString
& default_value
= "",
133 wxWindow
* parent
= NULL
,
134 int x
= wxDefaultCoord
,
135 int y
= wxDefaultCoord
,
139 Similar to wxGetTextFromUser() but the text entered in the dialog is not
140 shown on screen but replaced with stars. This is intended to be used for
141 entering passwords as the function name implies.
143 @header{wx/textdlg.h}
145 wxString
wxGetPasswordFromUser(const wxString
& message
,
146 const wxString
& caption
= "Input text",
147 const wxString
& default_value
= "",
148 wxWindow
* parent
= NULL
,
149 int x
= wxDefaultCoord
,
150 int y
= wxDefaultCoord
,