EAPI Evas_Object * elm_separator_add(Evas_Object *parent) { Evas_Object *obj; Evas *e; Widget_Data *wd; ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL); ELM_SET_WIDTYPE(widtype, "separator"); wd->horizontal = EINA_FALSE; elm_widget_type_set(obj, "separator"); elm_widget_sub_object_add(parent, obj); elm_widget_data_set(obj, wd); elm_widget_del_hook_set(obj, _del_hook); elm_widget_theme_hook_set(obj, _theme_hook); elm_widget_can_focus_set(obj, EINA_FALSE); wd->sep = edje_object_add(e); _elm_theme_object_set(obj, wd->sep, "separator", "vertical", "default"); elm_widget_resize_object_set(obj, wd->sep); _mirrored_set(obj, elm_widget_mirrored_get(obj)); _sizing_eval(obj); return obj; }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); if (wd->scr) { Evas_Object *edj; const char *str; _mirrored_set(obj, elm_widget_mirrored_get(obj)); elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", elm_widget_style_get(obj)); // scale = (elm_widget_scale_get(obj) * _elm_config->scale); // edje_object_scale_set(wd->scr, scale); edj = elm_smart_scroller_edje_object_get(wd->scr); str = edje_object_data_get(edj, "focus_highlight"); if ((str) && (!strcmp(str, "on"))) elm_widget_highlight_in_theme_set(obj, EINA_TRUE); else elm_widget_highlight_in_theme_set(obj, EINA_FALSE); } _sizing_eval(obj); }
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->bbl, "bubble", wd->corner, elm_widget_style_get(obj)); edje_object_part_text_set(wd->bbl, "elm.text", wd->label); if (wd->label) edje_object_signal_emit(wd->bbl, "elm,state,text,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,text,hidden", "elm"); edje_object_part_text_set(wd->bbl, "elm.info", wd->info); if (wd->info) edje_object_signal_emit(wd->bbl, "elm,state,info,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,info,hidden", "elm"); if (wd->content) { edje_object_part_swallow(wd->bbl, "elm.swallow.content", wd->content); edje_object_message_signal_process(wd->bbl); } if (wd->icon) edje_object_signal_emit(wd->bbl, "elm,state,icon,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,icon,hidden", "elm"); edje_object_scale_set(wd->bbl, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
static Eina_Bool _elm_table_smart_theme(Evas_Object *obj) { if (!_elm_table_parent_sc->theme(obj)) return EINA_FALSE; _mirrored_set(obj, elm_widget_mirrored_get(obj)); return EINA_TRUE; }
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)); _notify_theme_apply(obj); if (wd->block_events) _block_events_theme_apply(obj); edje_object_scale_set(wd->notify, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
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)); if (wd->horizontal) _elm_theme_object_set(obj, wd->sep, "separator", "horizontal", elm_widget_style_get(obj)); else _elm_theme_object_set(obj, wd->sep, "separator", "vertical", elm_widget_style_get(obj)); edje_object_scale_set(wd->sep, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
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) edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->content); edje_object_scale_set(wd->frm, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
EOLIAN static Eina_Bool _elm_notify_elm_widget_theme_apply(Eo *obj, Elm_Notify_Data *sd) { Eina_Bool int_ret = EINA_FALSE; eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply()); if (!int_ret) return EINA_FALSE; _mirrored_set(obj, elm_widget_mirrored_get(obj)); _notify_theme_apply(obj); if (sd->block_events) _block_events_theme_apply(obj); edje_object_scale_set (sd->notify, elm_widget_scale_get(obj) * elm_config_scale_get()); _sizing_eval(obj); return EINA_TRUE; }
static void _elm_notify_smart_theme(Eo *obj, void *_pd, va_list *list) { Elm_Notify_Smart_Data *sd = _pd; Eina_Bool *ret = va_arg(*list, Eina_Bool *); if (ret) *ret = EINA_FALSE; Eina_Bool int_ret = EINA_FALSE; eo_do_super(obj, MY_CLASS, elm_wdg_theme(&int_ret)); if (!int_ret) return; _mirrored_set(obj, elm_widget_mirrored_get(obj)); _notify_theme_apply(obj); if (sd->block_events) _block_events_theme_apply(obj); edje_object_scale_set (sd->notify, elm_widget_scale_get(obj) * elm_config_scale_get()); _sizing_eval(obj); if (ret) *ret = EINA_TRUE; }
static Eina_Bool _elm_fileselector_smart_theme(Evas_Object *obj) { const char *style; const char *data; char buf[1024]; ELM_FILESELECTOR_DATA_GET(obj, sd); if (!ELM_WIDGET_CLASS(_elm_fileselector_parent_sc)->theme(obj)) return EINA_FALSE; style = elm_widget_style_get(obj); _mirrored_set(obj, elm_widget_mirrored_get(obj)); data = edje_object_data_get (ELM_WIDGET_DATA(sd)->resize_obj, "path_separator"); if (data) sd->path_separator = data; else sd->path_separator = "/"; snprintf(buf, sizeof(buf), "fileselector/%s", style); #define SWALLOW(part_name, object_ptn) \ if (object_ptn) \ { \ elm_widget_style_set(object_ptn, buf); \ if (!elm_layout_content_set(obj, part_name, object_ptn)) \ evas_object_hide(object_ptn); \ } SWALLOW("elm.swallow.up", sd->up_button); SWALLOW("elm.swallow.home", sd->home_button); SWALLOW("elm.swallow.spinner", sd->spinner); elm_object_style_set(sd->spinner, "wheel"); if (sd->mode == ELM_FILESELECTOR_LIST) { if (elm_layout_content_set(obj, "elm.swallow.files", sd->files_list)) evas_object_hide(sd->files_grid); else evas_object_hide(sd->files_list); } else { if (elm_layout_content_set(obj, "elm.swallow.files", sd->files_grid)) evas_object_hide(sd->files_list); else evas_object_hide(sd->files_grid); } SWALLOW("elm.swallow.filename", sd->filename_entry); SWALLOW("elm.swallow.path", sd->path_entry); snprintf(buf, sizeof(buf), "fileselector/actions/%s", style); SWALLOW("elm.swallow.cancel", sd->cancel_button); SWALLOW("elm.swallow.ok", sd->ok_button); #undef SWALLOW edje_object_message_signal_process(ELM_WIDGET_DATA(sd)->resize_obj); elm_layout_sizing_eval(obj); return EINA_TRUE; }