]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/textdlg.h
add wxImage::SetType() and use it in animation decoders (#9639)
[wxWidgets.git] / interface / wx / textdlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: textdlg.h
3 // Purpose: interface of wxPasswordEntryDialog
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxPasswordEntryDialog
11
12 This class represents a dialog that requests a one-line password string from
13 the user.
14 It is implemented as a generic wxWidgets dialog.
15
16 @library{wxbase}
17 @category{cmndlg}
18
19 @see @ref overview_wxpasswordentrydialogoverview "wxPassowrdEntryDialog
20 overview"
21 */
22 class wxPasswordEntryDialog : public wxTextEntryDialog
23 {
24 public:
25
26 };
27
28
29
30 /**
31 @class wxTextEntryDialog
32
33 This class represents a dialog that requests a one-line text string from the
34 user.
35 It is implemented as a generic wxWidgets dialog.
36
37 @library{wxbase}
38 @category{cmndlg}
39
40 @see @ref overview_wxtextentrydialogoverview "wxTextEntryDialog overview"
41 */
42 class wxTextEntryDialog : public wxDialog
43 {
44 public:
45 /**
46 Constructor. Use ShowModal() to show the dialog.
47
48 @param parent
49 Parent window.
50 @param message
51 Message to show on the dialog.
52 @param defaultValue
53 The default value, which may be the empty string.
54 @param style
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.
58 @param pos
59 Dialog position.
60 */
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);
66
67 /**
68 Destructor.
69 */
70 ~wxTextEntryDialog();
71
72 /**
73 Returns the text that the user has entered if the user has pressed OK, or the
74 original value
75 if the user has pressed Cancel.
76 */
77 wxString GetValue() const;
78
79 /**
80 Sets the default text value.
81 */
82 void SetValue(const wxString& value);
83
84 /**
85 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
86 otherwise.
87 */
88 int ShowModal();
89 };
90
91
92
93 // ============================================================================
94 // Global functions/macros
95 // ============================================================================
96
97 /** @ingroup group_funcmacro_dialog */
98 //@{
99
100 /**
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.
104
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.
107
108 @header{wx/textdlg.h}
109 */
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,
116 bool centre = true);
117
118 /**
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.
122
123 @header{wx/textdlg.h}
124 */
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,
131 bool centre = true);
132
133 //@}
134