]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/textdlg.h
add wxImage::SetType() and use it in animation decoders (#9639)
[wxWidgets.git] / interface / wx / textdlg.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: textdlg.h
e54c96f1 3// Purpose: interface of wxPasswordEntryDialog
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxPasswordEntryDialog
7c913512 11
23324ae1
FM
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.
7c913512 15
23324ae1
FM
16 @library{wxbase}
17 @category{cmndlg}
7c913512 18
e54c96f1
FM
19 @see @ref overview_wxpasswordentrydialogoverview "wxPassowrdEntryDialog
20 overview"
23324ae1
FM
21*/
22class wxPasswordEntryDialog : public wxTextEntryDialog
23{
24public:
7c913512 25
23324ae1
FM
26};
27
28
e54c96f1 29
23324ae1
FM
30/**
31 @class wxTextEntryDialog
7c913512 32
23324ae1
FM
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.
7c913512 36
23324ae1
FM
37 @library{wxbase}
38 @category{cmndlg}
7c913512 39
e54c96f1 40 @see @ref overview_wxtextentrydialogoverview "wxTextEntryDialog overview"
23324ae1
FM
41*/
42class wxTextEntryDialog : public wxDialog
43{
44public:
45 /**
46 Constructor. Use ShowModal() to show the dialog.
3c4f71cc 47
7c913512 48 @param parent
4cc4bfaf 49 Parent window.
7c913512 50 @param message
4cc4bfaf 51 Message to show on the dialog.
7c913512 52 @param defaultValue
4cc4bfaf 53 The default value, which may be the empty string.
7c913512 54 @param style
4cc4bfaf
FM
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.
7c913512 58 @param pos
4cc4bfaf 59 Dialog position.
23324ae1
FM
60 */
61 wxTextEntryDialog(wxWindow* parent, const wxString& message,
62 const wxString& caption = "Please enter text",
63 const wxString& defaultValue = "",
4cc4bfaf 64 long style = wxOK | wxCANCEL | wxCENTRE,
23324ae1
FM
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 */
328f5751 77 wxString GetValue() const;
23324ae1
FM
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
e54c96f1 92
23324ae1
FM
93// ============================================================================
94// Global functions/macros
95// ============================================================================
96
ba2874ff
BP
97/** @ingroup group_funcmacro_dialog */
98//@{
99
23324ae1 100/**
ba2874ff
BP
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}
23324ae1
FM
109*/
110wxString wxGetTextFromUser(const wxString& message,
111 const wxString& caption = "Input text",
112 const wxString& default_value = "",
4cc4bfaf 113 wxWindow* parent = NULL,
23324ae1
FM
114 int x = wxDefaultCoord,
115 int y = wxDefaultCoord,
4cc4bfaf 116 bool centre = true);
23324ae1
FM
117
118/**
ba2874ff
BP
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}
23324ae1
FM
124*/
125wxString wxGetPasswordFromUser(const wxString& message,
126 const wxString& caption = "Input text",
127 const wxString& default_value = "",
4cc4bfaf 128 wxWindow* parent = NULL,
23324ae1
FM
129 int x = wxDefaultCoord,
130 int y = wxDefaultCoord,
4cc4bfaf 131 bool centre = true);
23324ae1 132
ba2874ff
BP
133//@}
134