]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/checkbox.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / cocoa / checkbox.h
CommitLineData
da0634c1
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/checkbox.h
3// Purpose: wxCheckBox class
4// Author: David Elliott
5// Modified by:
6// Created: 2003/03/16
da0634c1 7// Copyright: (c) 2003 David Elliott
8d8d3633 8// Licence: wxWindows licence
da0634c1
DE
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// ========================================================================
53a2db12 19class WXDLLIMPEXP_CORE wxCheckBox: public wxCheckBoxBase , protected wxCocoaNSButton
da0634c1
DE
20{
21 DECLARE_DYNAMIC_CLASS(wxCheckBox)
22 DECLARE_EVENT_TABLE()
23 WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
24// ------------------------------------------------------------------------
25// initialization
26// ------------------------------------------------------------------------
27public:
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// ------------------------------------------------------------------------
52protected:
53 virtual void Cocoa_wxNSButtonAction(void);
54// ------------------------------------------------------------------------
55// Implementation
56// ------------------------------------------------------------------------
57public:
58 virtual void SetValue(bool);
59 virtual bool GetValue() const;
d803176a 60 virtual void SetLabel(const wxString& label);
d174f457
VZ
61 virtual wxString GetLabel() const;
62
7f7b69e2
DE
63protected:
64 virtual void DoSet3StateValue(wxCheckBoxState state);
65 virtual wxCheckBoxState DoGet3StateValue() const;
da0634c1
DE
66};
67
68#endif // __WX_COCOA_CHECKBOX_H__