1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/numdlgg.h
3 // Purpose: wxNumberEntryDialog class
4 // Author: John Labenski
6 // Created: 07.02.04 (extracted from textdlgg.cpp)
7 // Copyright: (c) wxWidgets team
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
18 #include "wx/dialog.h"
21 class WXDLLIMPEXP_FWD_CORE wxSpinCtrl
;
23 class WXDLLIMPEXP_FWD_CORE wxTextCtrl
;
24 #endif // wxUSE_SPINCTRL
26 // ----------------------------------------------------------------------------
27 // wxNumberEntryDialog: a dialog with spin control, [ok] and [cancel] buttons
28 // ----------------------------------------------------------------------------
30 class WXDLLIMPEXP_CORE wxNumberEntryDialog
: public wxDialog
33 wxNumberEntryDialog(wxWindow
*parent
,
34 const wxString
& message
,
35 const wxString
& prompt
,
36 const wxString
& caption
,
37 long value
, long min
, long max
,
38 const wxPoint
& pos
= wxDefaultPosition
);
40 long GetValue() const { return m_value
; }
42 // implementation only
43 void OnOK(wxCommandEvent
& event
);
44 void OnCancel(wxCommandEvent
& event
);
49 wxSpinCtrl
*m_spinctrl
;
51 wxTextCtrl
*m_spinctrl
;
52 #endif // wxUSE_SPINCTRL
54 long m_value
, m_min
, m_max
;
58 DECLARE_DYNAMIC_CLASS(wxNumberEntryDialog
)
59 wxDECLARE_NO_COPY_CLASS(wxNumberEntryDialog
);
62 // ----------------------------------------------------------------------------
63 // function to get a number from user
64 // ----------------------------------------------------------------------------
67 wxGetNumberFromUser(const wxString
& message
,
68 const wxString
& prompt
,
69 const wxString
& caption
,
73 wxWindow
*parent
= NULL
,
74 const wxPoint
& pos
= wxDefaultPosition
);
76 #endif // wxUSE_NUMBERDLG
78 #endif // __NUMDLGH_G__