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