evas_object_show(o2);
elm_object_text_set(o2, "Frame content");
-elm_frame_content_set(o, o2);
+elm_object_content_set(o, o2);
#include "widget_preview_tmpl_foot.c"
}
}
-elm_mapbuf_content_set(o, tb);
+elm_object_content_set(o, tb);
elm_mapbuf_enabled_set(o, EINA_TRUE);
#include "widget_preview_tmpl_foot.c"
elm_object_text_set(o2, "content");
evas_object_show(o2);
-elm_notify_content_set(o, o2);
+elm_object_content_set(o, o2);
#include "widget_preview_tmpl_foot.c"
elm_object_text_set(o2, "content");
evas_object_show(o2);
-elm_panel_content_set(o, o2);
+elm_object_content_set(o, o2);
#include "widget_preview_tmpl_foot.c"
evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); \
evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); \
elm_object_text_set(lb, label); \
- elm_frame_content_set(pd, lb); \
+ elm_object_content_set(pd, lb); \
evas_object_show(lb); \
} \
while (0)
elm_object_text_set(lb,
"Applying configuration change"
);
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
}
// FIXME: add theme selector (basic mode and advanced for fallbacks)
// FIXME: save config
// FIXME: profile selector / creator etc.
- elm_frame_content_set(fr, bx);
+ elm_object_content_set(fr, bx);
evas_object_show(bx);
}
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, 1.0, 1.0);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
elm_list_item_append(li, "List Item 1", NULL, NULL, NULL, NULL);
elm_list_multi_select_set(li, EINA_TRUE);
evas_object_size_hint_weight_set(li, 1.0, 1.0);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(pd, li);
+ elm_object_content_set(pd, li);
evas_object_show(li);
list = elm_theme_name_available_list_new();
elm_object_text_set(bt, "Browse...");
evas_object_size_hint_weight_set(bt, 1.0, 1.0);
evas_object_size_hint_align_set(bt, 0.9, 0.9);
- elm_frame_content_set(pd, bt);
+ elm_object_content_set(pd, bt);
evas_object_show(bt);
*/
pd = elm_frame_add(win);
elm_object_text_set(fr, "Preview");
evas_object_size_hint_weight_set(fr, 1.0, 1.0);
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(pd, fr);
+ elm_object_content_set(pd, fr);
evas_object_show(fr);
sc = elm_scroller_add(win);
elm_scroller_bounce_set(sc, 0, 0);
evas_object_size_hint_weight_set(sc, 1.0, 1.0);
evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, sc);
+ elm_object_content_set(fr, sc);
evas_object_show(sc);
sample = _sample_theme_new(win);
elm_object_text_set(bt, "Use Theme");
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
evas_object_size_hint_align_set(bt, 0.5, 0.5);
- elm_frame_content_set(pd, bt);
+ elm_object_content_set(pd, bt);
evas_object_show(bt);
evas_object_data_set(win, "themes", tb);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
evas_object_data_set(win, "font_classes_list", li);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
evas_object_data_set(win, "font_names_list", li);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
evas_object_data_set(win, "font_styles_list", li);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
evas_object_data_set(win, "font_sizes_list", li);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
- elm_frame_content_set(pd, bx);
+ elm_object_content_set(pd, bx);
evas_object_data_set(win, "fonts", base);
elm_object_text_set(fr, "Available Profiles");
evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, fr_bx1);
+ elm_object_content_set(fr, fr_bx1);
elm_box_pack_end(bx, fr);
evas_object_show(fr);
elm_box_pack_end(btn_bx, bt);
evas_object_show(bt);
- elm_frame_content_set(pd, btn_bx);
+ elm_object_content_set(pd, btn_bx);
evas = evas_object_evas_get(li);
evas_event_freeze(evas);
evas_object_show(fr);
li = elm_list_add(win);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(bt, "Use Engine");
evas_object_size_hint_weight_set(bt, 0.0, 0.0);
evas_object_size_hint_align_set(bt, 0.5, 0.5);
- elm_frame_content_set(pd, bt);
+ elm_object_content_set(pd, bt);
evas_object_show(bt);
evas_object_data_set(win, "rendering", bx);
"Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
tg = elm_check_add(win);
elm_layout_file_set(ly, buf, "main");
evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, ly);
+ elm_object_content_set(fr, ly);
evas_object_show(ly);
re = evas_object_rectangle_add(evas_object_evas_get(win));
elm_colorselector_color_set(cp, r, g, b, a);
evas_object_size_hint_weight_set(cp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(cp, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, cp);
+ elm_object_content_set(fr, cp);
evas_object_show(cp);
evas_object_smart_callback_add(cp, "changed", _colorselector_clicked_cb, re);
fac_unrealize(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
// setting factory content to null deletes it
- printf("--------DELETE for factory %p [f: %p]\n", elm_factory_content_get(obj), obj);
- elm_factory_content_set(obj, NULL);
+ printf("--------DELETE for factory %p [f: %p]\n", elm_object_content_get(obj), obj);
+ elm_object_content_set(obj, NULL);
}
static void
evas_object_show(bt);
}
- elm_factory_content_set(obj, bx);
+ elm_object_content_set(obj, bx);
evas_object_show(bx);
}
evas_object_show(fc);
}
- elm_factory_content_set(obj, bx);
+ elm_object_content_set(obj, bx);
evas_object_show(bx);
}
evas_object_show(fc);
}
- elm_factory_content_set(obj, bx);
+ elm_object_content_set(obj, bx);
evas_object_show(bx);
}
fl_f = elm_flip_add(win);
evas_object_size_hint_align_set(fl_f, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(fl_f, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, fl_f);
+ elm_object_content_set(fr, fl_f);
evas_object_show(fl_f);
o = elm_bg_add(win);
fl_b = elm_flip_add(win);
evas_object_size_hint_align_set(fl_b, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(fl_b, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, fl_b);
+ elm_object_content_set(fr, fl_b);
evas_object_show(fl_b);
o = elm_bg_add(win);
{
Evas_Object *tb = elm_table_add(win);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, tb);
+ elm_object_content_set(fr, tb);
my_show(tb);
for (j = 0; j < 1; j++)
for (i = 0; i < 2; i++)
evas_object_show(fr);
bx2 = elm_box_add(win);
- elm_frame_content_set(fr, bx2);
+ elm_object_content_set(fr, bx2);
evas_object_show(bx2);
lb = elm_label_add(win);
elm_object_text_set(lb,
"Enable reorder mode if you want to move item.<br>"
"Then long press and drag item.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
gl = elm_genlist_add(win);
elm_table_pack(tb, pad, 6, 1, 1, 10);
mb = elm_mapbuf_add(win);
- elm_mapbuf_content_set(mb, tb);
+ elm_object_content_set(mb, tb);
evas_object_show(tb);
for (j = 0; j < 5; j++)
evas_object_show(bt);
mb = elm_mapbuf_add(win);
- elm_mapbuf_content_set(mb, ly);
+ elm_object_content_set(mb, ly);
evas_object_show(ly);
elm_box_pack_end(bx, mb);
mb = elm_mapbuf_add(win);
mbs = eina_list_append(mbs, mb);
- elm_mapbuf_content_set(mb, tb);
+ elm_object_content_set(mb, tb);
evas_object_show(tb);
elm_box_pack_end(bx, mb);
evas_object_show(mb);
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
evas_object_smart_callback_add(notify, "block,clicked", _notify_block, NULL);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_RIGHT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_TOP_LEFT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_TOP_RIGHT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM_LEFT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM_RIGHT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_toolbar_item_append(toolbar, "home", "Hello", _tstatus, panel);
- elm_panel_content_set(panel, toolbar);
+ elm_object_content_set(panel, toolbar);
elm_box_pack_end(vbx, panel);
evas_object_show(panel);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(list);
- elm_panel_content_set(panel, list);
+ elm_object_content_set(panel, list);
elm_box_pack_end(bx, panel);
evas_object_show(panel);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(list);
- elm_panel_content_set(panel, list);
+ elm_object_content_set(panel, list);
elm_box_pack_end(bx, panel);
evas_object_show(panel);
elm_toolbar_item_append(toolbar, "home", "Hello", _bstatus, panel);
- elm_panel_content_set(panel, toolbar);
+ elm_object_content_set(panel, toolbar);
elm_box_pack_end(vbx, panel);
evas_object_show(panel);
"Parent frame scale<br>"
"is 0.5. Child should<br>"
"inherit it.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
elm_box_pack_end(bx, fr);
evas_object_show(fr);
"Parent frame scale<br>"
"is 1.0. Child should<br>"
"inherit it.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
elm_object_scale_set(fr, 1.0);
elm_box_pack_end(bx, fr);
"Parent frame scale<br>"
"is 2.0. Child should<br>"
"inherit it.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
elm_object_scale_set(fr, 2.0);
elm_box_pack_end(bx, fr);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_TRUE);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
evas_object_show(bx);
evas_object_event_callback_add(bx, EVAS_CALLBACK_MOUSE_IN, _mouse_in,
label = elm_label_add(obj);
elm_object_text_set(label, message);
- elm_notify_content_set(popup, label);
+ elm_object_content_set(popup, label);
evas_object_show(label);
return popup;
evas_object_show(popup);
box = elm_box_add(obj);
- elm_notify_content_set(popup, box);
+ elm_object_content_set(popup, box);
evas_object_show(box);
label = elm_label_add(obj);
else return;
if (p->content) {
- elm_notify_content_set(obj, p->content);
+ elm_object_content_set(obj, p->content);
}
if (p->repeat_events_exists)
elm_notify_repeat_events_set(obj, p->repeat_events);
Evas_Object *content = external_common_param_edje_object_get(obj, param);
if ((strcmp(param->s, "")) && (!content))
return EINA_FALSE;
- elm_notify_content_set(obj, content);
+ elm_object_content_set(obj, content);
return EINA_TRUE;
}
else if ((!strcmp(param->name, "repeat_events"))
evas_object_smart_callback_add(o, "anchor,clicked", _anchorblock_clicked_cb,
NULL);
evas_object_show(o);
- elm_frame_content_set(frame, o);
+ elm_object_content_set(frame, o);
frame = elm_frame_add(win);
elm_object_text_set(frame, "Anchorview");
evas_object_smart_callback_add(o, "anchor,clicked", _anchorview_clicked_cb,
NULL);
evas_object_show(o);
- elm_frame_content_set(frame, o);
+ elm_object_content_set(frame, o);
elm_run();
box2 = elm_box_add(parent);
evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(sizeopts, box2);
+ elm_object_content_set(sizeopts, box2);
evas_object_show(box2);
sizebox = elm_box_add(parent);
elm_object_text_set(ewidth, buf);
evas_object_size_hint_weight_set(ewidth, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(ewidth, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fwidth, ewidth);
+ elm_object_content_set(fwidth, ewidth);
evas_object_show(ewidth);
evas_object_smart_callback_add(ewidth, "changed", _width_changed_cb, aid);
elm_object_text_set(eheight, buf);
evas_object_size_hint_weight_set(eheight, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(eheight, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fheight, eheight);
+ elm_object_content_set(fheight, eheight);
evas_object_show(eheight);
evas_object_smart_callback_add(eheight, "changed", _height_changed_cb, aid);
evas_object_show(r1);
f1= elm_frame_add(win);
- elm_frame_content_set(f1, r1);
+ elm_object_content_set(f1, r1);
elm_object_text_set(f1, "Default frame");
evas_object_resize(f1, 100, 100);
evas_object_move(f1, 25, 25);
evas_object_show(r2);
f2 = elm_frame_add(win);
- elm_frame_content_set(f2, r2);
+ elm_object_content_set(f2, r2);
elm_object_text_set(f2, "Padding frame");
evas_object_resize(f2, 100, 100);
evas_object_move(f2, 150, 25);
evas_object_show(r3);
f3 = elm_frame_add(win);
- elm_frame_content_set(f3, r3);
+ elm_object_content_set(f3, r3);
elm_object_text_set(f3, "Top outdent frame");
evas_object_resize(f3, 100, 100);
evas_object_move(f3, 25, 150);
evas_object_show(r4);
f4 = elm_frame_add(win);
- elm_frame_content_set(f4, r4);
+ elm_object_content_set(f4, r4);
elm_object_text_set(f4, "Bottom outdent frame");
evas_object_resize(f4, 100, 100);
evas_object_move(f4, 150, 150);
d.btn = elm_button_add(win);
elm_object_text_set(d.btn, "Click me");
- elm_frame_content_set(frame, d.btn);
+ elm_object_content_set(frame, d.btn);
fprintf(stdout, "Elementary's finger size is set to %d pixels\n.",
elm_finger_size_get());
}
}
- elm_mapbuf_content_set(mb, tb);
+ elm_object_content_set(mb, tb);
evas_object_show(mb);
hbx = elm_box_add(win);
notify = elm_notify_add(win);
elm_notify_repeat_events_set(notify, EINA_FALSE);
elm_notify_timeout_set(notify, 5);
- elm_notify_content_set(notify, content);
+ elm_object_content_set(notify, content);
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(notify);
elm_box_pack_end(bx, notify);
notify = elm_notify_add(win);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
- elm_notify_content_set(notify, content);
+ elm_object_content_set(notify, content);
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(notify);
elm_box_pack_end(bx, notify);
notify = elm_notify_add(win);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_CENTER);
- elm_notify_content_set(notify, content);
+ elm_object_content_set(notify, content);
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(notify);
elm_box_pack_end(bx, notify);
_hide(void *data, Evas_Object *obj, void *event_info)
{
evas_object_hide(obj);
-}
\ No newline at end of file
+}
elm_object_text_set(content, "content");
evas_object_show(content);
evas_object_size_hint_min_set(content, 100, 30);
- elm_panel_content_set(panel, content);
+ elm_object_content_set(panel, content);
panel = elm_panel_add(win);
elm_panel_orient_set(panel, ELM_PANEL_ORIENT_RIGHT);
elm_object_text_set(content, "content2");
evas_object_show(content);
evas_object_size_hint_min_set(content, 100, 30);
- elm_panel_content_set(panel, content);
+ elm_object_content_set(panel, content);
panel = elm_panel_add(win);
evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(content, "content2");
evas_object_show(content);
evas_object_size_hint_min_set(content, 100, 30);
- elm_panel_content_set(panel, content);
+ elm_object_content_set(panel, content);
evas_object_show(win);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_TRUE);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
evas_object_show(bx);
evas_object_event_callback_add(bx, EVAS_CALLBACK_MOUSE_IN, _mouse_in,
box = elm_box_add(obj);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_notify_content_set(msg, box);
+ elm_object_content_set(msg, box);
evas_object_show(box);
lbl = elm_label_add(obj);
* centered, scaled or stretched.
*
* Default contents parts of the bg widget that you can use for are:
- *
* @li "elm.swallow.content" - overlay of the bg
*
* Here is some sample code using it:
* @li hoversel_vertical_entry: Another internal for @ref Hoversel.
*
* Default contents parts of the button widget that you can use for are:
- *
* @li "elm.swallow.content" - A icon of the button
*
* Default text parts of the button widget that you can use for are:
- *
* @li "elm.text" - Label of the button
*
* Follow through a complete example @ref button_example_01 "here".
*
* Of all this styles only default shows the title. Frame emits no signals.
*
+ * Default contents parts of the frame widget that you can use for are:
+ * @li "elm.swallow.content" - A content of the frame
+ *
+ * Default text parts of the frame widget that you can use for are:
+ * @li "elm.text" - Label of the frame
+ *
* For a detailed example see the @ref tutorial_frame.
*
* @{
* @param obj The frame object
* @param content The content will be filled in this frame object
*/
- EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
* @brief Get the content of the frame widget
*
* @param obj The frame object
* @return The content that is being used
*/
- EAPI Evas_Object *elm_frame_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Unset the content of the frame widget
*
* @param obj The frame object
* @return The content that was being used
*/
- EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @}
*/
* @li "timeout" - when timeout happens on notify and it's hidden
* @li "block,clicked" - when a click outside of the notify happens
*
+ * Default contents parts of the notify widget that you can use for are:
+ * @li "elm.swallow.content" - A content of the notify
+ *
* @ref tutorial_notify show usage of the API.
*
* @{
* you want to keep that old content object, use the
* elm_notify_content_unset() function.
*/
- EAPI void elm_notify_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_notify_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
* @brief Unset the content of the notify widget
*
*
* @see elm_notify_content_set()
*/
- EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Return the content of the notify widget
*
*
* @see elm_notify_content_set()
*/
- EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Set the notify parent
*
* the check object(event_info is NULL).
*
* Default contents parts of the check widget that you can use for are:
- *
* @li "elm.swallow.content" - A icon of the check
*
* Default text parts of the check widget that you can use for are:
- *
* @li "elm.text" - Label of the check
*
* @ref tutorial_check should give you a firm grasp of how to use this widget
* @li ELM_PANEL_ORIENT_LEFT
* @li ELM_PANEL_ORIENT_RIGHT
*
+ * To set/get/unset the contetn of the panel, you can use
+ * elm_object_content_set/get/unset APIs.
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_object_content_unset() function
+ *
* @ref tutorial_panel shows one way to use this widget.
* @{
*/
* If you want to keep that old content object, use the
* elm_panel_content_unset() function.
*/
- EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
* @brief Get the content of the panel.
*
*
* @see elm_panel_content_set()
*/
- EAPI Evas_Object *elm_panel_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_panel_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Unset the content of the panel.
*
*
* @see elm_panel_content_set()
*/
- EAPI Evas_Object *elm_panel_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_panel_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Set the state of the panel.
*
* need to resize or move it frequently (the content object and its
* children).
*
+ * To set/get/unset the content of the mapbuf, you can use
+ * elm_object_content_set/get/unset APIs.
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_object_content_unset() function.
+ *
+ * To enable map, elm_mapbuf_enabled_set() should be used.
+ *
* See how to use this widget in this example:
* @ref mapbuf_example
*/
*
* @ingroup Mapbuf
*/
- EAPI void elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
* Get the content of the mapbuf.
*
* @ingroup Mapbuf
*/
- EAPI Evas_Object *elm_mapbuf_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_mapbuf_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Unset the content of the mapbuf.
*
* @ingroup Mapbuf
*/
- EAPI Evas_Object *elm_mapbuf_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_mapbuf_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Enable or disable the map.
* Signals that you can add callbacks for are:
* "dismissed" - the ctxpopup was dismissed
*
+ * Default contents parts of the ctxpopup widget that you can use for are:
+ * @li "elm.swallow.content" - A content of the ctxpopup
+ *
* @ref tutorial_ctxpopup shows the usage of a good deal of the API.
* @{
*/
*/
EAPI Evas_Object *elm_factory_add(Evas_Object *parent);
- EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content);
- EAPI Evas_Object *elm_factory_content_get(const Evas_Object *obj);
+ EINA_DEPRECATED EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content);
+ EINA_DEPRECATED EAPI Evas_Object *elm_factory_content_get(const Evas_Object *obj);
EAPI void elm_factory_maxmin_mode_set(Evas_Object *obj, Eina_Bool enabled);
EAPI Eina_Bool elm_factory_maxmin_mode_get(const Evas_Object *obj);
EAPI void elm_factory_maxmin_reset_set(Evas_Object *obj);
* application.
*
* Signals that you can add callback for are:
- *
* @li "transition,finished" - When the transition is finished in changing
* the item
* @li "title,clicked" - User clicked title area
*
* Default contents parts of the naviframe items that you can use for are:
- *
* @li "elm.swallow.content" - A main content of the page
* @li "elm.swallow.prev_btn" - A button to go to the previous page
* @li "elm.swallow.next_btn" - A button to go to the next page
*
* Default text parts of the naviframe items that you can use for are:
- *
* @li "elm.text.title" - Title label in the title area
*
* @ref tutorial_naviframe gives a good overview of the usage of the API.
static void _resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
static void _child_change(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
static void _child_del(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
+static void _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content);
+static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__);
static const char SIG_REALIZE[] = "realize";
static const char SIG_UNREALIZE[] = "unrealize";
// printf("FAC-- = %i\n", fac);
}
-EAPI Evas_Object *
-elm_factory_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, "factory");
- elm_widget_type_set(obj, "factory");
- elm_widget_sub_object_add(parent, obj);
- elm_widget_data_set(obj, wd);
- elm_widget_del_hook_set(obj, _del_hook);
- elm_widget_focus_next_hook_set(obj, _focus_next_hook);
- elm_widget_can_focus_set(obj, EINA_FALSE);
- elm_widget_changed_hook_set(obj, _changed);
-
- evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, NULL);
- evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, NULL);
-
- evas_object_smart_callbacks_descriptions_set(obj, _signals);
-
- wd->obj = obj;
- wd->last_calc_count = -1;
- return obj;
-}
-
-EAPI void
-elm_factory_content_set(Evas_Object *obj, Evas_Object *content)
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
}
}
-EAPI Evas_Object *
-elm_factory_content_get(const Evas_Object *obj)
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
return wd->content;
}
+EAPI Evas_Object *
+elm_factory_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, "factory");
+ elm_widget_type_set(obj, "factory");
+ elm_widget_sub_object_add(parent, obj);
+ elm_widget_data_set(obj, wd);
+ elm_widget_del_hook_set(obj, _del_hook);
+ elm_widget_focus_next_hook_set(obj, _focus_next_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_can_focus_set(obj, EINA_FALSE);
+ elm_widget_changed_hook_set(obj, _changed);
+
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, NULL);
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, NULL);
+
+ evas_object_smart_callbacks_descriptions_set(obj, _signals);
+
+ wd->obj = obj;
+ wd->last_calc_count = -1;
+ return obj;
+}
+
+EAPI void
+elm_factory_content_set(Evas_Object *obj, Evas_Object *content)
+{
+ _content_set_hook(obj, NULL, content);
+}
+
+EAPI Evas_Object *
+elm_factory_content_get(const Evas_Object *obj)
+{
+ return _content_get_hook(obj, NULL);
+}
+
EAPI void
elm_factory_maxmin_mode_set(Evas_Object *obj, Eina_Bool enabled)
{
return wd->label;
}
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->content == content) return;
+ if (wd->content) evas_object_del(wd->content);
+ 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);
+ }
+ _sizing_eval(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content;
+ if (!wd) return NULL;
+ if (!wd->content) return NULL;
+ content = wd->content;
+ elm_widget_sub_object_del(obj, wd->content);
+ edje_object_part_unswallow(wd->frm, wd->content);
+ wd->content = NULL;
+ return content;
+}
+
EAPI Evas_Object *
elm_frame_add(Evas_Object *parent)
{
elm_widget_can_focus_set(obj, EINA_FALSE);
elm_widget_text_set_hook_set(obj, _elm_frame_label_set);
elm_widget_text_get_hook_set(obj, _elm_frame_label_get);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
wd->frm = edje_object_add(e);
_elm_theme_object_set(obj, wd->frm, "frame", "base", "default");
EAPI void
elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->content == content) return;
- if (wd->content) evas_object_del(wd->content);
- 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);
- }
- _sizing_eval(obj);
+ _content_set_hook(obj, NULL, content);
}
EAPI Evas_Object *
elm_frame_content_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->content;
+ return _content_get_hook(obj, NULL);
}
EAPI Evas_Object *
elm_frame_content_unset(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *content;
- if (!wd) return NULL;
- if (!wd->content) return NULL;
- content = wd->content;
- elm_widget_sub_object_del(obj, wd->content);
- edje_object_part_unswallow(wd->frm, wd->content);
- wd->content = NULL;
- return content;
+ return _content_unset_hook(obj, NULL);
}
_configure(data);
}
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->content == content) return;
+ if (wd->content) evas_object_del(wd->content);
+ wd->content = content;
+ if (content)
+ {
+ evas_object_data_set(content, "_elm_leaveme", (void *)1);
+ elm_widget_sub_object_add(content, obj);
+ evas_object_smart_member_add(content, obj);
+ evas_object_clip_set(content, wd->clip);
+ evas_object_color_set(wd->clip, 255, 255, 255, 255);
+ evas_object_event_callback_add(content,
+ EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints, obj);
+ }
+ else
+ evas_object_color_set(wd->clip, 0, 0, 0, 0);
+ _sizing_eval(obj);
+ _configure(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content;
+ if (!wd) return NULL;
+ if (!wd->content) return NULL;
+ content = wd->content;
+ elm_widget_sub_object_del(obj, content);
+ evas_object_smart_member_del(content);
+ evas_object_color_set(wd->clip, 0, 0, 0, 0);
+ evas_object_clip_unset(content);
+ evas_object_data_del(content, "_elm_leaveme");
+ wd->content = NULL;
+ return content;
+}
+
EAPI Evas_Object *
elm_mapbuf_add(Evas_Object *parent)
{
elm_widget_data_set(obj, wd);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
wd->clip = evas_object_rectangle_add(e);
EAPI void
elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->content == content) return;
- if (wd->content) evas_object_del(wd->content);
- wd->content = content;
- if (content)
- {
- evas_object_data_set(content, "_elm_leaveme", (void *)1);
- elm_widget_sub_object_add(content, obj);
- evas_object_smart_member_add(content, obj);
- evas_object_clip_set(content, wd->clip);
- evas_object_color_set(wd->clip, 255, 255, 255, 255);
- evas_object_event_callback_add(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, obj);
- }
- else
- evas_object_color_set(wd->clip, 0, 0, 0, 0);
- _sizing_eval(obj);
- _configure(obj);
+ _content_set_hook(obj, NULL, content);
}
EAPI Evas_Object *
elm_mapbuf_content_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->content;
+ return _content_get_hook(obj, NULL);
}
EAPI Evas_Object *
elm_mapbuf_content_unset(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *content;
- if (!wd) return NULL;
- if (!wd->content) return NULL;
- content = wd->content;
- elm_widget_sub_object_del(obj, content);
- evas_object_smart_member_del(content);
- evas_object_color_set(wd->clip, 0, 0, 0, 0);
- evas_object_clip_unset(content);
- evas_object_data_del(content, "_elm_leaveme");
- wd->content = NULL;
- return content;
+ return _content_unset_hook(obj, NULL);
}
EAPI void
return elm_widget_focus_next_get(cur, dir, next);
}
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->content == content) return;
+ if (wd->content) evas_object_del(wd->content);
+ 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);
+ evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE,
+ _content_resize, obj);
+ edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
+ }
+ _sizing_eval(obj);
+ _calc(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ if (!wd) return NULL;
+ return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content;
+ if (!wd) return NULL;
+ if (!wd->content) return NULL;
+ content = wd->content;
+ elm_widget_sub_object_del(obj, wd->content);
+ edje_object_part_unswallow(wd->notify, wd->content);
+ wd->content = NULL;
+ return content;
+}
+
EAPI Evas_Object *
elm_notify_add(Evas_Object *parent)
{
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
elm_widget_focus_next_hook_set(obj, _elm_notify_focus_next_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
wd->repeat_events = EINA_TRUE;
EAPI void
elm_notify_content_set(Evas_Object *obj, Evas_Object *content)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->content == content) return;
- if (wd->content) evas_object_del(wd->content);
- 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);
- evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE,
- _content_resize, obj);
- edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
- }
- _sizing_eval(obj);
- _calc(obj);
+ _content_set_hook(obj, NULL, content);
}
EAPI Evas_Object *
elm_notify_content_unset(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *content;
- if (!wd) return NULL;
- if (!wd->content) return NULL;
- content = wd->content;
- elm_widget_sub_object_del(obj, wd->content);
- edje_object_part_unswallow(wd->notify, wd->content);
- wd->content = NULL;
- return content;
+ return _content_unset_hook(obj, NULL);
}
EAPI Evas_Object *
elm_notify_content_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
-
- if (!wd) return NULL;
- return wd->content;
+ return _content_get_hook(obj, NULL);
}
EAPI void
return EINA_TRUE;
}
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->content == content) return;
+ if (wd->content)
+ evas_object_box_remove_all(wd->bx, EINA_TRUE);
+ wd->content = content;
+ if (content)
+ {
+ evas_object_box_append(wd->bx, wd->content);
+ evas_object_show(wd->content);
+ }
+ _sizing_eval(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content;
+ if (!wd) return NULL;
+ if (!wd->content) return NULL;
+ content = wd->content;
+ evas_object_box_remove_all(wd->bx, EINA_FALSE);
+ wd->content = NULL;
+ return content;
+}
+
EAPI Evas_Object *
elm_panel_add(Evas_Object *parent)
{
elm_widget_focus_next_hook_set(obj, _elm_panel_focus_next_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_event_hook_set(obj, _event_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
wd->scr = elm_smart_scroller_add(e);
elm_smart_scroller_widget_set(wd->scr, obj);
EAPI void
elm_panel_content_set(Evas_Object *obj, Evas_Object *content)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->content == content) return;
- if (wd->content)
- evas_object_box_remove_all(wd->bx, EINA_TRUE);
- wd->content = content;
- if (content)
- {
- evas_object_box_append(wd->bx, wd->content);
- evas_object_show(wd->content);
- }
- _sizing_eval(obj);
+ _content_set_hook(obj, NULL, content);
}
EAPI Evas_Object *
elm_panel_content_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->content;
+ return _content_get_hook(obj, NULL);
}
EAPI Evas_Object *
elm_panel_content_unset(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *content;
- if (!wd) return NULL;
- if (!wd->content) return NULL;
- content = wd->content;
- evas_object_box_remove_all(wd->bx, EINA_FALSE);
- wd->content = NULL;
- return content;
+ return _content_unset_hook(obj, NULL);
}
EAPI void
elm_list_mode_set(list, ELM_LIST_EXPAND);
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_notify_content_set(notify, list);
+ elm_object_content_set(notify, list);
evas_object_show(list);
EINA_LIST_FOREACH(m->items, itr, it)