]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/spinctrl.h
1. wxApp::ProcessPendingEvents() is now common, added appcmn.cpp and
[wxWidgets.git] / include / wx / gtk1 / spinctrl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: spinctrl.h
3 // Purpose: wxSpinCtrl class
4 // Author: Robert Roebling
5 // Modified by:
6 // RCS-ID: $Id$
7 // Copyright: (c) Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __GTKSPINCTRLH__
12 #define __GTKSPINCTRLH__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 //-----------------------------------------------------------------------------
19 // wxSpinButton
20 //-----------------------------------------------------------------------------
21
22 class wxSpinCtrl : public wxControl
23 {
24 public:
25 wxSpinCtrl() {}
26 wxSpinCtrl(wxWindow *parent,
27 wxWindowID id = -1,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = wxSP_ARROW_KEYS,
31 int min = 0, int max = 100, int initial = 0,
32 const wxString& name = _T("wxSpinCtrl"))
33 {
34 Create(parent, id, pos, size, style, min, max, initial, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id = -1,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxSP_ARROW_KEYS,
42 int min = 0, int max = 100, int initial = 0,
43 const wxString& name = _T("wxSpinCtrl"));
44
45 virtual int GetValue() const;
46 virtual void SetValue( int value );
47 virtual void SetRange( int minVal, int maxVal );
48 virtual int GetMin() const;
49 virtual int GetMax() const;
50
51 bool IsOwnGtkWindow( GdkWindow *window );
52 void ApplyWidgetStyle();
53
54 GtkAdjustment *m_adjust;
55 float m_oldPos;
56
57 private:
58 DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
59 };
60
61 #endif
62 // __GTKSPINCTRLH__