]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/checklst.tex
Build fix after wxColourBase introduction.
[wxWidgets.git] / docs / latex / wx / checklst.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: checklst.tex
3 %% Purpose: wxCheckListBox documentation
4 %% Author: wxWidgets Team
5 %% Modified by:
6 %% Created:
7 %% RCS-ID: $Id$
8 %% Copyright: (c) wxWidgets Team
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxCheckListBox}}\label{wxchecklistbox}
13
14 A checklistbox is like a listbox, but allows items to be checked or unchecked.
15
16 When using this class under Windows wxWidgets must be compiled with USE\_OWNER\_DRAWN set to 1.
17
18 Only the new functions for this class are documented; see also \helpref{wxListBox}{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 \wxheading{Derived from}
24
25 \helpref{wxListBox}{wxlistbox}\\
26 \helpref{wxControl}{wxcontrol}\\
27 \helpref{wxWindow}{wxwindow}\\
28 \helpref{wxEvtHandler}{wxevthandler}\\
29 \helpref{wxObject}{wxobject}
30
31 \wxheading{Include files}
32
33 <wx/checklst.h>
34
35 \wxheading{Window styles}
36
37 See \helpref{wxListBox}{wxlistbox}.
38
39 \wxheading{Event handling}
40
41 \twocolwidtha{7cm}
42 \begin{twocollist}\itemsep=0pt
43 \twocolitem{{\bf EVT\_CHECKLISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLED event,
44 when an item in the check list box is checked or unchecked.}
45 \end{twocollist}
46
47 \wxheading{See also}
48
49 \helpref{wxListBox}{wxlistbox}, \helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}, \helpref{wxListCtrl}{wxlistctrl},
50 \rtfsp\helpref{wxCommandEvent}{wxcommandevent}
51
52 \latexignore{\rtfignore{\wxheading{Members}}}
53
54 \membersection{wxCheckListBox::wxCheckListBox}\label{wxchecklistboxctor}
55
56 \func{}{wxCheckListBox}{\void}
57
58 Default constructor.
59
60 \func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
61 \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
62 \param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp
63 \param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
64
65 \func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
66 \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
67 \param{const wxArrayString\& }{choices},\rtfsp
68 \param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
69
70 Constructor, creating and showing a list box.
71
72 \wxheading{Parameters}
73
74 \docparam{parent}{Parent window. Must not be NULL.}
75
76 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
77
78 \docparam{pos}{Window position.}
79
80 \docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
81 appropriately.}
82
83 \docparam{n}{Number of strings with which to initialise the control.}
84
85 \docparam{choices}{An array of strings with which to initialise the control.}
86
87 \docparam{style}{Window style. See \helpref{wxCheckListBox}{wxchecklistbox}.}
88
89 \docparam{validator}{Window validator.}
90
91 \docparam{name}{Window name.}
92
93 \pythonnote{The wxCheckListBox constructor in wxPython reduces the {\tt n}
94 and {\tt choices} arguments are to a single argument, which is
95 a list of strings.}
96
97 \perlnote{In wxPerl there is just an array reference in place of {\tt n}
98 and {\tt choices}.}
99
100 \membersection{wxCheckListBox::\destruct{wxCheckListBox}}\label{wxchecklistboxdtor}
101
102 \func{void}{\destruct{wxCheckListBox}}{\void}
103
104 Destructor, destroying the list box.
105
106 \membersection{wxCheckListBox::Check}\label{wxchecklistboxcheck}
107
108 \func{void}{Check}{\param{int }{item}, \param{bool}{ check = true}}
109
110 Checks the given item. Note that calling this method doesn't result in
111 wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
112
113 \wxheading{Parameters}
114
115 \docparam{item}{Index of item to check.}
116
117 \docparam{check}{true if the item is to be checked, false otherwise.}
118
119 \membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
120
121 \constfunc{bool}{IsChecked}{\param{unsigned int}{ item}}
122
123 Returns true if the given item is checked, false otherwise.
124
125 \wxheading{Parameters}
126
127 \docparam{item}{Index of item whose check status is to be returned.}