\section{Segment\+Control}
\label{group__SegmentControl}\index{Segment\+Control@{Segment\+Control}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
E\+O\+A\+P\+I int \hyperlink{group__SegmentControl_ga63f7b033ae2d5cdbd10e7b70d6589a3e}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the Segment items count from segment control. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\+\_\+\+Object\+\_\+\+Item} $\ast$ \hyperlink{group__SegmentControl_ga7569acecb740ffeec52e2a4101853bdb}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the selected item. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I const char $\ast$ \hyperlink{group__SegmentControl_gae986aad332dcabf950b66d02a9227214}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get} (int idx)
\begin{DoxyCompactList}\small\item\em Get the label of item. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\+\_\+\+Object\+\_\+\+Item} $\ast$ \hyperlink{group__SegmentControl_ga6b630572bd96bd4b4b7ac6ce20022b7e}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at} (Evas\+\_\+\+Object $\ast$icon, const char $\ast$label, int idx)
\begin{DoxyCompactList}\small\item\em Insert a new item to the segment control object at specified position. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\+\_\+\+Object\+\_\+\+Item} $\ast$ \hyperlink{group__SegmentControl_ga4305ba8fcd71c44128ed46fa5c7b2a8f}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+get} (int idx)
\begin{DoxyCompactList}\small\item\em Get the item placed at specified index. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__SegmentControl_ga197d65355726c46cc0215a4d3ae291bf}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at} (int idx)
\begin{DoxyCompactList}\small\item\em Remove a segment control item at given index from its parent, deleting it. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\+\_\+\+Object\+\_\+\+Item} $\ast$ \hyperlink{group__SegmentControl_ga5ae36472ae835701da614fd0b9292a9b}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+add} (Evas\+\_\+\+Object $\ast$icon, const char $\ast$label)
\begin{DoxyCompactList}\small\item\em Append a new item to the segment control object. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I Evas\+\_\+\+Object $\ast$ \hyperlink{group__SegmentControl_gaa3162386d6228356dbae0cde019474f6}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get} (int idx)
\begin{DoxyCompactList}\small\item\em Get the icon associated to the item. \end{DoxyCompactList}\item 
int \hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get} (const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$obj)
\begin{DoxyCompactList}\small\item\em Get the Segment items count from segment control. \end{DoxyCompactList}\item 
\hyperlink{group__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\+\_\+\+Object\+\_\+\+Item} $\ast$ \hyperlink{group__SegmentControl_gae407d4e828a8cf22a049095c95423e1c}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get} (const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$obj)
\begin{DoxyCompactList}\small\item\em Get the selected item. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{group__SegmentControl_gad5ed6816358ec3fcad6b1cc2772bba0d}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get} (const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$obj, int idx)
\begin{DoxyCompactList}\small\item\em Get the label of item. \end{DoxyCompactList}\item 
\hyperlink{group__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\+\_\+\+Object\+\_\+\+Item} $\ast$ \hyperlink{group__SegmentControl_ga41352493104b9bbd4bb8a26f78c66884}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at} (Elm\+\_\+\+Segment\+\_\+\+Control $\ast$obj, Evas\+\_\+\+Object $\ast$icon, const char $\ast$label, int idx)
\begin{DoxyCompactList}\small\item\em Insert a new item to the segment control object at specified position. \end{DoxyCompactList}\item 
\hyperlink{group__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\+\_\+\+Object\+\_\+\+Item} $\ast$ \hyperlink{group__SegmentControl_ga1fab8022881733d8015f2b489aadfbad}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+get} (const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$obj, int idx)
\begin{DoxyCompactList}\small\item\em Get the item placed at specified index. \end{DoxyCompactList}\item 
void \hyperlink{group__SegmentControl_ga44300d1dbb7cf7d8fd1fbfde94dea38d}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at} (Elm\+\_\+\+Segment\+\_\+\+Control $\ast$obj, int idx)
\begin{DoxyCompactList}\small\item\em Remove a segment control item at given index from its parent, deleting it. \end{DoxyCompactList}\item 
\hyperlink{group__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\+\_\+\+Object\+\_\+\+Item} $\ast$ \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add} (Elm\+\_\+\+Segment\+\_\+\+Control $\ast$obj, Evas\+\_\+\+Object $\ast$icon, const char $\ast$label)
\begin{DoxyCompactList}\small\item\em Append a new item to the segment control object. \end{DoxyCompactList}\item 
Evas\+\_\+\+Object $\ast$ \hyperlink{group__SegmentControl_gae666f586e206d82b37ed7c6d43d1fa73}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get} (const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$obj, int idx)
\begin{DoxyCompactList}\small\item\em Get the icon associated to the item. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I int \hyperlink{group__SegmentControl_ga89f510f0d9a17731ddf342540381c547}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the index of an item. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I Evas\+\_\+\+Object $\ast$ \hyperlink{group__SegmentControl_gabfc78153028239880bc7f7f097a3075d}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the real Evas(\+Edje) object created to implement the view of a given segment\+\_\+control {\ttfamily item}. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__SegmentControl_gaa8f1ef74fcb02f17b8db19f0d8b3f6b7}{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set} (Eina\+\_\+\+Bool selected)
\begin{DoxyCompactList}\small\item\em Set the selected state of an item. \end{DoxyCompactList}\item 
int \hyperlink{group__SegmentControl_ga7e77b43d2cfdd137db3804289214f522}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get} (const Elm\+\_\+\+Segment\+\_\+\+Control\+\_\+\+Item $\ast$obj)
\begin{DoxyCompactList}\small\item\em Get the index of an item. \end{DoxyCompactList}\item 
Evas\+\_\+\+Object $\ast$ \hyperlink{group__SegmentControl_ga0d8f3db391d87c226396632f43087959}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get} (const Elm\+\_\+\+Segment\+\_\+\+Control\+\_\+\+Item $\ast$obj)
\begin{DoxyCompactList}\small\item\em Get the real Evas(\+Edje) object created to implement the view of a given segment\+\_\+control {\ttfamily item}. \end{DoxyCompactList}\item 
void \hyperlink{group__SegmentControl_gacf833aa20b079f75749fec8b2b0fb031}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set} (Elm\+\_\+\+Segment\+\_\+\+Control\+\_\+\+Item $\ast$obj, Eina\+\_\+\+Bool selected)
\begin{DoxyCompactList}\small\item\em Set the selected state of an item. \end{DoxyCompactList}\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\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+add@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+add}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+add@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+add}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Elm\+\_\+\+Object\+\_\+\+Item}$\ast$ elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+add (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Object $\ast$}]{icon, }
\item[{const char $\ast$}]{label}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga5ae36472ae835701da614fd0b9292a9b}


Append a new item to the segment control object. 

\begin{DoxyReturn}{Returns}
The created item or {\ttfamily N\+U\+L\+L} upon failure.
\end{DoxyReturn}
A new item will be created and appended to the segment control, i.\+e., will be set as {\bfseries last} item.

If it should be inserted at another position, \hyperlink{group__SegmentControl_ga41352493104b9bbd4bb8a26f78c66884}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at()} should be used instead.

Items created with this function can be deleted with function elm\+\_\+object\+\_\+item\+\_\+del() or elm\+\_\+object\+\_\+item\+\_\+del\+\_\+at().

\begin{DoxyNote}{Note}
{\ttfamily label} set to {\ttfamily N\+U\+L\+L} is different from empty string \char`\"{}\char`\"{}. If an item only has icon, it will be displayed bigger and centered. If it has icon and label, even that an empty string, icon will be smaller and positioned at left.
\end{DoxyNote}
Simple example\+: 
\begin{DoxyCode}
1 sc = elm\_segment\_control\_add(win);
2 ic = elm\_icon\_add(win);
3 elm\_image\_file\_set(ic, "path/to/image", NULL);
4 elm\_icon\_resizable\_set(ic, EINA\_TRUE, EINA\_TRUE);
5 elm\_segment\_control\_item\_add(sc, ic, "label");
6 evas\_object\_show(sc);
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\hyperlink{group__SegmentControl_ga41352493104b9bbd4bb8a26f78c66884}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at()} 

elm\+\_\+object\+\_\+item\+\_\+del()
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em icon} & The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with \hyperlink{group__Icon_ga5739728c1209f90422cf65a778a16502}{elm\+\_\+icon\+\_\+add()}. \\
\hline
\mbox{\tt in}  & {\em label} & The label of the item. Note that, N\+U\+L\+L is different from empty string \char`\"{}\char`\"{}. \\
\hline
\end{DoxyParams}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I int elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga63f7b033ae2d5cdbd10e7b70d6589a3e}


Get the Segment items count from segment control. 

\begin{DoxyReturn}{Returns}
Segment items count.
\end{DoxyReturn}
It will just return the number of items added to segment control {\ttfamily obj}. 

Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at (
\begin{DoxyParamCaption}
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga197d65355726c46cc0215a4d3ae291bf}


Remove a segment control item at given index from its parent, deleting it. 

Items can be added with \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()} or \hyperlink{group__SegmentControl_ga41352493104b9bbd4bb8a26f78c66884}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at()}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em idx} & The position of the segment control item to be deleted. \\
\hline
\end{DoxyParams}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+get}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Elm\+\_\+\+Object\+\_\+\+Item}$\ast$ elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+get (
\begin{DoxyParamCaption}
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga4305ba8fcd71c44128ed46fa5c7b2a8f}


Get the item placed at specified index. 

\begin{DoxyReturn}{Returns}
The segment control item or {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
Index is the position of an item in segment control widget. Its range is from {\ttfamily 0} to {\ttfamily  count -\/ 1 }. Count is the number of items, that can be get with \hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get()}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em idx} & The index of the segment item. \\
\hline
\end{DoxyParams}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I Evas\+\_\+\+Object$\ast$ elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get (
\begin{DoxyParamCaption}
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gaa3162386d6228356dbae0cde019474f6}


Get the icon associated to the item. 

\begin{DoxyReturn}{Returns}
The left side icon associated to the item at {\ttfamily index}.
\end{DoxyReturn}
The return value is a pointer to the icon associated to the item when it was created, with function \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()}, or later with function elm\+\_\+object\+\_\+item\+\_\+part\+\_\+content\+\_\+set(). If no icon was passed as argument, it will return {\ttfamily N\+U\+L\+L}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()} 

elm\+\_\+object\+\_\+item\+\_\+part\+\_\+content\+\_\+set()
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em idx} & The index of the segment item. \\
\hline
\end{DoxyParams}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I int elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga89f510f0d9a17731ddf342540381c547}


Get the index of an item. 

Index is the position of an item in segment control widget. Its range is from {\ttfamily 0} to {\ttfamily  count -\/ 1 }. Count is the number of items, that can be get with \hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get()}.

\begin{DoxyReturn}{Returns}
The position of item in segment control widget. 
\end{DoxyReturn}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Elm\+\_\+\+Object\+\_\+\+Item}$\ast$ elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Object $\ast$}]{icon, }
\item[{const char $\ast$}]{label, }
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga6b630572bd96bd4b4b7ac6ce20022b7e}


Insert a new item to the segment control object at specified position. 

\begin{DoxyReturn}{Returns}
The created item or {\ttfamily N\+U\+L\+L} upon failure.
\end{DoxyReturn}
Index values must be between {\ttfamily 0}, when item will be prepended to segment control, and items count, that can be get with \hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get()}, case when item will be appended to segment control, just like \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()}.

Items created with this function can be deleted with function elm\+\_\+object\+\_\+item\+\_\+del() or \hyperlink{group__SegmentControl_ga44300d1dbb7cf7d8fd1fbfde94dea38d}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at()}.

\begin{DoxyNote}{Note}
{\ttfamily label} set to {\ttfamily N\+U\+L\+L} is different from empty string \char`\"{}\char`\"{}. If an item only has icon, it will be displayed bigger and centered. If it has icon and label, even that an empty string, icon will be smaller and positioned at left.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()} 

\hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get()} 

elm\+\_\+object\+\_\+item\+\_\+del()
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em icon} & The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with \hyperlink{group__Icon_ga5739728c1209f90422cf65a778a16502}{elm\+\_\+icon\+\_\+add()}. \\
\hline
\mbox{\tt in}  & {\em label} & The label of the item. \\
\hline
\mbox{\tt in}  & {\em idx} & Item position. Value should be between 0 and items count. \\
\hline
\end{DoxyParams}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I const char$\ast$ elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get (
\begin{DoxyParamCaption}
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gae986aad332dcabf950b66d02a9227214}


Get the label of item. 

\begin{DoxyReturn}{Returns}
The label of the item at {\ttfamily index}.
\end{DoxyReturn}
The return value is a pointer to the label associated to the item when it was created, with function \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()}, or later with function elm\+\_\+object\+\_\+item\+\_\+text\+\_\+set. If no label was passed as argument, it will return {\ttfamily N\+U\+L\+L}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__General_gab7192654621dd090be86c94678635ea4}{elm\+\_\+object\+\_\+item\+\_\+text\+\_\+set()} for more details. 

\hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()}
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em idx} & The index of the segment item. \\
\hline
\end{DoxyParams}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I Evas\+\_\+\+Object$\ast$ elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gabfc78153028239880bc7f7f097a3075d}


Get the real Evas(\+Edje) object created to implement the view of a given segment\+\_\+control {\ttfamily item}. 

Base object is the {\ttfamily Evas\+\_\+\+Object} that represents that item.

\begin{DoxyReturn}{Returns}
The base Edje object associated with {\ttfamily it}. 
\end{DoxyReturn}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Elm\+\_\+\+Object\+\_\+\+Item}$\ast$ elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga7569acecb740ffeec52e2a4101853bdb}


Get the selected item. 

\begin{DoxyReturn}{Returns}
The selected item or {\ttfamily N\+U\+L\+L} if none of segment items is selected.
\end{DoxyReturn}
The selected item can be unselected with function \hyperlink{group__SegmentControl_gacf833aa20b079f75749fec8b2b0fb031}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set()}.

The selected item always will be highlighted on segment control. 

Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set}}
\index{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set@{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Bool}]{selected}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gaa8f1ef74fcb02f17b8db19f0d8b3f6b7}


Set the selected state of an item. 

This sets the selected state of the given item {\ttfamily it}. {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} for selected, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} for not selected.

If a new item is selected the previously selected will be unselected. Selected item can be got with function \hyperlink{group__SegmentControl_gae407d4e828a8cf22a049095c95423e1c}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get()}.

The selected item always will be highlighted on segment control.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__SegmentControl_gae407d4e828a8cf22a049095c95423e1c}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get()}
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em selected} & No description supplied. \\
\hline
\end{DoxyParams}


Referenced by elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set().

\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[{elm\+\_\+segment\+\_\+control\+\_\+add}]{\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\+L\+L}, on errors.
\end{DoxyReturn}
This function inserts a new segment control widget on the canvas. \index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Elm\+\_\+\+Object\+\_\+\+Item}$\ast$ elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add (
\begin{DoxyParamCaption}
\item[{Elm\+\_\+\+Segment\+\_\+\+Control $\ast$}]{obj, }
\item[{Evas\+\_\+\+Object $\ast$}]{icon, }
\item[{const char $\ast$}]{label}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}


Append a new item to the segment control object. 

\begin{DoxyReturn}{Returns}
The created item or {\ttfamily N\+U\+L\+L} upon failure.
\end{DoxyReturn}
A new item will be created and appended to the segment control, i.\+e., will be set as {\bfseries last} item.

If it should be inserted at another position, \hyperlink{group__SegmentControl_ga41352493104b9bbd4bb8a26f78c66884}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at()} should be used instead.

Items created with this function can be deleted with function elm\+\_\+object\+\_\+item\+\_\+del() or elm\+\_\+object\+\_\+item\+\_\+del\+\_\+at().

\begin{DoxyNote}{Note}
{\ttfamily label} set to {\ttfamily N\+U\+L\+L} is different from empty string \char`\"{}\char`\"{}. If an item only has icon, it will be displayed bigger and centered. If it has icon and label, even that an empty string, icon will be smaller and positioned at left.
\end{DoxyNote}
Simple example\+: 
\begin{DoxyCode}
1 sc = elm\_segment\_control\_add(win);
2 ic = elm\_icon\_add(win);
3 elm\_image\_file\_set(ic, "path/to/image", NULL);
4 elm\_icon\_resizable\_set(ic, EINA\_TRUE, EINA\_TRUE);
5 elm\_segment\_control\_item\_add(sc, ic, "label");
6 evas\_object\_show(sc);
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\hyperlink{group__SegmentControl_ga41352493104b9bbd4bb8a26f78c66884}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at()} 

elm\+\_\+object\+\_\+item\+\_\+del()
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em icon} & The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with \hyperlink{group__Icon_ga5739728c1209f90422cf65a778a16502}{elm\+\_\+icon\+\_\+add()}. \\
\hline
\mbox{\tt in}  & {\em label} & The label of the item. Note that, N\+U\+L\+L is different from empty string \char`\"{}\char`\"{}. \\
\hline
\end{DoxyParams}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+add().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}int elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$}]{obj}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}


Get the Segment items count from segment control. 

\begin{DoxyReturn}{Returns}
Segment items count.
\end{DoxyReturn}
It will just return the number of items added to segment control {\ttfamily obj}. 

References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at}]{\setlength{\rightskip}{0pt plus 5cm}void elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at (
\begin{DoxyParamCaption}
\item[{Elm\+\_\+\+Segment\+\_\+\+Control $\ast$}]{obj, }
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga44300d1dbb7cf7d8fd1fbfde94dea38d}


Remove a segment control item at given index from its parent, deleting it. 

Items can be added with \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()} or \hyperlink{group__SegmentControl_ga41352493104b9bbd4bb8a26f78c66884}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at()}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em idx} & The position of the segment control item to be deleted. \\
\hline
\end{DoxyParams}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+get}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Elm\+\_\+\+Object\+\_\+\+Item}$\ast$ elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$}]{obj, }
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga1fab8022881733d8015f2b489aadfbad}


Get the item placed at specified index. 

\begin{DoxyReturn}{Returns}
The segment control item or {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
Index is the position of an item in segment control widget. Its range is from {\ttfamily 0} to {\ttfamily  count -\/ 1 }. Count is the number of items, that can be get with \hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get()}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em idx} & The index of the segment item. \\
\hline
\end{DoxyParams}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}Evas\+\_\+\+Object$\ast$ elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$}]{obj, }
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gae666f586e206d82b37ed7c6d43d1fa73}


Get the icon associated to the item. 

\begin{DoxyReturn}{Returns}
The left side icon associated to the item at {\ttfamily index}.
\end{DoxyReturn}
The return value is a pointer to the icon associated to the item when it was created, with function \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()}, or later with function elm\+\_\+object\+\_\+item\+\_\+part\+\_\+content\+\_\+set(). If no icon was passed as argument, it will return {\ttfamily N\+U\+L\+L}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()} 

elm\+\_\+object\+\_\+item\+\_\+part\+\_\+content\+\_\+set()
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em idx} & The index of the segment item. \\
\hline
\end{DoxyParams}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+icon\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}int elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Elm\+\_\+\+Segment\+\_\+\+Control\+\_\+\+Item $\ast$}]{obj}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga7e77b43d2cfdd137db3804289214f522}


Get the index of an item. 

Index is the position of an item in segment control widget. Its range is from {\ttfamily 0} to {\ttfamily  count -\/ 1 }. Count is the number of items, that can be get with \hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get()}.

\begin{DoxyReturn}{Returns}
The position of item in segment control widget. 
\end{DoxyReturn}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+index\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Elm\+\_\+\+Object\+\_\+\+Item}$\ast$ elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at (
\begin{DoxyParamCaption}
\item[{Elm\+\_\+\+Segment\+\_\+\+Control $\ast$}]{obj, }
\item[{Evas\+\_\+\+Object $\ast$}]{icon, }
\item[{const char $\ast$}]{label, }
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga41352493104b9bbd4bb8a26f78c66884}


Insert a new item to the segment control object at specified position. 

\begin{DoxyReturn}{Returns}
The created item or {\ttfamily N\+U\+L\+L} upon failure.
\end{DoxyReturn}
Index values must be between {\ttfamily 0}, when item will be prepended to segment control, and items count, that can be get with \hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get()}, case when item will be appended to segment control, just like \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()}.

Items created with this function can be deleted with function elm\+\_\+object\+\_\+item\+\_\+del() or \hyperlink{group__SegmentControl_ga44300d1dbb7cf7d8fd1fbfde94dea38d}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+del\+\_\+at()}.

\begin{DoxyNote}{Note}
{\ttfamily label} set to {\ttfamily N\+U\+L\+L} is different from empty string \char`\"{}\char`\"{}. If an item only has icon, it will be displayed bigger and centered. If it has icon and label, even that an empty string, icon will be smaller and positioned at left.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()} 

\hyperlink{group__SegmentControl_gadf14b4eaadddf9f0c8067b65f4b8c112}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+count\+\_\+get()} 

elm\+\_\+object\+\_\+item\+\_\+del()
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em icon} & The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with \hyperlink{group__Icon_ga5739728c1209f90422cf65a778a16502}{elm\+\_\+icon\+\_\+add()}. \\
\hline
\mbox{\tt in}  & {\em label} & The label of the item. \\
\hline
\mbox{\tt in}  & {\em idx} & Item position. Value should be between 0 and items count. \\
\hline
\end{DoxyParams}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+insert\+\_\+at().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$}]{obj, }
\item[{int}]{idx}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gad5ed6816358ec3fcad6b1cc2772bba0d}


Get the label of item. 

\begin{DoxyReturn}{Returns}
The label of the item at {\ttfamily index}.
\end{DoxyReturn}
The return value is a pointer to the label associated to the item when it was created, with function \hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()}, or later with function elm\+\_\+object\+\_\+item\+\_\+text\+\_\+set. If no label was passed as argument, it will return {\ttfamily N\+U\+L\+L}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__General_gab7192654621dd090be86c94678635ea4}{elm\+\_\+object\+\_\+item\+\_\+text\+\_\+set()} for more details. 

\hyperlink{group__SegmentControl_ga8179b6562444ddda69fb831286c60385}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+add()}
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em idx} & The index of the segment item. \\
\hline
\end{DoxyParams}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+label\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}Evas\+\_\+\+Object$\ast$ elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Elm\+\_\+\+Segment\+\_\+\+Control\+\_\+\+Item $\ast$}]{obj}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_ga0d8f3db391d87c226396632f43087959}


Get the real Evas(\+Edje) object created to implement the view of a given segment\+\_\+control {\ttfamily item}. 

Base object is the {\ttfamily Evas\+\_\+\+Object} that represents that item.

\begin{DoxyReturn}{Returns}
The base Edje object associated with {\ttfamily it}. 
\end{DoxyReturn}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+object\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Elm\+\_\+\+Object\+\_\+\+Item}$\ast$ elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Elm\+\_\+\+Segment\+\_\+\+Control $\ast$}]{obj}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gae407d4e828a8cf22a049095c95423e1c}


Get the selected item. 

\begin{DoxyReturn}{Returns}
The selected item or {\ttfamily N\+U\+L\+L} if none of segment items is selected.
\end{DoxyReturn}
The selected item can be unselected with function \hyperlink{group__SegmentControl_gacf833aa20b079f75749fec8b2b0fb031}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set()}.

The selected item always will be highlighted on segment control. 

References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get().

\index{Segment\+Control@{Segment\+Control}!elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set}}
\index{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set@{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set}!Segment\+Control@{Segment\+Control}}
\subsubsection[{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set (
\begin{DoxyParamCaption}
\item[{Elm\+\_\+\+Segment\+\_\+\+Control\+\_\+\+Item $\ast$}]{obj, }
\item[{Eina\+\_\+\+Bool}]{selected}
\end{DoxyParamCaption}
)}\label{group__SegmentControl_gacf833aa20b079f75749fec8b2b0fb031}


Set the selected state of an item. 

This sets the selected state of the given item {\ttfamily it}. {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} for selected, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} for not selected.

If a new item is selected the previously selected will be unselected. Selected item can be got with function \hyperlink{group__SegmentControl_gae407d4e828a8cf22a049095c95423e1c}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get()}.

The selected item always will be highlighted on segment control.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__SegmentControl_gae407d4e828a8cf22a049095c95423e1c}{elm\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+get()}
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em selected} & No description supplied. \\
\hline
\end{DoxyParams}


References elm\+\_\+obj\+\_\+segment\+\_\+control\+\_\+item\+\_\+selected\+\_\+set().

