]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/checklst.h
fix for discrepancies between wxNotebookEvent and wxNotebook GetSelection() results
[wxWidgets.git] / include / wx / gtk / checklst.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: 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 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19
20 #if wxUSE_CHECKLISTBOX
21
22 #include "wx/object.h"
23 #include "wx/list.h"
24 #include "wx/control.h"
25 #include "wx/listbox.h"
26
27 // ----------------------------------------------------------------------------
28 // macros
29 // ----------------------------------------------------------------------------
30
31 // there is no "right" choice of the checkbox indicators, so allow the user to
32 // define them himself if he wants
33 #ifndef wxCHECKLBOX_CHECKED
34 #define wxCHECKLBOX_CHECKED _T('x')
35 #define wxCHECKLBOX_UNCHECKED _T(' ')
36
37 #define wxCHECKLBOX_STRING _T("[ ] ")
38 #endif
39
40 // ----------------------------------------------------------------------------
41 // wxCheckListBox
42 // ----------------------------------------------------------------------------
43
44 class wxCheckListBox : public wxListBox
45 {
46 public:
47 wxCheckListBox();
48 wxCheckListBox(wxWindow *parent, wxWindowID id,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 int nStrings = 0,
52 const wxString *choices = (const wxString *)NULL,
53 long style = 0,
54 const wxValidator& validator = wxDefaultValidator,
55 const wxString& name = wxListBoxNameStr);
56
57 bool IsChecked( int index ) const;
58 void Check( int index, bool check = TRUE );
59
60 int GetItemHeight() const;
61
62 private:
63 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
64 };
65
66 #endif
67
68 #endif //__GTKCHECKLISTH__