1 /////////////////////////////////////////////////////////////////////////////
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 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "spinbutt.h"
19 class WXDLLEXPORT wxArrowButton
; // internal
21 class WXDLLEXPORT wxSpinButton
: public wxSpinButtonBase
23 DECLARE_DYNAMIC_CLASS(wxSpinButton
)
26 wxSpinButton() : m_up( 0 ), m_down( 0 ), m_pos( 0 ) { }
28 wxSpinButton(wxWindow
*parent
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
32 long style
= wxSP_VERTICAL
,
33 const wxString
& name
= "wxSpinButton")
38 Create(parent
, id
, pos
, size
, style
, name
);
42 bool Create(wxWindow
*parent
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
46 long style
= wxSP_VERTICAL
,
47 const wxString
& name
= "wxSpinButton");
51 int GetMin() const { return m_min
; }
52 int GetMax() const { return m_max
; }
55 void SetValue(int val
);
56 void SetRange(int minVal
, int maxVal
);
59 virtual void Command(wxCommandEvent
& event
)
60 { (void)ProcessCommand(event
); };
61 virtual void ChangeFont(bool keepOriginalSize
= TRUE
);
62 virtual void ChangeBackgroundColour();
63 virtual void ChangeForegroundColour();
65 // implementation detail
66 void Increment( int delta
);
69 virtual void DoSetSize(int x
, int y
, int width
, int height
,
70 int sizeFlags
= wxSIZE_AUTO
);
71 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
72 virtual wxSize
DoGetBestSize() const;
75 wxArrowButton
* m_down
;