]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/textdlgg.h
Attempted to fix splittree problem by not pushing event handler
[wxWidgets.git] / include / wx / generic / textdlgg.h
CommitLineData
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
23class WXDLLEXPORT wxTextCtrl;
24
9d2f3c71
OK
25WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
26WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
c801d85f 27
a294c6d5
VZ
28#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE)
29
30// ----------------------------------------------------------------------------
31// wxTextEntryDialog: a dialog with text control, [ok] and [cancel] buttons
32// ----------------------------------------------------------------------------
33
c50f1fb9 34class WXDLLEXPORT wxTextEntryDialog : public wxDialog
c801d85f 35{
c801d85f 36public:
c50f1fb9
VZ
37 wxTextEntryDialog(wxWindow *parent,
38 const wxString& message,
39 const wxString& caption = wxGetTextFromUserPromptStr,
40 const wxString& value = wxEmptyString,
a294c6d5 41 long style = wxTextEntryDialogStyle,
c50f1fb9 42 const wxPoint& pos = wxDefaultPosition);
c801d85f 43
c50f1fb9
VZ
44 void SetValue(const wxString& val) { m_value = val; }
45 wxString GetValue() const { return m_value; }
c801d85f 46
c50f1fb9 47 // implementation only
c801d85f
KB
48 void OnOK(wxCommandEvent& event);
49
c50f1fb9
VZ
50protected:
51 wxTextCtrl *m_textctrl;
52 wxString m_value;
479cd5de 53 long m_dialogStyle;
c50f1fb9
VZ
54
55private:
56 DECLARE_EVENT_TABLE()
a294c6d5 57 DECLARE_DYNAMIC_CLASS(wxTextEntryDialog)
c801d85f
KB
58};
59
c49245f8 60// ----------------------------------------------------------------------------
31528cd3 61// function to get a string from user
c49245f8
VZ
62// ----------------------------------------------------------------------------
63
c50f1fb9
VZ
64wxString WXDLLEXPORT
65wxGetTextFromUser(const wxString& message,
66 const wxString& caption = wxGetTextFromUserPromptStr,
67 const wxString& default_value = wxEmptyString,
68 wxWindow *parent = (wxWindow *) NULL,
69 int x = -1,
70 int y = -1,
71 bool centre = TRUE);
c801d85f 72
a294c6d5
VZ
73wxString WXDLLEXPORT
74wxGetPasswordFromUser(const wxString& message,
75 const wxString& caption = wxGetTextFromUserPromptStr,
76 const wxString& default_value = wxEmptyString,
77 wxWindow *parent = (wxWindow *) NULL);
78
c801d85f
KB
79#endif
80 // __TEXTDLGH_G__