]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/spinctrl.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSpinCtrl class
4 // Author: Robert Roebling
7 // Copyright: (c) Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKSPINCTRLH__
12 #define __GTKSPINCTRLH__
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class wxSpinCtrl
: public wxControl
26 wxSpinCtrl(wxWindow
*parent
,
28 const wxString
& value
= wxEmptyString
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
,
31 long style
= wxSP_ARROW_KEYS
,
32 int min
= 0, int max
= 100, int initial
= 0,
33 const wxString
& name
= _T("wxSpinCtrl"))
35 Create(parent
, id
, value
, pos
, size
, style
, min
, max
, initial
, name
);
38 bool Create(wxWindow
*parent
,
40 const wxString
& value
= wxEmptyString
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
43 long style
= wxSP_ARROW_KEYS
,
44 int min
= 0, int max
= 100, int initial
= 0,
45 const wxString
& name
= _T("wxSpinCtrl"));
47 void SetValue(const wxString
& text
);
49 virtual int GetValue() const;
50 virtual void SetValue( int value
);
51 virtual void SetRange( int minVal
, int maxVal
);
52 virtual int GetMin() const;
53 virtual int GetMax() const;
56 void OnChar( wxKeyEvent
&event
);
58 bool IsOwnGtkWindow( GdkWindow
*window
);
59 void ApplyWidgetStyle();
61 GtkAdjustment
*m_adjust
;
65 DECLARE_DYNAMIC_CLASS(wxSpinCtrl
)