]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/checklst.h
support retina display
[wxWidgets.git] / include / wx / osx / checklst.h
CommitLineData
6762286d 1///////////////////////////////////////////////////////////////////////////////
233f5738 2// Name: wx/osx/checklst.h
6762286d
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
10// Licence: wxWindows licence
11///////////////////////////////////////////////////////////////////////////////
12
13#ifndef _WX_MAC_CHECKLST_H_
14#define _WX_MAC_CHECKLST_H_
15
16class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
17{
18public:
19 // ctors
20 wxCheckListBox() { Init(); }
21 wxCheckListBox(wxWindow *parent,
22 wxWindowID id,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize,
25 int nStrings = 0,
26 const wxString *choices = NULL,
27 long style = 0,
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxListBoxNameStr)
30 {
31 Init();
32
33 Create(parent, id, pos, size, nStrings, choices, style, validator, name);
34 }
35 wxCheckListBox(wxWindow *parent,
36 wxWindowID id,
37 const wxPoint& pos,
38 const wxSize& size,
39 const wxArrayString& choices,
40 long style = 0,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxListBoxNameStr)
43 {
44 Init();
45
46 Create(parent, id, pos, size, choices, style, validator, name);
47 }
48
49 bool Create(wxWindow *parent,
50 wxWindowID id,
51 const wxPoint& pos = wxDefaultPosition,
52 const wxSize& size = wxDefaultSize,
53 int nStrings = 0,
54 const wxString *choices = NULL,
55 long style = 0,
56 const wxValidator& validator = wxDefaultValidator,
57 const wxString& name = wxListBoxNameStr);
58 bool Create(wxWindow *parent,
59 wxWindowID id,
60 const wxPoint& pos,
61 const wxSize& size,
62 const wxArrayString& choices,
63 long style = 0,
64 const wxValidator& validator = wxDefaultValidator,
65 const wxString& name = wxListBoxNameStr);
66
67 // items may be checked
68 bool IsChecked(unsigned int uiIndex) const;
69 void Check(unsigned int uiIndex, bool bCheck = true);
70
71 // data callbacks
72 virtual void GetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value );
73 virtual void SetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value );
74
75protected:
76 // override all methods which add/delete items to update m_checks array as
77 // well
78 virtual void OnItemInserted(unsigned int pos);
79 virtual void DoDeleteOneItem(unsigned int n);
80 virtual void DoClear();
81
82 // the array containing the checked status of the items
83 wxArrayInt m_checks;
03647350 84
6762286d
SC
85 wxListWidgetColumn* m_checkColumn ;
86
87 void Init();
88
89private:
90 DECLARE_EVENT_TABLE()
91 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
92};
93
94#endif // _WX_MAC_CHECKLST_H_