]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/checklst.h
fix printf() argument type in GetOsInfo()
[wxWidgets.git] / include / wx / gtk / checklst.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/checklst.h
3 // Purpose: wxCheckListBox class
4 // Author: Robert Roebling
5 // Modified by:
6 // RCS-ID: $Id$
7 // Copyright: (c) 1998 Robert Roebling
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __GTKCHECKLISTH__
12 #define __GTKCHECKLISTH__
13
14 // ----------------------------------------------------------------------------
15 // macros
16 // ----------------------------------------------------------------------------
17
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(' ')
23
24 #define wxCHECKLBOX_STRING _T("[ ] ")
25 #endif
26
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
30
31 //-----------------------------------------------------------------------------
32 // wxCheckListBox
33 // ----------------------------------------------------------------------------
34
35 class WXDLLIMPEXP_CORE wxCheckListBox : public wxListBox
36 {
37 public:
38 wxCheckListBox();
39 wxCheckListBox(wxWindow *parent, wxWindowID id,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 int nStrings = 0,
43 const wxString *choices = (const wxString *)NULL,
44 long style = 0,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxListBoxNameStr);
47 wxCheckListBox(wxWindow *parent, wxWindowID id,
48 const wxPoint& pos,
49 const wxSize& size,
50 const wxArrayString& choices,
51 long style = 0,
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxListBoxNameStr);
54
55 bool IsChecked(unsigned int index) const;
56 void Check(unsigned int index, bool check = true);
57
58 int GetItemHeight() const;
59
60 #if wxUSE_NATIVEGTKCHECKLIST
61 void DoCreateCheckList();
62 #endif
63
64 private:
65 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
66 };
67
68 #endif //__GTKCHECKLISTH__