]>
git.saurik.com Git - wxWidgets.git/blob - interface/textdlg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxPasswordEntryDialog
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxPasswordEntryDialog
13 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_wxpasswordentrydialogoverview "wxPassowrdEntryDialog
23 class wxPasswordEntryDialog
: public wxTextEntryDialog
32 @class wxTextEntryDialog
35 This class represents a dialog that requests a one-line text string from the
37 It is implemented as a generic wxWidgets dialog.
42 @see @ref overview_wxtextentrydialogoverview "wxTextEntryDialog overview"
44 class wxTextEntryDialog
: public wxDialog
48 Constructor. Use ShowModal() to show the dialog.
53 Message to show on the dialog.
55 The default value, which may be the empty string.
57 A dialog style, specifying the buttons (wxOK, wxCANCEL)
58 and an optional wxCENTRE style. Additionally, wxTextCtrl styles (such as
59 wxTE_PASSWORD) may be specified here.
63 wxTextEntryDialog(wxWindow
* parent
, const wxString
& message
,
64 const wxString
& caption
= "Please enter text",
65 const wxString
& defaultValue
= "",
66 long style
= wxOK
| wxCANCEL
| wxCENTRE
,
67 const wxPoint
& pos
= wxDefaultPosition
);
75 Returns the text that the user has entered if the user has pressed OK, or the
77 if the user has pressed Cancel.
79 wxString
GetValue() const;
82 Sets the default text value.
84 void SetValue(const wxString
& value
);
87 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
95 // ============================================================================
96 // Global functions/macros
97 // ============================================================================
99 /** @ingroup group_funcmacro_dialog */
103 Pop up a dialog box with title set to @e caption, @c message, and a
104 @c default_value. The user may type in text and press OK to return this
105 text, or press Cancel to return the empty string.
107 If @c centre is @true, the message text (which may include new line
108 characters) is centred; if @false, the message is left-justified.
110 @header{wx/textdlg.h}
112 wxString
wxGetTextFromUser(const wxString
& message
,
113 const wxString
& caption
= "Input text",
114 const wxString
& default_value
= "",
115 wxWindow
* parent
= NULL
,
116 int x
= wxDefaultCoord
,
117 int y
= wxDefaultCoord
,
121 Similar to wxGetTextFromUser() but the text entered in the dialog is not
122 shown on screen but replaced with stars. This is intended to be used for
123 entering passwords as the function name implies.
125 @header{wx/textdlg.h}
127 wxString
wxGetPasswordFromUser(const wxString
& message
,
128 const wxString
& caption
= "Input text",
129 const wxString
& default_value
= "",
130 wxWindow
* parent
= NULL
,
131 int x
= wxDefaultCoord
,
132 int y
= wxDefaultCoord
,