]> git.saurik.com Git - wxWidgets.git/blob - interface/textdlg.h
remove daily build of docs
[wxWidgets.git] / interface / 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 @wxheader{textdlg.h}
12
13 This class represents a dialog that requests a one-line password string from
14 the user.
15 It is implemented as a generic wxWidgets dialog.
16
17 @library{wxbase}
18 @category{cmndlg}
19
20 @see @ref overview_wxpasswordentrydialogoverview "wxPassowrdEntryDialog
21 overview"
22 */
23 class wxPasswordEntryDialog : public wxTextEntryDialog
24 {
25 public:
26
27 };
28
29
30
31 /**
32 @class wxTextEntryDialog
33 @wxheader{textdlg.h}
34
35 This class represents a dialog that requests a one-line text string from the
36 user.
37 It is implemented as a generic wxWidgets dialog.
38
39 @library{wxbase}
40 @category{cmndlg}
41
42 @see @ref overview_wxtextentrydialogoverview "wxTextEntryDialog overview"
43 */
44 class wxTextEntryDialog : public wxDialog
45 {
46 public:
47 /**
48 Constructor. Use ShowModal() to show the dialog.
49
50 @param parent
51 Parent window.
52 @param message
53 Message to show on the dialog.
54 @param defaultValue
55 The default value, which may be the empty string.
56 @param style
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.
60 @param pos
61 Dialog position.
62 */
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);
68
69 /**
70 Destructor.
71 */
72 ~wxTextEntryDialog();
73
74 /**
75 Returns the text that the user has entered if the user has pressed OK, or the
76 original value
77 if the user has pressed Cancel.
78 */
79 wxString GetValue() const;
80
81 /**
82 Sets the default text value.
83 */
84 void SetValue(const wxString& value);
85
86 /**
87 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
88 otherwise.
89 */
90 int ShowModal();
91 };
92
93
94
95 // ============================================================================
96 // Global functions/macros
97 // ============================================================================
98
99 /**
100 Pop up a dialog box with title set to @e caption, @e message, and a
101 @e default_value. The user may type in text and press OK to return this text,
102 or press Cancel to return the empty string.
103 If @a centre is @true, the message text (which may include new line characters)
104 is centred; if @false, the message is left-justified.
105 */
106 wxString wxGetTextFromUser(const wxString& message,
107 const wxString& caption = "Input text",
108 const wxString& default_value = "",
109 wxWindow* parent = NULL,
110 int x = wxDefaultCoord,
111 int y = wxDefaultCoord,
112 bool centre = true);
113
114 /**
115 Similar to wxGetTextFromUser() but the text entered
116 in the dialog is not shown on screen but replaced with stars. This is intended
117 to be used for entering passwords as the function name implies.
118 */
119 wxString wxGetPasswordFromUser(const wxString& message,
120 const wxString& caption = "Input text",
121 const wxString& default_value = "",
122 wxWindow* parent = NULL,
123 int x = wxDefaultCoord,
124 int y = wxDefaultCoord,
125 bool centre = true);
126