]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/checkbox.tex
Made wxStubs compile on Unix.
[wxWidgets.git] / docs / latex / wx / checkbox.tex
1 \section{\class{wxCheckBox}}\label{wxcheckbox}
2
3 A checkbox is a labelled box which is either on (checkmark is visible)
4 or 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
15 There are no special styles for wxCheckBox.
16
17 See also \helpref{window styles overview}{windowstyles}.
18
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,
24 when the checkbox is clicked.}
25 \end{twocollist}
26
27 \wxheading{See also}
28
29 \helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
30
31 \latexignore{\rtfignore{\wxheading{Members}}}
32
33 \membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
34
35 \func{}{wxCheckBox}{\void}
36
37 Default constructor.
38
39 \func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
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
44 Constructor, 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
72 Destructor, destroying the checkbox.
73
74 \membersection{wxCheckBox::Create}\label{wxcheckboxcreate}
75
76 \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
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
81 Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
82 for details.
83
84 \membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
85
86 \constfunc{bool}{GetValue}{\void}
87
88 Gets the state of the checkbox.
89
90 \wxheading{Return value}
91
92 Returns TRUE if it is checked, FALSE otherwise.
93
94 \membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
95
96 \func{void}{SetValue}{\param{const bool}{ state}}
97
98 Sets 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