*
*/
#include "main.h"
+#include "page16.h"
#include "page15.h"
#include "page14.h"
#include "page13.h"
}
Evas_Object*
+create_title_handle_content(Evas_Object *parent, Evas_Smart_Cb prev_btn_clicked_cb, Evas_Smart_Cb next_btn_clicked_cb,
+ Evas_Smart_Cb title_show_btn_clicked_cb, Evas_Smart_Cb title_hide_btn_clicked_cb,
+ Evas_Smart_Cb title_show_anim_btn_clicked_cb, Evas_Smart_Cb title_hide_anim_btn_clicked_cb, ui_view *view)
+{
+ Elm_Grid *grid;
+ Elm_Box *box;
+ Elm_Layout *layout;
+ Elm_Button *btn;
+
+ /* Grid */
+ grid = elm_grid_add(parent);
+ evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_show(grid);
+
+ /* NoContent Layout */
+ layout = elm_layout_add(grid);
+ elm_layout_theme_set(layout, "layout", "nocontents", "default");
+ elm_object_part_text_set(layout, "elm.text", NULL);
+ evas_object_show(layout);
+ elm_grid_pack(grid, layout, 0, 0, 100, 100);
+
+ /* Box */
+ box = elm_box_add(grid);
+ //elm_box_horizontal_set(box, EINA_TRUE);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ //elm_box_padding_set(box, ELM_SCALE_SIZE(50), 0);
+ evas_object_show(box);
+ elm_grid_pack(grid, box, 25, 15, 50, 50);
+
+ /* Title Show Button */
+ btn = elm_button_add(grid);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 1.0);
+ elm_object_text_set(btn, "Title Show");
+ evas_object_smart_callback_add(btn, "clicked", title_show_btn_clicked_cb, view);
+ evas_object_show(btn);
+ elm_box_pack_end(box, btn);
+
+ /* Title Hide Button */
+ btn = elm_button_add(grid);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 1.0);
+ elm_object_text_set(btn, "Title Hide");
+ evas_object_smart_callback_add(btn, "clicked", title_hide_btn_clicked_cb, view);
+ evas_object_show(btn);
+ elm_box_pack_end(box, btn);
+
+ /* Title Show Anim Button */
+ btn = elm_button_add(grid);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 1.0);
+ elm_object_text_set(btn, "Title Show Anim");
+ evas_object_smart_callback_add(btn, "clicked", title_show_anim_btn_clicked_cb, view);
+ evas_object_show(btn);
+ elm_box_pack_end(box, btn);
+
+ /* Title Hide Anim Button */
+ btn = elm_button_add(grid);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 1.0);
+ elm_object_text_set(btn, "Title Hide Anim");
+ evas_object_smart_callback_add(btn, "clicked", title_hide_anim_btn_clicked_cb, view);
+ evas_object_show(btn);
+ elm_box_pack_end(box, btn);
+
+ /* Box */
+ box = elm_box_add(grid);
+ elm_box_horizontal_set(box, EINA_TRUE);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 1.0);
+ elm_box_padding_set(box, ELM_SCALE_SIZE(50), 0);
+ evas_object_show(box);
+ elm_grid_pack(grid, box, 0, 0, 100, 100);
+
+ /* Previous Page Button */
+ btn = elm_button_add(grid);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 1.0);
+ elm_object_text_set(btn, "Prev");
+ evas_object_smart_callback_add(btn, "clicked", prev_btn_clicked_cb, NULL);
+ evas_object_show(btn);
+ elm_box_pack_end(box, btn);
+
+ /* Next Page Button */
+ btn = elm_button_add(grid);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 1.0);
+ elm_object_text_set(btn, "Next");
+ evas_object_smart_callback_add(btn, "clicked", next_btn_clicked_cb, NULL);
+ evas_object_show(btn);
+ elm_box_pack_end(box, btn);
+
+ return grid;
+}
+
+Evas_Object*
create_content(Evas_Object *parent, const char *text, Evas_Smart_Cb prev_btn_clicked_cb, Evas_Smart_Cb next_btn_clicked_cb)
{
Elm_Grid *grid;
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+/** This example create a simple view which is inheritance ui_view.
+ * Then push in viewmgr.
+ */
+class page16: public ui_view
+{
+protected:
+ void on_load()
+ {
+ ui_view::on_load();
+
+ //Create a main content.
+ Evas_Object *content = create_title_handle_content(this->get_base(),
+ //Prev Button Callback
+ [](void *data, Evas_Object *obj, void *event_info) -> void
+ {
+ UI_VIEWMGR->pop_view();
+ },
+ //Next Button Callback
+ [](void *data, Evas_Object *obj, void *event_info) -> void
+ {
+ UI_VIEWMGR->deactivate();
+ },
+ //Title Show Button Callback
+ [](void *data, Evas_Object *obj, void *event_info) -> void
+ {
+ ui_view *view = static_cast<ui_view *>(data);
+ view->set_title_visible(true, false);
+ },
+ //Title Hide Button Callback
+ [](void *data, Evas_Object *obj, void *event_info) -> void
+ {
+ ui_view *view = static_cast<ui_view *>(data);
+ view->set_title_visible(false, false);
+ },
+ //Title Show Anim Button Callback
+ [](void *data, Evas_Object *obj, void *event_info) -> void
+ {
+ ui_view *view = static_cast<ui_view *>(data);
+ view->set_title_visible(true, true);
+ },
+ //Title Hide Anim Button Callback
+ [](void *data, Evas_Object *obj, void *event_info) -> void
+ {
+ ui_view *view = static_cast<ui_view *>(data);
+ view->set_title_visible(false, true);
+ }, this);
+
+ this->set_content(content, "Page16");
+ }
+
+public:
+ page16() : ui_view("page16") {}
+ ~page16() {}
+};
+
+void create_page16()
+{
+ //Push this view in viewmgr.
+ UI_VIEWMGR->push_view(new page16());
+}