]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/spinbutt.h
fixed redraw problems in wxStaticText
[wxWidgets.git] / include / wx / gtk / spinbutt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/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 _WX_GTK_SPINBUTT_H_
12 #define _WX_GTK_SPINBUTT_H_
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 //-----------------------------------------------------------------------------
19 // wxSpinButton
20 //-----------------------------------------------------------------------------
21
22 class wxSpinButton : public wxSpinButtonBase
23 {
24 public:
25 wxSpinButton() { }
26 wxSpinButton(wxWindow *parent,
27 wxWindowID id = -1,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = wxSP_VERTICAL,
31 const wxString& name = wxSPIN_BUTTON_NAME)
32 {
33 Create(parent, id, pos, size, style, name);
34 }
35
36 bool Create(wxWindow *parent,
37 wxWindowID id = -1,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = wxSP_VERTICAL,
41 const wxString& name = wxSPIN_BUTTON_NAME);
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 protected:
59 virtual wxSize DoGetBestSize() const;
60
61 private:
62 DECLARE_EVENT_TABLE()
63 DECLARE_DYNAMIC_CLASS(wxSpinButton)
64 };
65
66 #endif
67 // _WX_GTK_SPINBUTT_H_