]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
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 | |
c50f1fb9 | 9 | // Licence: wxWindows license |
c801d85f KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef __TEXTDLGH_G__ | |
13 | #define __TEXTDLGH_G__ | |
14 | ||
15 | #ifdef __GNUG__ | |
c50f1fb9 | 16 | #pragma interface "textdlgg.h" |
c801d85f KB |
17 | #endif |
18 | ||
c50f1fb9 VZ |
19 | #include "wx/defs.h" |
20 | ||
c801d85f KB |
21 | #include "wx/dialog.h" |
22 | ||
dfe1eee3 VZ |
23 | class WXDLLEXPORT wxTextCtrl; |
24 | ||
c801d85f | 25 | // Handy dialog functions (will be converted into classes at some point) |
9d2f3c71 OK |
26 | WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr; |
27 | WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; | |
c801d85f | 28 | |
c50f1fb9 | 29 | class WXDLLEXPORT wxTextEntryDialog : public wxDialog |
c801d85f | 30 | { |
c50f1fb9 VZ |
31 | DECLARE_DYNAMIC_CLASS(wxTextEntryDialog) |
32 | ||
c801d85f | 33 | public: |
c50f1fb9 VZ |
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); | |
c801d85f | 40 | |
c50f1fb9 VZ |
41 | void SetValue(const wxString& val) { m_value = val; } |
42 | wxString GetValue() const { return m_value; } | |
c801d85f | 43 | |
c50f1fb9 | 44 | // implementation only |
c801d85f KB |
45 | void OnOK(wxCommandEvent& event); |
46 | ||
c50f1fb9 VZ |
47 | protected: |
48 | wxTextCtrl *m_textctrl; | |
49 | wxString m_value; | |
50 | ||
51 | private: | |
52 | DECLARE_EVENT_TABLE() | |
c801d85f KB |
53 | }; |
54 | ||
c49245f8 | 55 | // ---------------------------------------------------------------------------- |
31528cd3 | 56 | // function to get a string from user |
c49245f8 VZ |
57 | // ---------------------------------------------------------------------------- |
58 | ||
c50f1fb9 VZ |
59 | wxString WXDLLEXPORT |
60 | wxGetTextFromUser(const wxString& message, | |
61 | const wxString& caption = wxGetTextFromUserPromptStr, | |
62 | const wxString& default_value = wxEmptyString, | |
63 | wxWindow *parent = (wxWindow *) NULL, | |
64 | int x = -1, | |
65 | int y = -1, | |
66 | bool centre = TRUE); | |
c801d85f KB |
67 | |
68 | #endif | |
69 | // __TEXTDLGH_G__ |