]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/spinbutt.h
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class wxSpinButton
: public wxSpinButtonBase
26 wxSpinButton(wxWindow
*parent
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxSP_VERTICAL
,
31 const wxString
& name
= wxSPIN_BUTTON_NAME
)
33 Create(parent
, id
, pos
, size
, style
, name
);
36 bool Create(wxWindow
*parent
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
40 long style
= wxSP_VERTICAL
,
41 const wxString
& name
= wxSPIN_BUTTON_NAME
);
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;
49 static wxVisualAttributes
50 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
53 void OnSize( wxSizeEvent
&event
);
55 bool IsOwnGtkWindow( GdkWindow
*window
);
56 void ApplyWidgetStyle();
58 GtkAdjustment
*m_adjust
;
62 virtual wxSize
DoGetBestSize() const;
66 DECLARE_DYNAMIC_CLASS(wxSpinButton
)
70 // _WX_GTK_SPINBUTT_H_