]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/spinbutt.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / os2 / spinbutt.h
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/os2/spinbutt.h
0e320a79 3// Purpose: wxSpinButton class
409c9842 4// Author: David Webster
0e320a79 5// Modified by:
409c9842 6// Created: 10/15/99
409c9842 7// Copyright: (c) David Webster
65571936 8// Licence: wxWindows licence
0e320a79
DW
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_SPINBUTT_H_
12#define _WX_SPINBUTT_H_
13
0e320a79
DW
14#include "wx/control.h"
15#include "wx/event.h"
16
3c299c3a
DW
17extern MRESULT EXPENTRY wxSpinCtrlWndProc(
18 HWND hWnd
19, UINT uMessage
20, MPARAM wParam
21, MPARAM lParam
22);
23
53a2db12 24class WXDLLIMPEXP_CORE wxSpinButton: public wxSpinButtonBase
0e320a79 25{
409c9842
DW
26public:
27 // Construction
28 wxSpinButton() { }
3c299c3a
DW
29 inline wxSpinButton( wxWindow* pParent
30 ,wxWindowID vId = -1
31 ,const wxPoint& rPos = wxDefaultPosition
32 ,const wxSize& rSize = wxDefaultSize
33 ,long lStyle = wxSP_VERTICAL
edf1dfa1 34 ,const wxString& rsName = wxT("wxSpinButton")
409c9842
DW
35 )
36 {
3c299c3a 37 Create(pParent, vId, rPos, rSize, lStyle, rsName);
409c9842 38 }
409c9842
DW
39 virtual ~wxSpinButton();
40
3c299c3a
DW
41
42 bool Create( wxWindow* pParent
43 ,wxWindowID vId = -1
44 ,const wxPoint& rPos = wxDefaultPosition
45 ,const wxSize& rSize = wxDefaultSize
46 ,long lStyle = wxSP_VERTICAL
edf1dfa1 47 ,const wxString& rsName = wxT("wxSpinButton")
409c9842
DW
48 );
49
50 // Accessors
3c299c3a
DW
51 inline virtual int GetMax(void) const { return m_max; }
52 inline virtual int GetMin(void) const { return m_min; }
53 virtual int GetValue(void) const;
54 inline bool IsVertical(void) const {return ((m_windowStyle & wxSP_VERTICAL) != 0); }
55 virtual void SetValue(int nVal);
56 virtual void SetRange( int nMinVal
57 ,int nMaxVal
58 );
409c9842 59
3c299c3a 60 //
e78c4d50 61 // Implementation
3c299c3a
DW
62 //
63 virtual bool OS2Command( WXUINT wParam
64 ,WXWORD wId
409c9842 65 );
3c299c3a 66 virtual bool OS2OnScroll( int nOrientation
409c9842 67 ,WXWORD wParam
3c299c3a
DW
68 ,WXWORD wPos
69 ,WXHWND hControl
409c9842 70 );
0e320a79 71
3c299c3a 72 inline virtual bool AcceptsFocus(void) const { return FALSE; }
0e320a79 73protected:
3c299c3a 74 virtual wxSize DoGetBestSize() const;
409c9842
DW
75private:
76 DECLARE_DYNAMIC_CLASS(wxSpinButton)
3c299c3a
DW
77}; // end of CLASS wxSpinButton
78
79#endif // _WX_SPINBUTT_H_