1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Robert Roebling
7 // Copyright: (c) Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GTK_SPINBUTT_H_
12 #define _WX_GTK_SPINBUTT_H_
14 //-----------------------------------------------------------------------------
16 //-----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxSpinButton
: public wxSpinButtonBase
22 wxSpinButton(wxWindow
*parent
,
24 const wxPoint
& pos
= wxDefaultPosition
,
25 const wxSize
& size
= wxDefaultSize
,
26 long style
= wxSP_VERTICAL
,
27 const wxString
& name
= wxSPIN_BUTTON_NAME
)
29 Create(parent
, id
, pos
, size
, style
, name
);
32 bool Create(wxWindow
*parent
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
,
36 long style
= wxSP_VERTICAL
,
37 const wxString
& name
= wxSPIN_BUTTON_NAME
);
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;
45 static wxVisualAttributes
46 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
48 virtual bool Enable( bool enable
= true );
51 void OnSize( wxSizeEvent
&event
);
56 void GtkDisableEvents() const;
57 void GtkEnableEvents() const;
59 virtual wxSize
DoGetBestSize() const;
60 virtual GdkWindow
*GTKGetWindow(wxArrayGdkWindows
& windows
) const;
63 typedef wxSpinButtonBase base_type
;
66 DECLARE_DYNAMIC_CLASS(wxSpinButton
)
70 // _WX_GTK_SPINBUTT_H_