]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | /////////////////////////////////////////////////////////////////////////////// |
853dcc57 | 2 | // Name: wx/motif/checklst.h |
9b6dbb09 JS |
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 | |
65571936 | 10 | // Licence: wxWindows licence |
9b6dbb09 JS |
11 | /////////////////////////////////////////////////////////////////////////////// |
12 | ||
13 | #ifndef _WX_CHECKLST_H_ | |
14 | #define _WX_CHECKLST_H_ | |
15 | ||
9b6dbb09 JS |
16 | #include "wx/listbox.h" |
17 | ||
94c7b088 | 18 | class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase |
9b6dbb09 | 19 | { |
83df96d6 | 20 | DECLARE_DYNAMIC_CLASS(wxCheckListBox) |
853dcc57 | 21 | |
9b6dbb09 | 22 | public: |
1bfcb0b6 VZ |
23 | // ctors |
24 | wxCheckListBox(); | |
25 | wxCheckListBox(wxWindow *parent, wxWindowID id, | |
83df96d6 JS |
26 | const wxPoint& pos = wxDefaultPosition, |
27 | const wxSize& size = wxDefaultSize, | |
853dcc57 | 28 | int nStrings = 0, |
83df96d6 JS |
29 | const wxString choices[] = NULL, |
30 | long style = 0, | |
31 | const wxValidator& validator = wxDefaultValidator, | |
32 | const wxString& name = wxListBoxNameStr); | |
ef41d80c | 33 | |
584ad2a3 MB |
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 | ||
ef41d80c MB |
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); | |
853dcc57 | 49 | |
584ad2a3 MB |
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); | |
853dcc57 | 57 | |
1bfcb0b6 VZ |
58 | // items may be checked |
59 | bool IsChecked(size_t uiIndex) const; | |
96be256b | 60 | void Check(size_t uiIndex, bool bCheck = true); |
ef41d80c MB |
61 | |
62 | // override base class functions | |
63 | virtual int DoAppend(const wxString& item); | |
853dcc57 | 64 | virtual int FindString(const wxString& s, bool bCase = false) const; |
ef41d80c MB |
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 ); | |
1bfcb0b6 VZ |
72 | private: |
73 | DECLARE_EVENT_TABLE() | |
9b6dbb09 JS |
74 | }; |
75 | ||
76 | #endif | |
83df96d6 | 77 | // _WX_CHECKLST_H_ |