1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: David Elliott
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_COCOA_CHECKBOX_H__
12 #define __WX_COCOA_CHECKBOX_H__
14 #include "wx/cocoa/NSButton.h"
16 // ========================================================================
18 // ========================================================================
19 class WXDLLIMPEXP_CORE wxCheckBox
: public wxCheckBoxBase
, protected wxCocoaNSButton
21 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
23 WX_DECLARE_COCOA_OWNER(NSButton
,NSControl
,NSView
)
24 // ------------------------------------------------------------------------
26 // ------------------------------------------------------------------------
29 wxCheckBox(wxWindow
*parent
, wxWindowID winid
,
30 const wxString
& label
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
34 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxCheckBoxNameStr
)
37 Create(parent
, winid
, label
, pos
, size
, style
, validator
, name
);
40 bool Create(wxWindow
*parent
, wxWindowID winid
,
41 const wxString
& label
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
& name
= wxCheckBoxNameStr
);
47 virtual ~wxCheckBox();
49 // ------------------------------------------------------------------------
51 // ------------------------------------------------------------------------
53 virtual void Cocoa_wxNSButtonAction(void);
54 // ------------------------------------------------------------------------
56 // ------------------------------------------------------------------------
58 virtual void SetValue(bool);
59 virtual bool GetValue() const;
60 virtual void SetLabel(const wxString
& label
);
61 virtual wxString
GetLabel() const;
64 virtual void DoSet3StateValue(wxCheckBoxState state
);
65 virtual wxCheckBoxState
DoGet3StateValue() const;
68 #endif // __WX_COCOA_CHECKBOX_H__