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"
16 WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr
;
18 // Checkbox item (single checkbox)
19 class WXDLLEXPORT wxBitmap
;
20 class WXDLLEXPORT wxCheckBox
: public wxCheckBoxBase
23 inline wxCheckBox() { }
24 inline wxCheckBox( wxWindow
* pParent
26 ,const wxString
& rsLabel
27 ,const wxPoint
& rPos
= wxDefaultPosition
28 ,const wxSize
& rSize
= wxDefaultSize
31 ,const wxValidator
& rValidator
= wxDefaultValidator
33 ,const wxString
& rsName
= wxCheckBoxNameStr
49 bool Create( wxWindow
* pParent
51 ,const wxString
& rsLabel
52 ,const wxPoint
& rPos
= wxDefaultPosition
53 ,const wxSize
& rSize
= wxDefaultSize
56 ,const wxValidator
& rValidator
= wxDefaultValidator
58 ,const wxString
& rsName
= wxCheckBoxNameStr
61 virtual void SetValue(bool bValue
);
62 virtual bool GetValue(void) const ;
64 virtual bool OS2Command( WXUINT uParam
67 virtual void SetLabel(const wxString
& rsLabel
);
68 virtual void Command(wxCommandEvent
& rEvent
);
71 virtual wxSize
DoGetBestSize(void) const;
73 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
76 class WXDLLEXPORT wxBitmapCheckBox
: public wxCheckBox
80 inline wxBitmapCheckBox() { m_nCheckWidth
= -1; m_nCheckHeight
= -1; }
81 inline wxBitmapCheckBox( wxWindow
* pParent
83 ,const wxBitmap
* pLabel
84 ,const wxPoint
& rPos
= wxDefaultPosition
85 ,const wxSize
& rSize
= wxDefaultSize
88 ,const wxValidator
& rValidator
= wxDefaultValidator
90 ,const wxString
& rsName
= wxCheckBoxNameStr
104 bool Create( wxWindow
* pParent
106 ,const wxBitmap
* pLabel
107 ,const wxPoint
& rPos
= wxDefaultPosition
108 ,const wxSize
& rSize
= wxDefaultSize
111 ,const wxValidator
& rValidator
= wxDefaultValidator
113 ,const wxString
& rsName
= wxCheckBoxNameStr
116 virtual void SetLabel(const wxBitmap
& rBitmap
);
123 virtual void SetLabel(const wxString
& rsString
)
124 { wxCheckBox::SetLabel(rsString
); };
125 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox
)