2. add no title view example.
Change-Id: If6578430476ac39a4ceb1f2c2d3a4185efb67711
return false;
}
-bool ui_basic_view::set_icon(Evas_Object *icon)
-{
- if (this->layout)
- {
- elm_object_part_content_set(this->layout, "elm.swallow.icon", icon);
- if (icon) elm_object_signal_emit(this->layout, "elm,state,icon,show", "elm");
- else elm_object_signal_emit(this->layout, "elm,state,icon,hide", "elm");
- return true;
- }
- LOGE("Layout is not exist!");
- return false;
-}
-
bool ui_basic_view::set_title_left_btn(Evas_Object *title_left_btn)
{
if (this->layout)
return false;
}
-Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *icon, Evas_Object *title_left_btn,
+Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn,
Evas_Object *title_right_btn)
{
Evas_Object *pcontent = this->set_content(content);
{
this->set_title(title);
this->set_subtitle(subtitle);
- this->set_icon(icon);
this->set_title_left_btn(title_left_btn);
this->set_title_right_btn(title_right_btn);
}
virtual ~ui_basic_view();
Evas_Object *set_content(Evas_Object *content, const char *title = NULL);
- Evas_Object *set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *icon, Evas_Object *title_left_btn, Evas_Object *title_right_btn);
+ Evas_Object *set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn, Evas_Object *title_right_btn);
bool set_title_badge(const char *text);
bool set_subtitle(const char *text);
- bool set_icon(Evas_Object *icon);
bool set_title_left_btn(Evas_Object *title_left_btn);
bool set_title_right_btn(Evas_Object *title_right_btn);
bool set_title(const char *text);
//Set Indicator properties
elm_win_indicator_mode_set(this->win, ELM_WIN_INDICATOR_SHOW);
- elm_win_indicator_opacity_set(this->win, ELM_WIN_INDICATOR_TRANSPARENT);
+ elm_win_indicator_opacity_set(this->win, ELM_WIN_INDICATOR_OPAQUE);
elm_win_autodel_set(this->win, EINA_TRUE);
}
*/
virtual void destroy();
-
virtual void unload_content() = 0;
/// Return the state of event block.
*
*/
#include "main.h"
+#include "page5_controller.h"
#include "page4_controller.h"
#include "page3_controller.h"
#include "page2_controller.h"
Evas_Object *right_title_btn = elm_button_add(view->get_base());
elm_object_text_set(right_title_btn, "Done");
- //Arguments: content, title, subtitle, icon, title left button, title right button
- view->set_content(content, "Title Buttons", NULL, NULL, left_title_btn, right_title_btn);
+ //Arguments: content, title, subtitle, title left button, title right button
+ view->set_content(content, "Title Buttons", NULL, left_title_btn, right_title_btn);
}
};
},
this->ad);
- //Arguments: content, title, subtitle, icon, title left button, title right button
- view->set_content(content, "Title", "Subtitle", NULL, NULL, NULL);
+ //Arguments: content, title, subtitle, title left button, title right button
+ view->set_content(content, "Title", "Subtitle", NULL, NULL);
}
};
[](void *data, Evas_Object *obj, void *event_info) -> void
{
appdata_s *ad = static_cast<appdata_s *>(data);
- ad->viewmgr->deactivate();
+ page5(ad);
}, this->ad);
//Arguments: content, title
--- /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.
+ *
+ */
+class page5_controller: public ui_controller
+{
+private:
+ appdata_s *ad;
+
+public:
+ page5_controller(appdata_s *ad)
+ : ad(ad)
+ {
+ //No basic form.
+ ad->viewmgr->push_view(new ui_view(this, "page5"));
+ }
+
+ ~page5_controller()
+ {
+ }
+
+ void load()
+ {
+ //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 5<br>(No Title View)",
+ //Prev Button
+ [](void *data, Evas_Object *obj, void *event_info) -> void
+ {
+ appdata_s *ad = static_cast<appdata_s *>(data);
+ ad->viewmgr->pop_view();
+ },
+ //Next Button
+ [](void *data, Evas_Object *obj, void *event_info) -> void
+ {
+ appdata_s *ad = static_cast<appdata_s *>(data);
+ ad->viewmgr->deactivate();
+ }, this->ad);
+
+ view->set_content(content);
+ }
+};
+
+void page5(appdata_s *ad)
+{
+ new page5_controller(ad);
+}