]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/checklst.h
Moved more code from wxDataViewCtrl to wxDataViewCtrlInternal.
[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 wxT('x')
22 #define wxCHECKLBOX_UNCHECKED wxT(' ')
23
24 #define wxCHECKLBOX_STRING wxT("[ ] ")
25 #endif
26
27 //-----------------------------------------------------------------------------
28 // wxCheckListBox
29 // ----------------------------------------------------------------------------
30
31 class WXDLLIMPEXP_CORE wxCheckListBox : public wxListBox
32 {
33 public:
34 wxCheckListBox();
35 wxCheckListBox(wxWindow *parent, wxWindowID id,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 int nStrings = 0,
39 const wxString *choices = (const wxString *)NULL,
40 long style = 0,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxListBoxNameStr);
43 wxCheckListBox(wxWindow *parent, wxWindowID id,
44 const wxPoint& pos,
45 const wxSize& size,
46 const wxArrayString& choices,
47 long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxListBoxNameStr);
50
51 bool IsChecked(unsigned int index) const;
52 void Check(unsigned int index, bool check = true);
53
54 int GetItemHeight() const;
55
56 void DoCreateCheckList();
57
58 private:
59 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
60 };
61
62 #endif //__GTKCHECKLISTH__