1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCheckBox class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "checkbox.h"
19 // Checkbox item (single checkbox)
20 class WXDLLEXPORT wxCheckBox
: public wxCheckBoxBase
24 wxCheckBox(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
, long style
= 0,
27 const wxValidator
& validator
= wxDefaultValidator
,
28 const wxString
& name
= wxCheckBoxNameStr
)
30 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
33 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
, long style
= 0,
36 const wxValidator
& validator
= wxDefaultValidator
,
37 const wxString
& name
= wxCheckBoxNameStr
);
38 virtual void SetValue(bool);
39 virtual bool GetValue() const;
40 virtual void MacHandleControlClick( WXWidget control
, wxInt16 controlpart
);
41 virtual void Command(wxCommandEvent
& event
);
43 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
46 class WXDLLEXPORT wxBitmap
;
47 class WXDLLEXPORT wxBitmapCheckBox
: public wxCheckBox
54 : checkWidth(-1), checkHeight(-1)
57 wxBitmapCheckBox(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*label
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
, long style
= 0,
60 const wxValidator
& validator
= wxDefaultValidator
,
61 const wxString
& name
= wxCheckBoxNameStr
)
63 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
66 bool Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*bitmap
,
67 const wxPoint
& pos
= wxDefaultPosition
,
68 const wxSize
& size
= wxDefaultSize
, long style
= 0,
69 const wxValidator
& validator
= wxDefaultValidator
,
70 const wxString
& name
= wxCheckBoxNameStr
);
71 virtual void SetValue(bool);
72 virtual bool GetValue() const;
73 virtual void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
74 virtual void SetLabel(const wxBitmap
*bitmap
);
75 virtual void SetLabel( const wxString
& WXUNUSED(name
) ) {}
77 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox
)