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 
  15     It is implemented as a generic wxWidgets dialog. 
  20     @see @ref overview_cmndlg_password 
  22 class wxPasswordEntryDialog 
: public wxTextEntryDialog
 
  28         Use wxTextEntryDialog::ShowModal to show the dialog. 
  33             Message to show on the dialog. 
  35             The caption of the dialog. 
  37             The default value, which may be the empty string. 
  39             A dialog style, specifying the buttons (wxOK, wxCANCEL) and an 
  40             optional wxCENTRE style. You do not need to specify the wxTE_PASSWORD style, 
  45     wxPasswordEntryDialog(wxWindow
* parent
, const wxString
& message
, 
  46                           const wxString
& caption 
= wxGetPasswordFromUserPromptStr
, 
  47                           const wxString
& defaultValue 
= wxEmptyString
, 
  48                           long style 
= wxOK 
| wxCANCEL 
| wxCENTRE
, 
  49                           const wxPoint
& pos 
= wxDefaultPosition
); 
  55     @class wxTextEntryDialog 
  57     This class represents a dialog that requests a one-line text string from the user. 
  58     It is implemented as a generic wxWidgets dialog. 
  63     @see @ref overview_cmndlg_textentry 
  65 class wxTextEntryDialog 
: public wxDialog
 
  69         Constructor. Use ShowModal() to show the dialog. 
  74             Message to show on the dialog. 
  76             The caption of the the dialog. 
  78             The default value, which may be the empty string. 
  80             A dialog style, specifying the buttons (wxOK, wxCANCEL) 
  81             and an optional wxCENTRE style. Additionally, wxTextCtrl styles 
  82             (such as wxTE_PASSWORD) may be specified here. 
  86     wxTextEntryDialog(wxWindow
* parent
, const wxString
& message
, 
  87                       const wxString
& caption 
= wxGetTextFromUserPromptStr
, 
  88                       const wxString
& value 
= wxEmptyString
, 
  89                       long style 
= wxOK 
| wxCANCEL 
| wxCENTRE
, 
  90                       const wxPoint
& pos 
= wxDefaultPosition
); 
  95     virtual ~wxTextEntryDialog(); 
  98         Returns the text that the user has entered if the user has pressed OK, or the 
  99         original value if the user has pressed Cancel. 
 101     wxString 
GetValue() const; 
 104         Sets the default text value. 
 106     void SetValue(const wxString
& value
); 
 109         Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL 
 117 // ============================================================================ 
 118 // Global functions/macros 
 119 // ============================================================================ 
 121 /** @ingroup group_funcmacro_dialog */ 
 125     Pop up a dialog box with title set to @e caption, @c message, and a 
 126     @c default_value. The user may type in text and press OK to return this 
 127     text, or press Cancel to return the empty string. 
 129     If @c centre is @true, the message text (which may include new line 
 130     characters) is centred; if @false, the message is left-justified. 
 132     @header{wx/textdlg.h} 
 134 wxString 
wxGetTextFromUser(const wxString
& message
, 
 135                            const wxString
& caption 
= "Input text", 
 136                            const wxString
& default_value 
= "", 
 137                            wxWindow
* parent 
= NULL
, 
 138                            int x 
= wxDefaultCoord
, 
 139                            int y 
= wxDefaultCoord
, 
 143     Similar to wxGetTextFromUser() but the text entered in the dialog is not 
 144     shown on screen but replaced with stars. This is intended to be used for 
 145     entering passwords as the function name implies. 
 147     @header{wx/textdlg.h} 
 149 wxString 
wxGetPasswordFromUser(const wxString
& message
, 
 150                                const wxString
& caption 
= "Input text", 
 151                                const wxString
& default_value 
= "", 
 152                                wxWindow
* parent 
= NULL
, 
 153                                int x 
= wxDefaultCoord
, 
 154                                int y 
= wxDefaultCoord
,