]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/checklst.h
remove definitions which are already in wx/app.h
[wxWidgets.git] / include / wx / mac / carbon / checklst.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/checklst.h
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_CHECKLST_H_
14 #define _WX_CHECKLST_H_
15
16 class wxMacCheckListControl
17 {
18 public :
19 virtual bool MacIsChecked(unsigned int n) const = 0;
20 virtual void MacCheck(unsigned int n, bool bCheck = true) = 0;
21 };
22
23 class WXDLLEXPORT wxCheckListBox : public wxCheckListBoxBase
24 {
25 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
26 public:
27 // ctors
28 wxCheckListBox() { Init(); }
29 wxCheckListBox(wxWindow *parent,
30 wxWindowID id,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 int nStrings = 0,
34 const wxString *choices = NULL,
35 long style = 0,
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxListBoxNameStr)
38 {
39 Init();
40
41 Create(parent, id, pos, size, nStrings, choices, style, validator, name);
42 }
43 wxCheckListBox(wxWindow *parent,
44 wxWindowID id,
45 const wxPoint& pos,
46 const wxSize& size,
47 const wxArrayString& choices,
48 long style = 0,
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxListBoxNameStr)
51 {
52 Init();
53
54 Create(parent, id, pos, size, choices, style, validator, name);
55 }
56
57 bool Create(wxWindow *parent,
58 wxWindowID id,
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& size = wxDefaultSize,
61 int nStrings = 0,
62 const wxString *choices = NULL,
63 long style = 0,
64 const wxValidator& validator = wxDefaultValidator,
65 const wxString& name = wxListBoxNameStr);
66 bool Create(wxWindow *parent,
67 wxWindowID id,
68 const wxPoint& pos,
69 const wxSize& size,
70 const wxArrayString& choices,
71 long style = 0,
72 const wxValidator& validator = wxDefaultValidator,
73 const wxString& name = wxListBoxNameStr);
74
75 // items may be checked
76 bool IsChecked(unsigned int uiIndex) const;
77 void Check(unsigned int uiIndex, bool bCheck = true);
78
79 wxMacCheckListControl* GetPeer() const;
80
81 protected:
82 void Init();
83 private:
84
85 DECLARE_EVENT_TABLE()
86 };
87
88 #endif
89 // _WX_CHECKLST_H_