This code places an Elementary flip selector widget on a window, along with two buttons trigerring actions on it (though its A\+PI).

The selector is being populated with the following items\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *lbl[] =}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{stringliteral}{"Elementary"},}
\DoxyCodeLine{        \textcolor{stringliteral}{"Evas"},}
\DoxyCodeLine{        \textcolor{stringliteral}{"Eina"},}
\DoxyCodeLine{        \textcolor{stringliteral}{"Edje"},}
\DoxyCodeLine{        \textcolor{stringliteral}{"Eet"},}
\DoxyCodeLine{        \textcolor{stringliteral}{"Ecore"},}
\DoxyCodeLine{        \textcolor{stringliteral}{"Efreet"},}
\DoxyCodeLine{        \textcolor{stringliteral}{"Eldbus"}}
\DoxyCodeLine{     \};}

\end{DoxyCodeInclude}


Next, we create it, populating it with those items and registering two (smart) callbacks on it\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   fp = \mbox{\hyperlink{group__Elm__Flipselector_gaffabf9e37915526cbbe8ac2621eeee8a}{elm\_flipselector\_add}}(win);}
\DoxyCodeLine{   evas\_object\_size\_hint\_weight\_set(fp, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}}(fp, \textcolor{stringliteral}{"underflowed"}, \_overflow\_cb, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}}(fp, \textcolor{stringliteral}{"overflowed"}, \_underflow\_cb, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(lbl) / \textcolor{keyword}{sizeof}(lbl[0]); i++)}
\DoxyCodeLine{     elm\_flipselector\_item\_append(fp, lbl[i], NULL, NULL);}
\DoxyCodeLine{   elm\_box\_pack\_end(bx, fp);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(fp);}

\end{DoxyCodeInclude}


Those two callbacks will take place whenever one of those smart events occur, and they will just print something to {\ttfamily stdout\+:}  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keywordtype}{void} \textcolor{comment}{/* underflow callback */}}
\DoxyCodeLine{\_underflow\_cb(\textcolor{keywordtype}{void}        *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{              \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{              \textcolor{keywordtype}{void}        *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"Underflow!\(\backslash\)n"});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} \textcolor{comment}{/* overflow callback */}}
\DoxyCodeLine{\_overflow\_cb(\textcolor{keywordtype}{void}        *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{             \textcolor{keywordtype}{void}        *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"Overflow!\(\backslash\)n"});}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 Flip the sheets on the widget while looking at the items list, in the source code, and you\textquotesingle{}ll get the idea of those events.

The two buttons below the flip selector will take the actions described in their labels\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   bt = \mbox{\hyperlink{group__Elm__Button_ga0021b9d86d822367035843ed18bc6ea9}{elm\_button\_add}}(win);}
\DoxyCodeLine{   elm\_object\_text\_set(bt, \textcolor{stringliteral}{"Unselect item"});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}}(bt, \textcolor{stringliteral}{"clicked"}, \_unsel\_cb, fp);}
\DoxyCodeLine{   elm\_box\_pack\_end(bx, bt);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(bt);}
\DoxyCodeLine{}
\DoxyCodeLine{   bt = \mbox{\hyperlink{group__Elm__Button_ga0021b9d86d822367035843ed18bc6ea9}{elm\_button\_add}}(win);}
\DoxyCodeLine{   elm\_object\_text\_set(bt, \textcolor{stringliteral}{"Delete item"});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}}(bt, \textcolor{stringliteral}{"clicked"}, \_del\_cb, fp);}
\DoxyCodeLine{   elm\_box\_pack\_end(bx, bt);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(bt);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_gae2d2f3ef544f5aa59a0d89fbb67584e5}{elm\_object\_event\_callback\_add}}(win, \_on\_keydown, fp);}

\end{DoxyCodeInclude}


 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keywordtype}{void} \textcolor{comment}{/* unselect the item shown in the flip selector */}}
\DoxyCodeLine{\_unsel\_cb(\textcolor{keywordtype}{void}        *data,}
\DoxyCodeLine{          \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{          \textcolor{keywordtype}{void}        *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\_Object\_Item}} *it;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *fp = data;}
\DoxyCodeLine{}
\DoxyCodeLine{   it = elm\_flipselector\_selected\_item\_get(fp);}
\DoxyCodeLine{   elm\_flipselector\_item\_selected\_set(it, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} \textcolor{comment}{/* delete the item shown in the flip selector */}}
\DoxyCodeLine{\_del\_cb(\textcolor{keywordtype}{void}        *data,}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{        \textcolor{keywordtype}{void}        *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga13a0c231414b86e62f68afe3c6fb462b}{Elm\_Object\_Item}} *it;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *fp = data;}
\DoxyCodeLine{}
\DoxyCodeLine{   it = elm\_flipselector\_selected\_item\_get(fp);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (it) \mbox{\hyperlink{group__Elm__General_gad1b5a0d41fa322b28000a290154ec3a4}{elm\_object\_item\_del}}(it);}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}


Click on them to exercise those flip selector A\+PI calls. To interact with the other parts of this A\+PI, there\textquotesingle{}s a command line interface, whose help string can be asked for with the \textquotesingle{}h\textquotesingle{} key\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *commands = \(\backslash\)}
\DoxyCodeLine{                              \textcolor{stringliteral}{"commands are:\(\backslash\)n"}}
\DoxyCodeLine{                              \textcolor{stringliteral}{"\(\backslash\)tn -\/ flip to next item\(\backslash\)n"}}
\DoxyCodeLine{                              \textcolor{stringliteral}{"\(\backslash\)tp -\/ flip to previous item\(\backslash\)n"}}
\DoxyCodeLine{                              \textcolor{stringliteral}{"\(\backslash\)tf -\/ print first item's label\(\backslash\)n"}}
\DoxyCodeLine{                              \textcolor{stringliteral}{"\(\backslash\)tl -\/ print last item's label\(\backslash\)n"}}
\DoxyCodeLine{                              \textcolor{stringliteral}{"\(\backslash\)ts -\/ print selected item's label\(\backslash\)n"}}
\DoxyCodeLine{                              \textcolor{stringliteral}{"\(\backslash\)th -\/ print help\(\backslash\)n"};}

\end{DoxyCodeInclude}


The \textquotesingle{}n\textquotesingle{} and \textquotesingle{}p\textquotesingle{} keys will exemplify elm\+\_\+flipselector\+\_\+flip\+\_\+next() and elm\+\_\+flipselector\+\_\+flip\+\_\+prev(), respectively. \textquotesingle{}f\textquotesingle{} and \textquotesingle{}l\textquotesingle{} account for elm\+\_\+flipselector\+\_\+first\+\_\+item\+\_\+get() and elm\+\_\+flipselector\+\_\+last\+\_\+item\+\_\+get(), respectively. Finally, \textquotesingle{}s\textquotesingle{} will issue elm\+\_\+flipselector\+\_\+selected\+\_\+item\+\_\+get() on our example flip selector widget.

See the full \mbox{\hyperlink{flipselector_example_8c-example}{example}}, whose window should look like this picture\+:

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{screenshots/flipselector_example}}
\end{DoxyImageNoCaption}


See the full \mbox{\hyperlink{flipselector_example_c}{source code}} for this example. 