]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/checkbox.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / cocoa / checkbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/03/16
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __WX_COCOA_CHECKBOX_H__
12 #define __WX_COCOA_CHECKBOX_H__
13
14 #include "wx/cocoa/NSButton.h"
15
16 // ========================================================================
17 // wxCheckBox
18 // ========================================================================
19 class WXDLLIMPEXP_CORE wxCheckBox: public wxCheckBoxBase , protected wxCocoaNSButton
20 {
21 DECLARE_DYNAMIC_CLASS(wxCheckBox)
22 DECLARE_EVENT_TABLE()
23 WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
24 // ------------------------------------------------------------------------
25 // initialization
26 // ------------------------------------------------------------------------
27 public:
28 wxCheckBox() { }
29 wxCheckBox(wxWindow *parent, wxWindowID winid,
30 const wxString& label,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 long style = 0,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxCheckBoxNameStr)
36 {
37 Create(parent, winid, label, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent, wxWindowID winid,
41 const wxString& label,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 long style = 0,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxCheckBoxNameStr);
47 virtual ~wxCheckBox();
48
49 // ------------------------------------------------------------------------
50 // Cocoa callbacks
51 // ------------------------------------------------------------------------
52 protected:
53 virtual void Cocoa_wxNSButtonAction(void);
54 // ------------------------------------------------------------------------
55 // Implementation
56 // ------------------------------------------------------------------------
57 public:
58 virtual void SetValue(bool);
59 virtual bool GetValue() const;
60 virtual void SetLabel(const wxString& label);
61 virtual wxString GetLabel() const;
62
63 protected:
64 virtual void DoSet3StateValue(wxCheckBoxState state);
65 virtual wxCheckBoxState DoGet3StateValue() const;
66 };
67
68 #endif // __WX_COCOA_CHECKBOX_H__