\section{panes\+\_\+example.\+c}

\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#include <Elementary.h>}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_press(\textcolor{keywordtype}{void} *data, Evas\_Object *obj, \textcolor{keywordtype}{void} *event\_info)
\{
   printf(\textcolor{stringliteral}{"Pressed\(\backslash\)n"});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_unpress(\textcolor{keywordtype}{void} *data, Evas\_Object *obj, \textcolor{keywordtype}{void} *event\_info)
\{
   printf(\textcolor{stringliteral}{"Unpressed, size : %f\(\backslash\)n"}, elm\_panes\_content\_left\_size\_get(obj));
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_clicked(\textcolor{keywordtype}{void} *data, Evas\_Object *obj, \textcolor{keywordtype}{void} *event\_info)
\{
   printf(\textcolor{stringliteral}{"Clicked\(\backslash\)n"});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_clicked\_double(\textcolor{keywordtype}{void} *data, Evas\_Object *obj, \textcolor{keywordtype}{void} *event\_info)
\{
   \textcolor{keyword}{static} \textcolor{keywordtype}{double} size = 0.0;
   \textcolor{keywordtype}{double} tmp\_size = 0.0;

   tmp\_size = elm\_panes\_content\_left\_size\_get(obj);
   \textcolor{keywordflow}{if} (tmp\_size > 0)
     \{
        elm\_panes\_content\_left\_size\_set(obj, 0.0);
        printf(\textcolor{stringliteral}{"Double clicked, hidding.\(\backslash\)n"});
     \}
   \textcolor{keywordflow}{else}
     \{
        elm\_panes\_content\_left\_size\_set(obj, size);
        printf(\textcolor{stringliteral}{"Double clicked, restoring size.\(\backslash\)n"});
     \}
   size = tmp\_size;
\}

EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *panes, *panes\_h, *bt;

   elm_policy_set(ELM\_POLICY\_QUIT, ELM\_POLICY\_QUIT\_LAST\_WINDOW\_CLOSED);

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"panes"}, \textcolor{stringliteral}{"Panes Example"});
   elm\_win\_autodel\_set(win, EINA\_TRUE);
   elm\_win\_focus\_highlight\_enabled\_set(win, EINA\_TRUE);

   panes = elm_panes_add(win);
   evas\_object\_size\_hint\_weight\_set(panes, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm\_win\_resize\_object\_add(win, panes);
   evas\_object\_show(panes);

   bt = elm_button_add(win);
   elm\_object\_text\_set(bt, \textcolor{stringliteral}{"Left"});
   evas\_object\_size\_hint\_weight\_set(bt, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_size\_hint\_align\_set(bt, EVAS\_HINT\_FILL, EVAS\_HINT\_FILL);
   evas\_object\_show(bt);
   elm_object_part_content_set(panes, \textcolor{stringliteral}{"left"}, bt);

   panes\_h = elm_panes_add(win);
   elm\_panes\_horizontal\_set(panes\_h, EINA\_TRUE);
   evas\_object\_size\_hint\_weight\_set(panes\_h, EVAS\_HINT\_EXPAND,
                                    EVAS\_HINT\_EXPAND);
   evas\_object\_size\_hint\_align\_set(panes\_h, EVAS\_HINT\_FILL, EVAS\_HINT\_FILL);
   evas\_object\_show(panes\_h);
   elm_object_part_content_set(panes, \textcolor{stringliteral}{"right"}, panes\_h);

   bt = elm_button_add(win);
   elm\_object\_text\_set(bt, \textcolor{stringliteral}{"Up"});
   evas\_object\_size\_hint\_weight\_set(bt, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_size\_hint\_align\_set(bt, EVAS\_HINT\_FILL, EVAS\_HINT\_FILL);
   evas\_object\_show(bt);
   elm_object_part_content_set(panes\_h, \textcolor{stringliteral}{"left"}, bt);

   bt = elm_button_add(win);
   elm\_object\_text\_set(bt, \textcolor{stringliteral}{"Down"});
   evas\_object\_size\_hint\_weight\_set(bt, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_size\_hint\_align\_set(bt, EVAS\_HINT\_FILL, EVAS\_HINT\_FILL);
   evas\_object\_show(bt);
   elm_object_part_content_set(panes\_h, \textcolor{stringliteral}{"right"}, bt);

   evas\_object\_smart\_callback\_add(panes, \textcolor{stringliteral}{"clicked"}, \_clicked, panes);
   evas\_object\_smart\_callback\_add(panes, \textcolor{stringliteral}{"clicked,double"}, \_clicked\_double,
                                  panes);
   evas\_object\_smart\_callback\_add(panes, \textcolor{stringliteral}{"press"}, \_press, panes);
   evas\_object\_smart\_callback\_add(panes, \textcolor{stringliteral}{"unpress"}, \_unpress, panes);

   evas\_object\_resize(win, 320, 400);
   evas\_object\_show(win);

   elm_run();

   \textcolor{keywordflow}{return} 0;
\}
ELM_MAIN()
\end{DoxyCodeInclude}
 