]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/checklst.h
Use re_search directly instead of regexec when using the GNU regex lib
[wxWidgets.git] / include / wx / motif / checklst.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/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 #include "wx/listbox.h"
17
18 class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
19 {
20 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
21
22 public:
23 // ctors
24 wxCheckListBox();
25 wxCheckListBox(wxWindow *parent, wxWindowID id,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 int nStrings = 0,
29 const wxString choices[] = NULL,
30 long style = 0,
31 const wxValidator& validator = wxDefaultValidator,
32 const wxString& name = wxListBoxNameStr);
33
34 wxCheckListBox(wxWindow *parent, wxWindowID id,
35 const wxPoint& pos,
36 const wxSize& size,
37 const wxArrayString& choices,
38 long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxListBoxNameStr);
41
42 bool Create(wxWindow *parent, wxWindowID id,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 int n = 0, const wxString choices[] = NULL,
46 long style = 0,
47 const wxValidator& validator = wxDefaultValidator,
48 const wxString& name = wxListBoxNameStr);
49
50 bool Create(wxWindow *parent, wxWindowID id,
51 const wxPoint& pos,
52 const wxSize& size,
53 const wxArrayString& choices,
54 long style = 0,
55 const wxValidator& validator = wxDefaultValidator,
56 const wxString& name = wxListBoxNameStr);
57
58 // items may be checked
59 bool IsChecked(size_t uiIndex) const;
60 void Check(size_t uiIndex, bool bCheck = true);
61
62 // override base class functions
63 virtual int DoAppend(const wxString& item);
64 virtual int FindString(const wxString& s, bool bCase = false) const;
65 virtual void SetString(int n, const wxString& s);
66 virtual wxString GetString(int n) const;
67
68 virtual void DoInsertItems(const wxArrayString& items, int pos);
69 virtual void DoSetItems(const wxArrayString& items, void **clientData);
70 private:
71 void DoToggleItem( int item, int x );
72 private:
73 DECLARE_EVENT_TABLE()
74 };
75
76 #endif
77 // _WX_CHECKLST_H_