]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/spinbutt.h
Make the Connect that also takes a local bind port non-virtual. This silences some...
[wxWidgets.git] / include / wx / gtk1 / spinbutt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/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 //-----------------------------------------------------------------------------
15 // wxSpinButton
16 //-----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase
19 {
20 public:
21 wxSpinButton() { }
22 wxSpinButton(wxWindow *parent,
23 wxWindowID id = -1,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
26 long style = wxSP_VERTICAL,
27 const wxString& name = wxSPIN_BUTTON_NAME)
28 {
29 Create(parent, id, pos, size, style, name);
30 }
31
32 bool Create(wxWindow *parent,
33 wxWindowID id = -1,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = wxSP_VERTICAL,
37 const wxString& name = wxSPIN_BUTTON_NAME);
38
39 virtual int GetValue() const;
40 virtual void SetValue( int value );
41 virtual void SetRange( int minVal, int maxVal );
42 virtual int GetMin() const;
43 virtual int GetMax() const;
44
45 static wxVisualAttributes
46 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
47
48 // implementation
49 void OnSize( wxSizeEvent &event );
50
51 bool IsOwnGtkWindow( GdkWindow *window );
52
53 GtkAdjustment *m_adjust;
54 float m_oldPos;
55
56 protected:
57 virtual wxSize DoGetBestSize() const;
58
59 private:
60 DECLARE_EVENT_TABLE()
61 DECLARE_DYNAMIC_CLASS(wxSpinButton)
62 };
63
64 #endif
65 // _WX_GTK_SPINBUTT_H_