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) wxWindows team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "numdlgg.h"
23 #include "wx/dialog.h"
26 class WXDLLEXPORT wxSpinCtrl
;
28 class WXDLLEXPORT wxTextCtrl
;
29 #endif // wxUSE_SPINCTRL
31 // ----------------------------------------------------------------------------
32 // wxNumberEntryDialog: a dialog with spin control, [ok] and [cancel] buttons
33 // ----------------------------------------------------------------------------
35 class WXDLLEXPORT wxNumberEntryDialog
: public wxDialog
38 wxNumberEntryDialog(wxWindow
*parent
,
39 const wxString
& message
,
40 const wxString
& prompt
,
41 const wxString
& caption
,
42 long value
, long min
, long max
,
43 const wxPoint
& pos
= wxDefaultPosition
);
45 long GetValue() const { return m_value
; }
47 // implementation only
48 void OnOK(wxCommandEvent
& event
);
49 void OnCancel(wxCommandEvent
& event
);
54 wxSpinCtrl
*m_spinctrl
;
56 wxTextCtrl
*m_spinctrl
;
57 #endif // wxUSE_SPINCTRL
59 long m_value
, m_min
, m_max
;
63 DECLARE_DYNAMIC_CLASS(wxNumberEntryDialog
)
64 DECLARE_NO_COPY_CLASS(wxNumberEntryDialog
)
67 // ----------------------------------------------------------------------------
68 // function to get a number from user
69 // ----------------------------------------------------------------------------
72 wxGetNumberFromUser(const wxString
& message
,
73 const wxString
& prompt
,
74 const wxString
& caption
,
78 wxWindow
*parent
= (wxWindow
*)NULL
,
79 const wxPoint
& pos
= wxDefaultPosition
);
81 #endif // wxUSE_NUMBERDLG
83 #endif // __NUMDLGH_G__