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