]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/checklst.h
Cast for argument to delete[] - VC6 doesn't want to delete a const pointer
[wxWidgets.git] / include / wx / mac / carbon / checklst.h
CommitLineData
8cf73271 1///////////////////////////////////////////////////////////////////////////////
aa61d352 2// Name: wx/mac/carbon/checklst.h
8cf73271
SC
3// Purpose: wxCheckListBox class - a listbox with checkable items
4// Note: this is an optional class.
5// Author: Stefan Csomor
6// Modified by:
7// Created: 1998-01-01
8// RCS-ID: $Id$
9// Copyright: (c) Stefan Csomor
65571936 10// Licence: wxWindows licence
8cf73271
SC
11///////////////////////////////////////////////////////////////////////////////
12
6ab4491a
VZ
13#ifndef _WX_MAC_CHECKLST_H_
14#define _WX_MAC_CHECKLST_H_
8cf73271 15
6ab4491a 16class wxMacCheckListControl
ca923098
SC
17{
18public :
19 virtual bool MacIsChecked(unsigned int n) const = 0;
20 virtual void MacCheck(unsigned int n, bool bCheck = true) = 0;
6ab4491a
VZ
21
22 virtual ~wxMacCheckListControl() { }
ca923098
SC
23};
24
53a2db12 25class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
8cf73271 26{
8cf73271 27public:
6ab4491a 28 // ctors
8cf73271
SC
29 wxCheckListBox() { Init(); }
30 wxCheckListBox(wxWindow *parent,
31 wxWindowID id,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 int nStrings = 0,
35 const wxString *choices = NULL,
36 long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxListBoxNameStr)
39 {
40 Init();
41
42 Create(parent, id, pos, size, nStrings, choices, style, validator, name);
43 }
44 wxCheckListBox(wxWindow *parent,
45 wxWindowID id,
46 const wxPoint& pos,
47 const wxSize& size,
48 const wxArrayString& choices,
49 long style = 0,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxListBoxNameStr)
52 {
53 Init();
54
55 Create(parent, id, pos, size, choices, style, validator, name);
56 }
57
58 bool Create(wxWindow *parent,
59 wxWindowID id,
60 const wxPoint& pos = wxDefaultPosition,
61 const wxSize& size = wxDefaultSize,
62 int nStrings = 0,
63 const wxString *choices = NULL,
64 long style = 0,
65 const wxValidator& validator = wxDefaultValidator,
66 const wxString& name = wxListBoxNameStr);
67 bool Create(wxWindow *parent,
68 wxWindowID id,
69 const wxPoint& pos,
70 const wxSize& size,
71 const wxArrayString& choices,
72 long style = 0,
73 const wxValidator& validator = wxDefaultValidator,
74 const wxString& name = wxListBoxNameStr);
75
19de24fe 76 // items may be checked
aa61d352
VZ
77 bool IsChecked(unsigned int uiIndex) const;
78 void Check(unsigned int uiIndex, bool bCheck = true);
8cf73271 79
ca923098 80 wxMacCheckListControl* GetPeer() const;
19de24fe 81
8cf73271 82protected:
8cf73271 83 void Init();
19de24fe 84
6ab4491a 85private:
19de24fe 86 DECLARE_EVENT_TABLE()
6ab4491a 87 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
8cf73271
SC
88};
89
6ab4491a 90#endif // _WX_MAC_CHECKLST_H_