static const char *widtype = NULL;
static void _del_hook(Evas_Object *obj);
+static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
static void _theme_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
}
static void
+_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ edje_object_mirrored_set(wd->frm, rtl);
+}
+
+static void
_theme_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
+ _elm_widget_mirrored_reload(obj);
+ _mirrored_set(obj, elm_widget_mirrored_get(obj));
_elm_theme_object_set(obj, wd->frm, "frame", "base", elm_widget_style_get(obj));
edje_object_part_text_set(wd->frm, "elm.text", wd->label);
if (wd->content)
if (!wd) return;
if (sub == wd->content)
{
- evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
- wd->content = NULL;
- _sizing_eval(obj);
+ wd->content = NULL;
+ _sizing_eval(obj);
}
}
Evas *e;
Widget_Data *wd;
- EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
+ ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
- wd = ELM_NEW(Widget_Data);
- e = evas_object_evas_get(parent);
- if (!e) return NULL;
- obj = elm_widget_add(e);
ELM_SET_WIDTYPE(widtype, "frame");
elm_widget_type_set(obj, "frame");
elm_widget_sub_object_add(parent, obj);
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
+ _mirrored_set(obj, elm_widget_mirrored_get(obj));
_sizing_eval(obj);
return obj;
}
wd->content = content;
if (content)
{
- elm_widget_sub_object_add(obj, content);
- evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, obj);
- edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
+ elm_widget_sub_object_add(obj, content);
+ evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints, obj);
+ edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
}
_sizing_eval(obj);
}