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