1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCheckBox class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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;
41 void DoSet3StateValue(wxCheckBoxState val
);
42 virtual wxCheckBoxState
DoGet3StateValue() const;
44 virtual void MacHandleControlClick( WXWidget control
, wxInt16 controlpart
, bool mouseStillDown
);
45 virtual void Command(wxCommandEvent
& event
);
47 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
50 class WXDLLEXPORT wxBitmap
;
51 class WXDLLEXPORT wxBitmapCheckBox
: public wxCheckBox
58 : checkWidth(-1), checkHeight(-1)
61 wxBitmapCheckBox(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*label
,
62 const wxPoint
& pos
= wxDefaultPosition
,
63 const wxSize
& size
= wxDefaultSize
, long style
= 0,
64 const wxValidator
& validator
= wxDefaultValidator
,
65 const wxString
& name
= wxCheckBoxNameStr
)
67 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
70 bool Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*bitmap
,
71 const wxPoint
& pos
= wxDefaultPosition
,
72 const wxSize
& size
= wxDefaultSize
, long style
= 0,
73 const wxValidator
& validator
= wxDefaultValidator
,
74 const wxString
& name
= wxCheckBoxNameStr
);
75 virtual void SetValue(bool);
76 virtual bool GetValue() const;
77 virtual void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
78 virtual void SetLabel(const wxBitmap
*bitmap
);
79 virtual void SetLabel( const wxString
& WXUNUSED(name
) ) {}
81 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox
)