]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/checklst.h
avoid a bug in Carbon headers
[wxWidgets.git] / include / wx / motif / checklst.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: checklst.h
3 // Purpose: wxCheckListBox class - a listbox with checkable items
4 // Note: this is an optional class.
5 // Author: Julian Smart
6 // Modified by:
7 // Created: 17/09/98
8 // RCS-ID: $Id$
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 ///////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_CHECKLST_H_
14 #define _WX_CHECKLST_H_
15
16 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
17 #pragma interface "checklst.h"
18 #endif
19
20 #include "wx/listbox.h"
21
22 class wxCheckListBox : public wxCheckListBoxBase
23 {
24 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
25
26 public:
27 // ctors
28 wxCheckListBox();
29 wxCheckListBox(wxWindow *parent, wxWindowID id,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 int nStrings = 0,
33 const wxString choices[] = NULL,
34 long style = 0,
35 const wxValidator& validator = wxDefaultValidator,
36 const wxString& name = wxListBoxNameStr);
37
38 bool Create(wxWindow *parent, wxWindowID id,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 int n = 0, const wxString choices[] = NULL,
42 long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxListBoxNameStr);
45
46 // items may be checked
47 bool IsChecked(size_t uiIndex) const;
48 void Check(size_t uiIndex, bool bCheck = TRUE);
49
50 // override base class functions
51 virtual int DoAppend(const wxString& item);
52 virtual int FindString(const wxString& s) const;
53 virtual void SetString(int n, const wxString& s);
54 virtual wxString GetString(int n) const;
55
56 virtual void DoInsertItems(const wxArrayString& items, int pos);
57 virtual void DoSetItems(const wxArrayString& items, void **clientData);
58 private:
59 void DoToggleItem( int item, int x );
60 private:
61 DECLARE_EVENT_TABLE()
62 };
63
64 #endif
65 // _WX_CHECKLST_H_