Get rid of controller interface. 81/64181/3
authorHermet Park <hermet@hermet.pe.kr>
Wed, 30 Mar 2016 10:44:09 +0000 (19:44 +0900)
committerHermet Park <hermet@hermet.pe.kr>
Wed, 30 Mar 2016 10:51:36 +0000 (19:51 +0900)
We've considered supporting controller interface.
But it turned out it's unnecesary here.
It just made ui_viewmgr complex and we couldn't find out the actual usuability.

If, it's usage is figured out, then we could revert this interface again.

Change-Id: Ie58ce01aaee8708371e2ed7e187a7910624cb6ea

35 files changed:
src/examples/efl/CMakeLists.txt
src/examples/efl/main.cpp
src/examples/efl/page1.h
src/examples/efl/page10.h
src/examples/efl/page11.h
src/examples/efl/page12.h
src/examples/efl/page13.h
src/examples/efl/page14.h
src/examples/efl/page15.h [deleted file]
src/examples/efl/page2.h
src/examples/efl/page3.h
src/examples/efl/page4.h
src/examples/efl/page5.h
src/examples/efl/page6.h
src/examples/efl/page7.h
src/examples/efl/page8.h
src/examples/efl/page9.h
src/include/efl/mobile/ui_controller.h [deleted file]
src/include/efl/mobile/ui_view.h
src/include/efl/mobile/ui_viewmanager.h
src/include/efl/mobile/ui_viewmgr.h
src/include/efl/ui_base_controller.h [deleted file]
src/include/efl/ui_base_view.h
src/include/efl/ui_viewmanager_base.h
src/include/interface/ui_iface_controller.h [deleted file]
src/include/interface/ui_iface_rotatable.h
src/include/interface/ui_iface_view.h
src/include/interface/ui_viewmanager_interface.h
src/lib/CMakeLists.txt
src/lib/efl/mobile/ui_controller.cpp [deleted file]
src/lib/efl/mobile/ui_view.cpp
src/lib/efl/ui_base_controller.cpp [deleted file]
src/lib/efl/ui_base_view.cpp
src/lib/interface/ui_iface_controller.cpp [deleted file]
src/lib/interface/ui_iface_view.cpp

index 225f69c..99b4f7f 100644 (file)
@@ -1,14 +1,11 @@
 SET(EXAM_NAME viewmgr_demo)
 SET(EXAM_SRCS
-         ../../lib/interface/ui_iface_controller.cpp
          ../../lib/interface/ui_iface_view.cpp
          ../../lib/interface/ui_iface_viewmgr.cpp
          ../../lib/efl/ui_base_popup.cpp
-         ../../lib/efl/ui_base_controller.cpp
          ../../lib/efl/ui_base_view.cpp
          ../../lib/efl/ui_base_viewmgr.cpp
          ../../lib/efl/ui_base_key_listener.cpp
-         ../../lib/efl/mobile/ui_controller.cpp
          ../../lib/efl/mobile/ui_menu.cpp
          ../../lib/efl/mobile/ui_view.cpp
          ../../lib/efl/mobile/ui_key_listener.cpp
index 143497a..d374167 100644 (file)
@@ -15,7 +15,6 @@
  *
  */
 #include "main.h"
-#include "page15.h"
 #include "page14.h"
 #include "page13.h"
 #include "page12.h"
index 5a0e4e3..4263a41 100644 (file)
@@ -24,7 +24,7 @@ protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 1",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Basic View",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
@@ -35,7 +35,7 @@ protected:
                                {
                                        create_page2();
                                });
-               this->set_content(content, "Title");
+               this->set_content(content, "Page1");
        }
 
 public:
index 9dadddd..fcc12c2 100644 (file)
  *
  */
 
-/** This page inherit ui_view.
- *  And implement on_portait(), on_landscape() method to create portarit, landscape content.
- *  This page will be created suitable content in on_portrait(), on_landscape() method.
+/** This page implements on_rotate() method to create portarit, landscape content.
+ *  This page will be created suitable content in on_rotate() method.
  */
 class page10: public ui_view
 {
 protected:
        void on_load()
        {
-               //FIXME: Change below code to more convenient and clear way.
-               if (this->get_degree() == 90 || this->get_degree() == 270)
-                       this->on_landscape();
-               else
-                       this->on_portrait();
-       }
-
-       void on_portrait()
-       {
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 10<br>(Portrait + Landscape)",
-                       //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
-                               {
-                                       create_page11();
-                       });
-               this->set_content(content, "Title");
-               this->set_indicator(UI_VIEW_INDICATOR_DEFAULT);
+               this->on_rotate(this->get_degree());
        }
 
-       void on_landscape()
+       void on_rotate(int degree)
        {
-               Evas_Object *content = create_landscape_content(this->get_base(), "ViewMgr Demo<br>Page 10<br>(Portrait + Landscape)",
-                               //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
-                               {
-                                       create_page11();
-                               });
-               this->set_content(content, "Title");
-               this->set_indicator(UI_VIEW_INDICATOR_OPTIMAL);
+               //Portrait
+               if (this->get_degree() == 0 || this->get_degree() == 180)
+               {
+                       Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Rotation",
+                                       //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
+                                       {
+                                               create_page11();
+                                       });
+                       this->set_content(content, "Page 10");
+                       this->set_indicator(UI_VIEW_INDICATOR_DEFAULT);
+               }
+               //Landscape
+               else
+               {
+                       Evas_Object *content = create_landscape_content(this->get_base(), "ViewMgr Demo<br>Rotation",
+                                       //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
+                                       {
+                                               create_page11();
+                                       });
+                       this->set_content(content, "Page 10");
+                       this->set_indicator(UI_VIEW_INDICATOR_OPTIMAL);
+               }
        }
-
 public:
        page10() : ui_view("page10") {}
        ~page10() {}
index 9312359..676fd0d 100644 (file)
  *
  */
 
-/** This page inherit ui_controller
- *  And implement on_rotate() method to create portarit, landscape content.
- *  This page will be created suitable content in on_rotate() method.
+
+/** This page implement on_menu() method to create ctxpopup when menu HW key clicked.
+ *  This page will be created menu(ctxpopup)items in on_menu() method.
  */
-class page11: public ui_controller
+static void ctxpopup_item_select_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       ui_view *view = static_cast<ui_view *>(data);
+       Elm_Object_Item *it = static_cast<Elm_Object_Item *>(event_info);
+       elm_ctxpopup_dismiss(obj);
+       LOGE("Item (%s) is selected", elm_object_item_text_get(it));
+}
+
+class page11: public ui_view
 {
 protected:
        void on_load()
        {
-               ui_view *view = dynamic_cast<ui_view *>(this->get_view());
-               this->on_rotate(view->get_degree());
+               //Create a main content.
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Menu Popup",
+                               //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
+                               {
+                                       create_page12();
+                               });
+
+               this->set_content(content, "Page11");
        }
 
-       void on_rotate(int degree)
+       void on_menu(ui_menu *menu)
        {
-               ui_view *view = dynamic_cast<ui_view *>(this->get_view());
+               Elm_Ctxpopup *ctxpopup = elm_ctxpopup_add(menu->get_base());
+               elm_ctxpopup_item_append(ctxpopup, "Phone calls", NULL, ctxpopup_item_select_cb, this);
+               elm_ctxpopup_item_append(ctxpopup, "Favorites", NULL, ctxpopup_item_select_cb, this);
+               elm_ctxpopup_item_append(ctxpopup, "Search", NULL, ctxpopup_item_select_cb, this);
+               elm_ctxpopup_item_append(ctxpopup, "Dialer", NULL, ctxpopup_item_select_cb, this);
+               elm_ctxpopup_item_append(ctxpopup, "Add contact", NULL, ctxpopup_item_select_cb, this);
+               elm_ctxpopup_item_append(ctxpopup, "Phone calls", NULL, ctxpopup_item_select_cb, this);
+               elm_ctxpopup_item_append(ctxpopup, "Favorites", NULL, ctxpopup_item_select_cb, this);
+               elm_ctxpopup_item_append(ctxpopup, "Search", NULL, ctxpopup_item_select_cb, this);
+               elm_ctxpopup_item_append(ctxpopup, "Dialer", NULL, ctxpopup_item_select_cb, this);
 
-               //Portrait
-               if (view->get_degree() == 0 || view->get_degree() == 180)
-               {
-                       Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 11<br>(Rotate)",
-                                       //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
-                                       {
-                                               create_page12();
-                                       });
-                       view->set_content(content, "Title");
-                       view->set_indicator(UI_VIEW_INDICATOR_DEFAULT);
-               }
-               //Landscape
-               else
-               {
-                       Evas_Object *content = create_landscape_content(view->get_base(), "ViewMgr Demo<br>Page 11<br>(Rotate)",
-                                       //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
-                                       {
-                                               create_page12();
-                                       });
-                       view->set_content(content, "Title");
-                       view->set_indicator(UI_VIEW_INDICATOR_OPTIMAL);
-               }
+               menu->set_content(ctxpopup);
        }
+
 public:
-       page11()
-       {
-               UI_VIEWMGR->push_view(new ui_view(this, "page11"));
-       }
+       page11() {}
        ~page11() {}
 };
 
 void create_page11()
 {
-       //page 11 controller
-       page11 *controller = new page11();
+       //Push this view in viewmgr.
+       UI_VIEWMGR->push_view(new page11());
 }
index c65c976..51cee23 100644 (file)
  *
  */
 
-
-/** This page inherit ui_controller
- *  And implement on_menu() method to create ctxpopup when menu HW key clicked.
- *  This page will be created menu(ctxpopup)items in on_menu() method.
+/** This page inherit ui_ui_view
+ *  And make a button on right top side of title area to activate popup.
+ *  The created popup has view and it will be managed by viewmgr.
  */
-static void ctxpopup_item_select_cb(void *data, Evas_Object *obj, void *event_info)
+
+static void popup_dismissed_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       ui_view *view = static_cast<ui_view *>(data);
-       Elm_Object_Item *it = static_cast<Elm_Object_Item *>(event_info);
-       elm_ctxpopup_dismiss(obj);
-       LOGE("Item (%s) is selected", elm_object_item_text_get(it));
+       //FIXME: remove dismissed callback because this callback is called twice.
+       //It seems this is an efl or popup error, not this ui_popup nor example.
+       evas_object_smart_callback_del(obj, "dismissed", popup_dismissed_cb);
+       ui_base_popup *overlay = static_cast<ui_base_popup *>(data);
+       delete (overlay);
 }
 
 class page12: public ui_view
@@ -34,7 +35,7 @@ protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 12<br>(Menu Popup)",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Popup",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
@@ -46,28 +47,49 @@ protected:
                                        create_page13();
                                });
 
-               this->set_content(content, "Title");
-       }
-
-       void on_menu(ui_menu *menu)
-       {
-               Elm_Ctxpopup *ctxpopup = elm_ctxpopup_add(menu->get_base());
-               elm_ctxpopup_item_append(ctxpopup, "Phone calls", NULL, ctxpopup_item_select_cb, this);
-               elm_ctxpopup_item_append(ctxpopup, "Favorites", NULL, ctxpopup_item_select_cb, this);
-               elm_ctxpopup_item_append(ctxpopup, "Search", NULL, ctxpopup_item_select_cb, this);
-               elm_ctxpopup_item_append(ctxpopup, "Dialer", NULL, ctxpopup_item_select_cb, this);
-               elm_ctxpopup_item_append(ctxpopup, "Add contact", NULL, ctxpopup_item_select_cb, this);
-               elm_ctxpopup_item_append(ctxpopup, "Phone calls", NULL, ctxpopup_item_select_cb, this);
-               elm_ctxpopup_item_append(ctxpopup, "Favorites", NULL, ctxpopup_item_select_cb, this);
-               elm_ctxpopup_item_append(ctxpopup, "Search", NULL, ctxpopup_item_select_cb, this);
-               elm_ctxpopup_item_append(ctxpopup, "Dialer", NULL, ctxpopup_item_select_cb, this);
+               this->set_content(content, "Page12");
 
-               menu->set_content(ctxpopup);
+               //Title Right button
+               Elm_Button *right_btn = elm_button_add(this->get_base());
+               elm_object_text_set(right_btn, "popup");
+               evas_object_smart_callback_add(right_btn, "clicked",
+                               [](void *data, Evas_Object *obj, void *event_info) -> void
+                               {
+                                       page12 *view = static_cast<page12 *>(data);
+                                       view->create_popup();
+                               },
+                               this);
+               this->set_title_right_btn(right_btn);
        }
 
 public:
-       page12() {}
+       page12() : ui_view("page12") {}
        ~page12() {}
+
+       void create_popup()
+       {
+               //FIXME: is overlay a proper name?
+               ui_base_popup *overlay = new ui_base_popup(this);
+
+               Elm_Popup *popup = elm_popup_add(overlay->get_base());
+               elm_object_text_set(popup, "This popup has only text which is set via desc set function, (This popup gets hidden when user clicks outside) here timeout of 3 sec is set.");
+               elm_popup_timeout_set(popup, 3.0);
+               evas_object_smart_callback_add(popup, "dismissed", popup_dismissed_cb, overlay);
+               evas_object_smart_callback_add(popup, "block,clicked",
+                               [](void *data, Evas_Object *obj, void *event_info) -> void
+                               {
+                                       elm_popup_dismiss(obj);
+                               },
+                               NULL);
+               evas_object_smart_callback_add(popup, "timeout",
+                               [](void *data, Evas_Object *obj, void *event_info) -> void
+                               {
+                                       elm_popup_dismiss(obj);
+                               },
+                               NULL);
+               overlay->set_content(popup);
+               overlay->activate();
+       }
 };
 
 void create_page12()
index 27e940b..9fab450 100644 (file)
  *
  */
 
-/** This page inherit ui_ui_view
- *  And make a button on right top side of title area to activate popup.
- *  The created popup has view and it will be managed by viewmgr.
+/** This example create a simple view which is inheritance ui_view.
+ *  Then push in viewmgr.
  */
-
-static void popup_dismissed_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       //FIXME: remove dismissed callback because this callback is called twice.
-       //It seems this is an efl or popup error, not this ui_popup nor example.
-       evas_object_smart_callback_del(obj, "dismissed", popup_dismissed_cb);
-       ui_base_popup *overlay = static_cast<ui_base_popup *>(data);
-       delete (overlay);
-}
-
 class page13: public ui_view
 {
 protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 13<br>(Popup)",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Fade Transition",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
@@ -47,49 +36,15 @@ protected:
                                        create_page14();
                                });
 
-               this->set_content(content, "Title");
-
-               //Title Right button
-               Elm_Button *right_btn = elm_button_add(this->get_base());
-               elm_object_text_set(right_btn, "popup");
-               evas_object_smart_callback_add(right_btn, "clicked",
-                               [](void *data, Evas_Object *obj, void *event_info) -> void
-                               {
-                                       page13 *view = static_cast<page13 *>(data);
-                                       view->create_popup();
-                               },
-                               this);
-               this->set_title_right_btn(right_btn);
+               this->set_content(content, "Page13");
        }
 
 public:
-       page13() : ui_view("page13") {}
-       ~page13() {}
-
-       void create_popup()
+       page13() : ui_view("page13")
        {
-               //FIXME: is overlay a proper name?
-               ui_base_popup *overlay = new ui_base_popup(this);
-
-               Elm_Popup *popup = elm_popup_add(overlay->get_base());
-               elm_object_text_set(popup, "This popup has only text which is set via desc set function, (This popup gets hidden when user clicks outside) here timeout of 3 sec is set.");
-               elm_popup_timeout_set(popup, 3.0);
-               evas_object_smart_callback_add(popup, "dismissed", popup_dismissed_cb, overlay);
-               evas_object_smart_callback_add(popup, "block,clicked",
-                               [](void *data, Evas_Object *obj, void *event_info) -> void
-                               {
-                                       elm_popup_dismiss(obj);
-                               },
-                               NULL);
-               evas_object_smart_callback_add(popup, "timeout",
-                               [](void *data, Evas_Object *obj, void *event_info) -> void
-                               {
-                                       elm_popup_dismiss(obj);
-                               },
-                               NULL);
-               overlay->set_content(popup);
-               overlay->activate();
+               this->set_transition_style("fade");
        }
+       ~page13() {}
 };
 
 void create_page13()
index dd6e6c4..f875de4 100644 (file)
@@ -24,7 +24,7 @@ protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 14<br>(Fade Transition)",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>None Transition",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
@@ -33,18 +33,18 @@ protected:
                                //Next Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
-                                       create_page15();
+                                       UI_VIEWMGR->deactivate();
                                });
 
-               this->set_content(content, "Title");
+               this->set_content(content, "Page14");
        }
 
 public:
        page14() : ui_view("page14")
        {
-               this->set_transition_style("fade");
+               this->set_transition_style("none");
        }
-       ~page14() {}
+       ~page14(){}
 };
 
 void create_page14()
diff --git a/src/examples/efl/page15.h b/src/examples/efl/page15.h
deleted file mode 100644 (file)
index 2cbf09a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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 page15: public ui_view
-{
-protected:
-       void on_load()
-       {
-               //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 15<br>(None Transition)",
-                               //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();
-                               });
-
-               this->set_content(content, "Title");
-       }
-
-public:
-       page15() : ui_view("page15")
-       {
-               this->set_transition_style("none");
-       }
-       ~page15(){}
-};
-
-void create_page15()
-{
-       //Push this view in viewmgr.
-       UI_VIEWMGR->push_view(new page15());
-}
index dd3986c..ba3c38d 100644 (file)
@@ -24,7 +24,7 @@ protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 2",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Title Buttons",
                //Prev Button Callback
                        [](void *data, Evas_Object *obj, void *event_info) -> void
                        {
@@ -45,7 +45,7 @@ protected:
                elm_object_text_set(right_title_btn, "Done");
 
                //Arguments: content, title, subtitle, title left button, title right button
-               this->set_content(content, "Title Buttons", NULL, left_title_btn, right_title_btn);
+               this->set_content(content, "Page2", NULL, left_title_btn, right_title_btn);
        }
 
 public:
index 3c6dbba..99762d9 100644 (file)
@@ -24,7 +24,7 @@ protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 3",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Subtitle",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
@@ -37,7 +37,7 @@ protected:
                                });
 
                //Arguments: content, title, subtitle, title left button, title right button
-               this->set_content(content, "Title", "Subtitle", NULL, NULL);
+               this->set_content(content, "Page3", "Subtitle", NULL, NULL);
        }
 
 public:
index 3c9ac18..153fc20 100644 (file)
@@ -25,7 +25,7 @@ protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 4",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Title Badge",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
@@ -38,7 +38,7 @@ protected:
                                });
 
                //Arguments: content, title
-               this->set_content(content, "TitleTitleTitleTitleTitleTitleTitleTitleTitleTitleTitleTitleTitleTitleTitleTitle");
+               this->set_content(content, "Page4. We put a long title here intentionally");
                this->set_title_badge("999+");
        }
 
index 420993e..1c19d06 100644 (file)
@@ -24,7 +24,7 @@ protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 5<br>(Full View)",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Full View",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
index b8fb69c..540c277 100644 (file)
@@ -23,7 +23,7 @@ protected:
        void on_load()
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 6",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Toolbar",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
@@ -36,7 +36,7 @@ protected:
                                });
 
                //Arguments: content, title
-               this->set_content(content, "Title with toolbar");
+               this->set_content(content, "Page6");
                Elm_Toolbar *toolbar = create_toolbar(this->get_base(), "toolbar_with_title");
                this->set_toolbar(toolbar);
        }
index 089a483..debbfa3 100644 (file)
@@ -24,7 +24,7 @@ public:
        page7() : ui_view("page7")
        {
                //Create a main content.
-               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 7<br>(Navigationbar style)",
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Navigationbar",
                                //Prev Button Callback
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
@@ -38,7 +38,7 @@ public:
 
                //FIXME: Don't delete view's content when this view poped.
                this->set_removable_content(false);
-               this->set_content(content, "Title with toolbar");
+               this->set_content(content, "Page7");
                Elm_Toolbar *toolbar = create_toolbar(this->get_base(), "navigationbar");
                this->set_toolbar(toolbar);
        }
index 53bff35..4c6712f 100644 (file)
  *
  */
 
-/** This page inherit ui_controller to show view create in controller side.
+/** This page shows how to create a view content in advance.
  */
-class page8: public ui_controller
+class page8: public ui_view
 {
-protected:
-       void on_load()
+public:
+       page8() : ui_view("page8")
        {
-               //Initialize contents.
-               ui_view *view = dynamic_cast<ui_view *>(this->get_view());
-
                //Create a main content.
-               Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 8<br>(Controller Inheritance)",
-                               //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
-                               {
-                                       create_page9();
-                               });
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Content Preloading",
+                       //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
+                       {
+                               create_page9();
+                       });
 
-               view->set_content(content, "Title");
-       }
-public:
-       page8()
-       {
-               UI_VIEWMGR->push_view(new ui_view(this, "page8"));
+               //Don't delete view's content when this view poped.
+               this->set_removable_content(false);
+               this->set_content(content, "Page 8");
        }
        ~page8() {}
 };
 
 void create_page8()
 {
-       page8 *controller = new page8();
+       //Push this view in viewmgr.
+       UI_VIEWMGR->push_view(new page8());
 }
index f70c232..6e4059c 100644 (file)
  *
  */
 
-/** This page inherit ui_controller to show view create in controller side.
- *  And this page create content in controller constructor time.
+/** This page inherit ui_view.
+ *  And implement on_portait(), on_landscape() method to create portarit, landscape content.
+ *  This page will be created suitable content in on_portrait(), on_landscape() method.
  */
-class page9: public ui_controller
+class page9: public ui_view
 {
-public:
-       page9()
+protected:
+       void on_load()
        {
-               ui_view *view = new ui_view(this, "page9");
+               //FIXME: Change below code to more convenient and clear way.
+               if (this->get_degree() == 90 || this->get_degree() == 270)
+                       this->on_landscape();
+               else
+                       this->on_portrait();
+       }
 
-               //Create a main content.
-               Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 9<br>(Controller Inheritance + Content Preloading)",
+       void on_portrait()
+       {
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Portrait/Landscape",
                        //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
-                       {
-                               create_page10();
-                       });
-
-               //Don't delete view's content when this view poped.
-               view->set_removable_content(false);
-               view->set_content(content, "Title");
+                               [](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
+                               {
+                                       create_page10();
+                       });
+               this->set_content(content, "Page 9");
+               this->set_indicator(UI_VIEW_INDICATOR_DEFAULT);
+       }
 
-               UI_VIEWMGR->push_view(view);
+       void on_landscape()
+       {
+               Evas_Object *content = create_landscape_content(this->get_base(), "ViewMgr Demo<br>Portrait/Landscape",
+                               //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
+                               {
+                                       create_page10();
+                               });
+               this->set_content(content, "Page 9");
+               this->set_indicator(UI_VIEW_INDICATOR_OPTIMAL);
        }
+
+public:
+       page9() : ui_view("page9") {}
        ~page9() {}
 };
 
 void create_page9()
 {
-       page9 *controller = new page9();
+       //Push this view in viewmgr.
+       UI_VIEWMGR->push_view(new page9());
 }
diff --git a/src/include/efl/mobile/ui_controller.h b/src/include/efl/mobile/ui_controller.h
deleted file mode 100644 (file)
index 58e0017..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- *
- */
-#ifndef UI_CONTROLLER_H
-#define UI_CONTROLLER_H
-
-#include "../ui_viewmanager_base.h"
-
-namespace efl_viewmgr
-{
-class ui_menu;
-class ui_viewmgr;
-
-class ui_controller: public ui_base_controller
-{
-       friend class ui_viewmgr;
-       friend class ui_view;
-
-protected:
-       virtual void on_menu(ui_menu *menu);
-
-public:
-       virtual ~ui_controller();
-};
-}
-
-#endif /* UI_CONTROLLER_H */
index 5dc1227..1df362c 100644 (file)
 namespace efl_viewmgr
 {
 
+class ui_menu;
+class ui_key_listener;
+
 class ui_view: public ui_base_view
 {
        friend class ui_menu;
        friend class ui_key_listener;
-       friend class ui_controller;
 
 private:
        Elm_Layout *layout;                //Base layout for view
@@ -47,21 +49,11 @@ protected:
        virtual void unload_content();
        virtual void set_event_block(bool block);
        virtual void on_back();
-
-       /** @brief This is for calling controller's rotate method.
-        */
        virtual void on_rotate(int degree);
-
-       /** @brief This is for calling controller's portrait method.
-        */
        virtual void on_portrait();
-
-       /** @brief This is for calling controller's landscape method.
-        */
        virtual void on_landscape();
 
 public:
-       ui_view(ui_controller *controller, const char *name = NULL);
        ui_view(const char *name = NULL);
        virtual ~ui_view();
 
index a0bb471..797581f 100644 (file)
@@ -21,7 +21,6 @@
 #endif
 #define LOG_TAG "UI_VIEWMGR"
 
-#include "ui_controller.h"
 #include "ui_view.h"
 #include "ui_key_listener.h"
 #include "ui_viewmgr.h"
index 314f3f2..bb9d3db 100644 (file)
@@ -29,7 +29,6 @@ class ui_viewmgr;
 class ui_viewmgr: public ui_base_viewmgr
 {
        friend class ui_view;
-       friend class ui_controller;
 
 public:
        ui_viewmgr(const char *pkg);
diff --git a/src/include/efl/ui_base_controller.h b/src/include/efl/ui_base_controller.h
deleted file mode 100644 (file)
index d93f4eb..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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.
- *
- */
-#ifndef UI_BASE_CONTROLLER_H
-#define UI_BASE_CONTROLLER_H
-
-#include "../interface/ui_viewmanager_interface.h"
-
-namespace efl_viewmgr
-{
-
-/**
- *  @class ui_base_controller
- *
- *  @ingroup viewmgr
- *
- *  @brief UI Controller. This is a class for handling of life-cycle events from user side.
- */
-class ui_base_controller: public viewmgr::ui_iface_controller
-{
-       friend class ui_base_view;
-
-protected:
-       /** @brief load callback.
-        *
-        *  @note Now, this view is moving onto the screen. Get ready for this view. If this view content is alive, load callback won't be called.
-        *        In the most cases, this callback will be triggered with this step load -> deactivate -> activate.
-        */
-       virtual void on_load() {}
-
-       /** @brief unload callback.
-        *
-        *  @note Remove resources with regards to this view for saving memory or keep the content for performance. It's up to your scenario.
-        *        Unload will be called just right before when the view is going to be deleted by popping or it's piled under the more than one view.
-        *        If the view content is not alive, the unload won't be called.
-        *        In the most cases, this callback will be triggered with this step. deactivate -> unload -> destroy
-        */
-       virtual void on_unload() {}
-
-       /** @brief activate callback.
-        *
-        *  @note View is on activate state after show transition is finished.
-        *        From whatever the state, if the view is on the screen, the activate callback will be called.
-        *        In the most cases, this callback will be triggered with this step. load -> deactivate -> activate
-        */
-       virtual void on_activate() {}
-
-       /** @brief deactivate callback.
-        *
-        *  @note View is on deactivate state. Get ready for unload. Hide transition may be triggered at this point.
-        *        Deactivate state is triggered on this scenario that the view is still visible but it's not interactivate with users.
-        *        In the most cases, when view is going to be popped or destroyed or pushed one more depth, the deactivate state will be triggered.
-        *        Some UI controls such as a center popup or a menu popup blocks the view, this view may be deactivate but still visible in someway (with transparency)
-        */
-       virtual void on_deactivate() {}
-
-       /** @brief pause callback.
-        *
-        *  @note When the system blocks the application running in cases such as phone call, system notification, switching applications ...
-        *        When Window turns to deactivate. (@see ui_base_viewmgr_base :: deactivate()).
-        *        If the view were deactivate or unload state, the pause won't be called.
-        */
-       virtual void on_pause() {}
-
-       /** @brief resume callback.
-        *
-        *  @note View is turning back to the activate state again from pause.
-        *        When the system allows the application turns to activate.
-        *        When the Window turns to activate. (@see ui_base_viewmgr :: activate())
-        */
-       virtual void on_resume() {}
-
-       /** @brief destroy callback.
-        *
-        *  @note When this view is on destroying by popping or deleting.
-        */
-       virtual void on_destroy() {}
-
-       /** @brief View rotate callback.
-        *
-        *  @param degree Current rotation degree.
-        *
-        *  @note This method will be called when view rotation occurred.
-        */
-       virtual void on_rotate(int degree) {}
-
-       /** @brief Portrait callback.
-        *
-        *  @note When current view is on portrait mode.
-        */
-       virtual void on_portrait() {}
-
-       /** @brief Landscape callback.
-        *
-        *  @note When current view is on landscape mode.
-        */
-       virtual void on_landscape() {}
-
-       /** @brief Back key callback.
-        *
-        *  @note In default. current view will be popped by viewmgr in those scenarios
-        *        that viewmgr is requested to poo the current view.
-        *        If you return false in the overriding, then popping will be stopped.
-        */
-       virtual bool on_back() { return true; }
-
-public:
-       ///Destructor.
-       virtual ~ui_base_controller();
-
-       /**
-        *  @brief Return a view which is matched with controller
-        *
-        *  @return The view which is matched with controller
-        *
-        *  @note User can set a controller 2 ways, 1. send a controller instance when view created,
-        *        2. call set_view() method with controller instance.
-        *
-        *  @see set_view()
-        */
-
-       ui_base_view *get_view();
-};
-}
-
-#endif /* UI_BASE_CONTROLLER_H */
index d1e7c08..1cbb01d 100644 (file)
@@ -25,7 +25,6 @@
 
 namespace efl_viewmgr
 {
-class ui_base_controller;
 class ui_base_popup;
 
 /**
@@ -75,30 +74,19 @@ protected:
         */
        virtual void set_event_block(bool block);
 
-       /** @brief This is for calling controller's rotate method.
-        */
        virtual void on_rotate(int degree);
-
-       /** @brief This is for calling controller's portrait method.
-        */
        virtual void on_portrait();
-
-       /** @brief This is for calling controller's landscape method.
-        */
        virtual void on_landscape();
 
        /** @brief view deactivate state.
         *
         *  @note this state will be triggered by ui_iface_viewmgr.
         *
-        *  @see ui_iface_controller for this state in detail.
         */
        virtual void on_deactivate();
 
 public:
        ///Constructor.
-       ui_base_view(ui_base_controller *controller, const char *name = NULL);
-       ///Constructor.
        ui_base_view(const char *name = NULL);
 
        ///Destructor.
@@ -122,8 +110,6 @@ public:
         */
        virtual Evas_Object *get_base();
 
-       /** @brief This is for calling controller's back method.
-        */
        //FIXME: public?
        virtual void on_back();
 
index 33f383f..8a5a717 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "ui_base_singleton.h"
 #include "ui_base_viewmgr.h"
-#include "ui_base_controller.h"
 #include "ui_base_view.h"
 #include "ui_base_key_listener.h"
 #include "ui_base_popup.h"
diff --git a/src/include/interface/ui_iface_controller.h b/src/include/interface/ui_iface_controller.h
deleted file mode 100644 (file)
index 769965b..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.
- *
- */
-#ifndef UI_CONTROLLER_INTERFACE_H_
-#define UI_CONTROLLER_INTERFACE_H_
-
-namespace viewmgr {
-
-class ui_iface_view;
-
-/**
- *  @class ui_iface_controller.
- *
- *  @internal
- *  @ingroup viewmgr
- *
- *  @brief UI Controller Interface. This interface is designed for handling of life-cycle events from user side.
- */
-class ui_iface_controller
-{
-       friend class ui_iface_view;
-
-private:
-       ui_iface_view *view;
-
-       void set_view(ui_iface_view *view);
-
-protected:
-       /**
-        *  @brief Return a view which is matched with controller
-        *
-        *  @return The view which is matched with controller
-        *
-        *  @note User can set a controller 2 ways, 1. send a controller instance when view created,
-        *        2. call set_view() method with controller instance.
-        *
-        *  @see set_view()
-        */
-       ui_iface_view *get_view()
-       {
-               return this->view;
-       }
-
-       /** @brief load callback.
-        *
-        *  @note Now, this view is moving onto the screen. Get ready for this view. If this view content is alive, load callback won't be called.
-        *        In the most cases, this callback will be triggered with this step load -> deactivate -> activate.
-        */
-       virtual void on_load() = 0;
-
-       /** @brief unload callback.
-        *
-        *  @note Remove resources with regards to this view for saving memory or keep the content for performance. It's up to your scenario.
-        *        Unload will be called just right before when the view is going to be deleted by popping or it's piled under the more than one view.
-        *        If the view content is not alive, the unload won't be called.
-        *        In the most cases, this callback will be triggered with this step. deactivate -> unload -> destroy
-        */
-       virtual void on_unload() = 0;
-
-       /** @brief activate callback.
-        *
-        *  @note View is on activate state after show transition is finished.
-        *        From whatever the state, if the view is on the screen, the activate callback will be called.
-        *        In the most cases, this callback will be triggered with this step. load -> deactivate -> activate
-        */
-       virtual void on_activate() = 0;
-
-       /** @brief deactivate callback.
-        *
-        *  @note View is on deactivate state. Get ready for unload. Hide transition may be triggered at this point.
-        *        Deactivate state is triggered on this scenario that the view is still visible but it's not interactivate with users.
-        *        In the most cases, when view is going to be popped or destroyed or pushed one more depth, the deactivate state will be triggered.
-        *        Some UI controls such as a center popup or a menu popup blocks the view, this view may be deactivate but still visible in someway (with transparency)
-        */
-       virtual void on_deactivate() = 0;
-
-       /** @brief pause callback.
-        *
-        *  @note When the system blocks the application running in cases such as phone call, system notification, switching applications ...
-        *        When Window turns to deactivate. (@see ui_viewmgr_base :: deactivate()).
-        *        If the view were deactivate or unload state, the pause won't be called.
-        */
-       virtual void on_pause() = 0;
-
-       /** @brief resume callback.
-        *
-        *  @note View is turning back to the activate state again from pause.
-        *        When the system allows the application turns to activate.
-        *        When the Window turns to activate. (@see ui_viewmgr_base :: activate())
-        */
-       virtual void on_resume() = 0;
-
-       /** @brief destroy callback.
-        *
-        *  @note When this view is on destroying by popping or deleting.
-        */
-       virtual void on_destroy() = 0;
-
-       /** @brief View rotate callback.
-        *
-        *  @param degree Current rotation degree.
-        *
-        *  @note This method will be called when view rotation occurred.
-        */
-       virtual void on_rotate(int degree) = 0;
-
-       /** @brief Portrait callback.
-        *
-        *  @note When current view is on portrait mode.
-        */
-       virtual void on_portrait() = 0;
-
-       /** @brief Landscape callback.
-        *
-        *  @note When current view is on landscape mode.
-        */
-       virtual void on_landscape() = 0;
-
-
-public:
-       ///Constructor.
-       ui_iface_controller() :
-                       view(NULL)
-       {
-       }
-
-       ///Destructor.
-       virtual ~ui_iface_controller()
-       {
-       }
-};
-
-}
-
-#endif /* UI_CONTROLLER_INTERFACE_H_ */
index 6d46c2a..e5018df 100644 (file)
@@ -22,16 +22,8 @@ namespace viewmgr
 class ui_iface_rotatable
 {
 protected:
-       /** @brief This is for calling controller's portrait method.
-        */
        virtual void on_portrait() {}
-
-       /** @brief This is for calling controller's landscape method.
-        */
        virtual void on_landscape() {}
-
-       /** @brief This is for calling controller's rotate method.
-        */
        virtual void on_rotate(int degree) {}
 
 public:
index 577ff07..2d67074 100644 (file)
@@ -26,7 +26,6 @@ typedef void* T;
 namespace viewmgr {
 
 class ui_iface_viewmgr;
-class ui_iface_controller;
 
 /**
  *  @class ui_iface_view
@@ -44,7 +43,6 @@ class ui_iface_controller;
 class ui_iface_view
 {
        friend class ui_iface_viewmgr;
-       friend class ui_iface_controller;
 
 private:
        /// View state definition
@@ -59,7 +57,6 @@ private:
        };
 
        T content;                              ///< A content instance for a screen as a view.
-       ui_iface_controller *controller;        ///< View life-cycle controller interface.
        string name;                            ///< View name.
        string transition_style;                ///< View transition style name.
        ui_iface_viewmgr *viewmgr;              ///< Viewmgr which this view belongs to.
@@ -83,7 +80,6 @@ protected:
         *
         *  @note this state will be triggered by ui_iface_viewmgr.
         *
-        *  @see ui_iface_controller for this state in detail.
         */
        virtual void on_load();
 
@@ -91,7 +87,6 @@ protected:
         *
         *  @note this state will be triggered by ui_iface_viewmgr.
         *
-        *  @see ui_iface_controller for this state in detail.
         */
        virtual void on_unload();
 
@@ -99,7 +94,6 @@ protected:
         *
         *  @note this state will be triggered by ui_iface_viewmgr.
         *
-        *  @see ui_iface_controller for this state in detail.
         */
        virtual void on_activate();
 
@@ -107,7 +101,6 @@ protected:
         *
         *  @note this state will be triggered by ui_iface_viewmgr.
         *
-        *  @see ui_iface_controller for this state in detail.
         */
        virtual void on_deactivate();
 
@@ -115,7 +108,6 @@ protected:
         *
         *  @note this state will be triggered by ui_iface_viewmgr.
         *
-        *  @see ui_iface_controller for this state in detail.
         */
        virtual void on_pause();
 
@@ -123,7 +115,6 @@ protected:
         *
         *  @note this state will be triggered by ui_iface_viewmgr.
         *
-        *  @see ui_iface_controller for this state in detail.
         */
        virtual void on_resume();
 
@@ -131,7 +122,6 @@ protected:
         *
         *  @note this state will be triggered by ui_iface_viewmgr.
         *
-        *  @see ui_iface_controller for this state in detail.
         */
        virtual void on_destroy();
 
@@ -147,12 +137,6 @@ protected:
                return this->event_block;
        }
 
-       /// Return a controller of this view.
-       ui_iface_controller* get_controller()
-       {
-               return this->controller;
-       }
-
        /** @brief Return a viewmgr which this view is belonging to.
         */
        ui_iface_viewmgr *get_viewmgr()
@@ -160,29 +144,11 @@ protected:
                return this->viewmgr;
        }
 
-       /** @brief This is for replacing or setting a controller of the view.
-        *
-        *  @return A previous controller. If it wasn't, the return value will be @c NULL.
-        *  @note this state will be triggered by ui_iface_viewmgr.
-        *  @param controller a new controller. It allows @c NULL for canceling the previous controller.
-        *
-        *  @warning Be aware deletion of controller passed here will be taken cover by ui_iface_view.
-        *           If you want to keep the controller for any reasons, please unset it using set_controller() before ui_iface_view is deleted.
-        */
-       ui_iface_controller* set_controller(ui_iface_controller *controller);
-
 public:
        /** @brief This is a constructor for initializing this view resources.
         *
-        *  @param controller view life-cycle controller interface.
         *  @param name view name.
-        *
-        *  @warning Be aware the deletion of controller passed here will be covered by ui_iface_view.
-        *           If you want to keep it for any reasons, please unset it using set_controller() before ui_iface_view is deleted.
         */
-       ///Constructor for initializing with controller.
-       ui_iface_view(ui_iface_controller *controller, const char *name = NULL);
-       ///Constructor for initializing with name.
        ui_iface_view(const char *name = NULL);
 
        ///Destructor for terminating view.
index baae5e4..6001341 100644 (file)
@@ -38,6 +38,5 @@ enum ui_view_indicator
 #include "ui_iface_rotatable.h"
 #include "ui_iface_viewmgr.h"
 #include "ui_iface_view.h"
-#include "ui_iface_controller.h"
 
 #endif /* UI_VIEWMANAGER_INTERFACE_H */
index a768555..4a1e3b4 100644 (file)
@@ -1,13 +1,10 @@
 SET(LIB_SRCS
-     interface/ui_iface_controller.cpp
      interface/ui_iface_view.cpp
      interface/ui_iface_viewmgr.cpp
      efl/ui_base_popup.cpp
-     efl/ui_base_controller.cpp
      efl/ui_base_view.cpp
      efl/ui_base_viewmgr.cpp
      efl/ui_base_key_listener.cpp
-     efl/mobile/ui_controller.cpp
      efl/mobile/ui_menu.cpp
      efl/mobile/ui_view.cpp
      efl/mobile/ui_key_listener.cpp
diff --git a/src/lib/efl/mobile/ui_controller.cpp b/src/lib/efl/mobile/ui_controller.cpp
deleted file mode 100644 (file)
index 7bff689..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- *
- */
-#include "../../../include/efl/mobile/ui_viewmanager.h"
-
-using namespace efl_viewmgr;
-using namespace viewmgr;
-
-ui_controller::~ui_controller()
-{
-}
-
-void ui_controller::on_menu(ui_menu *menu)
-{
-}
index c5bf06b..d6c6288 100644 (file)
@@ -23,8 +23,6 @@
 using namespace efl_viewmgr;
 using namespace viewmgr;
 
-#define MY_CONTROLLER dynamic_cast<ui_controller *>(this->get_controller())
-
 static void content_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
        ui_view *view = static_cast<ui_view *>(data);
@@ -126,13 +124,8 @@ void ui_view::on_back()
        ui_base_view ::on_back();
 }
 
-ui_view::ui_view(ui_controller *controller, const char *name)
-               : ui_base_view(controller, name), layout(NULL), menu(NULL)
-{
-}
-
 ui_view::ui_view(const char *name)
-               : ui_view(NULL, name)
+               : ui_base_view(name), layout(NULL), menu(NULL)
 {
 }
 
@@ -333,12 +326,6 @@ bool ui_view::on_menu_pre()
        {
                this->menu = new ui_menu(this);
        }
-
-       if (this->get_controller())
-       {
-               MY_CONTROLLER->on_menu(this->menu);
-               return false;
-       }
        return true;
 }
 
diff --git a/src/lib/efl/ui_base_controller.cpp b/src/lib/efl/ui_base_controller.cpp
deleted file mode 100644 (file)
index 434964b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- *
- */
-#include "../../include/efl/ui_viewmanager_base.h"
-
-using namespace efl_viewmgr;
-using namespace viewmgr;
-
-ui_base_view * ui_base_controller::get_view()
-{
-       ui_iface_view *view = ui_iface_controller::get_view();
-       if (!view) return NULL;
-       return dynamic_cast<ui_base_view *>(view);
-}
-
-ui_base_controller::~ui_base_controller()
-{
-
-}
index 4a4d896..3cbc695 100644 (file)
@@ -19,7 +19,6 @@
 using namespace efl_viewmgr;
 using namespace viewmgr;
 
-#define MY_CONTROLLER dynamic_cast<ui_base_controller *>(this->get_controller())
 typedef list<ui_base_popup*>::reverse_iterator popup_ritr;
 
 void ui_base_view::connect_popup(ui_base_popup *popup)
@@ -32,13 +31,8 @@ void ui_base_view::disconnect_popup(ui_base_popup *popup)
        this->popup_list.remove(popup);
 }
 
-ui_base_view::ui_base_view(ui_base_controller *controller, const char *name)
-               : ui_iface_view(controller, name)
-{
-}
-
 ui_base_view::ui_base_view(const char *name)
-               : ui_base_view(NULL, name)
+               : ui_iface_view(name)
 {
 }
 
@@ -134,13 +128,6 @@ void ui_base_view::on_back()
        //If any popup is activated, deactivate the popup first.
        if (this->deactivate_popup(true)) return;
 
-       if (this->get_controller())
-       {
-               if (!MY_CONTROLLER->on_back())
-               {
-                       return;
-               }
-       }
        ui_base_viewmgr *viewmgr = UI_BASE_VIEWMGR;
        if (!viewmgr)
        {
@@ -152,21 +139,16 @@ void ui_base_view::on_back()
 
 void ui_base_view::on_rotate(int degree)
 {
-       if (!this->get_controller()) return;
-       MY_CONTROLLER->on_rotate(degree);
 }
 
 void ui_base_view::on_portrait()
 {
-       if (!this->get_controller()) return;
-       MY_CONTROLLER->on_portrait();
 }
 
 void ui_base_view::on_landscape()
 {
-       if (!this->get_controller()) return;
-       MY_CONTROLLER->on_landscape();
 }
+
 void ui_base_view::set_event_block(bool block)
 {
        ui_iface_view::set_event_block(block);
diff --git a/src/lib/interface/ui_iface_controller.cpp b/src/lib/interface/ui_iface_controller.cpp
deleted file mode 100644 (file)
index e86b333..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- *
- */
-#include "../../include/interface/ui_viewmanager_interface.h"
-
-using namespace viewmgr;
-
-void ui_iface_controller::set_view(ui_iface_view *view)
-{
-       if (this->view)
-       {
-               this->view->set_controller(NULL);
-       }
-       this->view = view;
-}
index e1dc7c0..76945d9 100644 (file)
@@ -26,9 +26,6 @@ void ui_iface_view::set_event_block(bool block)
 void ui_iface_view::on_load()
 {
        this->state = UI_VIEW_STATE_LOAD;
-       if (this->content) return;
-       if (!this->controller) return;
-       this->controller->on_load();
 }
 
 void ui_iface_view::on_unload()
@@ -39,78 +36,42 @@ void ui_iface_view::on_unload()
                this->unload_content();
                return;
        }
-       if (!this->content) return;
-       if (!this->controller) return;
-       this->controller->on_unload();
 }
 
 void ui_iface_view::on_activate()
 {
        this->state = UI_VIEW_STATE_ACTIVATE;
-       if (!this->controller) return;
-       this->controller->on_activate();
 }
 
 void ui_iface_view::on_deactivate()
 {
        this->state = UI_VIEW_STATE_DEACTIVATE;
-       if (!this->controller) return;
-       this->controller->on_deactivate();
 }
 
 void ui_iface_view::on_pause()
 {
        this->state = UI_VIEW_STATE_PAUSE;
-       if (!this->content) return;
-       if (state != UI_VIEW_STATE_ACTIVATE) return;
-       if (!this->controller) return;
-       this->controller->on_pause();
 }
 
 void ui_iface_view::on_resume()
 {
        this->state = UI_VIEW_STATE_ACTIVATE;
-       if (state != UI_VIEW_STATE_PAUSE) return;
-       if (!this->content) return;
-       if (!this->controller) return;
-       this->controller->on_resume();
 }
 
 void ui_iface_view::on_destroy()
 {
-       if (!this->controller) return;
-       this->controller->on_destroy();
 }
 
-ui_iface_view::ui_iface_view(ui_iface_controller *controller, const char *name)
-               : content(NULL), controller(controller), name(string(name ? name : "")), transition_style(string("default")), viewmgr(NULL), state(UI_VIEW_STATE_LOAD),
+ui_iface_view::ui_iface_view(const char *name)
+               : content(NULL), name(string(name ? name : "")), transition_style(string("default")), viewmgr(NULL), state(UI_VIEW_STATE_LOAD),
                  indicator(UI_VIEW_INDICATOR_DEFAULT), event_block(false), removable_content(true)
 {
        this->state = UI_VIEW_STATE_UNLOAD;
-
-       if (controller)
-               controller->set_view(this);
-}
-
-ui_iface_view::ui_iface_view(const char *name)
-               : ui_iface_view(NULL, name)
-{
-
 }
 
 ui_iface_view::~ui_iface_view()
 {
        this->viewmgr->remove_view(this);
-       if (this->controller) delete (this->controller);
-}
-
-ui_iface_controller* ui_iface_view::set_controller(ui_iface_controller *controller)
-{
-       ui_iface_controller *prev_controller = this->controller;
-       this->controller = controller;
-       if (controller) controller->set_view(this);
-       if (prev_controller) prev_controller->set_view(NULL);
-       return prev_controller;
 }
 
 T ui_iface_view::set_content(T content)