// import button theme
elm_theme_overlay_add(NULL, THEME_EDJ_PATH);
- m_platform_layout = createPlatformLayout(m_win);
+ m_conformant = createConformant(m_win);
+ evas_object_show(m_conformant);
+ m_platform_layout = createPlatformLayout(m_conformant);
evas_object_show(m_platform_layout);
m_navigation = createNavigationBar(m_platform_layout);
evas_object_show(m_navigation);
m_user_layout = createUserLayout(m_navigation);
evas_object_show(m_user_layout);
- m_conformant = createConformant(m_user_layout);
- evas_object_show(m_conformant);
+
}
void WindowData::setEvasObjectForLayout(Evas_Object* evas_object)
void WindowData::toggleIndicator(bool indicator)
{
LogDebug(__PRETTY_FUNCTION__);
- if (indicator) {
+ if (indicator)
elm_win_indicator_mode_set(m_win, ELM_WIN_INDICATOR_SHOW);
- elm_layout_theme_set(m_platform_layout,
- LAYOUT,
- APPLICATION,
- INDICATOR);
- } else {
+ else
elm_win_indicator_mode_set(m_win, ELM_WIN_INDICATOR_HIDE);
- elm_layout_theme_set(m_platform_layout,
- LAYOUT,
- APPLICATION,
- NOINDICATOR);
- }
+
}
void WindowData::setViewMode(
return window;
}
+Evas_Object* WindowData::createConformant(Evas_Object* parent)
+{
+ Assert(parent != NULL && "Parent is null");
+ Evas_Object* conformant = elm_conformant_add(parent);
+
+ evas_object_size_hint_weight_set(
+ conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_win_resize_object_add(parent, conformant);
+ return conformant;
+}
+
Evas_Object* WindowData::createPlatformLayout(Evas_Object* parent)
{
Evas_Object* platform_layout = elm_layout_add(parent);
- if (!elm_layout_file_set(platform_layout, PLATFORM_EDJ_PATH, "platformlayout"))
- elm_layout_theme_set(platform_layout, LAYOUT, APPLICATION, NOINDICATOR);
+ elm_layout_file_set(platform_layout, PLATFORM_EDJ_PATH, "platformlayout");
- evas_object_size_hint_expand_set(platform_layout,
- EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
-
- elm_win_resize_object_add(parent, platform_layout);
+ evas_object_size_hint_align_set(platform_layout,
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(platform_layout,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ elm_object_content_set(parent, platform_layout);
edje_object_signal_emit(
elm_layout_edje_get(platform_layout), ELM_STATE_SHOW_CONTENT, ELM);
return platform_layout;
}
+Evas_Object* WindowData::createNavigationBar(Evas_Object* parent)
+{
+ Assert(parent != NULL && "Parent for naviframe is null");
+ Evas_Object* navigation = elm_naviframe_add(parent);
+
+ evas_object_size_hint_align_set(navigation,
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(navigation,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ elm_object_part_content_set(parent, ELM_SWALLOW_CONTENT, navigation);
+ //elm_object_content_set(parent, navigation);
+ return navigation;
+}
+
Evas_Object* WindowData::createUserLayout(Evas_Object* parent)
{
Assert(parent != NULL && "Parent for User Layout is null");
evas_object_size_hint_weight_set(
layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_win_resize_object_add(parent, layout);
Elm_Object_Item* naviIt = elm_naviframe_item_push(
/* Evas_Object *obj */
return layout;
}
-Evas_Object* WindowData::createConformant(Evas_Object* parent)
-{
- Assert(parent != NULL && "Parent is null");
- Evas_Object* conformant = elm_conformant_add(parent);
- elm_object_style_set(conformant, INTERNAL_LAYOUT);
- evas_object_size_hint_weight_set(
- conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_part_content_set(parent, ELM_SWALLOW_CONTENT, conformant);
- evas_object_show(conformant);
- return conformant;
-}
-
-Evas_Object* WindowData::createNavigationBar(Evas_Object* parent)
-{
- Assert(parent != NULL && "Parent for naviframe is null");
- Evas_Object* navigation = elm_naviframe_add(parent);
- elm_object_part_content_set(parent, ELM_SWALLOW_CONTENT, navigation);
- return navigation;
-}
-
void WindowData::showHiddenOption(Evas_Object* parent)
{
Assert(parent != NULL && "Parent for Hiden Option");
const char *EDJE_SHOW_BACKWARD_SIGNAL = "show,backward,signal";
const std::string VIEWMODE_TYPE_FULLSCREEN = "fullscreen";
const std::string VIEWMODE_TYPE_MAXIMIZED = "maximized";
+char const* const ELM_SWALLOW_CONTENT = "elm.swallow.content";
WrtClient::WrtClient(int argc, char **argv) :
Application(argc, argv, "wrt-client", false),
void WrtClient::setLayout(Evas_Object* newBuffer) {
LogDebug("add new webkit buffer to window");
Assert(newBuffer);
- elm_object_content_set(m_windowData->m_conformant, newBuffer);
+
+ elm_object_part_content_set(m_windowData->m_user_layout, ELM_SWALLOW_CONTENT, newBuffer);
+
evas_object_show(newBuffer);
evas_object_focus_set(newBuffer, EINA_TRUE);
}
LogDebug("remove current webkit buffer from window");
Assert(currentBuffer);
evas_object_hide(currentBuffer);
- elm_object_content_unset(m_windowData->m_conformant);
+
+ elm_object_part_content_unset(m_windowData->m_user_layout, ELM_SWALLOW_CONTENT);
+
}
void WrtClient::shutdownStep()