]> git.saurik.com Git - wxWidgets.git/blob - interface/checklst.h
removed trailing whitespace in Doxygen files
[wxWidgets.git] / interface / checklst.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: checklst.h
3 // Purpose: interface of wxCheckListBox
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 @see wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
34 */
35 class wxCheckListBox : public wxListBox
36 {
37 public:
38 //@{
39 /**
40 Constructor, creating and showing a list box.
41
42 @param parent
43 Parent window. Must not be @NULL.
44 @param id
45 Window identifier. The value wxID_ANY indicates a default value.
46 @param pos
47 Window position.
48 @param size
49 Window size. If wxDefaultSize is specified then the window is
50 sized
51 appropriately.
52 @param n
53 Number of strings with which to initialise the control.
54 @param choices
55 An array of strings with which to initialise the control.
56 @param style
57 Window style. See wxCheckListBox.
58 @param validator
59 Window validator.
60 @param name
61 Window name.
62 */
63 wxCheckListBox();
64 wxCheckListBox(wxWindow* parent, wxWindowID id,
65 const wxPoint& pos = wxDefaultPosition,
66 const wxSize& size = wxDefaultSize,
67 int n,
68 const wxString choices[] = NULL,
69 long style = 0,
70 const wxValidator& validator = wxDefaultValidator,
71 const wxString& name = "listBox");
72 wxCheckListBox(wxWindow* parent, wxWindowID id,
73 const wxPoint& pos,
74 const wxSize& size,
75 const wxArrayString& choices,
76 long style = 0,
77 const wxValidator& validator = wxDefaultValidator,
78 const wxString& name = "listBox");
79 //@}
80
81 /**
82 Destructor, destroying the list box.
83 */
84 ~wxCheckListBox();
85
86 /**
87 Checks the given item. Note that calling this method doesn't result in
88 wxEVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted.
89
90 @param item
91 Index of item to check.
92 @param check
93 @true if the item is to be checked, @false otherwise.
94 */
95 void Check(int item, bool check = true);
96 };
97