]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/checkbox.tex
Latex updates; added defines to printdlg.h for referring to generic print dialogs
[wxWidgets.git] / docs / latex / wx / checkbox.tex
CommitLineData
a660d684
KB
1\section{\class{wxCheckBox}}\label{wxcheckbox}
2
3A checkbox is a labelled box which is either on (checkmark is visible)
4or off (no checkmark).
5
6\wxheading{Derived from}
7
8\helpref{wxControl}{wxcontrol}\\
9\helpref{wxWindow}{wxwindow}\\
10\helpref{wxEvtHandler}{wxevthandler}\\
11\helpref{wxObject}{wxobject}
12
13\wxheading{Window styles}
14
15There are no special styles for wxCheckBox.
16
17See also \helpref{window styles overview}{windowstyles}.
18
5de76427
JS
19\wxheading{Event handling}
20
21\twocolwidtha{7cm}
22\begin{twocollist}\itemsep=0pt
23\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED event,
24when the checkbox is clicked.}
25\end{twocollist}
26
a660d684
KB
27\wxheading{See also}
28
5de76427 29\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
a660d684
KB
30
31\latexignore{\rtfignore{\wxheading{Members}}}
32
33\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
34
35\func{}{wxCheckBox}{\void}
36
37Default constructor.
38
eaaa6a06 39\func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
a660d684
KB
40\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
41\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
42\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
43
44Constructor, creating and showing a checkbox.
45
46\wxheading{Parameters}
47
48\docparam{parent}{Parent window. Must not be NULL.}
49
50\docparam{id}{Checkbox identifier. A value of -1 indicates a default value.}
51
52\docparam{label}{Text to be displayed next to the checkbox.}
53
54\docparam{pos}{Checkbox position. If the position (-1, -1) is specified then a default position is chosen.}
55
56\docparam{size}{Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.}
57
58\docparam{style}{Window style. See \helpref{wxCheckBox}{wxcheckbox}.}
59
60\docparam{validator}{Window validator.}
61
62\docparam{name}{Window name.}
63
64\wxheading{See also}
65
66\helpref{wxCheckBox::Create}{wxcheckboxcreate}, \helpref{wxValidator}{wxvalidator}
67
68\membersection{wxCheckBox::\destruct{wxCheckBox}}
69
70\func{}{\destruct{wxCheckBox}}{\void}
71
72Destructor, destroying the checkbox.
73
74\membersection{wxCheckBox::Create}\label{wxcheckboxcreate}
75
eaaa6a06 76\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
a660d684
KB
77\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
78\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
79\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
80
81Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
82for details.
83
84\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
85
86\constfunc{bool}{GetValue}{\void}
87
88Gets the state of the checkbox.
89
90\wxheading{Return value}
91
92Returns TRUE if it is checked, FALSE otherwise.
93
94\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
95
96\func{void}{SetValue}{\param{const bool}{ state}}
97
98Sets the checkbox to the given state.
99
100\wxheading{Parameters}
101
102\docparam{state}{If TRUE, the check is on, otherwise it is off.}
103
104