

This example will show 2 checkboxes, one with just a label and the second one with both a label and an icon. This example also illustrates how to have the checkbox change the value of a variable and how to react to those changes.

We will start with the usual setup code\-: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


And now we create our first checkbox, set its label, tell it to change the value of {\ttfamily value} when the checkbox stats is changed and ask to be notified of state changes\-: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


For our second checkbox we are going to set an icon so we need to create and icon\-: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}
 \begin{DoxyNote}{Note}
For simplicity we are using a rectangle as icon, but any evas object can be used.
\end{DoxyNote}
And for our second checkbox we set the label, icon and state to true\-: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


We now do some more setup\-: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


And finally implement the callback that will be called when the first checkbox's state changes. This callback will use {\ttfamily data} to print a message\-: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}
 \begin{DoxyNote}{Note}
This work because {\ttfamily data} is {\ttfamily value(from the main function)} and {\ttfamily value} is changed when the checkbox is changed.
\end{DoxyNote}
Our example will look like this\-:

 
\begin{DoxyImage}
\includegraphics{screenshots/check_example_01}
\caption{width=}
\end{DoxyImage}
 