1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
16 #pragma interface "checkbox.h"
19 // Checkbox item (single checkbox)
20 class WXDLLEXPORT wxBitmap
;
21 class WXDLLEXPORT wxCheckBox
: public wxCheckBoxBase
25 wxCheckBox(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
, long style
= 0,
28 const wxValidator
& validator
= wxDefaultValidator
,
29 const wxString
& name
= wxCheckBoxNameStr
)
31 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
34 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
35 const wxPoint
& pos
= wxDefaultPosition
,
36 const wxSize
& size
= wxDefaultSize
, long style
= 0,
37 const wxValidator
& validator
= wxDefaultValidator
,
38 const wxString
& name
= wxCheckBoxNameStr
);
40 virtual void SetValue(bool value
);
41 virtual bool GetValue() const ;
43 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
44 virtual void SetLabel(const wxString
& label
);
45 virtual void Command(wxCommandEvent
& event
);
48 virtual wxSize
DoGetBestSize() const;
51 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
54 class WXDLLEXPORT wxBitmapCheckBox
: public wxCheckBox
56 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox
)
62 wxBitmapCheckBox() { checkWidth
= -1; checkHeight
= -1; }
63 wxBitmapCheckBox(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*label
,
64 const wxPoint
& pos
= wxDefaultPosition
,
65 const wxSize
& size
= wxDefaultSize
, long style
= 0,
66 const wxValidator
& validator
= wxDefaultValidator
,
67 const wxString
& name
= wxCheckBoxNameStr
)
69 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
72 bool Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*bitmap
,
73 const wxPoint
& pos
= wxDefaultPosition
,
74 const wxSize
& size
= wxDefaultSize
, long style
= 0,
75 const wxValidator
& validator
= wxDefaultValidator
,
76 const wxString
& name
= wxCheckBoxNameStr
);
78 virtual void SetLabel(const wxBitmap
& bitmap
);