]> git.saurik.com Git - wxWidgets.git/blob - interface/checklst.h
3fd990b9ec4935ae7bbc21ffed5669124ff4bb6e
[wxWidgets.git] / interface / checklst.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: checklst.h
3 // Purpose: documentation for wxCheckListBox class
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxCheckListBox
11 @wxheader{checklst.h}
12
13 A checklistbox is like a listbox, but allows items to be checked or unchecked.
14
15 When using this class under Windows wxWidgets must be compiled with
16 USE_OWNER_DRAWN set to 1.
17
18 Only the new functions for this class are documented; see also wxListBox.
19
20 Please note that wxCheckListBox uses client data in its implementation,
21 and therefore this is not available to the application.
22
23 @beginEventTable
24 @event{EVT_CHECKLISTBOX(id, func)}:
25 Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event, when an item in
26 the check list box is checked or unchecked.
27 @endEventTable
28
29 @library{wxcore}
30 @category{ctrl}
31 @appearance{checklistbox.png}
32
33 @seealso
34 wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
35 */
36 class wxCheckListBox : public wxListBox
37 {
38 public:
39 //@{
40 /**
41 Constructor, creating and showing a list box.
42
43 @param parent
44 Parent window. Must not be @NULL.
45 @param id
46 Window identifier. The value wxID_ANY indicates a default value.
47 @param pos
48 Window position.
49 @param size
50 Window size. If wxDefaultSize is specified then the window is
51 sized
52 appropriately.
53 @param n
54 Number of strings with which to initialise the control.
55 @param choices
56 An array of strings with which to initialise the control.
57 @param style
58 Window style. See wxCheckListBox.
59 @param validator
60 Window validator.
61 @param name
62 Window name.
63 */
64 wxCheckListBox();
65 wxCheckListBox(wxWindow* parent, wxWindowID id,
66 const wxPoint& pos = wxDefaultPosition,
67 const wxSize& size = wxDefaultSize,
68 int n,
69 const wxString choices[] = NULL,
70 long style = 0,
71 const wxValidator& validator = wxDefaultValidator,
72 const wxString& name = "listBox");
73 wxCheckListBox(wxWindow* parent, wxWindowID id,
74 const wxPoint& pos,
75 const wxSize& size,
76 const wxArrayString& choices,
77 long style = 0,
78 const wxValidator& validator = wxDefaultValidator,
79 const wxString& name = "listBox");
80 //@}
81
82 /**
83 Destructor, destroying the list box.
84 */
85 ~wxCheckListBox();
86
87 /**
88 Checks the given item. Note that calling this method doesn't result in
89 wxEVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted.
90
91 @param item
92 Index of item to check.
93 @param check
94 @true if the item is to be checked, @false otherwise.
95 */
96 void Check(int item, bool check = true);
97 };