\hypertarget{group__Elm__Button}{}\section{Button}
\label{group__Elm__Button}\index{Button@{Button}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$ \mbox{\hyperlink{group__Elm__Button_ga0021b9d86d822367035843ed18bc6ea9}{elm\+\_\+button\+\_\+add}} (\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$parent)
\begin{DoxyCompactList}\small\item\em Add a new button to the parent\textquotesingle{}s canvas. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Elm__Button_gadbffea6d39be360a72f094c267b95c7a}{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set}} (\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$obj, double t)
\begin{DoxyCompactList}\small\item\em The initial timeout before the autorepeat event is generated. \end{DoxyCompactList}\item 
double \mbox{\hyperlink{group__Elm__Button_gad005ba078078f9985968df8f82c7ff0c}{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+get}} (const \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$obj)
\begin{DoxyCompactList}\small\item\em The initial timeout before the autorepeat event is generated. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Elm__Button_gaf97340cba16cf46497f3dd2dce28ed8a}{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set}} (\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$obj, double t)
\begin{DoxyCompactList}\small\item\em The interval between each generated autorepeat event. \end{DoxyCompactList}\item 
double \mbox{\hyperlink{group__Elm__Button_ga4cc5be53d0a4de5b908b116d607ef583}{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+get}} (const \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$obj)
\begin{DoxyCompactList}\small\item\em The interval between each generated autorepeat event. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Elm__Button_ga4c5373e4d6c955c6480ee3f21a7dc1fa}{elm\+\_\+button\+\_\+autorepeat\+\_\+set}} (\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$obj, \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} on)
\begin{DoxyCompactList}\small\item\em Turn on/off the autorepeat event generated when the button is kept pressed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Elm__Button_ga428d70d4525a46e07a8164d40050eec6}{elm\+\_\+button\+\_\+autorepeat\+\_\+get}} (const \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$obj)
\begin{DoxyCompactList}\small\item\em Turn on/off the autorepeat event generated when the button is kept pressed. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{button_inheritance_tree}}
\end{DoxyImageNoCaption}


 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{img/widget/button/preview-00}}
\end{DoxyImageNoCaption}
  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{img/widget/button/preview-01}}
\end{DoxyImageNoCaption}
  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{img/widget/button/preview-02}}
\end{DoxyImageNoCaption}


This is a push-\/button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature.

This widget inherits from the \mbox{\hyperlink{group__Elm__Layout}{Layout}} one, so that all the functions acting on it also work for button objects.

This widget emits the following signals, besides the ones sent from \mbox{\hyperlink{group__Elm__Layout}{Layout}} \+: \begin{DoxyItemize}
\item \char`\"{}clicked\char`\"{}\+: the user clicked the button (press/release). \item \char`\"{}repeated\char`\"{}\+: the user pressed the button without releasing it. \item \char`\"{}pressed\char`\"{}\+: button was pressed. \item \char`\"{}unpressed\char`\"{}\+: button was released after being pressed. \item {\ttfamily \char`\"{}focused\char`\"{}} \+: When the button has received focus. (since 1.\+8) \item {\ttfamily \char`\"{}unfocused\char`\"{}} \+: When the button has lost focus. (since 1.\+8) In all cases, the {\ttfamily event} parameter of the callback will be {\ttfamily N\+U\+LL}.\end{DoxyItemize}
Also, defined in the default theme, the button has the following styles available\+: \begin{DoxyItemize}
\item default\+: a normal button. \item anchor\+: Like default, but the button fades away when the mouse is not over it, leaving only the text or icon. \item hoversel\+\_\+vertical\+: Internally used by \mbox{\hyperlink{group__Elm__Hoversel}{Hoversel}} to give a continuous look across its options. \item hoversel\+\_\+vertical\+\_\+entry\+: Another internal for \mbox{\hyperlink{group__Elm__Hoversel}{Hoversel}}. \item naviframe\+: Internally used by \mbox{\hyperlink{group__Elm__Naviframe}{Naviframe}} for its back button. \item colorselector\+: Internally used by \mbox{\hyperlink{group__Elm__Colorselector}{Colorselector}} for its left and right buttons.\end{DoxyItemize}
Default content parts of the button widget that you can use for are\+: \begin{DoxyItemize}
\item \char`\"{}icon\char`\"{} -\/ An icon of the button\end{DoxyItemize}
Default text parts of the button widget that you can use for are\+: \begin{DoxyItemize}
\item \char`\"{}default\char`\"{} -\/ A label of the button\end{DoxyItemize}
Supported elm\+\_\+object common A\+P\+Is. \begin{DoxyItemize}
\item \mbox{\hyperlink{group__Elm__General_ga9c088563c442670796564d2e5158f154}{elm\+\_\+object\+\_\+part\+\_\+text\+\_\+set}} \item \mbox{\hyperlink{group__Elm__General_ga965e34858eb4b80b7a4b5feda732bf27}{elm\+\_\+object\+\_\+part\+\_\+text\+\_\+get}} \item \mbox{\hyperlink{group__Elm__General_ga0531ec8867c72def7c780601764ca642}{elm\+\_\+object\+\_\+part\+\_\+content\+\_\+set}} \item \mbox{\hyperlink{group__Elm__General_ga32413f4d59d8232cd362a922a281abf1}{elm\+\_\+object\+\_\+part\+\_\+content\+\_\+get}} \item \mbox{\hyperlink{group__Elm__General_gadc5a1df25fe17e31739841133b53b5fc}{elm\+\_\+object\+\_\+part\+\_\+content\+\_\+unset}} \item \mbox{\hyperlink{group__Elm__General_ga1beada7edf5d714c0dba5459bcc993fc}{elm\+\_\+object\+\_\+signal\+\_\+emit}} \item \mbox{\hyperlink{group__Elm__General_ga6f9574b798efcd454afdac6f2904f633}{elm\+\_\+object\+\_\+signal\+\_\+callback\+\_\+add}} \item \mbox{\hyperlink{group__Elm__General_ga3c76b5447be522d647e352cb7ff7c9e6}{elm\+\_\+object\+\_\+signal\+\_\+callback\+\_\+del}}\end{DoxyItemize}
Here is some sample code using it\+: \begin{DoxyItemize}
\item button\+\_\+example\+\_\+00 \item button\+\_\+example\+\_\+01 \end{DoxyItemize}


\subsection{Function Documentation}
\mbox{\Hypertarget{group__Elm__Button_ga0021b9d86d822367035843ed18bc6ea9}\label{group__Elm__Button_ga0021b9d86d822367035843ed18bc6ea9}} 
\index{Button@{Button}!elm\+\_\+button\+\_\+add@{elm\+\_\+button\+\_\+add}}
\index{elm\+\_\+button\+\_\+add@{elm\+\_\+button\+\_\+add}!Button@{Button}}
\subsubsection{\texorpdfstring{elm\+\_\+button\+\_\+add()}{elm\_button\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}}$\ast$ elm\+\_\+button\+\_\+add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{parent }\end{DoxyParamCaption})}



Add a new button to the parent\textquotesingle{}s canvas. 


\begin{DoxyParams}{Parameters}
{\em parent} & The parent object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The new object or N\+U\+LL if it cannot be created 
\end{DoxyReturn}


Referenced by elm\+\_\+quicklaunch\+\_\+seed().

\mbox{\Hypertarget{group__Elm__Button_gadbffea6d39be360a72f094c267b95c7a}\label{group__Elm__Button_gadbffea6d39be360a72f094c267b95c7a}} 
\index{Button@{Button}!elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set@{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set}}
\index{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set@{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set}!Button@{Button}}
\subsubsection{\texorpdfstring{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set()}{elm\_button\_autorepeat\_initial\_timeout\_set()}}
{\footnotesize\ttfamily void elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{obj,  }\item[{double}]{t }\end{DoxyParamCaption})}



The initial timeout before the autorepeat event is generated. 

Sets the timeout, in seconds, since the button is pressed until the first {\ttfamily repeated} signal is emitted. If {\ttfamily t} is 0.\+0 or less, there won\textquotesingle{}t be any delay and the event will be fired the moment the button is pressed.

See also \mbox{\hyperlink{group__Elm__Button_ga4c5373e4d6c955c6480ee3f21a7dc1fa}{elm\+\_\+button\+\_\+autorepeat\+\_\+set}}, \mbox{\hyperlink{group__Elm__Button_gaf97340cba16cf46497f3dd2dce28ed8a}{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Timeout in seconds \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Elm__Button_gad005ba078078f9985968df8f82c7ff0c}\label{group__Elm__Button_gad005ba078078f9985968df8f82c7ff0c}} 
\index{Button@{Button}!elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+get@{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+get}}
\index{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+get@{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+get}!Button@{Button}}
\subsubsection{\texorpdfstring{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+get()}{elm\_button\_autorepeat\_initial\_timeout\_get()}}
{\footnotesize\ttfamily double elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{obj }\end{DoxyParamCaption})}



The initial timeout before the autorepeat event is generated. 

Sets the timeout, in seconds, since the button is pressed until the first {\ttfamily repeated} signal is emitted. If {\ttfamily t} is 0.\+0 or less, there won\textquotesingle{}t be any delay and the event will be fired the moment the button is pressed.

See also \mbox{\hyperlink{group__Elm__Button_ga4c5373e4d6c955c6480ee3f21a7dc1fa}{elm\+\_\+button\+\_\+autorepeat\+\_\+set}}, \mbox{\hyperlink{group__Elm__Button_gaf97340cba16cf46497f3dd2dce28ed8a}{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set}}.

\begin{DoxyReturn}{Returns}
Timeout in seconds 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Elm__Button_gaf97340cba16cf46497f3dd2dce28ed8a}\label{group__Elm__Button_gaf97340cba16cf46497f3dd2dce28ed8a}} 
\index{Button@{Button}!elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set@{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set}}
\index{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set@{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set}!Button@{Button}}
\subsubsection{\texorpdfstring{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set()}{elm\_button\_autorepeat\_gap\_timeout\_set()}}
{\footnotesize\ttfamily void elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{obj,  }\item[{double}]{t }\end{DoxyParamCaption})}



The interval between each generated autorepeat event. 

After the first {\ttfamily repeated} event is fired, all subsequent ones will follow after a delay of {\ttfamily t} seconds for each.

See also \mbox{\hyperlink{group__Elm__Button_gadbffea6d39be360a72f094c267b95c7a}{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Interval in seconds \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Elm__Button_ga4cc5be53d0a4de5b908b116d607ef583}\label{group__Elm__Button_ga4cc5be53d0a4de5b908b116d607ef583}} 
\index{Button@{Button}!elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+get@{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+get}}
\index{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+get@{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+get}!Button@{Button}}
\subsubsection{\texorpdfstring{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+get()}{elm\_button\_autorepeat\_gap\_timeout\_get()}}
{\footnotesize\ttfamily double elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{obj }\end{DoxyParamCaption})}



The interval between each generated autorepeat event. 

After the first {\ttfamily repeated} event is fired, all subsequent ones will follow after a delay of {\ttfamily t} seconds for each.

See also \mbox{\hyperlink{group__Elm__Button_gadbffea6d39be360a72f094c267b95c7a}{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set}}.

\begin{DoxyReturn}{Returns}
Interval in seconds 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Elm__Button_ga4c5373e4d6c955c6480ee3f21a7dc1fa}\label{group__Elm__Button_ga4c5373e4d6c955c6480ee3f21a7dc1fa}} 
\index{Button@{Button}!elm\+\_\+button\+\_\+autorepeat\+\_\+set@{elm\+\_\+button\+\_\+autorepeat\+\_\+set}}
\index{elm\+\_\+button\+\_\+autorepeat\+\_\+set@{elm\+\_\+button\+\_\+autorepeat\+\_\+set}!Button@{Button}}
\subsubsection{\texorpdfstring{elm\+\_\+button\+\_\+autorepeat\+\_\+set()}{elm\_button\_autorepeat\_set()}}
{\footnotesize\ttfamily void elm\+\_\+button\+\_\+autorepeat\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{obj,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}}]{on }\end{DoxyParamCaption})}



Turn on/off the autorepeat event generated when the button is kept pressed. 

When off, no autorepeat is performed and buttons emit a normal {\ttfamily clicked} signal when they are clicked.

When on, keeping a button pressed will continuously emit a {\ttfamily repeated} signal until the button is released. The time it takes until it starts emitting the signal is given by \mbox{\hyperlink{group__Elm__Button_gadbffea6d39be360a72f094c267b95c7a}{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set}}, and the time between each new emission by \mbox{\hyperlink{group__Elm__Button_gaf97340cba16cf46497f3dd2dce28ed8a}{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em on} & A bool to turn on/off the event \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Elm__Button_ga428d70d4525a46e07a8164d40050eec6}\label{group__Elm__Button_ga428d70d4525a46e07a8164d40050eec6}} 
\index{Button@{Button}!elm\+\_\+button\+\_\+autorepeat\+\_\+get@{elm\+\_\+button\+\_\+autorepeat\+\_\+get}}
\index{elm\+\_\+button\+\_\+autorepeat\+\_\+get@{elm\+\_\+button\+\_\+autorepeat\+\_\+get}!Button@{Button}}
\subsubsection{\texorpdfstring{elm\+\_\+button\+\_\+autorepeat\+\_\+get()}{elm\_button\_autorepeat\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} elm\+\_\+button\+\_\+autorepeat\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{obj }\end{DoxyParamCaption})}



Turn on/off the autorepeat event generated when the button is kept pressed. 

When off, no autorepeat is performed and buttons emit a normal {\ttfamily clicked} signal when they are clicked.

When on, keeping a button pressed will continuously emit a {\ttfamily repeated} signal until the button is released. The time it takes until it starts emitting the signal is given by \mbox{\hyperlink{group__Elm__Button_gadbffea6d39be360a72f094c267b95c7a}{elm\+\_\+button\+\_\+autorepeat\+\_\+initial\+\_\+timeout\+\_\+set}}, and the time between each new emission by \mbox{\hyperlink{group__Elm__Button_gaf97340cba16cf46497f3dd2dce28ed8a}{elm\+\_\+button\+\_\+autorepeat\+\_\+gap\+\_\+timeout\+\_\+set}}.

\begin{DoxyReturn}{Returns}
A bool to turn on/off the event 
\end{DoxyReturn}
