]>
Commit | Line | Data |
---|---|---|
9b6dbb09 JS |
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 | |
31528cd3 | 9 | // Licence: wxWindows licence |
9b6dbb09 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_SPINBUTT_H_ | |
13 | #define _WX_SPINBUTT_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
83df96d6 | 16 | #pragma interface "spinbutt.h" |
9b6dbb09 JS |
17 | #endif |
18 | ||
31528cd3 | 19 | class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase |
9b6dbb09 | 20 | { |
31528cd3 | 21 | DECLARE_DYNAMIC_CLASS(wxSpinButton) |
83df96d6 | 22 | |
31528cd3 VZ |
23 | public: |
24 | wxSpinButton() { } | |
83df96d6 | 25 | |
31528cd3 | 26 | wxSpinButton(wxWindow *parent, |
83df96d6 JS |
27 | wxWindowID id = -1, |
28 | const wxPoint& pos = wxDefaultPosition, | |
29 | const wxSize& size = wxDefaultSize, | |
30 | long style = wxSP_VERTICAL, | |
31 | const wxString& name = "wxSpinButton") | |
31528cd3 VZ |
32 | { |
33 | Create(parent, id, pos, size, style, name); | |
34 | } | |
35 | ~wxSpinButton(); | |
83df96d6 | 36 | |
31528cd3 | 37 | bool Create(wxWindow *parent, |
83df96d6 JS |
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 | ||
31528cd3 VZ |
44 | // accessors |
45 | int GetValue() const; | |
46 | int GetMin() const { return m_min; } | |
47 | int GetMax() const { return m_max; } | |
83df96d6 | 48 | |
31528cd3 VZ |
49 | // operations |
50 | void SetValue(int val); | |
51 | void SetRange(int minVal, int maxVal); | |
83df96d6 | 52 | |
31528cd3 VZ |
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(); | |
83df96d6 | 58 | |
9b6dbb09 | 59 | protected: |
31528cd3 VZ |
60 | int m_min; |
61 | int m_max; | |
9b6dbb09 JS |
62 | }; |
63 | ||
9b6dbb09 | 64 | #endif |
83df96d6 | 65 | // _WX_SPINBUTT_H_ |