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
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_CHECKLST_H_
14 #define _WX_CHECKLST_H_
16 #include "wx/listbox.h"
18 class WXDLLIMPEXP_CORE wxCheckListBox
: public wxCheckListBoxBase
20 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
25 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
29 const wxString choices
[] = NULL
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxListBoxNameStr
);
34 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
37 const wxArrayString
& choices
,
39 const wxValidator
& validator
= wxDefaultValidator
,
40 const wxString
& name
= wxListBoxNameStr
);
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
,
47 const wxValidator
& validator
= wxDefaultValidator
,
48 const wxString
& name
= wxListBoxNameStr
);
50 bool Create(wxWindow
*parent
, wxWindowID id
,
53 const wxArrayString
& choices
,
55 const wxValidator
& validator
= wxDefaultValidator
,
56 const wxString
& name
= wxListBoxNameStr
);
58 // items may be checked
59 bool IsChecked(unsigned int uiIndex
) const;
60 void Check(unsigned int uiIndex
, bool bCheck
= true);
62 // override base class functions
63 virtual int DoInsertItems(const wxArrayStringsAdapter
& items
,
65 void **clientData
, wxClientDataType type
);
66 virtual int FindString(const wxString
& s
, bool bCase
= false) const;
67 virtual void SetString(unsigned int n
, const wxString
& s
);
68 virtual wxString
GetString(unsigned int n
) const;
71 void DoToggleItem( int item
, int x
);