]>
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
14 It is implemented as a generic wxWidgets dialog.
19 @see @ref overview_wxpasswordentrydialogoverview "wxPassowrdEntryDialog
22 class wxPasswordEntryDialog
: public wxTextEntryDialog
31 @class wxTextEntryDialog
33 This class represents a dialog that requests a one-line text string from the
35 It is implemented as a generic wxWidgets dialog.
40 @see @ref overview_wxtextentrydialogoverview "wxTextEntryDialog overview"
42 class wxTextEntryDialog
: public wxDialog
46 Constructor. Use ShowModal() to show the dialog.
51 Message to show on the dialog.
53 The default value, which may be the empty string.
55 A dialog style, specifying the buttons (wxOK, wxCANCEL)
56 and an optional wxCENTRE style. Additionally, wxTextCtrl styles (such as
57 wxTE_PASSWORD) may be specified here.
61 wxTextEntryDialog(wxWindow
* parent
, const wxString
& message
,
62 const wxString
& caption
= "Please enter text",
63 const wxString
& defaultValue
= "",
64 long style
= wxOK
| wxCANCEL
| wxCENTRE
,
65 const wxPoint
& pos
= wxDefaultPosition
);
70 virtual ~wxTextEntryDialog();
73 Returns the text that the user has entered if the user has pressed OK, or the
75 if the user has pressed Cancel.
77 wxString
GetValue() const;
80 Sets the default text value.
82 void SetValue(const wxString
& value
);
85 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
93 // ============================================================================
94 // Global functions/macros
95 // ============================================================================
97 /** @ingroup group_funcmacro_dialog */
101 Pop up a dialog box with title set to @e caption, @c message, and a
102 @c default_value. The user may type in text and press OK to return this
103 text, or press Cancel to return the empty string.
105 If @c centre is @true, the message text (which may include new line
106 characters) is centred; if @false, the message is left-justified.
108 @header{wx/textdlg.h}
110 wxString
wxGetTextFromUser(const wxString
& message
,
111 const wxString
& caption
= "Input text",
112 const wxString
& default_value
= "",
113 wxWindow
* parent
= NULL
,
114 int x
= wxDefaultCoord
,
115 int y
= wxDefaultCoord
,
119 Similar to wxGetTextFromUser() but the text entered in the dialog is not
120 shown on screen but replaced with stars. This is intended to be used for
121 entering passwords as the function name implies.
123 @header{wx/textdlg.h}
125 wxString
wxGetPasswordFromUser(const wxString
& message
,
126 const wxString
& caption
= "Input text",
127 const wxString
& default_value
= "",
128 wxWindow
* parent
= NULL
,
129 int x
= wxDefaultCoord
,
130 int y
= wxDefaultCoord
,