]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/checklst.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxCheckListBox
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 A wxCheckListBox is like a wxListBox, but allows items to be checked or
15 When using this class under Windows wxWidgets must be compiled with
16 wxUSE_OWNER_DRAWN set to 1.
18 Only the new functions for this class are documented; see also wxListBox.
20 Please note that wxCheckListBox uses client data in its implementation,
21 and therefore this is not available to the application.
23 @beginEventTable{wxCommandEvent}
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.
31 <!-- @appearance{checklistbox.png} -->
33 @see wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
35 class wxCheckListBox
: public wxListBox
45 Constructor, creating and showing a list box.
48 Parent window. Must not be @NULL.
50 Window identifier. The value wxID_ANY indicates a default value.
54 Window size. If wxDefaultSize is specified then the window is sized
57 Number of strings with which to initialise the control.
59 An array of strings with which to initialise the control.
61 Window style. See wxCheckListBox.
67 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
68 const wxPoint
& pos
= wxDefaultPosition
,
69 const wxSize
& size
= wxDefaultSize
,
71 const wxString choices
[] = NULL
,
73 const wxValidator
& validator
= wxDefaultValidator
,
74 const wxString
& name
= "listBox");
76 Constructor, creating and showing a list box.
79 Parent window. Must not be @NULL.
81 Window identifier. The value wxID_ANY indicates a default value.
85 Window size. If wxDefaultSize is specified then the window is sized
88 An array of strings with which to initialise the control.
90 Window style. See wxCheckListBox.
96 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
99 const wxArrayString
& choices
,
101 const wxValidator
& validator
= wxDefaultValidator
,
102 const wxString
& name
= "listBox");
106 Destructor, destroying the list box.
108 virtual ~wxCheckListBox();
111 Checks the given item. Note that calling this method does not result in
112 a wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event being emitted.
115 Index of item to check.
117 @true if the item is to be checked, @false otherwise.
119 void Check(unsigned int item
, bool check
= true);
122 Returns @true if the given item is checked, @false otherwise.
125 Index of item whose check status is to be returned.
127 bool IsChecked(unsigned int item
) const;