]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/spinbutt.h
added support for add/insert/deleting many items at once in wxArray (patch 548050)
[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 // accessors
45 int GetValue() const;
46 int GetMin() const { return m_min; }
47 int GetMax() const { return m_max; }
48
49 // operations
50 void SetValue(int val);
51 void SetRange(int minVal, int maxVal);
52
53 // Implementation
54 virtual void Command(wxCommandEvent& event) { (void)ProcessCommand(event); };
55 virtual void ChangeFont(bool keepOriginalSize = TRUE);
56 virtual void ChangeBackgroundColour();
57 virtual void ChangeForegroundColour();
58
59 protected:
60 int m_min;
61 int m_max;
62 };
63
64 #endif
65 // _WX_SPINBUTT_H_