return false;
}
- create_page1();
+ //Push first view in viewmgr.
+ UI_VIEWMGR->push_view(new page1());
return true;
}
int main(int argc, char *argv[])
{
sample_app app(PACKAGE, LOCALE_DIR);
- return app.start(argc, argv);
+ return app.run(argc, argv);
}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page2();
+ UI_VIEWMGR->push_view(new page2());
});
this->set_content(content, "Page1");
}
page1() : ui_view("page1") {}
~page1() {}
};
-
-void create_page1()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page1());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page11();
+ UI_VIEWMGR->push_view(new page11());
});
this->set_content(content, "Page 10");
this->set_indicator(UI_VIEW_INDICATOR_DEFAULT);
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page11();
+ UI_VIEWMGR->push_view(new page11());
});
this->set_content(content, "Page 10");
this->set_indicator(UI_VIEW_INDICATOR_OPTIMAL);
page10() : ui_view("page10") {}
~page10() {}
};
-
-void create_page10()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page10());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page12();
+ UI_VIEWMGR->push_view(new page12());
});
this->set_content(content, "Page11");
page11() {}
~page11() {}
};
-
-void create_page11()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page11());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page13();
+ UI_VIEWMGR->push_view(new page13());
});
this->set_content(content, "Page12");
popup->activate();
}
};
-
-void create_page12()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page12());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page14();
+ UI_VIEWMGR->push_view(new page14());
});
this->set_content(content, "Page13");
}
~page13() {}
};
-
-void create_page13()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page13());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page15();
+ UI_VIEWMGR->push_view(new page15());
});
this->set_content(content, "Page14");
}
~page14(){}
};
-
-void create_page14()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page14());
-}
evas_object_smart_callback_add(right_btn, "clicked",
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page16();
+ UI_VIEWMGR->push_view(new page16());
},
this);
this->set_title_right_btn(right_btn);
}
};
-
-void create_page15()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page15());
-}
page16() : ui_view("page16") {}
~page16() {}
};
-
-void create_page16()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page16());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page3();
+ UI_VIEWMGR->push_view(new page3());
});
//Title left button
page2() : ui_view("page2") {}
~page2() {}
};
-
-void create_page2()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page2());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page4();
+ UI_VIEWMGR->push_view(new page4());
});
//Arguments: content, title, subtitle, title left button, title right button
page3() : ui_view("page3") {}
~page3() {}
};
-
-void create_page3()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page3());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page5();
+ UI_VIEWMGR->push_view(new page5());
});
//Arguments: content, title
page4() : ui_view("page4") {}
~page4() {}
};
-
-void create_page4()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page4());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page6();
+ UI_VIEWMGR->push_view(new page6());
});
this->set_content(content);
page5() : ui_base_view("page5") {}
~page5() {}
};
-
-void create_page5()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page5());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page7();
+ UI_VIEWMGR->push_view(new page7());
});
//Arguments: content, title
page6() : ui_view("page6") {}
~page6() {}
};
-
-void create_page6()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page6());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page8();
+ UI_VIEWMGR->push_view(new page8());
});
//FIXME: Don't delete view's content when this view poped.
page7() : ui_view("page7") {}
~page7() {}
};
-
-void create_page7()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page7());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page9();
+ UI_VIEWMGR->push_view(new page9());
});
//Don't delete view's content when this view poped.
}
~page8() {}
};
-
-void create_page8()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page8());
-}
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page10();
+ UI_VIEWMGR->push_view(new page10());
});
this->set_content(content, "Page 9");
this->set_indicator(UI_VIEW_INDICATOR_DEFAULT);
//Next Button Callback
[](void *data, Evas_Object *obj, void *event_info) -> void
{
- create_page10();
+ UI_VIEWMGR->push_view(new page10());
});
this->set_content(content, "Page 9");
this->set_indicator(UI_VIEW_INDICATOR_OPTIMAL);
page9() : ui_view("page9") {}
~page9() {}
};
-
-void create_page9()
-{
- //Push this view in viewmgr.
- UI_VIEWMGR->push_view(new page9());
-}
ui_app(const char *pkg, const char *locale_dir);
virtual ~ui_app();
- virtual int start(int argc, char **argv);
+ virtual int run(int argc, char **argv);
virtual bool on_create();
virtual void on_terminate();
virtual void on_pause();
virtual bool activate();
virtual bool deactivate();
- virtual bool set_content(Elm_Popup* ctxpopup);
+ virtual bool set_content(Elm_Popup* popup);
virtual Elm_Popup *unset_content();
virtual bool is_activated();
ui_viewmgr(const char *pkg);
ui_viewmgr(const ui_viewmgr& viewmgr);
virtual ~ui_viewmgr();
-
};
}
void ui_app::on_resume()
{
+ this->viewmgr->activate();
}
void ui_app::on_control(app_control_h app_control)
locale_dir = eina_stringshare_add(locale_dir);
}
-int ui_app::start(int argc, char **argv)
+int ui_app::run(int argc, char **argv)
{
ui_app_lifecycle_callback_s event_callback = { 0, };
app_event_handler_h handlers[5] = { NULL, };
ui_app::~ui_app()
{
- eina_stringshare_del(this->pkg);
delete (this->viewmgr);
+ eina_stringshare_del(this->pkg);
+ eina_stringshare_del(this->locale_dir);
}
ui_viewmgr *ui_app::get_viewmgr()