]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/checkbox.h
Removing OS/2 specific positioning methods, no longer needed
[wxWidgets.git] / include / wx / os2 / checkbox.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: checkbox.h
3// Purpose: wxCheckBox class
37f214d5 4// Author: David Webster
0e320a79 5// Modified by:
37f214d5 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
37f214d5
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHECKBOX_H_
13#define _WX_CHECKBOX_H_
14
0e320a79 15#include "wx/control.h"
0e320a79
DW
16
17// Checkbox item (single checkbox)
18class WXDLLEXPORT wxBitmap;
210a651b 19class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
0e320a79 20{
0e320a79 21 public:
3011bf2b
DW
22 inline wxCheckBox() { }
23 inline wxCheckBox( wxWindow* pParent
24 ,wxWindowID vId
25 ,const wxString& rsLabel
26 ,const wxPoint& rPos = wxDefaultPosition
27 ,const wxSize& rSize = wxDefaultSize
28 ,long lStyle = 0
29#if wxUSE_VALIDATORS
30 ,const wxValidator& rValidator = wxDefaultValidator
31#endif
32 ,const wxString& rsName = wxCheckBoxNameStr
33 )
34 {
35 Create( pParent
36 ,vId
37 ,rsLabel
38 ,rPos
39 ,rSize
40 ,lStyle
57c4d796 41#if wxUSE_VALIDATORS
3011bf2b 42 ,rValidator
57c4d796 43#endif
3011bf2b
DW
44 ,rsName
45 );
46 }
0e320a79 47
3011bf2b
DW
48 bool Create( wxWindow* pParent
49 ,wxWindowID vId
50 ,const wxString& rsLabel
51 ,const wxPoint& rPos = wxDefaultPosition
52 ,const wxSize& rSize = wxDefaultSize
53 ,long lStyle = 0
57c4d796 54#if wxUSE_VALIDATORS
3011bf2b 55 ,const wxValidator& rValidator = wxDefaultValidator
57c4d796 56#endif
3011bf2b
DW
57 ,const wxString& rsName = wxCheckBoxNameStr
58 );
37f214d5 59
3011bf2b
DW
60 virtual void SetValue(bool bValue);
61 virtual bool GetValue(void) const ;
37f214d5 62
3011bf2b
DW
63 virtual bool OS2Command( WXUINT uParam
64 ,WXWORD wId
65 );
66 virtual void SetLabel(const wxString& rsLabel);
67 virtual void Command(wxCommandEvent& rEvent);
37f214d5
DW
68
69protected:
3011bf2b 70 virtual wxSize DoGetBestSize(void) const;
210a651b
DW
71private:
72 DECLARE_DYNAMIC_CLASS(wxCheckBox)
0e320a79
DW
73};
74
75class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
76{
0e320a79 77 public:
0e320a79 78
3011bf2b
DW
79 inline wxBitmapCheckBox() { m_nCheckWidth = -1; m_nCheckHeight = -1; }
80 inline wxBitmapCheckBox( wxWindow* pParent
81 ,wxWindowID vId
82 ,const wxBitmap* pLabel
83 ,const wxPoint& rPos = wxDefaultPosition
84 ,const wxSize& rSize = wxDefaultSize
85 ,long lStyle = 0
57c4d796 86#if wxUSE_VALIDATORS
3011bf2b 87 ,const wxValidator& rValidator = wxDefaultValidator
57c4d796 88#endif
3011bf2b
DW
89 ,const wxString& rsName = wxCheckBoxNameStr
90 )
91 {
92 Create( pParent
93 ,vId
94 ,pLabel
95 ,rPos
96 ,rSize
97 ,lStyle
98 ,rValidator
99 ,rsName
100 );
101 }
0e320a79 102
3011bf2b
DW
103 bool Create( wxWindow* pParent
104 ,wxWindowID vId
105 ,const wxBitmap* pLabel
106 ,const wxPoint& rPos = wxDefaultPosition
107 ,const wxSize& rSize = wxDefaultSize
108 ,long lStyle = 0
57c4d796 109#if wxUSE_VALIDATORS
3011bf2b 110 ,const wxValidator& rValidator = wxDefaultValidator
57c4d796 111#endif
3011bf2b
DW
112 ,const wxString& rsName = wxCheckBoxNameStr
113 );
114
115 virtual void SetLabel(const wxBitmap& rBitmap);
116
117 int m_nCheckWidth;
118 int m_nCheckHeight;
37f214d5 119
0e320a79 120private:
3011bf2b
DW
121
122 virtual void SetLabel(const wxString& rsString)
123 { wxCheckBox::SetLabel(rsString); };
124 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
0e320a79
DW
125};
126#endif
127 // _WX_CHECKBOX_H_