1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_SPINBUTT_H_
12 #define _WX_SPINBUTT_H_
14 class WXDLLIMPEXP_FWD_CORE wxArrowButton
; // internal
16 class WXDLLIMPEXP_CORE wxSpinButton
: public wxSpinButtonBase
18 DECLARE_DYNAMIC_CLASS(wxSpinButton
)
21 wxSpinButton() : m_up( 0 ), m_down( 0 ), m_pos( 0 ) { }
23 wxSpinButton(wxWindow
*parent
,
24 wxWindowID id
= wxID_ANY
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
,
27 long style
= wxSP_VERTICAL
,
28 const wxString
& name
= "wxSpinButton")
33 Create(parent
, id
, pos
, size
, style
, name
);
35 virtual ~wxSpinButton();
37 bool Create(wxWindow
*parent
,
38 wxWindowID id
= wxID_ANY
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
41 long style
= wxSP_VERTICAL
,
42 const wxString
& name
= "wxSpinButton");
46 int GetMin() const { return m_min
; }
47 int GetMax() const { return m_max
; }
50 void SetValue(int val
);
51 void SetRange(int minVal
, int maxVal
);
54 virtual void Command(wxCommandEvent
& event
)
55 { (void)ProcessCommand(event
); }
56 virtual void ChangeFont(bool keepOriginalSize
= true);
57 virtual void ChangeBackgroundColour();
58 virtual void ChangeForegroundColour();
60 // implementation detail
61 void Increment( int delta
);
64 virtual void DoSetSize(int x
, int y
, int width
, int height
,
65 int sizeFlags
= wxSIZE_AUTO
);
66 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
67 virtual wxSize
DoGetBestSize() const;
70 wxArrowButton
* m_down
;