1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Robert Roebling
6 // Copyright: (c) Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_SPINBUTT_H_
11 #define _WX_GTK_SPINBUTT_H_
13 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxSpinButton
: public wxSpinButtonBase
21 wxSpinButton(wxWindow
*parent
,
23 const wxPoint
& pos
= wxDefaultPosition
,
24 const wxSize
& size
= wxDefaultSize
,
25 long style
= wxSP_VERTICAL
,
26 const wxString
& name
= wxSPIN_BUTTON_NAME
)
28 Create(parent
, id
, pos
, size
, style
, name
);
31 bool Create(wxWindow
*parent
,
33 const wxPoint
& pos
= wxDefaultPosition
,
34 const wxSize
& size
= wxDefaultSize
,
35 long style
= wxSP_VERTICAL
,
36 const wxString
& name
= wxSPIN_BUTTON_NAME
);
38 virtual int GetValue() const;
39 virtual void SetValue( int value
);
40 virtual void SetRange( int minVal
, int maxVal
);
41 virtual int GetMin() const;
42 virtual int GetMax() const;
44 static wxVisualAttributes
45 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
48 void OnSize( wxSizeEvent
&event
);
50 bool IsOwnGtkWindow( GdkWindow
*window
);
52 GtkAdjustment
*m_adjust
;
56 virtual wxSize
DoGetBestSize() const;
60 DECLARE_DYNAMIC_CLASS(wxSpinButton
)
64 // _WX_GTK_SPINBUTT_H_