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