1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_SPINBUTT_H_
13 #define _WX_SPINBUTT_H_
15 class WXDLLIMPEXP_FWD_CORE wxArrowButton
; // internal
17 class WXDLLEXPORT wxSpinButton
: public wxSpinButtonBase
19 DECLARE_DYNAMIC_CLASS(wxSpinButton
)
22 wxSpinButton() : m_up( 0 ), m_down( 0 ), m_pos( 0 ) { }
24 wxSpinButton(wxWindow
*parent
,
25 wxWindowID id
= wxID_ANY
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
28 long style
= wxSP_VERTICAL
,
29 const wxString
& name
= "wxSpinButton")
34 Create(parent
, id
, pos
, size
, style
, name
);
36 virtual ~wxSpinButton();
38 bool Create(wxWindow
*parent
,
39 wxWindowID id
= wxID_ANY
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxSP_VERTICAL
,
43 const wxString
& name
= "wxSpinButton");
47 int GetMin() const { return m_min
; }
48 int GetMax() const { return m_max
; }
51 void SetValue(int val
);
52 void SetRange(int minVal
, int maxVal
);
55 virtual void Command(wxCommandEvent
& event
)
56 { (void)ProcessCommand(event
); };
57 virtual void ChangeFont(bool keepOriginalSize
= true);
58 virtual void ChangeBackgroundColour();
59 virtual void ChangeForegroundColour();
61 // implementation detail
62 void Increment( int delta
);
65 virtual void DoSetSize(int x
, int y
, int width
, int height
,
66 int sizeFlags
= wxSIZE_AUTO
);
67 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
68 virtual wxSize
DoGetBestSize() const;
71 wxArrowButton
* m_down
;