\section{Segment\+Control}
\label{group__SegmentControl}\index{Segment\+Control@{Segment\+Control}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
Evas\+\_\+\+Object $\ast$ \hyperlink{group__SegmentControl_ga6c0d5f4de78c9c66b4a09680d3c85f46}{elm\+\_\+segment\+\_\+control\+\_\+add} (Evas\+\_\+\+Object $\ast$parent)
\begin{DoxyCompactList}\small\item\em Add a new segment control widget to the given parent Elementary (container) object. \end{DoxyCompactList}\end{DoxyCompactItemize}


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


 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{img/widget/segment_control/preview-00}}
\end{DoxyImageNoCaption}


 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{segment_control}}
\end{DoxyImageNoCaption}


Segment control widget is a horizontal control made of multiple segment items, each segment item functioning similar to discrete two state button. A segment control groups the items together and provides compact single button with multiple equal size segments.

Segment item size is determined by base widget size and the number of items added. Only one segment item can be at selected state. A segment item can display combination of Text and any Evas\+\_\+\+Object like Images or other widget.

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

This widget emits the following signals, besides the ones sent from Layout\+:
\begin{DoxyItemize}
\item {\ttfamily \char`\"{}changed\char`\"{}} -\/ When the user clicks on a segment item which is not previously selected and get selected. The event\+\_\+info parameter is the segment item pointer.
\item {\ttfamily \char`\"{}language,changed\char`\"{}} -\/ the program\textquotesingle{}s language changed (since 1.\+9)
\end{DoxyItemize}

Available styles for it\+:
\begin{DoxyItemize}
\item {\ttfamily \char`\"{}default\char`\"{}} 
\end{DoxyItemize}

Default content parts of the segment control items that you can use for are\+: \begin{DoxyItemize}
\item \char`\"{}icon\char`\"{} -\/ An icon in a segment control item\end{DoxyItemize}
Default text parts of the segment control items that you can use for are\+: \begin{DoxyItemize}
\item \char`\"{}default\char`\"{} -\/ A title label in a segment control item\end{DoxyItemize}
Supported elm\+\_\+object common A\+P\+Is. \begin{DoxyItemize}
\item elm\+\_\+object\+\_\+disabled\+\_\+set \item elm\+\_\+object\+\_\+disabled\+\_\+get\end{DoxyItemize}
Supported elm\+\_\+object\+\_\+item common A\+P\+Is. \begin{DoxyItemize}
\item elm\+\_\+object\+\_\+item\+\_\+del \item elm\+\_\+object\+\_\+item\+\_\+part\+\_\+text\+\_\+set \item elm\+\_\+object\+\_\+item\+\_\+part\+\_\+text\+\_\+get \item elm\+\_\+object\+\_\+item\+\_\+part\+\_\+content\+\_\+set \item elm\+\_\+object\+\_\+item\+\_\+part\+\_\+content\+\_\+get\end{DoxyItemize}
Here is an example on its usage\+: \begin{DoxyItemize}
\item \hyperlink{segment_control_example}{Segment Control Example} \end{DoxyItemize}


\subsection{Function Documentation}
\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+add@{elm\+\_\+segment\+\_\+control\+\_\+add}}
\index{elm\+\_\+segment\+\_\+control\+\_\+add@{elm\+\_\+segment\+\_\+control\+\_\+add}!Segment\+Control@{Segment\+Control}}
\subsubsection[{\texorpdfstring{elm\+\_\+segment\+\_\+control\+\_\+add(\+Evas\+\_\+\+Object $\ast$parent)}{elm_segment_control_add(Evas_Object *parent)}}]{\setlength{\rightskip}{0pt plus 5cm}Evas\+\_\+\+Object$\ast$ elm\+\_\+segment\+\_\+control\+\_\+add (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Object $\ast$}]{parent}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga6c0d5f4de78c9c66b4a09680d3c85f46}


Add a new segment control widget to the given parent Elementary (container) object. 


\begin{DoxyParams}{Parameters}
{\em parent} & The parent object. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a new segment control widget handle or {\ttfamily N\+U\+LL}, on errors.
\end{DoxyReturn}
This function inserts a new segment control widget on the canvas. 