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_NO_COPY_CLASS(wxNumberEntryDialog
)
66 // ----------------------------------------------------------------------------
67 // function to get a number from user
68 // ----------------------------------------------------------------------------
71 wxGetNumberFromUser(const wxString
& message
,
72 const wxString
& prompt
,
73 const wxString
& caption
,
77 wxWindow
*parent
= (wxWindow
*)NULL
,
78 const wxPoint
& pos
= wxDefaultPosition
);
80 #endif // wxUSE_NUMBERDLG
82 #endif // __NUMDLGH_G__