• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ elm_object_text_set函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中elm_object_text_set函数的典型用法代码示例。如果您正苦于以下问题:C++ elm_object_text_set函数的具体用法?C++ elm_object_text_set怎么用?C++ elm_object_text_set使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了elm_object_text_set函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _connect_button_click_cb

void _connect_button_click_cb(void *data, Evas_Object *connect_button, void *ev) {
   int check = -1;
   //int autoCheck =0;
   char ip_final[16] = { 0, };

   ipEntry_1 = elm_entry_entry_get(ipEntry1);
   ipEntry_2 = elm_entry_entry_get(ipEntry2);
   ipEntry_3 = elm_entry_entry_get(ipEntry3);
   ipEntry_4 = elm_entry_entry_get(ipEntry4);

   strcpy(ip_final, ipEntry_1);
   strcat(ip_final, ".");
   strcat(ip_final, ipEntry_2);
   strcat(ip_final, ".");
   strcat(ip_final, ipEntry_3);
   strcat(ip_final, ".");
   strcat(ip_final, ipEntry_4);

   port_final = elm_entry_entry_get(portEntry);

   //dlog_print(DLOG_DEBUG, "IP", ip_final);
   //dlog_print(DLOG_DEBUG, "PORT", port_final);

   check = inputIP(&ip_final);
   initiate();

   if(check == 2){
      elm_object_text_set(connect_button, "Connected");
   }

   remote_control_cb(1);

}
开发者ID:kcassia,项目名称:pHClient,代码行数:33,代码来源:connection.c


示例2: utils_edit_area_image_add

void utils_edit_area_image_add(void *data, Evas_Object *obj, void *event_info)
{
    if(eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_CUSTOM_AREA
            && eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_THEME_AREA)
        return ;

    Evas_Object *inwin, *fs, *fr;

    setlocale(LC_ALL, "");

    inwin = elm_win_inwin_add(win);
    evas_object_show(inwin);

    fr = elm_frame_add(inwin);
    elm_win_inwin_content_set(inwin, fr);
    elm_object_text_set(fr, D_("Select an image"));

    fs = elm_fileselector_add(win);
    elm_fileselector_expandable_set(fs, EINA_FALSE);
    elm_fileselector_path_set(fs, getenv("HOME"));
    evas_object_size_hint_weight_set(fs, 1.0, 1.0);
    elm_object_content_set(fr, fs);
    evas_object_show(fs);
    evas_object_smart_callback_add(fs, "done", _utils_edit_area_image_add_cb, inwin);
}
开发者ID:Limsik,项目名称:e17,代码行数:25,代码来源:slide_utils.c


示例3: CLK_FUN_BEG

/**
* send
* This function is  used to create button
* @param           parent       pointer to Evas object, as the  parent
* @param           label        string for  title
* @param           icon_path    string for  icon path
* @param           cb           as cb when get signle "clicked"
* @param           cb_data      as cb'data
* @param           style        as style
* @return          when success, return a pointer to evas object, or return NULL
* @exception
*/
Evas_Object *widget_create_button(Evas_Object * parent, char *style,
				  const char *label, const char *icon_path,
				  EO_SMART_CB cb, void *cb_data)
{
	Evas_Object *ret = NULL;
	Evas_Object *icon = NULL;
	int nErr = SUCCESS;
	CLK_FUN_BEG();
	ret = elm_button_add(parent);
	CLK_RETVM_IF(!ret, NULL, "elm_button_add error!");
	elm_object_style_set(ret, style);
	evas_object_size_hint_weight_set(ret, EVAS_HINT_EXPAND,
					 EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(ret, EVAS_HINT_FILL, 0.5);
	if (icon_path) {
		icon = widget_create_icon(parent, icon_path);
	}
	if (label) {
		elm_object_text_set(ret, label);
	}
	if (icon) {
		elm_object_part_content_set(ret, "icon", icon);
	}
	if (cb && cb_data) {
		evas_object_smart_callback_add(ret, "clicked", cb, cb_data);
	}
	evas_object_show(ret);
 End:
	CLK_FUN_END();
	return ret;
}
开发者ID:ysdafa,项目名称:test,代码行数:43,代码来源:noa_fwk_widget.c


示例4: btn_extension_click_cb

static void
btn_extension_click_cb(void *data, Evas_Object *btn, void *ev)
{
   const char *lbl = elm_object_text_get(btn);

   if (!strncmp(lbl, "Load", 4))
     {
        elm_theme_extension_add(NULL, "./theme_example.edj");
        elm_object_text_set(btn, "Unload extension");
     }
   else if (!strncmp(lbl, "Unload", 6))
     {
        elm_theme_extension_del(NULL, "./theme_example.edj");
        elm_object_text_set(btn, "Load extension");
     }
}
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:16,代码来源:theme_example_01.c


示例5: elm_main

EAPI_MAIN int
elm_main(int argc, char **argv) {
	Evas_Object *win = NULL;
	Evas_Object *dayselector = NULL;

	win = elm_win_add(NULL, "dayselector sample", ELM_WIN_BASIC);
	elm_win_title_set(win, "dayselector sample");
	elm_win_autodel_set(win, EINA_TRUE);
	elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

	dayselector = elm_dayselector_add(win);
	elm_object_text_set(dayselector, "DaySelector!");

	request_init();

	evas_object_smart_callback_add(win, "focus,in", _register_cb, dayselector);

	register_request_listener(EVENT_RESIZE, resize, dayselector);
	register_request_listener(EVENT_SET_DISABLED, set_disabled, dayselector);
	register_request_listener(EVENT_SET_ENABLED, set_enabled, dayselector);
	register_request_listener(EVENT_HIDE, hide, dayselector);
	register_request_listener(EVENT_SHOW, show, dayselector);

	evas_object_resize(win, 380, 80);
	evas_object_resize(dayselector, 120, 40);
	evas_object_move(dayselector, 30, 15);

	evas_object_show(win);
	evas_object_show(dayselector);

	elm_run();
	request_shutdown();
	elm_shutdown();
	return 0;
}
开发者ID:loleksak,项目名称:eail-its,代码行数:35,代码来源:dayselector.c


示例6: START_TEST

END_TEST

START_TEST (elm_entry_atspi_text_string_get_line)
{
   Evas_Object *win, *entry;
   char *val;
   int start, end;

   const char *txt = "Lorem ipśum<br>   dolor sit amęt";

   elm_init(1, NULL);
   win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);

   entry = elm_entry_add(win);
   evas_object_resize(entry, 500, 500);

   elm_object_text_set(entry, txt);

   start = 1;
   eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_LINE, &start, &end));

   ck_assert_str_eq(val, "Lorem ipśum");
   ck_assert(start == 0);
   ck_assert(end == 11);
   if (val) free(val);

   start = 13;
   eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_LINE, &start, &end));
   ck_assert_str_eq(val, "   dolor sit amęt");
   ck_assert(start == 12);
   ck_assert(end == 29);
   if (val) free(val);

   elm_shutdown();
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:35,代码来源:elm_test_entry.c


示例7: _profile_changed_signal_cb

static void
_profile_changed_signal_cb(void *userdata, const char *profile)
{
	/*FIXME: I should probably free this profile, but how?, CHECK DBUS*/
	(void) userdata;
	elm_object_text_set(view.profiles_combo, profile);
}
开发者ID:shr-project,项目名称:libphone-ui-shr,代码行数:7,代码来源:quick-settings-view.c


示例8: _fn_pb_timer_bar

static Eina_Bool _fn_pb_timer_bar(void *data)
{
	pswd_popup_t *pswd_popup_data = (pswd_popup_t *)data;
	pbc_popup_t *pbc_popup_data = pswd_popup_data->pbc_popup_data;
	if (!pbc_popup_data || pbc_popup_data->timer == NULL || pbc_popup_data->progressbar == NULL) {
		return ECORE_CALLBACK_CANCEL;
	}
	const double diff = (double)1/(double)MAX_PBC_TIMEOUT_SECS;
	pbc_popup_data->value = elm_progressbar_value_get(pbc_popup_data->progressbar);
	pbc_popup_data->value += diff;
	if (pbc_popup_data->value >= 1) {
		if (pbc_popup_data->checker == 0) {
			__COMMON_FUNC_ENTER__;
			common_utils_show_info_timeout_popup(pswd_popup_data->win, PBC_TIMEOUT_MSG_STR, 3.0f);
			Evas_Object *cancel_btn = elm_object_part_content_get(pbc_popup_data->popup, "button1");
			evas_object_smart_callback_call(cancel_btn, "clicked", NULL);
			__COMMON_FUNC_EXIT__;
		}
		return ECORE_CALLBACK_CANCEL;
	}

	int remain_mins = (int)(MAX_PBC_TIMEOUT_SECS * (1 - pbc_popup_data->value));
	int remain_secs = 0;
	remain_secs = remain_mins % 60;
	remain_mins /= 60;

	char *remaining_time_str = g_strdup_printf("<font_size=40><align=center>%02d:%02d</align></font_size>", remain_mins, remain_secs);
	elm_object_text_set(pbc_popup_data->timer_label, remaining_time_str);
	//INFO_LOG(UG_NAME_NORMAL, "pbc_popup_data->value = %lf; remain_mins = %d; remain_secs = %d; remaining_time_str = %s", pbc_popup_data->value, remain_mins, remain_secs, remaining_time_str);
	g_free(remaining_time_str);

	elm_progressbar_value_set(pbc_popup_data->progressbar, pbc_popup_data->value);

	return ECORE_CALLBACK_RENEW;
}
开发者ID:tizenorg,项目名称:apps.core.preloaded.ug-wifi-efl,代码行数:35,代码来源:common_pswd_popup.c


示例9: create_base_gui

static void
create_base_gui(appdata_s *ad)
{
	/* Window */
	ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE);
	elm_win_autodel_set(ad->win, EINA_TRUE);

	if (elm_win_wm_rotation_supported_get(ad->win)) {
		int rots[4] = { 0, 90, 180, 270 };
		elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4);
	}

	evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL);
	eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad);

	/* Conformant */
	ad->conform = elm_conformant_add(ad->win);
	elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW);
	elm_win_indicator_opacity_set(ad->win, ELM_WIN_INDICATOR_OPAQUE);
	evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_win_resize_object_add(ad->win, ad->conform);
	evas_object_show(ad->conform);

	/* Label */
	ad->label = elm_label_add(ad->conform);
	elm_object_text_set(ad->label, "<align=center>Hello EFL</align>");
	evas_object_size_hint_weight_set(ad->label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_object_content_set(ad->conform, ad->label);

	/* Show window after base gui is set up */
	evas_object_show(ad->win);
}
开发者ID:seiwin92,项目名称:tizenTunner,代码行数:32,代码来源:tizentunner.c


示例10: enna_browser_bar_file_set

void
enna_browser_bar_file_set(Evas_Object *obj, Enna_File *file)
{
   Evas_Object *o_entry = evas_object_data_get(obj, "entry");

   elm_object_text_set(o_entry, file->mrl);
}
开发者ID:gzorin,项目名称:e17,代码行数:7,代码来源:browser_bar.c


示例11: _init_label

static void
_init_label(Evas_Object *win)
{
   Evas_Object *bg, *label;

   bg = elm_bg_add(win);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bg);
   evas_object_show(bg);

   label = elm_label_add(win);
   elm_object_text_set(label, "Lorem ipsum dolor sit amet, consectetur adipisicing elit,"
                       "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
                       "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris"
                       "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in"
                       "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla"
                       "pariatur. Excepteur sint occaecat cupidatat non proident, sunt"
                       "in culpa qui officia deserunt mollit anim id est laborum.");
   elm_label_line_wrap_set(label, ELM_WRAP_WORD);
   evas_object_resize(label, 200, 170);
   evas_object_move(label, 0, 0);
   evas_object_show(label);

   evas_object_resize(win, 200, 320);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:25,代码来源:eail_label_test.c


示例12: contact_list_add

void
contact_list_add(struct ContactListData *list_data)
{
	Evas_Object *win;
	win = ui_utils_view_window_get(list_data->view);
	list_data->index = NULL;
	list_data->list = elm_genlist_add(win);
	elm_genlist_mode_set(list_data->list, ELM_LIST_LIMIT);
	elm_genlist_longpress_timeout_set(list_data->list, 0.5);
	//elm_genlist_multi_select_set(list_data->list, EINA_TRUE);
	evas_object_size_hint_align_set(list_data->list, 0.0, 0.0);
	elm_object_scale_set(list_data->list, 1.0);
	itc.item_style = "contact";
	itc.func.text_get = gl_text_get;
	itc.func.content_get = gl_content_get;
	itc.func.state_get = NULL;
	itc.func.del = gl_del;
	evas_object_show(list_data->list);
	if (list_data->layout) {
		elm_object_part_content_set(list_data->layout, "contacts_list",
				list_data->list);
	}
	list_data->progress = elm_progressbar_add(win);
	elm_object_style_set(list_data->progress, "wheel");
	elm_object_text_set(list_data->progress, D_("Loading..."));
	evas_object_size_hint_align_set(list_data->progress, EVAS_HINT_FILL, 0.5);
	evas_object_size_hint_weight_set(list_data->progress, EVAS_HINT_EXPAND,
	                                 EVAS_HINT_EXPAND);
	elm_object_part_content_set(list_data->layout, "loading_indicator", list_data->progress);
	evas_object_show(list_data->progress);
}
开发者ID:shr-project,项目名称:libphone-ui-shr,代码行数:31,代码来源:contact-list-common.c


示例13: elm_button_add

static Evas_Object *_gl_hidden_btn_content_get(void *data, Evas_Object *obj, const char *part)
{
	Evas_Object *find_hidden_ap_btn = elm_button_add(obj);
	elm_object_text_set(find_hidden_ap_btn, sc(PACKAGE, I18N_TYPE_Find_Hidden_Network));

	return find_hidden_ap_btn;
}
开发者ID:tizenorg,项目名称:apps.core.preloaded.ug-wifi-efl,代码行数:7,代码来源:viewer_manager.c


示例14: 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


示例15: elm_main

EAPI_MAIN int
elm_main(int argc, char **argv) {
	Evas_Object *map = NULL;
	Evas_Object *bg = NULL;
	Evas_Object *icon = NULL;
	Elm_Map_Overlay *item =  NULL;

	win = elm_win_add(NULL, "Main Window", ELM_WIN_BASIC);
	elm_win_title_set(win, "Hello, My World Map!");
	elm_win_autodel_set(win, EINA_TRUE);
	elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

	bg = elm_bg_add(win);
	evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_win_resize_object_add(win, bg);
	evas_object_show(bg);

	map = elm_map_add(win);
	evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_win_resize_object_add(win, map);
	evas_object_show(map);

	icon = elm_icon_add(win);
	elm_object_text_set(icon, "Icon1");
	elm_icon_standard_set(icon, "home");

	item = elm_map_overlay_add(map,21.009865, 52.224855);
	elm_map_overlay_icon_set(item, icon);

	evas_object_smart_callback_add(win, "focus,in", _register_cb, map);

	register_request_listener(EVENT_SET_FOCUS, set_focus, map);
	register_request_listener(EVENT_UNSET_FOCUS, unset_focus, map);
	register_request_listener(EVENT_SET_FOCUSABLE, set_focusable, map);
	register_request_listener(EVENT_UNSET_FOCUSABLE, unset_focusable, map);
	register_request_listener(EVENT_ADD_CHILDREN, add_children,map);
	register_request_listener(EVENT_RM_CHILDREN, rm_children,item);
	register_request_listener(EVENT_HIDE, hide, map);
	register_request_listener(EVENT_SHOW, show, map);

	register_request_listener(ACTION_ZOOM_IN, register_action_zoom_in, map);
	register_request_listener(ACTION_ZOOM_OUT, register_action_zoom_out, map);
	register_request_listener(ACTION_SCROLL_LEFT, register_action_scroll_left, map);
	register_request_listener(ACTION_SCROLL_RIGHT, register_action_scroll_right, map);
	register_request_listener(ACTION_SCROLL_UP, register_action_scroll_up, map);
	register_request_listener(ACTION_SCROLL_DOWN, register_action_scroll_down, map);
	register_request_listener(ACTION_CLICK, register_action_click, map);
	register_request_listener(ACTION_PRESS, register_action_press, map);

	elm_map_zoom_set(map, 2);

	evas_object_resize(win, 800, 800);
	evas_object_show(win);

	elm_run();
	request_shutdown();
	elm_shutdown();
	return 0;
}
开发者ID:loleksak,项目名称:eail-its,代码行数:59,代码来源:map.c


示例16: _init_panes

static void
_init_panes(Evas_Object *win)
{
   Evas_Object *bg, *panes, *panes_h, *bt;

   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);
   elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
   evas_object_show(bg);

   panes = elm_panes_add(win);
   elm_win_resize_object_add(win, panes);
   evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(panes, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(panes);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Left");
   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);
   evas_object_show(bt);
   elm_object_part_content_set(panes, "left", bt);

   panes_h = elm_panes_add(win);
   elm_panes_horizontal_set(panes_h, EINA_TRUE);
   evas_object_size_hint_weight_set(panes_h, EVAS_HINT_EXPAND,
                                    EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(panes_h, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(panes_h);
   elm_object_part_content_set(panes, "right", panes_h);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Up");
   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);
   evas_object_show(bt);
   elm_object_part_content_set(panes_h, "left", bt);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Down");
   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);
   evas_object_show(bt);
   elm_object_part_content_set(panes_h, "right", bt);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:46,代码来源:eail_panes_test.c


示例17: elm_main

int
elm_main(int argc, char **argv)
{
	Evas_Object *win, *box, *lab, *btn;

	// new window - do the usual and give it a name (hello) and title (Hello)
	win = elm_win_util_standard_add("hello", "Hello");
	// when the user clicks "close" on a window there is a request to delete
	evas_object_smart_callback_add(win, "delete,request", on_done, NULL);

	// add a box object - default is vertical. a box holds children in a row,
	// either horizontally or vertically. nothing more.
	box = elm_box_add(win);
	// make the box horizontal
	elm_box_horizontal_set(box, EINA_TRUE);
	// add object as a resize object for the window (controls window minimum
	// size as well as gets resized if window is resized)
	elm_win_resize_object_add(win, box);
	evas_object_show(box);

	// add a label widget, set the text and put it in the pad frame
	lab = elm_label_add(win);
	// set default text of the label
	elm_object_text_set(lab, "Hello out there world!");
	// pack the label at the end of the box
	elm_box_pack_end(box, lab);
	evas_object_show(lab);

	// add an ok button
	btn = elm_button_add(win);
	// set default text of button to "OK"
	elm_object_text_set(btn, "OK");
	// pack the button at the end of the box
	elm_box_pack_end(box, btn);
	evas_object_show(btn);
	// call on_done when button is clicked
	evas_object_smart_callback_add(btn, "clicked", on_done, NULL);

	// now we are done, show the window
	evas_object_show(win);

	// run the mainloop and process events and callbacks
	elm_run();
	elm_shutdown();
	return 0;
}
开发者ID:caivega,项目名称:efl_helloworld,代码行数:46,代码来源:main.c


示例18: set_api_state

static void
set_api_state(api_data *api)
{
   const Eina_List *items = elm_box_children_get(api->box);
   if (!eina_list_count(items))
     return;

   /* use elm_box_children_get() to get list of children */
   switch(api->state)
     { /* Put all api-changes under switch */
      case HOVERSEL_HORIZ:  /* Make first hover horiz (0) */
         elm_hoversel_horizontal_set(eina_list_nth(items, 0), EINA_TRUE);
         elm_hoversel_hover_begin(eina_list_nth(items, 0));
         break;

      case HOVERSEL_END:  /* Make first hover horiz (1) */
         elm_hoversel_hover_begin(eina_list_nth(items, 1));
         elm_hoversel_hover_end(eina_list_nth(items, 1));
         break;

      case HOVERSEL_LABAL_SET: /* set second hover label (2) */
         elm_object_text_set(eina_list_nth(items, 1), "Label from API");
         break;

      case HOVERSEL_ICON_UNSET: /* 3 */
         elm_object_text_set(eina_list_nth(items, 5), "Label only");
         elm_object_part_content_unset(eina_list_nth(items, 5), "icon");
         break;

      case HOVERSEL_CLEAR_OPEN: /* 4 */
         elm_hoversel_hover_begin(eina_list_nth(items, 1));
         elm_hoversel_clear(eina_list_nth(items, 1));
         break;

      case HOVERSEL_CLEAR: /* 5 */
         elm_hoversel_clear(eina_list_nth(items, 0));
         break;

      case API_STATE_LAST:
         break;

      default:
         return;
     }
}
开发者ID:Limsik,项目名称:e17,代码行数:45,代码来源:test_hoversel.c


示例19: elm_main

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *bubble, *label, *icon;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("bubble", "Bubble");
   elm_win_autodel_set(win, EINA_TRUE);

   label = elm_label_add(win);
   elm_object_text_set(label, "This is the CONTENT of our bubble");
   evas_object_show(label);

   icon = evas_object_rectangle_add(evas_object_evas_get(win));
   evas_object_color_set(icon, 0, 0, 255, 255);
   evas_object_show(icon);

   bubble = elm_bubble_add(win);
   elm_object_part_content_set(bubble, "icon", icon);
   elm_object_part_text_set(bubble, "info", "INFO");
   elm_object_text_set(bubble, "LABEL");
   elm_object_content_set(bubble, label);
   evas_object_resize(bubble, 300, 100);
   evas_object_show(bubble);

   evas_object_smart_callback_add(bubble, "clicked", _bla, NULL);

   label = elm_label_add(win);
   elm_object_text_set(label, "Bubble with no icon, info or label");
   evas_object_show(label);

   bubble = elm_bubble_add(win);
   elm_object_content_set(bubble, label);
   evas_object_resize(bubble, 200, 50);
   evas_object_move(bubble, 0, 110);
   evas_object_show(bubble);

   evas_object_resize(win, 300, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:45,代码来源:bubble_example_01.c


示例20: _set_list_title

static void
_set_list_title (
        Evas_Object *obj,
        Elm_Object_Item *item)
{
    if (item && obj) {
        elm_object_text_set(obj, elm_object_item_text_get(item));
    }
}
开发者ID:avalluri,项目名称:tlm,代码行数:9,代码来源:tlm-ui.c



注:本文中的elm_object_text_set函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ elm_policy_set函数代码示例发布时间:2022-05-30
下一篇:
C++ elm_object_style_set函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap