]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/spinbutt.h
We use native paths now in wxWindows. On the Mac, too.
[wxWidgets.git] / include / wx / motif / spinbutt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_SPINBUTT_H_
13 #define _WX_SPINBUTT_H_
14
15 #ifdef __GNUG__
16 #pragma interface "spinbutt.h"
17 #endif
18
19 class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase
20 {
21 DECLARE_DYNAMIC_CLASS(wxSpinButton)
22
23 public:
24 wxSpinButton() { }
25
26 wxSpinButton(wxWindow *parent,
27 wxWindowID id = -1,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = wxSP_VERTICAL,
31 const wxString& name = "wxSpinButton")
32 {
33 Create(parent, id, pos, size, style, name);
34 }
35 ~wxSpinButton();
36
37 bool Create(wxWindow *parent,
38 wxWindowID id = -1,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxSP_VERTICAL,
42 const wxString& name = "wxSpinButton");
43
44
45 // accessors
46 int GetValue() const;
47 int GetMin() const { return m_min; }
48 int GetMax() const { return m_max; }
49
50 // operations
51 void SetValue(int val);
52 void SetRange(int minVal, int maxVal);
53
54 // Implementation
55 virtual void Command(wxCommandEvent& event) { (void)ProcessCommand(event); };
56 virtual void ChangeFont(bool keepOriginalSize = TRUE);
57 virtual void ChangeBackgroundColour();
58 virtual void ChangeForegroundColour();
59
60 protected:
61 int m_min;
62 int m_max;
63 };
64
65 #endif
66 // _WX_SPINBUTT_H_