]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/spinbutt.h
Make wxComboCtrlBase::Set*groundColour() methods public.
[wxWidgets.git] / include / wx / msw / spinbutt.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/msw/spinbutt.h
2bda0e17
KB
3// Purpose: wxSpinButton class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
bbcdf8bc 7// Copyright: (c) Julian Smart
65571936 8// Licence: wxWindows licence
2bda0e17
KB
9/////////////////////////////////////////////////////////////////////////////
10
bbcdf8bc
JS
11#ifndef _WX_SPINBUTT_H_
12#define _WX_SPINBUTT_H_
2bda0e17 13
2bda0e17
KB
14#include "wx/control.h"
15#include "wx/event.h"
16
4bf45c9e
WS
17#if wxUSE_SPINBTN
18
53a2db12 19class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase
2bda0e17 20{
aeafc354 21public:
b782f2e0 22 // construction
5ea47806 23 wxSpinButton() { }
a23fd0e1 24
aeafc354 25 wxSpinButton(wxWindow *parent,
4bf45c9e 26 wxWindowID id = wxID_ANY,
aeafc354
VZ
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
1e6feb95 30 const wxString& name = wxSPIN_BUTTON_NAME)
aeafc354
VZ
31 {
32 Create(parent, id, pos, size, style, name);
33 }
a23fd0e1 34
aeafc354 35 virtual ~wxSpinButton();
a23fd0e1 36
aeafc354 37 bool Create(wxWindow *parent,
4bf45c9e 38 wxWindowID id = wxID_ANY,
aeafc354
VZ
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
a23fd0e1 41 long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
1e6feb95 42 const wxString& name = wxSPIN_BUTTON_NAME);
a23fd0e1
VZ
43
44
0655ad29 45 // accessors
31528cd3
VZ
46 virtual int GetValue() const;
47 virtual void SetValue(int val);
48 virtual void SetRange(int minVal, int maxVal);
a23fd0e1 49
0655ad29 50 // implementation
aeafc354 51 virtual bool MSWCommand(WXUINT param, WXWORD id);
0655ad29 52 virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
a23fd0e1
VZ
53 virtual bool MSWOnScroll(int orientation, WXWORD wParam,
54 WXWORD pos, WXHWND control);
b782f2e0 55
8614c467 56 // a wxSpinButton can't do anything useful with focus, only wxSpinCtrl can
4bf45c9e 57 virtual bool AcceptsFocus() const { return false; }
8614c467 58
a047aff2
JS
59 // returns true if the platform should explicitly apply a theme border
60 virtual bool CanApplyThemeBorder() const { return false; }
61
b782f2e0 62protected:
f68586e5 63 virtual wxSize DoGetBestSize() const;
b782f2e0 64
5ec60151 65 // ensure that the control displays a value in the current range
1e8dba5e 66 virtual void NormalizeValue();
5ec60151 67
b782f2e0 68private:
fc7a2a60 69 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSpinButton)
2bda0e17
KB
70};
71
4bf45c9e
WS
72#endif // wxUSE_SPINBTN
73
74#endif // _WX_SPINBUTT_H_