]> git.saurik.com Git - wxWidgets.git/blob - src/cocoa/checklst.mm
Fix the off-by-one a little differently, and correct a refresh problem
[wxWidgets.git] / src / cocoa / checklst.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/checklst.mm
3 // Purpose: wxCheckListBox
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/03/18
7 // RCS-ID: $Id:
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/wxprec.h"
13 #ifndef WX_PRECOMP
14 #include "wx/log.h"
15 #include "wx/app.h"
16 #include "wx/checklst.h"
17 #endif //WX_PRECOMP
18
19 IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
20 BEGIN_EVENT_TABLE(wxCheckListBox, wxCheckListBoxBase)
21 END_EVENT_TABLE()
22 // WX_IMPLEMENT_COCOA_OWNER(wxCheckListBox,NSButton,NSControl,NSView)
23
24 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
25 const wxPoint& pos,
26 const wxSize& size,
27 const wxArrayString& choices,
28 long style,
29 const wxValidator& validator,
30 const wxString& name)
31 {
32 wxCArrayString chs(choices);
33
34 return Create(parent, winid, pos, size, chs.GetCount(), chs.GetStrings(),
35 style, validator, name);
36 }
37
38 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
39 const wxPoint& pos,
40 const wxSize& size,
41 int n, const wxString choices[],
42 long style,
43 const wxValidator& validator,
44 const wxString& name)
45 {
46 if(!CreateControl(parent,winid,pos,size,style,validator,name))
47 return false;
48
49 if(m_parent)
50 m_parent->CocoaAddChild(this);
51 return true;
52 }
53
54 wxCheckListBox::~wxCheckListBox()
55 {
56 CocoaRemoveFromParent();
57 }
58
59 bool wxCheckListBox::IsChecked(size_t item) const
60 {
61 return false;
62 }
63
64
65 void wxCheckListBox::Check(size_t item, bool check)
66 {
67 }
68