]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/checklst.h
1 ///////////////////////////////////////////////////////////////////////////////
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
17 #pragma interface "checklst.h"
20 #include "wx/listbox.h"
22 class wxCheckListBox
: public wxCheckListBoxBase
24 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
29 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
33 const wxString choices
[] = NULL
,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxListBoxNameStr
);
38 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
41 const wxArrayString
& choices
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxListBoxNameStr
);
46 bool Create(wxWindow
*parent
, wxWindowID id
,
47 const wxPoint
& pos
= wxDefaultPosition
,
48 const wxSize
& size
= wxDefaultSize
,
49 int n
= 0, const wxString choices
[] = NULL
,
51 const wxValidator
& validator
= wxDefaultValidator
,
52 const wxString
& name
= wxListBoxNameStr
);
54 bool Create(wxWindow
*parent
, wxWindowID id
,
57 const wxArrayString
& choices
,
59 const wxValidator
& validator
= wxDefaultValidator
,
60 const wxString
& name
= wxListBoxNameStr
);
62 // items may be checked
63 bool IsChecked(size_t uiIndex
) const;
64 void Check(size_t uiIndex
, bool bCheck
= true);
66 // override base class functions
67 virtual int DoAppend(const wxString
& item
);
68 virtual int FindString(const wxString
& s
) const;
69 virtual void SetString(int n
, const wxString
& s
);
70 virtual wxString
GetString(int n
) const;
72 virtual void DoInsertItems(const wxArrayString
& items
, int pos
);
73 virtual void DoSetItems(const wxArrayString
& items
, void **clientData
);
75 void DoToggleItem( int item
, int x
);