forked from enlightenment/efl
and enable the 5 swallow regions (possibly limitless) of the hover and test
SVN revision: 36516
This commit is contained in:
parent
c78abf03be
commit
eeb785ac88
|
@ -57,7 +57,8 @@ flip_shad.png \
|
||||||
sb_runnerh.png \
|
sb_runnerh.png \
|
||||||
sb_runnerv.png \
|
sb_runnerv.png \
|
||||||
shelf_inset.png \
|
shelf_inset.png \
|
||||||
tog_base.png
|
tog_base.png \
|
||||||
|
shad_circ.png
|
||||||
|
|
||||||
default.edj: Makefile $(EXTRA_DIST)
|
default.edj: Makefile $(EXTRA_DIST)
|
||||||
$(EDJE_CC) $(EDJE_FLAGS) \
|
$(EDJE_CC) $(EDJE_FLAGS) \
|
||||||
|
|
|
@ -2122,30 +2122,9 @@ collections {
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
group { name: "hover";
|
group { name: "hover";
|
||||||
images {
|
images {
|
||||||
image: "bt_base1.png" COMP;
|
image: "shad_circ.png" COMP;
|
||||||
image: "bt_base2.png" COMP;
|
|
||||||
image: "bt_hilight.png" COMP;
|
|
||||||
image: "bt_shine.png" COMP;
|
|
||||||
}
|
}
|
||||||
parts {
|
parts {
|
||||||
part { name: "base";
|
|
||||||
type: RECT;
|
|
||||||
mouse_events: 1;
|
|
||||||
description { state: "default" 0.0;
|
|
||||||
color: 0 0 0 200;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part { name: "box";
|
|
||||||
type: RECT;
|
|
||||||
mouse_events: 0;
|
|
||||||
description { state: "default" 0.0;
|
|
||||||
color: 255 255 255 200;
|
|
||||||
rel1.to: "elm.swallow.size";
|
|
||||||
rel1.offset: -2 -2;
|
|
||||||
rel2.to: "elm.swallow.size";
|
|
||||||
rel2.offset: 1 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part { name: "elm.swallow.offset";
|
part { name: "elm.swallow.offset";
|
||||||
type: SWALLOW;
|
type: SWALLOW;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
|
@ -2164,6 +2143,97 @@ collections {
|
||||||
rel2.relative: 1.0 1.0;
|
rel2.relative: 1.0 1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
part { name: "base";
|
||||||
|
type: RECT;
|
||||||
|
mouse_events: 1;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
color: 0 0 0 64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "shad";
|
||||||
|
mouse_events: 0;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
image.normal: "shad_circ.png";
|
||||||
|
rel1.to: "elm.swallow.size";
|
||||||
|
rel1.offset: -20 -20;
|
||||||
|
rel2.to: "elm.swallow.size";
|
||||||
|
rel2.offset: 19 19;
|
||||||
|
fill.smooth: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "box";
|
||||||
|
type: RECT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
color: 0 0 0 0;
|
||||||
|
rel1.to: "elm.swallow.size";
|
||||||
|
rel1.offset: -2 -2;
|
||||||
|
rel2.to: "elm.swallow.size";
|
||||||
|
rel2.offset: 1 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "elm.swallow.slot.left";
|
||||||
|
type: SWALLOW;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
align: 1.0 0.5;
|
||||||
|
rel1.to: "elm.swallow.slot.middle";
|
||||||
|
rel1.relative: 0.0 0.0;
|
||||||
|
rel1.offset: -1 0;
|
||||||
|
rel2.to: "elm.swallow.slot.middle";
|
||||||
|
rel2.relative: 0.0 1.0;
|
||||||
|
rel2.offset: -1 -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "elm.swallow.slot.right";
|
||||||
|
type: SWALLOW;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
align: 0.0 0.5;
|
||||||
|
rel1.to: "elm.swallow.slot.middle";
|
||||||
|
rel1.relative: 1.0 0.0;
|
||||||
|
rel1.offset: 0 0;
|
||||||
|
rel2.to: "elm.swallow.slot.middle";
|
||||||
|
rel2.relative: 1.0 1.0;
|
||||||
|
rel2.offset: 0 -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "elm.swallow.slot.top";
|
||||||
|
type: SWALLOW;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
align: 0.5 1.0;
|
||||||
|
rel1.to: "elm.swallow.slot.middle";
|
||||||
|
rel1.relative: 0.0 0.0;
|
||||||
|
rel1.offset: 0 -1;
|
||||||
|
rel2.to: "elm.swallow.slot.middle";
|
||||||
|
rel2.relative: 1.0 0.0;
|
||||||
|
rel2.offset: -1 -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "elm.swallow.slot.bottom";
|
||||||
|
type: SWALLOW;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
align: 0.5 0.0;
|
||||||
|
rel1.to: "elm.swallow.slot.middle";
|
||||||
|
rel1.relative: 0.0 1.0;
|
||||||
|
rel1.offset: 0 0;
|
||||||
|
rel2.to: "elm.swallow.slot.middle";
|
||||||
|
rel2.relative: 1.0 1.0;
|
||||||
|
rel2.offset: -1 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "elm.swallow.slot.middle";
|
||||||
|
type: SWALLOW;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
rel1.to: "elm.swallow.size";
|
||||||
|
rel2.to: "elm.swallow.size";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
programs {
|
||||||
|
program { name: "end";
|
||||||
|
signal: "mouse,down,1";
|
||||||
|
source: "base";
|
||||||
|
action: SIGNAL_EMIT "elm,action,dismiss" "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -500,6 +500,46 @@ my_bt_11(void *data, Evas_Object *obj, void *event_info)
|
||||||
elm_hover_parent_set(hv, win);
|
elm_hover_parent_set(hv, win);
|
||||||
elm_hover_target_set(hv, bt);
|
elm_hover_target_set(hv, bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Popup");
|
||||||
|
elm_hover_content_set(hv, "middle", bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bx = elm_box_add(win);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Top 1");
|
||||||
|
elm_box_pack_end(bx, bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Top 2");
|
||||||
|
elm_box_pack_end(bx, bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Top 3");
|
||||||
|
elm_box_pack_end(bx, bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
evas_object_show(bx);
|
||||||
|
elm_hover_content_set(hv, "top", bx);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Bottom");
|
||||||
|
elm_hover_content_set(hv, "bottom", bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Left");
|
||||||
|
elm_hover_content_set(hv, "left", bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Right");
|
||||||
|
elm_hover_content_set(hv, "right", bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
evas_object_size_hint_min_set(bg, 160, 160);
|
evas_object_size_hint_min_set(bg, 160, 160);
|
||||||
evas_object_size_hint_max_set(bg, 640, 640);
|
evas_object_size_hint_max_set(bg, 640, 640);
|
||||||
evas_object_resize(win, 320, 320);
|
evas_object_resize(win, 320, 320);
|
||||||
|
|
|
@ -97,30 +97,30 @@ EAPI void
|
||||||
elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj)
|
elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
_els_smart_box_pack_start(wd->box, subobj);
|
|
||||||
elm_widget_sub_object_add(obj, subobj);
|
elm_widget_sub_object_add(obj, subobj);
|
||||||
|
_els_smart_box_pack_start(wd->box, subobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj)
|
elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
_els_smart_box_pack_end(wd->box, subobj);
|
|
||||||
elm_widget_sub_object_add(obj, subobj);
|
elm_widget_sub_object_add(obj, subobj);
|
||||||
|
_els_smart_box_pack_end(wd->box, subobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before)
|
elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
_els_smart_box_pack_before(wd->box, subobj, before);
|
|
||||||
elm_widget_sub_object_add(obj, subobj);
|
elm_widget_sub_object_add(obj, subobj);
|
||||||
|
_els_smart_box_pack_before(wd->box, subobj, before);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after)
|
elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
_els_smart_box_pack_after(wd->box, subobj, after);
|
|
||||||
elm_widget_sub_object_add(obj, subobj);
|
elm_widget_sub_object_add(obj, subobj);
|
||||||
|
_els_smart_box_pack_after(wd->box, subobj, after);
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,9 +117,9 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
|
||||||
wd->icon = icon;
|
wd->icon = icon;
|
||||||
if (icon)
|
if (icon)
|
||||||
{
|
{
|
||||||
|
elm_widget_sub_object_add(obj, icon);
|
||||||
edje_object_part_swallow(wd->btn, "elm.swallow.content", icon);
|
edje_object_part_swallow(wd->btn, "elm.swallow.content", icon);
|
||||||
edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm");
|
edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm");
|
||||||
elm_widget_sub_object_add(obj, icon);
|
|
||||||
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
|
|
|
@ -94,8 +94,8 @@ elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
|
||||||
wd->content = content;
|
wd->content = content;
|
||||||
if (content)
|
if (content)
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
|
|
||||||
elm_widget_sub_object_add(obj, content);
|
elm_widget_sub_object_add(obj, content);
|
||||||
|
edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
|
||||||
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
|
|
|
@ -28,7 +28,6 @@ static void
|
||||||
_del_hook(Evas_Object *obj)
|
_del_hook(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
/*
|
|
||||||
while (wd->subs)
|
while (wd->subs)
|
||||||
{
|
{
|
||||||
Subinfo *si = wd->subs->data;
|
Subinfo *si = wd->subs->data;
|
||||||
|
@ -36,7 +35,6 @@ _del_hook(Evas_Object *obj)
|
||||||
evas_stringshare_del(si->swallow);
|
evas_stringshare_del(si->swallow);
|
||||||
free(si);
|
free(si);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
free(wd);
|
free(wd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,9 +49,9 @@ _sizing_eval(Evas_Object *obj)
|
||||||
evas_object_move(wd->cov, x, y);
|
evas_object_move(wd->cov, x, y);
|
||||||
evas_object_resize(wd->cov, w, h);
|
evas_object_resize(wd->cov, w, h);
|
||||||
evas_object_size_hint_min_set(wd->offset, x2 - x, y2 - y);
|
evas_object_size_hint_min_set(wd->offset, x2 - x, y2 - y);
|
||||||
edje_object_part_swallow(wd->hov, "elm.swallow.offset", wd->offset);
|
edje_object_part_swallow(wd->cov, "elm.swallow.offset", wd->offset);
|
||||||
evas_object_size_hint_min_set(wd->size, w2, h2);
|
evas_object_size_hint_min_set(wd->size, w2, h2);
|
||||||
edje_object_part_swallow(wd->hov, "elm.swallow.size", wd->size);
|
edje_object_part_swallow(wd->cov, "elm.swallow.size", wd->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -61,18 +59,15 @@ _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(data);
|
Widget_Data *wd = elm_widget_data_get(data);
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
/*
|
|
||||||
for (l = wd->subs; l; l = l->next)
|
for (l = wd->subs; l; l = l->next)
|
||||||
{
|
{
|
||||||
Subinfo *si = l->data;
|
Subinfo *si = l->data;
|
||||||
if (si->obj == obj)
|
if (si->obj == obj)
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(wd->hov, si->swallow, obj);
|
edje_object_part_swallow(wd->hov, si->swallow, obj);
|
||||||
_sizing_eval(obj);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -82,7 +77,6 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
|
||||||
Evas_Object *sub = event_info;
|
Evas_Object *sub = event_info;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
|
||||||
/*
|
|
||||||
for (l = wd->subs; l; l = l->next)
|
for (l = wd->subs; l; l = l->next)
|
||||||
{
|
{
|
||||||
Subinfo *si = l->data;
|
Subinfo *si = l->data;
|
||||||
|
@ -96,7 +90,6 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -126,7 +119,7 @@ _hov_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cov_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
_signal_dismiss(void *data, Evas_Object *obj, const char *emission, const char *source)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(data);
|
Widget_Data *wd = elm_widget_data_get(data);
|
||||||
evas_object_smart_callback_call(data, "clicked", NULL);
|
evas_object_smart_callback_call(data, "clicked", NULL);
|
||||||
|
@ -148,6 +141,7 @@ elm_hover_add(Evas_Object *parent)
|
||||||
|
|
||||||
wd->hov = evas_object_rectangle_add(e);
|
wd->hov = evas_object_rectangle_add(e);
|
||||||
evas_object_color_set(wd->hov, 0, 0, 0, 0);
|
evas_object_color_set(wd->hov, 0, 0, 0, 0);
|
||||||
|
evas_object_pass_events_set(wd->hov, 1);
|
||||||
elm_widget_resize_object_set(obj, wd->hov);
|
elm_widget_resize_object_set(obj, wd->hov);
|
||||||
evas_object_event_callback_add(wd->hov, EVAS_CALLBACK_MOVE, _hov_move, obj);
|
evas_object_event_callback_add(wd->hov, EVAS_CALLBACK_MOVE, _hov_move, obj);
|
||||||
evas_object_event_callback_add(wd->hov, EVAS_CALLBACK_RESIZE, _hov_resize, obj);
|
evas_object_event_callback_add(wd->hov, EVAS_CALLBACK_RESIZE, _hov_resize, obj);
|
||||||
|
@ -157,18 +151,20 @@ elm_hover_add(Evas_Object *parent)
|
||||||
wd->cov = edje_object_add(e);
|
wd->cov = edje_object_add(e);
|
||||||
_elm_theme_set(wd->cov, "hover", "hover");
|
_elm_theme_set(wd->cov, "hover", "hover");
|
||||||
elm_widget_sub_object_add(obj, wd->cov);
|
elm_widget_sub_object_add(obj, wd->cov);
|
||||||
evas_object_event_callback_add(wd->cov, EVAS_CALLBACK_MOUSE_DOWN, _cov_down, obj);
|
edje_object_signal_callback_add(wd->cov, "elm,action,dismiss", "", _signal_dismiss, obj);
|
||||||
|
|
||||||
wd->offset = evas_object_rectangle_add(e);
|
wd->offset = evas_object_rectangle_add(e);
|
||||||
|
evas_object_pass_events_set(wd->offset, 1);
|
||||||
evas_object_color_set(wd->offset, 0, 0, 0, 0);
|
evas_object_color_set(wd->offset, 0, 0, 0, 0);
|
||||||
elm_widget_sub_object_add(obj, wd->offset);
|
elm_widget_sub_object_add(obj, wd->offset);
|
||||||
|
|
||||||
wd->size = evas_object_rectangle_add(e);
|
wd->size = evas_object_rectangle_add(e);
|
||||||
|
evas_object_pass_events_set(wd->size, 1);
|
||||||
evas_object_color_set(wd->size, 0, 0, 0, 0);
|
evas_object_color_set(wd->size, 0, 0, 0, 0);
|
||||||
elm_widget_sub_object_add(obj, wd->size);
|
elm_widget_sub_object_add(obj, wd->size);
|
||||||
|
|
||||||
edje_object_part_swallow(wd->hov, "elm.swallow.offset", wd->offset);
|
edje_object_part_swallow(wd->cov, "elm.swallow.offset", wd->offset);
|
||||||
edje_object_part_swallow(wd->hov, "elm.swallow.size", wd->size);
|
edje_object_part_swallow(wd->cov, "elm.swallow.size", wd->size);
|
||||||
|
|
||||||
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
|
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
|
||||||
|
|
||||||
|
@ -194,18 +190,19 @@ elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content)
|
elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
Subinfo *si;
|
Subinfo *si;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
char buf[1024];
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "elm.swallow.slot.%s", swallow);
|
||||||
for (l = wd->subs; l; l = l->next)
|
for (l = wd->subs; l; l = l->next)
|
||||||
{
|
{
|
||||||
si = l->data;
|
si = l->data;
|
||||||
if (!strcmp(swallow, si->swallow))
|
if (!strcmp(buf, si->swallow))
|
||||||
{
|
{
|
||||||
if (content == si->obj) return;
|
if (content == si->obj) return;
|
||||||
elm_widget_sub_object_del(obj, si->obj);
|
elm_widget_sub_object_del(obj, si->obj);
|
||||||
|
@ -214,15 +211,14 @@ elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conten
|
||||||
}
|
}
|
||||||
if (content)
|
if (content)
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(wd->hov, swallow, content);
|
|
||||||
elm_widget_sub_object_add(obj, content);
|
elm_widget_sub_object_add(obj, content);
|
||||||
|
edje_object_part_swallow(wd->cov, buf, content);
|
||||||
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
si = ELM_NEW(Subinfo);
|
si = ELM_NEW(Subinfo);
|
||||||
si->swallow = evas_stringshare_add(swallow);
|
si->swallow = evas_stringshare_add(buf);
|
||||||
si->obj = content;
|
si->obj = content;
|
||||||
wd->subs = evas_list_append(wd->subs, si);
|
wd->subs = evas_list_append(wd->subs, si);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
|
@ -134,8 +134,8 @@ elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conte
|
||||||
}
|
}
|
||||||
if (content)
|
if (content)
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(wd->lay, swallow, content);
|
|
||||||
elm_widget_sub_object_add(obj, content);
|
elm_widget_sub_object_add(obj, content);
|
||||||
|
edje_object_part_swallow(wd->lay, swallow, content);
|
||||||
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
si = ELM_NEW(Subinfo);
|
si = ELM_NEW(Subinfo);
|
||||||
|
|
|
@ -108,10 +108,10 @@ elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
|
||||||
wd->content = content;
|
wd->content = content;
|
||||||
if (content)
|
if (content)
|
||||||
{
|
{
|
||||||
|
elm_widget_sub_object_add(obj, content);
|
||||||
elm_smart_scroller_child_set(wd->scr, content);
|
elm_smart_scroller_child_set(wd->scr, content);
|
||||||
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
elm_widget_sub_object_add(obj, content);
|
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,6 @@ EAPI void
|
||||||
elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h)
|
elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
_els_smart_table_pack(wd->tbl, subobj, x, y, w, h);
|
|
||||||
elm_widget_sub_object_add(obj, subobj);
|
elm_widget_sub_object_add(obj, subobj);
|
||||||
|
_els_smart_table_pack(wd->tbl, subobj, x, y, w, h);
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,9 +132,9 @@ elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
|
||||||
wd->icon = icon;
|
wd->icon = icon;
|
||||||
if (icon)
|
if (icon)
|
||||||
{
|
{
|
||||||
|
elm_widget_sub_object_add(obj, icon);
|
||||||
edje_object_part_swallow(wd->tgl, "elm.swallow.content", icon);
|
edje_object_part_swallow(wd->tgl, "elm.swallow.content", icon);
|
||||||
edje_object_signal_emit(wd->tgl, "elm,state,icon,visible", "elm");
|
edje_object_signal_emit(wd->tgl, "elm,state,icon,visible", "elm");
|
||||||
elm_widget_sub_object_add(obj, icon);
|
|
||||||
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
|
|
Loading…
Reference in New Issue