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
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CHECKLST_H_
13 #define _WX_CHECKLST_H_
15 #include "wx/listbox.h"
17 class WXDLLIMPEXP_CORE wxCheckListBox
: public wxCheckListBoxBase
19 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
24 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
,
28 const wxString choices
[] = NULL
,
30 const wxValidator
& validator
= wxDefaultValidator
,
31 const wxString
& name
= wxListBoxNameStr
);
33 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
36 const wxArrayString
& choices
,
38 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxListBoxNameStr
);
41 bool Create(wxWindow
*parent
, wxWindowID id
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 int n
= 0, const wxString choices
[] = NULL
,
46 const wxValidator
& validator
= wxDefaultValidator
,
47 const wxString
& name
= wxListBoxNameStr
);
49 bool Create(wxWindow
*parent
, wxWindowID id
,
52 const wxArrayString
& choices
,
54 const wxValidator
& validator
= wxDefaultValidator
,
55 const wxString
& name
= wxListBoxNameStr
);
57 // items may be checked
58 bool IsChecked(unsigned int uiIndex
) const;
59 void Check(unsigned int uiIndex
, bool bCheck
= true);
61 // override base class functions
62 virtual int DoInsertItems(const wxArrayStringsAdapter
& items
,
64 void **clientData
, wxClientDataType type
);
65 virtual int FindString(const wxString
& s
, bool bCase
= false) const;
66 virtual void SetString(unsigned int n
, const wxString
& s
);
67 virtual wxString
GetString(unsigned int n
) const;
70 void DoToggleItem( int item
, int x
);