1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCheckBox class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
15 #include "wx/control.h"
17 // Checkbox item (single checkbox)
18 class WXDLLEXPORT wxBitmap
;
19 class WXDLLEXPORT wxCheckBox
: public wxCheckBoxBase
22 inline wxCheckBox() { }
23 inline wxCheckBox( wxWindow
* pParent
25 ,const wxString
& rsLabel
26 ,const wxPoint
& rPos
= wxDefaultPosition
27 ,const wxSize
& rSize
= wxDefaultSize
30 ,const wxValidator
& rValidator
= wxDefaultValidator
32 ,const wxString
& rsName
= wxCheckBoxNameStr
48 bool Create( wxWindow
* pParent
50 ,const wxString
& rsLabel
51 ,const wxPoint
& rPos
= wxDefaultPosition
52 ,const wxSize
& rSize
= wxDefaultSize
55 ,const wxValidator
& rValidator
= wxDefaultValidator
57 ,const wxString
& rsName
= wxCheckBoxNameStr
60 virtual void SetValue(bool bValue
);
61 virtual bool GetValue(void) const ;
63 virtual bool OS2Command( WXUINT uParam
66 virtual void SetLabel(const wxString
& rsLabel
);
67 virtual void Command(wxCommandEvent
& rEvent
);
70 virtual wxSize
DoGetBestSize(void) const;
72 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
75 class WXDLLEXPORT wxBitmapCheckBox
: public wxCheckBox
79 inline wxBitmapCheckBox() { m_nCheckWidth
= -1; m_nCheckHeight
= -1; }
80 inline wxBitmapCheckBox( wxWindow
* pParent
82 ,const wxBitmap
* pLabel
83 ,const wxPoint
& rPos
= wxDefaultPosition
84 ,const wxSize
& rSize
= wxDefaultSize
87 ,const wxValidator
& rValidator
= wxDefaultValidator
89 ,const wxString
& rsName
= wxCheckBoxNameStr
103 bool Create( wxWindow
* pParent
105 ,const wxBitmap
* pLabel
106 ,const wxPoint
& rPos
= wxDefaultPosition
107 ,const wxSize
& rSize
= wxDefaultSize
110 ,const wxValidator
& rValidator
= wxDefaultValidator
112 ,const wxString
& rsName
= wxCheckBoxNameStr
115 virtual void SetLabel(const wxBitmap
& rBitmap
);
122 virtual void SetLabel(const wxString
& rsString
)
123 { wxCheckBox::SetLabel(rsString
); };
124 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox
)