]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/spinbutt.h
STL compilation fix
[wxWidgets.git] / include / wx / motif / spinbutt.h
CommitLineData
9b6dbb09 1/////////////////////////////////////////////////////////////////////////////
925f7740 2// Name: wx/motif/spinbutt.h
9b6dbb09
JS
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
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SPINBUTT_H_
13#define _WX_SPINBUTT_H_
14
dba00620
MB
15class WXDLLEXPORT wxArrowButton; // internal
16
31528cd3 17class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase
9b6dbb09 18{
31528cd3 19 DECLARE_DYNAMIC_CLASS(wxSpinButton)
925f7740 20
31528cd3 21public:
dba00620 22 wxSpinButton() : m_up( 0 ), m_down( 0 ), m_pos( 0 ) { }
925f7740 23
31528cd3 24 wxSpinButton(wxWindow *parent,
925f7740 25 wxWindowID id = wxID_ANY,
83df96d6
JS
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = wxSP_VERTICAL,
29 const wxString& name = "wxSpinButton")
dba00620
MB
30 : m_up( 0 ),
31 m_down( 0 ),
32 m_pos( 0 )
31528cd3
VZ
33 {
34 Create(parent, id, pos, size, style, name);
35 }
d3c7fc99 36 virtual ~wxSpinButton();
925f7740 37
31528cd3 38 bool Create(wxWindow *parent,
925f7740 39 wxWindowID id = wxID_ANY,
83df96d6
JS
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxSP_VERTICAL,
43 const wxString& name = "wxSpinButton");
925f7740 44
31528cd3
VZ
45 // accessors
46 int GetValue() const;
47 int GetMin() const { return m_min; }
48 int GetMax() const { return m_max; }
925f7740 49
31528cd3
VZ
50 // operations
51 void SetValue(int val);
52 void SetRange(int minVal, int maxVal);
925f7740 53
31528cd3 54 // Implementation
dba00620
MB
55 virtual void Command(wxCommandEvent& event)
56 { (void)ProcessCommand(event); };
96be256b 57 virtual void ChangeFont(bool keepOriginalSize = true);
31528cd3
VZ
58 virtual void ChangeBackgroundColour();
59 virtual void ChangeForegroundColour();
dba00620
MB
60public:
61 // implementation detail
62 void Increment( int delta );
63
64private:
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;
69
70 wxArrowButton* m_up;
71 wxArrowButton* m_down;
72 int m_pos;
9b6dbb09
JS
73};
74
9b6dbb09 75#endif
83df96d6 76// _WX_SPINBUTT_H_