1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: Stefan Csomor
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_CHECKBOX_H_
12 #define _WX_CHECKBOX_H_
14 // Checkbox item (single checkbox)
15 class WXDLLIMPEXP_CORE wxCheckBox
: public wxCheckBoxBase
19 wxCheckBox(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
20 const wxPoint
& pos
= wxDefaultPosition
,
21 const wxSize
& size
= wxDefaultSize
, long style
= 0,
22 const wxValidator
& validator
= wxDefaultValidator
,
23 const wxString
& name
= wxCheckBoxNameStr
)
25 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
28 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
, long style
= 0,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxCheckBoxNameStr
);
33 virtual void SetValue(bool);
34 virtual bool GetValue() const;
36 virtual void Command(wxCommandEvent
& event
);
38 // osx specific event handling common for all osx-ports
40 virtual bool OSXHandleClicked( double timestampsec
);
42 void DoSet3StateValue(wxCheckBoxState val
);
43 virtual wxCheckBoxState
DoGet3StateValue() const;
45 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
48 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
49 class WXDLLIMPEXP_CORE wxBitmapCheckBox
: public wxCheckBox
56 : checkWidth(-1), checkHeight(-1)
59 wxBitmapCheckBox(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*label
,
60 const wxPoint
& pos
= wxDefaultPosition
,
61 const wxSize
& size
= wxDefaultSize
, long style
= 0,
62 const wxValidator
& validator
= wxDefaultValidator
,
63 const wxString
& name
= wxCheckBoxNameStr
)
65 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
68 bool Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*bitmap
,
69 const wxPoint
& pos
= wxDefaultPosition
,
70 const wxSize
& size
= wxDefaultSize
, long style
= 0,
71 const wxValidator
& validator
= wxDefaultValidator
,
72 const wxString
& name
= wxCheckBoxNameStr
);
73 virtual void SetValue(bool);
74 virtual bool GetValue() const;
75 virtual void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
76 virtual void SetLabel(const wxBitmap
*bitmap
);
77 virtual void SetLabel( const wxString
& WXUNUSED(name
) ) {}
79 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox
)