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