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

\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{//gcc -g naviframe\_example.c -o naviframe\_example `pkg-config --cflags --libs elementary`}

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

\textcolor{keywordtype}{void}
\_btn\_cb(\textcolor{keywordtype}{void} *data, Evas\_Object *obj, \textcolor{keywordtype}{void} *event\_info)
\{
   Evas\_Object *nf = data, *btn;
   \textcolor{keywordflow}{if} (!nf) \textcolor{keywordflow}{return};

   btn = elm_button_add(nf);
   elm\_object\_text\_set(btn, \textcolor{stringliteral}{"Go to Second Page."});
   evas\_object\_smart\_callback\_add(btn, \textcolor{stringliteral}{"clicked"}, \_btn\_cb, nf);

   elm_naviframe_item_push(nf, \textcolor{stringliteral}{"Next Page"}, NULL, NULL, btn, NULL);
\}

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

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"naviframe"}, \textcolor{stringliteral}{"Naviframe"});
   elm_win_autodel_set(win, EINA\_TRUE);

   nf = elm_naviframe_add(win);
   evas\_object\_size\_hint\_weight\_set(nf, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm_win_resize_object_add(win, nf);
   evas\_object\_show(nf);

   btn = elm_button_add(nf);
   elm\_object\_text\_set(btn, \textcolor{stringliteral}{"Go to Second Page."});
   evas\_object\_smart\_callback\_add(btn, \textcolor{stringliteral}{"clicked"}, \_btn\_cb, nf);

   elm_naviframe_item_push(nf, \textcolor{stringliteral}{"First Page"}, NULL, NULL, btn, NULL);

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

   elm_run();

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