1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCheckBox class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
16 #pragma interface "checkbox.h"
19 #include "wx/control.h"
21 WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr
;
23 // Checkbox item (single checkbox)
24 class WXDLLEXPORT wxBitmap
;
25 class WXDLLEXPORT wxCheckBox
: public wxControl
27 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
30 inline wxCheckBox() { }
31 inline wxCheckBox(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
, long style
= 0,
34 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxCheckBoxNameStr
)
37 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
40 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
, long style
= 0,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxCheckBoxNameStr
);
45 virtual void SetValue(bool);
46 virtual bool GetValue() const ;
47 virtual void MacHandleControlClick( ControlHandle control
, SInt16 controlpart
) ;
48 virtual void Command(wxCommandEvent
& event
);
51 class WXDLLEXPORT wxBitmapCheckBox
: public wxCheckBox
53 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox
)
59 inline wxBitmapCheckBox() { checkWidth
= -1; checkHeight
= -1; }
60 inline wxBitmapCheckBox(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*label
,
61 const wxPoint
& pos
= wxDefaultPosition
,
62 const wxSize
& size
= wxDefaultSize
, long style
= 0,
63 const wxValidator
& validator
= wxDefaultValidator
,
64 const wxString
& name
= wxCheckBoxNameStr
)
66 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
69 bool Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*bitmap
,
70 const wxPoint
& pos
= wxDefaultPosition
,
71 const wxSize
& size
= wxDefaultSize
, long style
= 0,
72 const wxValidator
& validator
= wxDefaultValidator
,
73 const wxString
& name
= wxCheckBoxNameStr
);
74 virtual void SetValue(bool);
75 virtual bool GetValue() const ;
76 virtual void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
77 virtual void SetLabel(const wxBitmap
*bitmap
);
78 virtual void SetLabel( const wxString
&name
) {}