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