]>
Commit | Line | Data |
---|---|---|
caaa4cfd RR |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: checklst.h | |
3 | // Purpose: wxCheckListBox class | |
4 | // Author: Robert Roebling | |
ff8bfdbb | 5 | // Modified by: |
caaa4cfd RR |
6 | // RCS-ID: $Id$ |
7 | // Copyright: (c) 1998 Robert Roebling | |
65571936 | 8 | // Licence: wxWindows licence |
caaa4cfd RR |
9 | /////////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef __GTKCHECKLISTH__ | |
12 | #define __GTKCHECKLISTH__ | |
13 | ||
d752a3c3 VZ |
14 | // ---------------------------------------------------------------------------- |
15 | // macros | |
16 | // ---------------------------------------------------------------------------- | |
caaa4cfd | 17 | |
d752a3c3 VZ |
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(' ') | |
caaa4cfd | 23 | |
d752a3c3 VZ |
24 | #define wxCHECKLBOX_STRING _T("[ ] ") |
25 | #endif | |
26 | ||
4a46cbe8 RR |
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 | ||
1e6feb95 | 31 | //----------------------------------------------------------------------------- |
caaa4cfd | 32 | // wxCheckListBox |
d752a3c3 | 33 | // ---------------------------------------------------------------------------- |
caaa4cfd | 34 | |
20123d49 | 35 | class WXDLLIMPEXP_CORE wxCheckListBox : public wxListBox |
caaa4cfd | 36 | { |
ff8bfdbb VZ |
37 | public: |
38 | wxCheckListBox(); | |
39 | wxCheckListBox(wxWindow *parent, wxWindowID id, | |
40 | const wxPoint& pos = wxDefaultPosition, | |
41 | const wxSize& size = wxDefaultSize, | |
42 | int nStrings = 0, | |
64716cd7 | 43 | const wxString *choices = (const wxString *)NULL, |
ff8bfdbb VZ |
44 | long style = 0, |
45 | const wxValidator& validator = wxDefaultValidator, | |
46 | const wxString& name = wxListBoxNameStr); | |
584ad2a3 MB |
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); | |
ff8bfdbb VZ |
54 | |
55 | bool IsChecked( int index ) const; | |
56 | void Check( int index, bool check = TRUE ); | |
57 | ||
58 | int GetItemHeight() const; | |
738f9e5a | 59 | |
4a46cbe8 RR |
60 | #if wxUSE_NATIVEGTKCHECKLIST |
61 | void DoCreateCheckList(); | |
62 | #endif | |
63 | ||
738f9e5a RR |
64 | private: |
65 | DECLARE_DYNAMIC_CLASS(wxCheckListBox) | |
caaa4cfd RR |
66 | }; |
67 | ||
dcf924a3 | 68 | #endif //__GTKCHECKLISTH__ |