1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/numdlgg.h
3 // Purpose: wxNumberEntryDialog class
4 // Author: John Labenski
6 // Created: 07.02.04 (extracted from textdlgg.cpp)
8 // Copyright: (c) wxWidgets team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
19 #include "wx/dialog.h"
22 class WXDLLIMPEXP_FWD_CORE wxSpinCtrl
;
24 class WXDLLIMPEXP_FWD_CORE wxTextCtrl
;
25 #endif // wxUSE_SPINCTRL
27 // ----------------------------------------------------------------------------
28 // wxNumberEntryDialog: a dialog with spin control, [ok] and [cancel] buttons
29 // ----------------------------------------------------------------------------
31 class WXDLLIMPEXP_CORE wxNumberEntryDialog
: public wxDialog
34 wxNumberEntryDialog(wxWindow
*parent
,
35 const wxString
& message
,
36 const wxString
& prompt
,
37 const wxString
& caption
,
38 long value
, long min
, long max
,
39 const wxPoint
& pos
= wxDefaultPosition
);
41 long GetValue() const { return m_value
; }
43 // implementation only
44 void OnOK(wxCommandEvent
& event
);
45 void OnCancel(wxCommandEvent
& event
);
50 wxSpinCtrl
*m_spinctrl
;
52 wxTextCtrl
*m_spinctrl
;
53 #endif // wxUSE_SPINCTRL
55 long m_value
, m_min
, m_max
;
59 DECLARE_DYNAMIC_CLASS(wxNumberEntryDialog
)
60 wxDECLARE_NO_COPY_CLASS(wxNumberEntryDialog
);
63 // ----------------------------------------------------------------------------
64 // function to get a number from user
65 // ----------------------------------------------------------------------------
68 wxGetNumberFromUser(const wxString
& message
,
69 const wxString
& prompt
,
70 const wxString
& caption
,
74 wxWindow
*parent
= NULL
,
75 const wxPoint
& pos
= wxDefaultPosition
);
77 #endif // wxUSE_NUMBERDLG
79 #endif // __NUMDLGH_G__