friend class ui_base_view;
private:
- Elm_Win *win; //This is acting like a base object of viewmgr.
+ Elm_Win *win; //This is acting like a base object of viewmgr.
Elm_Conformant *conform; //Conformant for viewmgr.
- Elm_Scroller *scroller; //Scroller for viewmgr.
Elm_Layout *layout; //Viewmgr's base layout.
ui_base_key_listener *key_listener; //HW Key Handler such as "BACK" key...
ui_view_indicator indicator; //Mode of indicator.
*/
bool create_conformant(Elm_Win *win);
- /**
- * @brief Create a Scroller.
- *
- * @param conform viewmgr's conformant object. this will be parent of layout object.
- *
- * @note We add a scroller for an exceptional case. If user view content is larger than window,
- * then the content will be automatically scrollable by this scroller.
- * For instance, if the virtual keypad is enabled in the landscape mode,
- * the content area would be smaller than content minimum size.
- * We could avoid clipping the content by scroller.
- *
- * @return @c true success or @c false not.
- */
-
- bool create_scroller(Elm_Conformant *conform);
/**
* @brief Create a base layout.
*
- * @param scroller viewmgr's scroller object. this will be parent of layout object.
+ * @param conform viewmgr's conformant object. this will be parent of layout object.
* @param style view's transition effect style.
*
* @return @c true success or @c false not.
*/
- bool create_base_layout(Elm_Scroller *scroller, const char *style);
+ bool create_base_layout(Elm_Conformant *conform, const char *style);
/** @brief Set the indicator mode.
*
//FIXME: is it correct to define here?
#define EDJ_PATH "/usr/share/edje/ui-viewmgr/ui-viewmgr.edj"
-bool ui_base_viewmgr::create_base_layout(Elm_Scroller *scroller, const char *style)
+bool ui_base_viewmgr::create_base_layout(Elm_Conformant *conform, const char *style)
{
char buf[128];
- Elm_Layout *layout = elm_layout_add(scroller);
+ Elm_Layout *layout = elm_layout_add(conform);
if (!layout) return false;
//FIXME: Is it C programming style? need to change?
snprintf(buf, sizeof(buf), "transition/%s", style);
//default transition layout
elm_layout_file_set(layout, EDJ_PATH, buf);
- 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_object_content_set(scroller, layout);
+ elm_object_content_set(conform, layout);
//Push Finished Event
elm_layout_signal_callback_add(layout, "push,finished", "viewmgr",
if (effect_map.size()) effect_layout = effect_map.find(transition_style)->second;
//Conformant content change to current effect layout and change to hide prev layout.
- Elm_Layout *playout = elm_object_part_content_unset(this->scroller, "elm.swallow.content");
+ Elm_Layout *playout = elm_object_part_content_unset(this->conform, "elm.swallow.content");
evas_object_hide(playout);
if (!effect_layout)
//Create and add effect_layouts in map here.
//FIXME: If we have to support many effects, this logic should be changed.
effect_map.insert(pair<string, Elm_Layout *>("default", this->layout));
- this->create_base_layout(this->scroller, transition_style.c_str());
+ this->create_base_layout(this->get_conformant(), transition_style.c_str());
effect_map.insert(pair<string, Elm_Layout *>(transition_style, this->layout));
}
else
{
- elm_object_part_content_set(this->scroller, "elm.swallow.content", effect_layout);
+ elm_object_part_content_set(this->conform, "elm.swallow.content", effect_layout);
this->layout = effect_layout;
}
return true;
}
-bool ui_base_viewmgr::create_scroller(Elm_Conformant *conform)
-{
- Elm_Scroller *scroller = elm_scroller_add(conform);
- if (!scroller) return false;
-
- elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO);
- evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- elm_object_content_set(conform, scroller);
-
- this->scroller = scroller;
-
- return true;
-}
-
ui_base_viewmgr::ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_listener)
: ui_iface_viewmgr(), key_listener(key_listener), transition_style("default")
{
return;
}
- if (!this->create_scroller(this->conform))
- {
- LOGE("Failed to create a scroller (%s)", pkg);
- return;
- }
-
- if (!this->create_base_layout(this->scroller, "default"))
+ if (!this->create_base_layout(this->conform, "default"))
{
LOGE("Failed to create a base layout (%s)", pkg);
return;