]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/spinbutt.h
1. wxMotif toolbar works; the toggle buttons have the same width as the other
[wxWidgets.git] / include / wx / gtk / spinbutt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: spinbutt.h
3 // Purpose: wxSpinButton 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 __GTKSPINBUTTH__
12 #define __GTKSPINBUTTH__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19
20 #if wxUSE_SPINBTN
21
22 #include "wx/control.h"
23
24 //-----------------------------------------------------------------------------
25 // wxSpinButton
26 //-----------------------------------------------------------------------------
27
28 class wxSpinButton : public wxSpinButtonBase
29 {
30 public:
31 wxSpinButton() { }
32 wxSpinButton( wxWindow *parent, wxWindowID id = -1,
33 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
34 long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton")
35 {
36 Create(parent, id, pos, size, style, name);
37 }
38
39 bool Create( wxWindow *parent, wxWindowID id = -1,
40 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
41 long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton" );
42
43 virtual int GetValue() const;
44 virtual void SetValue( int value );
45 virtual void SetRange( int minVal, int maxVal );
46 virtual int GetMin() const;
47 virtual int GetMax() const;
48
49 // implementation
50 void OnSize( wxSizeEvent &event );
51
52 bool IsOwnGtkWindow( GdkWindow *window );
53 void ApplyWidgetStyle();
54
55 GtkAdjustment *m_adjust;
56 float m_oldPos;
57
58 private:
59 DECLARE_EVENT_TABLE()
60 DECLARE_DYNAMIC_CLASS(wxSpinButton)
61 };
62
63 #endif
64 // wxUSE_SPINBTN
65
66 #endif
67 // __GTKSPINBUTTH__