Add view transition effect example 92/63792/1
authorWoochan Lee <wc0917.lee@samsung.com>
Sun, 27 Mar 2016 08:12:23 +0000 (17:12 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Sun, 27 Mar 2016 08:13:01 +0000 (17:13 +0900)
page14 = zoom.
page15 = none.

Change-Id: I8dc6faa3d11bdeb5e2d2f680fcc92e1b2f1ae266

src/examples/efl/main.cpp
src/examples/efl/page13.h
src/examples/efl/page14.h [new file with mode: 0644]
src/examples/efl/page15.h [new file with mode: 0644]

index 5a42973..f97ac27 100644 (file)
@@ -15,6 +15,8 @@
  *
  */
 #include "main.h"
+#include "page15.h"
+#include "page14.h"
 #include "page13.h"
 #include "page12.h"
 #include "page11.h"
index e61abc6..b768a39 100644 (file)
@@ -35,7 +35,7 @@ protected:
                                [](void *data, Evas_Object *obj, void *event_info) -> void
                                {
                                        appdata_s *ad = static_cast<appdata_s *>(data);
-                                       ad->viewmgr->deactivate();
+                                       create_page14(ad);
                                },
                                this->ad);
                this->set_content(content, "Title");
diff --git a/src/examples/efl/page14.h b/src/examples/efl/page14.h
new file mode 100644 (file)
index 0000000..35259f9
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * 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 page14: public ui_view
+{
+private:
+       appdata_s *ad;
+
+protected:
+       void on_load()
+       {
+               //Create a main content.
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 14<br>zoom transition effect",
+                               //Prev Button Callback
+                               [](void *data, Evas_Object *obj, void *event_info) -> void
+                               {
+                                       appdata_s *ad = static_cast<appdata_s *>(data);
+                                       ad->viewmgr->pop_view();
+                               },
+                               //Next Button Callback
+                               [](void *data, Evas_Object *obj, void *event_info) -> void
+                               {
+                                       appdata_s *ad = static_cast<appdata_s *>(data);
+                                       create_page15(ad);
+                               },
+                               this->ad);
+
+               this->set_transition_style("zoom");
+               this->set_content(content, "Title");
+       }
+
+public:
+       page14(appdata_s *ad) : ui_view("page14"), ad(ad)
+       {
+               ad->viewmgr->push_view(this);
+       }
+
+       ~page14()
+       {
+       }
+};
+
+void create_page14(appdata_s *ad)
+{
+       new page14(ad);
+}
diff --git a/src/examples/efl/page15.h b/src/examples/efl/page15.h
new file mode 100644 (file)
index 0000000..5e6aa45
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * 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
+{
+private:
+       appdata_s *ad;
+
+protected:
+       void on_load()
+       {
+               //Create a main content.
+               Evas_Object *content = create_content(this->get_base(), "ViewMgr Demo<br>Page 15<br>none transition effect",
+                               //Prev Button Callback
+                               [](void *data, Evas_Object *obj, void *event_info) -> void
+                               {
+                                       appdata_s *ad = static_cast<appdata_s *>(data);
+                                       ad->viewmgr->pop_view();
+                               },
+                               //Next Button Callback
+                               [](void *data, Evas_Object *obj, void *event_info) -> void
+                               {
+                                       appdata_s *ad = static_cast<appdata_s *>(data);
+                                       ad->viewmgr->deactivate();
+                               },
+                               this->ad);
+
+               this->set_transition_style("none");
+               this->set_content(content, "Title");
+       }
+
+public:
+       page15(appdata_s *ad) : ui_view("page15"), ad(ad)
+       {
+               ad->viewmgr->push_view(this);
+       }
+
+       ~page15()
+       {
+       }
+};
+
+void create_page15(appdata_s *ad)
+{
+       new page15(ad);
+}