本文整理汇总了C++中elm_box_add函数的典型用法代码示例。如果您正苦于以下问题:C++ elm_box_add函数的具体用法?C++ elm_box_add怎么用?C++ elm_box_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了elm_box_add函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: _test_layout
static void
_test_layout()
{
Evas_Object *win, *box, *ly, *bt;
char buf[PATH_MAX];
win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
box = elm_box_add(win);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, box);
evas_object_show(box);
ly = elm_layout_add(win);
if (!elm_layout_theme_set(
ly, "layout", "application", "titlebar"))
fprintf(stderr, "Failed to set layout");
elm_object_part_text_set(ly, "elm.text", "Some title");
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, ly);
evas_object_show(ly);
bt = elm_icon_add(win);
elm_icon_standard_set(bt, "chat");
evas_object_size_hint_min_set(bt, 20, 20);
elm_layout_icon_set(ly, bt);
bt = elm_icon_add(win);
elm_icon_standard_set(bt, "close");
evas_object_size_hint_min_set(bt, 20, 20);
elm_layout_end_set(ly, bt);
ly = elm_layout_add(win);
snprintf(buf, sizeof(buf), "%s/test.edj","./data/");
elm_layout_file_set(ly, buf, "layout");
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(box, ly);
//elm_win_resize_object_add(win, ly);
evas_object_show(ly);
bt = elm_button_add(win);
elm_object_text_set(bt, "Button 1");
elm_object_part_content_set(ly, "element1", bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Button 2");
elm_object_part_content_set(ly, "element2", bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Button 3");
elm_object_part_content_set(ly, "element3", bt);
evas_object_show(bt);
evas_object_show(win);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:60,代码来源:eail_layout_test.c
示例2: alert
static void
alert(const char *text)
{
Evas_Object *win, *bx, *lb, *bt;
win = window;
inwin3 = elm_win_inwin_add(win);
elm_object_style_set(inwin3, "minimal_vertical");
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, 1.0, 0.0);
evas_object_size_hint_align_set(bx, -1.0, -1.0);
lb = elm_label_add(win);
evas_object_size_hint_weight_set(lb, 1.0, 1.0);
evas_object_size_hint_align_set(lb, -1.0, 0.5);
elm_label_label_set(lb, text);
elm_box_pack_end(bx, lb);
evas_object_show(lb);
bt = elm_button_add(window);
elm_button_label_set(bt, "OK");
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
evas_object_size_hint_align_set(bt, -1.0, -1.0);
elm_box_pack_end(bx, bt);
evas_object_smart_callback_add(bt, "clicked", on_alert_ok, NULL);
evas_object_show(bt);
elm_win_inwin_content_set(inwin3, bx);
evas_object_show(bx);
elm_win_inwin_activate(inwin3);
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:33,代码来源:list.c
示例3: _init_photo
static void
_init_photo(Evas_Object *win)
{
Evas_Object *bg, *bx, *photo;
const char * const filename = "./data/th-whiterabbit01.jpg";
bg = elm_bg_add(win);
elm_bg_color_set(bg, 255, 255, 255);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_homogeneous_set(bx, EINA_TRUE);
elm_win_resize_object_add(win, bx);
photo = elm_photo_add(win);
g_assert(elm_photo_file_set(photo, filename));
elm_photo_size_set(photo, 100);
elm_photo_aspect_fixed_set(photo, EINA_FALSE);
evas_object_smart_callback_add(photo, "clicked", _on_photo_clicked, NULL);
evas_object_size_hint_weight_set(photo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_photo_fill_inside_set(photo, EINA_TRUE);
evas_object_size_hint_align_set(photo, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(bx, photo);
evas_object_show(photo);
evas_object_show(bx);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:32,代码来源:eail_photo_test.c
示例4: view_main_create_empty_layout
static void view_main_create_empty_layout(void)
{
__COMMON_FUNC_ENTER__;
Evas_Object *box = NULL;
Evas_Object *layout = NULL;
Evas_Object *prev_box = NULL;
prev_box = elm_object_content_get(devpkr_app_state->popup);
if (prev_box != NULL) {
evas_object_del(prev_box);
list = NULL;
grouptitle = NULL;
}
box = elm_box_add(devpkr_app_state->popup);
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);
layout = elm_layout_add(devpkr_app_state->popup);
elm_layout_file_set(layout, WIFI_DEVPKR_EDJ, WIFI_SYSPOPUP_EMPTY_GRP);
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_domain_translatable_part_text_set(layout, "text", PACKAGE,
sc(PACKAGE, I18N_TYPE_No_Wi_Fi_AP_Found));
elm_box_pack_end(box, layout);
evas_object_show(layout);
evas_object_show(box);
elm_object_content_set(devpkr_app_state->popup, box);
__COMMON_FUNC_EXIT__;
}
开发者ID:gudbooy,项目名称:tizentetheredwifi,代码行数:34,代码来源:view-main.c
示例5: view_main_create_main_list
void view_main_create_main_list(void)
{
__COMMON_FUNC_ENTER__;
Evas_Object *box = NULL;
Evas_Object *main_list = NULL;
Evas_Object *prev_box = NULL;
prev_box = elm_object_content_get(devpkr_app_state->popup);
if (prev_box != NULL) {
evas_object_del(prev_box);
list = NULL;
grouptitle = NULL;
}
box = elm_box_add(devpkr_app_state->popup);
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);
main_list = _create_genlist(box);
view_main_add_group_title();
elm_box_pack_end(box, main_list);
evas_object_show(main_list);
evas_object_show(box);
elm_object_content_set(devpkr_app_state->popup, box);
__COMMON_FUNC_EXIT__;
}
开发者ID:gudbooy,项目名称:tizentetheredwifi,代码行数:29,代码来源:view-main.c
示例6: create_inner_layout
static Evas_Object * create_inner_layout (void *data)
{
struct appdata *ad = (struct appdata *)data;
Evas_Object *bx = NULL ;
Evas_Object *ef = NULL ;
Evas_Object *en = NULL;
Evas_Object *parent = ad->naviframe;
const char *imdata_ko = "LANG:ko_KR";
const char *imdata_en = "LANG:en_US";
bx = elm_box_add (parent);
evas_object_size_hint_weight_set (bx, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set (bx, EVAS_HINT_FILL, 0.0);
evas_object_show (bx);
ef = _create_ef_layout (parent, _("ko_KR"), _("Korean Layout"));
elm_box_pack_end (bx, ef);
en = elm_object_part_content_get(ef, "elm.swallow.content");
elm_entry_input_panel_imdata_set (en, imdata_ko, strlen(imdata_ko));
ef = _create_ef_layout (parent, _("en_US"), _("English layout"));
elm_box_pack_end (bx, ef);
en = elm_object_part_content_get(ef, "elm.swallow.content");
elm_entry_input_panel_imdata_set (en, imdata_en, strlen(imdata_en));
return bx;
}
开发者ID:Tarnyko,项目名称:dali-isf,代码行数:28,代码来源:isf_imdata_set_efl.cpp
示例7: emusic_notify_creat
Evas_Object *
emusic_notify_creat(Em_Smart_Data *em)
{
Evas_Object *bx, *bt, *notify, *label;
sd = calloc(1, sizeof(Smart_Data));
if (!sd) return NULL;
notify = elm_notify_add(em->edje);
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_TOP_RIGHT);
//edje_object_part_swallow(, "box.swallow", em->notify.notify);
sd->notify = notify;
bx = elm_box_add(notify);
elm_notify_content_set(notify, bx);
elm_box_horizontal_set(bx, 1);
evas_object_show(bx);
label = elm_label_add(notify);
elm_label_label_set(label, "Top Right position.");
elm_box_pack_end(bx, label);
evas_object_show(label);
sd->label = label;
bt = elm_button_add(notify);
elm_button_label_set(bt, "Close");
evas_object_smart_callback_add(bt, "clicked", _notify_bt_close, NULL);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
return notify;
}
开发者ID:mink365,项目名称:e_music,代码行数:33,代码来源:emusic_notify.c
示例8: on_to_select
static void
on_to_select(void *data, Evas_Object *obj, void *event_info)
{
Evas_Object *win, *li, *bx, *bt;
Eina_List *l;
win = window;
inwin = elm_win_inwin_add(win);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, 1.0, 0.0);
evas_object_size_hint_align_set(bx, -1.0, -1.0);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, 1.0, 1.0);
evas_object_size_hint_align_set(li, -1.0, -1.0);
elm_box_pack_end(bx, li);
for (l = (Eina_List *)data_contacts_all_list(); l; l = l->next)
{
Data_Contact *ctc = l->data;
Evas_Object *ph;
char buf[1024];
char *file, *name;
if (!ctc->tel.numbers) continue;
name = data_contact_name_get(ctc);
if (!name) continue;
ph = elm_photo_add(win);
elm_photo_size_set(ph, 20);
file = data_contact_photo_file_get(ctc);
if (file)
{
elm_photo_file_set(ph, file);
free(file);
}
elm_list_item_append(li, name, ph, NULL, on_contact_select, ctc);
evas_object_show(ph);
free(name);
}
elm_list_item_append(li, "... Other", NULL, NULL, on_contact_select, NULL);
elm_list_go(li);
evas_object_show(li);
bt = elm_button_add(window);
elm_button_label_set(bt, "OK");
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
evas_object_size_hint_align_set(bt, -1.0, -1.0);
elm_box_pack_end(bx, bt);
evas_object_smart_callback_add(bt, "clicked", on_select_ok, NULL);
evas_object_show(bt);
elm_win_inwin_content_set(inwin, bx);
evas_object_show(bx);
elm_win_inwin_activate(inwin);
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:60,代码来源:list.c
示例9: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win = NULL, *image = NULL, *btn = NULL, *bx = NULL;
char buf[PATH_MAX];
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
win = elm_win_util_standard_add("test", "Hello Elementary");
elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
evas_object_show(bx);
snprintf(buf, sizeof(buf), "bodhilogo-simple.png");
image = elm_image_add(win);
/*if (!elm_image_file_set(image, buf, NULL))
{
printf("error: could not load image \"%s\"\n", buf);
return -1;
} */
elm_image_file_set(image, NULL, NULL);
evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, image);
evas_object_show(image);
evas_object_resize(win, 300, 200);
evas_object_show(win);
elm_run();
return EXIT_SUCCESS;
}
开发者ID:rbtylee,项目名称:Elementary,代码行数:33,代码来源:elm_image.c
示例10: _add_login_box
static Evas_Object *
_add_login_box (
Evas_Object *win)
{
Evas_Object *box = NULL, *label, *login_button;
Eina_Bool value;
box = elm_box_add (win);
evas_object_size_hint_weight_set (box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show (box);
elm_win_resize_object_add (win, box);
elm_box_horizontal_set (box, EINA_TRUE);
evas_object_size_hint_align_set (box, 0.1, 0.0);
/* login button */
login_button = elm_button_add (win);
elm_object_text_set (login_button, "Login");
evas_object_size_hint_weight_set (login_button,
EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set (login_button,
EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_smart_callback_add (login_button, "clicked",
_on_login_user_clicked, win);
elm_box_pack_end (box, login_button);
evas_object_show (login_button);
return box;
}
开发者ID:avalluri,项目名称:tlm,代码行数:28,代码来源:tlm-ui.c
示例11: _init_colorselector
static void
_init_colorselector(Evas_Object *obj)
{
Evas_Object *bx = NULL;
Evas_Object *cs = NULL;
Evas_Object *fr = NULL;
bx = elm_box_add(obj);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_win_resize_object_add(obj, bx);
evas_object_show(bx);
fr = elm_frame_add(obj);
evas_object_size_hint_weight_set(fr, 1.0, 0.5);
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(fr, "Color Selector");
elm_box_pack_end(bx, fr);
evas_object_show(fr);
cs = elm_colorselector_add(obj);
elm_colorselector_palette_name_set(cs, "painting");
evas_object_size_hint_weight_set(cs, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(cs, EVAS_HINT_FILL, 0.0);
elm_colorselector_color_set(cs, 100, 100, 100, 133);
evas_object_show(cs);
elm_object_content_set(fr, cs);
evas_object_resize(obj, 320, 480);
}
开发者ID:mknapinski,项目名称:eail,代码行数:30,代码来源:eail_colorselector_tc1.c
示例12: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg, *bx, *tb, *bt, *menu;
Elm_Object_Item *tb_it;
win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC);
elm_win_title_set(win, "Toolbar Example");
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bx);
bt = elm_button_add(win);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(bt, "Button");
evas_object_show(bt);
tb = elm_toolbar_add(win);
evas_object_size_hint_weight_set(tb, 0.0, 0.0);
evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
evas_object_show(tb);
elm_toolbar_item_append(tb, "document-print", "Print", NULL, NULL);
elm_toolbar_item_append(tb, "folder-new", "Folder", NULL, NULL);
elm_toolbar_item_append(tb, "clock", "Clock", NULL, NULL);
elm_toolbar_item_append(tb, "refresh", "Update", NULL, NULL);
elm_toolbar_menu_parent_set(tb, win);
tb_it = elm_toolbar_item_append(tb, "mail-send", "Send Mail", NULL, NULL);
elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
menu = elm_toolbar_item_menu_get(tb_it);
elm_menu_item_add(menu, NULL, "emptytrash", "Empty Trash", NULL, NULL);
elm_menu_item_add(menu, NULL, "trashcan_full", "Full Trash", NULL, NULL);
elm_toolbar_item_priority_set(tb_it, 10);
elm_box_pack_end(bx, tb);
elm_box_pack_end(bx, bt);
evas_object_resize(win, 230, 200);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:59,代码来源:toolbar_example_03.c
示例13: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bx, *ck;
unsigned int digedit;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
win = elm_win_util_standard_add("clock", "Clock Example");
elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
evas_object_show(bx);
/* pristine (no seconds, military time) */
ck = elm_clock_add(win);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
/* am/pm */
ck = elm_clock_add(win);
elm_clock_show_am_pm_set(ck, EINA_TRUE);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
/* with seconds and custom time */
ck = elm_clock_add(win);
elm_clock_show_seconds_set(ck, EINA_TRUE);
elm_clock_time_set(ck, 10, 11, 12);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
/* in edition mode, with seconds, custom time and am/pm set */
ck = elm_clock_add(win);
elm_clock_edit_set(ck, EINA_TRUE);
elm_clock_show_seconds_set(ck, EINA_TRUE);
elm_clock_show_am_pm_set(ck, EINA_TRUE);
elm_clock_time_set(ck, 10, 11, 12);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
/* in edition mode, with seconds, but only some digits editable */
ck = elm_clock_add(win);
elm_clock_show_seconds_set(ck, EINA_TRUE);
elm_clock_edit_set(ck, EINA_TRUE);
digedit = ELM_CLOCK_EDIT_HOUR_UNIT | ELM_CLOCK_EDIT_MIN_UNIT | ELM_CLOCK_EDIT_SEC_UNIT;
elm_clock_edit_mode_set(ck, digedit);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:59,代码来源:clock_example.c
示例14: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg, *map, *box, *bt;
win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
elm_win_title_set(win, "Map Creation Example");
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
map = elm_map_add(win);
elm_win_resize_object_add(win, map);
evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(map);
box = elm_box_add(win);
evas_object_show(box);
bt = elm_button_add(win);
elm_object_text_set(bt, "+");
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _bt_zoom_in, map);
bt = elm_button_add(win);
elm_object_text_set(bt, "-");
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _bt_zoom_out, map);
bt = elm_button_add(win);
elm_object_text_set(bt, "X");
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fit, map);
bt = elm_button_add(win);
elm_object_text_set(bt, "#");
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fill, map);
elm_map_zoom_set(map, 12);
elm_map_region_show(map, -43.2, -22.9);
evas_object_resize(win, 512, 512);
evas_object_show(win);
ecore_timer_add(0.5, _nasty_hack, win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:58,代码来源:map_example_01.c
示例15: float_new
Eo* float_new(PropertyValue* val, Eo* obj)
{
Evas_Object *bx;
bx = elm_box_add(obj);
elm_box_horizontal_set(bx, EINA_TRUE);
elm_box_padding_set(bx, 4, 0);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
Evas_Coord fw = -1, fh = -1;
elm_coords_finger_size_adjust(1, &fw, 1, &fh);
evas_object_size_hint_min_set(bx, 0, fh);
const char* name;
/*
Eo* l = elm_layout_add(obj);
elm_layout_file_set(l, "edc/entry.edj", "main");
evas_object_size_hint_weight_set(l, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(l, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(l);
elm_box_pack_end(bx, l);
return bx;
*/
//Evas_Object* en = smart_entry_add(evas_object_evas_get(obj));
//Evas_Object* en = smart_entry_add(obj);
//chris
//Evas_Object *en = eo_add(JK_ENTRY_CLASS, obj);
Evas_Object *en = jk_entry_add(obj);
//evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(en);
elm_box_pack_end(bx, en);
//Eo* rect = evas_object_rectangle_add(evas_object_evas_get(obj));
//evas_object_show(rect);
//evas_object_color_set(rect, rand() % 255, rand() % 255, rand() % 255, 255/2);
//evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
//
//elm_box_pack_end(bx, rect);
evas_object_smart_callback_add(en, "changed,end", _jk_entry_changed_end_cb_list, val);
evas_object_smart_callback_add(en, "changed", _jk_entry_changed_cb_list, val);
const float* f = val->data;
//eo_do(en, jk_entry_value_set(*f));
jk_entry_value_set(en, *f);
val->item_eo = en;
evas_object_show(bx);
return bx;
}
开发者ID:drasich,项目名称:joker,代码行数:58,代码来源:float.c
示例16: emusic_playlist_ctl_creat
int
emusic_playlist_ctl_creat(Em_Smart_Data *em)
{
Evas_Object *obj, *box, *ic, *bt;
sd = calloc(1, sizeof(Smart_Data));
if (!sd) return FALSE;
obj = edje_object_add(em->evas);
if (!edje_object_file_set(obj, emusic_config_theme_get(), "widget/playlist_ctl"))
{
int err = edje_object_load_error_get(obj);
const char *errmsg = edje_load_error_str(err);
ERR("cannot load theme '%s', group '%s': %s\n",
emusic_config_theme_get(),"widget/playlist_ctl", errmsg);
evas_object_del(obj);
return NULL;
}
em->playlist_ctl = obj;
box = elm_box_add(obj);
elm_box_homogenous_set(box, 0);
elm_box_horizontal_set(box, 1);
ic = elm_icon_add(obj);
elm_icon_file_set(ic, emusic_config_theme_get(), "icon/mp_playlist");
bt = elm_button_add(obj);
evas_object_smart_callback_add(bt, "clicked", _button_clicked_playlist_cb, em);
elm_button_icon_set(bt, ic);
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_show(ic);
ic = elm_icon_add(obj);
elm_icon_file_set(ic, emusic_config_theme_get(), "icon/mp_repeat_off");
bt = elm_button_add(obj);
evas_object_smart_callback_add(bt, "clicked", _button_clicked_repeat_cb, em);
elm_button_icon_set(bt, ic);
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_show(ic);
sd->repeat_btn = bt;
ic = elm_icon_add(obj);
elm_icon_file_set(ic, emusic_config_theme_get(), "icon/mp_shuffle_off");
bt = elm_button_add(obj);
evas_object_smart_callback_add(bt, "clicked", _button_clicked_shuffle_cb, em);
elm_button_icon_set(bt, ic);
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_show(ic);
sd->shuffle_btn = bt;
edje_object_part_swallow(obj, "box.swallow", box);
evas_object_show(box);
return TRUE;
}
开发者ID:mink365,项目名称:e_music,代码行数:58,代码来源:emusic_playlist_ctl.c
示例17: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg, *bx, *notify, *content;
win = elm_win_util_standard_add("notify", "Notify");
elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_FALSE);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
evas_object_show(bx);
content = elm_label_add(win);
elm_object_text_set(content, "default");
evas_object_show(content);
notify = elm_notify_add(win);
elm_notify_allow_events_set(notify, EINA_FALSE);
elm_notify_timeout_set(notify, 5);
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);
evas_object_smart_callback_add(notify, "block,clicked", _hide, NULL);
content = elm_label_add(win);
elm_object_text_set(content, "bottom");
evas_object_show(content);
notify = elm_notify_add(win);
elm_notify_align_set(notify, 0.5, 1.0);
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);
content = elm_label_add(win);
elm_object_text_set(content, "center");
evas_object_show(content);
notify = elm_notify_add(win);
elm_notify_align_set(notify, 0.5, 0.5);
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);
evas_object_resize(win, 100, 200);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:wjhendr,项目名称:enlightenment,代码行数:58,代码来源:notify_example_01.c
示例18: create_main_win
void
create_main_win(void)
{
Evas_Object *win, *bg, *bx, *sc, *tb, *ic;
Elm_Object_Item *tbi;
win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
elm_win_title_set(win, "Messages");
evas_object_smart_callback_add(win, "delete,request", on_win_del_req, NULL);
window = win;
bg = elm_bg_add(win);
evas_object_size_hint_weight_set(bg, 1.0, 1.0);
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, 1.0, 1.0);
evas_object_size_hint_align_set(bx, -1.0, -1.0);
elm_win_resize_object_add(win, bx);
box = bx;
tb = elm_toolbar_add(win);
evas_object_size_hint_weight_set(tb, 1.0, 0.0);
evas_object_size_hint_align_set(tb, -1.0, -1.0);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "edit");
elm_toolbar_item_append(tb, ic, "Write", on_write, NULL);
evas_object_show(ic);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "clock");
tbi = elm_toolbar_item_append(tb, ic, "Recent", on_recent, NULL);
evas_object_show(ic);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "chat");
elm_toolbar_item_append(tb, ic, "Chats", on_chats, NULL);
evas_object_show(ic);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "delete");
elm_toolbar_item_append(tb, ic, "Trash", on_trash, NULL);
evas_object_show(ic);
elm_box_pack_end(bx, tb);
evas_object_show(tb);
elm_toolbar_item_selected_set(tbi, EINA_TRUE);
evas_object_show(bx);
evas_object_resize(win, 240, 280);
evas_object_show(win);
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:56,代码来源:list.c
示例19: elm_main
EAPI_MAIN int
elm_main(int argc, char *argv[])
{
Evas_Object *win, *bg, *bx, *datetime;
win = elm_win_add(NULL, "Datetime", ELM_WIN_BASIC);
elm_win_title_set(win, "Datetime");
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
elm_box_horizontal_set(bx, EINA_FALSE);
evas_object_show(bx);
evas_object_size_hint_min_set(bx, 360, 200);
//datetime showing only DATE
datetime = elm_datetime_add(bx);
evas_object_size_hint_weight_set(datetime, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(datetime, EVAS_HINT_FILL, 0.5);
elm_datetime_field_visible_set(datetime, ELM_DATETIME_HOUR, EINA_FALSE);
elm_datetime_field_visible_set(datetime, ELM_DATETIME_MINUTE, EINA_FALSE);
elm_datetime_field_visible_set(datetime, ELM_DATETIME_AMPM, EINA_FALSE);
elm_box_pack_end(bx, datetime);
evas_object_show(datetime);
//datetime showing only TIME
datetime = elm_datetime_add(bx);
evas_object_size_hint_weight_set(datetime, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(datetime, EVAS_HINT_FILL, 0.5);
elm_datetime_field_visible_set(datetime, ELM_DATETIME_YEAR, EINA_FALSE);
elm_datetime_field_visible_set(datetime, ELM_DATETIME_MONTH, EINA_FALSE);
elm_datetime_field_visible_set(datetime, ELM_DATETIME_DATE, EINA_FALSE);
elm_box_pack_end(bx, datetime);
evas_object_show(datetime);
//datetime showing both DATE and TIME
datetime = elm_datetime_add(bx);
evas_object_size_hint_weight_set(datetime, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(datetime, EVAS_HINT_FILL, 0.5);
elm_box_pack_end(bx, datetime);
evas_object_show(datetime);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:TizenChameleon,项目名称:uifw-elementary,代码行数:55,代码来源:datetime_example.c
示例20: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg, *box;
Evas_Object *list;
win = elm_win_add(NULL, "icon", ELM_WIN_BASIC);
elm_win_title_set(win, "Icon");
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_win_autodel_set(win, EINA_TRUE);
bg = elm_bg_add(win);
elm_bg_color_set(bg, 255,255 ,255);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
box = elm_box_add(win);
elm_box_horizontal_set(box, EINA_TRUE);
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_win_resize_object_add(win, box);
evas_object_show(box);
if (!_itc)
{
_itc = elm_genlist_item_class_new();
_itc->item_style = "double_label";
_itc->func.text_get = _item_label_get;
_itc->func.content_get = _item_content_get;
_itc->func.state_get = NULL;
_itc->func.del = NULL;
}
list = _genlist_add(box);
_genlist_fill(list);
list = _genlist_add(box);
elm_genlist_mode_set(list, ELM_LIST_LIMIT);
_genlist_fill(list);
list = _genlist_add(box);
elm_genlist_mode_set(list, ELM_LIST_COMPRESS);
_genlist_fill(list);
evas_object_size_hint_min_set(bg, 800, 160);
evas_object_size_hint_max_set(bg, 800, 640);
evas_object_resize(win, 800, 320);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:TizenChameleon,项目名称:uifw-elementary,代码行数:55,代码来源:genlist_example_03.c
注:本文中的elm_box_add函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论