1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/checklst.h
3 // Purpose: wxCheckListBox class
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKCHECKLISTH__
12 #define __GTKCHECKLISTH__
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
18 // there is no "right" choice of the checkbox indicators, so allow the user to
19 // define them himself if he wants
20 #ifndef wxCHECKLBOX_CHECKED
21 #define wxCHECKLBOX_CHECKED _T('x')
22 #define wxCHECKLBOX_UNCHECKED _T(' ')
24 #define wxCHECKLBOX_STRING _T("[ ] ")
27 //Use the native GTK2.0+ checklist?? You should say YYEEESS unless
28 //there are like some major bugs or something :)
29 #define wxUSE_NATIVEGTKCHECKLIST 1
31 //-----------------------------------------------------------------------------
33 // ----------------------------------------------------------------------------
35 class WXDLLIMPEXP_CORE wxCheckListBox
: public wxListBox
39 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
43 const wxString
*choices
= (const wxString
*)NULL
,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
& name
= wxListBoxNameStr
);
47 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
50 const wxArrayString
& choices
,
52 const wxValidator
& validator
= wxDefaultValidator
,
53 const wxString
& name
= wxListBoxNameStr
);
55 bool IsChecked(unsigned int index
) const;
56 void Check(unsigned int index
, bool check
= true);
58 int GetItemHeight() const;
60 #if wxUSE_NATIVEGTKCHECKLIST
61 void DoCreateCheckList();
65 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
68 #endif //__GTKCHECKLISTH__