1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxStatusBar class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __TEXTDLGH_G__
13 #define __TEXTDLGH_G__
16 #pragma interface "textdlgg.h"
21 #include "wx/dialog.h"
23 class WXDLLEXPORT wxTextCtrl
;
25 WXDLLEXPORT_DATA(extern const wxChar
*) wxGetTextFromUserPromptStr
;
26 WXDLLEXPORT_DATA(extern const wxChar
*) wxEmptyString
;
28 #define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE)
30 // ----------------------------------------------------------------------------
31 // wxTextEntryDialog: a dialog with text control, [ok] and [cancel] buttons
32 // ----------------------------------------------------------------------------
34 class WXDLLEXPORT wxTextEntryDialog
: public wxDialog
37 wxTextEntryDialog(wxWindow
*parent
,
38 const wxString
& message
,
39 const wxString
& caption
= wxGetTextFromUserPromptStr
,
40 const wxString
& value
= wxEmptyString
,
41 long style
= wxTextEntryDialogStyle
,
42 const wxPoint
& pos
= wxDefaultPosition
);
44 void SetValue(const wxString
& val
) { m_value
= val
; }
45 wxString
GetValue() const { return m_value
; }
47 // implementation only
48 void OnOK(wxCommandEvent
& event
);
51 wxTextCtrl
*m_textctrl
;
57 DECLARE_DYNAMIC_CLASS(wxTextEntryDialog
)
60 // ----------------------------------------------------------------------------
61 // function to get a string from user
62 // ----------------------------------------------------------------------------
65 wxGetTextFromUser(const wxString
& message
,
66 const wxString
& caption
= wxGetTextFromUserPromptStr
,
67 const wxString
& default_value
= wxEmptyString
,
68 wxWindow
*parent
= (wxWindow
*) NULL
,
74 wxGetPasswordFromUser(const wxString
& message
,
75 const wxString
& caption
= wxGetTextFromUserPromptStr
,
76 const wxString
& default_value
= wxEmptyString
,
77 wxWindow
*parent
= (wxWindow
*) NULL
);