]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/checklst.h
don't eat activation events (replaces patch 1465849)
[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
13#ifndef _WX_CHECKLST_H_
14#define _WX_CHECKLST_H_
15
8cf73271
SC
16class WXDLLEXPORT wxCheckListBox : public wxCheckListBoxBase
17{
18 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
19public:
20 // ctors
21 wxCheckListBox() { Init(); }
22 wxCheckListBox(wxWindow *parent,
23 wxWindowID id,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
26 int nStrings = 0,
27 const wxString *choices = NULL,
28 long style = 0,
29 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxListBoxNameStr)
31 {
32 Init();
33
34 Create(parent, id, pos, size, nStrings, choices, style, validator, name);
35 }
36 wxCheckListBox(wxWindow *parent,
37 wxWindowID id,
38 const wxPoint& pos,
39 const wxSize& size,
40 const wxArrayString& choices,
41 long style = 0,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxListBoxNameStr)
44 {
45 Init();
46
47 Create(parent, id, pos, size, choices, style, validator, name);
48 }
49
50 bool Create(wxWindow *parent,
51 wxWindowID id,
52 const wxPoint& pos = wxDefaultPosition,
53 const wxSize& size = wxDefaultSize,
54 int nStrings = 0,
55 const wxString *choices = NULL,
56 long style = 0,
57 const wxValidator& validator = wxDefaultValidator,
58 const wxString& name = wxListBoxNameStr);
59 bool Create(wxWindow *parent,
60 wxWindowID id,
61 const wxPoint& pos,
62 const wxSize& size,
63 const wxArrayString& choices,
64 long style = 0,
65 const wxValidator& validator = wxDefaultValidator,
66 const wxString& name = wxListBoxNameStr);
67
19de24fe 68 // items may be checked
aa61d352
VZ
69 bool IsChecked(unsigned int uiIndex) const;
70 void Check(unsigned int uiIndex, bool bCheck = true);
8cf73271 71
8cf73271
SC
72
73 // override all methods which add/delete items to update m_checks array as
74 // well
aa61d352 75 virtual void Delete(unsigned int n);
19de24fe
SC
76 // the array containing the checked status of the items
77 wxArrayInt m_checks;
78
8cf73271
SC
79protected:
80 virtual int DoAppend(const wxString& item);
aa61d352 81 virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
8cf73271
SC
82 virtual void DoSetItems(const wxArrayString& items, void **clientData);
83 virtual void DoClear();
84 // common part of all ctors
85 void Init();
86private:
19de24fe
SC
87
88 DECLARE_EVENT_TABLE()
8cf73271
SC
89};
90
91#endif
92 // _WX_CHECKLST_H_