]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/textdlgg.h
Added code to look up main program symbols - unix only. PLEASE FIX FOR MSW.
[wxWidgets.git] / include / wx / generic / textdlgg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: textdlgg.h
3 // Purpose: wxStatusBar class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __TEXTDLGH_G__
13 #define __TEXTDLGH_G__
14
15 #ifdef __GNUG__
16 #pragma interface "textdlgg.h"
17 #endif
18
19 #include "wx/defs.h"
20
21 #include "wx/dialog.h"
22
23 class WXDLLEXPORT wxTextCtrl;
24
25 // Handy dialog functions (will be converted into classes at some point)
26 WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
27 WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
28
29 class WXDLLEXPORT wxTextEntryDialog : public wxDialog
30 {
31 DECLARE_DYNAMIC_CLASS(wxTextEntryDialog)
32
33 public:
34 wxTextEntryDialog(wxWindow *parent,
35 const wxString& message,
36 const wxString& caption = wxGetTextFromUserPromptStr,
37 const wxString& value = wxEmptyString,
38 long style = wxOK | wxCANCEL | wxCENTRE,
39 const wxPoint& pos = wxDefaultPosition);
40
41 void SetValue(const wxString& val) { m_value = val; }
42 wxString GetValue() const { return m_value; }
43
44 // implementation only
45 void OnOK(wxCommandEvent& event);
46
47 protected:
48 wxTextCtrl *m_textctrl;
49 wxString m_value;
50
51 private:
52 DECLARE_EVENT_TABLE()
53 };
54
55 wxString WXDLLEXPORT
56 wxGetTextFromUser(const wxString& message,
57 const wxString& caption = wxGetTextFromUserPromptStr,
58 const wxString& default_value = wxEmptyString,
59 wxWindow *parent = (wxWindow *) NULL,
60 int x = -1,
61 int y = -1,
62 bool centre = TRUE);
63
64 #endif
65 // __TEXTDLGH_G__