1 #include <Elementary.h>
3 # include "elementary_config.h"
5 #ifndef ELM_LIB_QUICKLAUNCH
7 my_entry_bt_1(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
9 Evas_Object *en = data;
10 elm_entry_entry_set(en, "");
14 my_entry_bt_2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
16 Evas_Object *en = data;
17 const char *s = elm_entry_entry_get(en);
19 if (s) printf("%s\n", s);
20 printf("ENTRY PLAIN UTF8:\n");
23 s = elm_entry_markup_to_utf8(s);
33 my_entry_bt_3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
35 Evas_Object *en = data;
36 const char *s = elm_entry_selection_get(en);
37 printf("SELECTION:\n");
38 if (s) printf("%s\n", s);
39 printf("SELECTION PLAIN UTF8:\n");
42 s = elm_entry_markup_to_utf8(s);
52 my_entry_bt_4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
54 Evas_Object *en = data;
55 elm_entry_entry_insert(en, "Insert some <b>BOLD</> text");
59 test_entry(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
61 Evas_Object *win, *bg, *bx, *bx2, *bt, *en;
64 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
65 elm_win_title_set(win, "Entry");
66 elm_win_autodel_set(win, 1);
69 elm_win_resize_object_add(win, bg);
70 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
73 bx = elm_box_add(win);
74 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
75 elm_win_resize_object_add(win, bx);
78 en = elm_entry_add(win);
79 elm_entry_line_wrap_set(en, 0);
80 snprintf(buf, sizeof(buf),
81 "This is an entry widget in this window that<br>"
82 "uses markup <b>like this</> for styling and<br>"
83 "formatting <em>like this</>, as well as<br>"
84 "<a href=X><link>links in the text</></a>, so enter text<br>"
85 "in here to edit it. By the way, links are<br>"
86 "called <a href=anc-02>Anchors</a> so you will need<br>"
87 "to refer to them this way.<br>"
90 "Also you can stick in items with (relsize + ascent): "
91 "<item relsize=16x16 vsize=ascent href=emoticon/evil-laugh></item>"
93 "<item relsize=16x16 vsize=full href=emoticon/guilty-smile></item>"
96 "Also (size + ascent): "
97 "<item size=16x16 vsize=ascent href=emoticon/haha></item>"
99 "<item size=16x16 vsize=full href=emoticon/happy-panting></item>"
102 "And as well (absize + ascent): "
103 "<item absize=64x64 vsize=ascent href=emoticon/knowing-grin></item>"
105 "<item absize=64x64 vsize=full href=emoticon/not-impressed></item>"
106 " or even paths to image files on disk too like: "
107 "<item absize=96x128 vsize=full href=file://%s/images/sky_01.jpg></item>"
111 elm_entry_entry_set(en, buf);
112 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
113 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
114 elm_box_pack_end(bx, en);
115 evas_object_show(en);
117 bx2 = elm_box_add(win);
118 elm_box_horizontal_set(bx2, 1);
119 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
120 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
122 bt = elm_button_add(win);
123 elm_button_label_set(bt, "Clear");
124 evas_object_smart_callback_add(bt, "clicked", my_entry_bt_1, en);
125 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
126 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
127 elm_box_pack_end(bx2, bt);
128 evas_object_propagate_events_set(bt, 0);
129 elm_object_focus_allow_set(bt, 0);
130 evas_object_show(bt);
132 bt = elm_button_add(win);
133 elm_button_label_set(bt, "Print");
134 evas_object_smart_callback_add(bt, "clicked", my_entry_bt_2, en);
135 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
136 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
137 elm_box_pack_end(bx2, bt);
138 evas_object_propagate_events_set(bt, 0);
139 elm_object_focus_allow_set(bt, 0);
140 evas_object_show(bt);
142 bt = elm_button_add(win);
143 elm_button_label_set(bt, "Selection");
144 evas_object_smart_callback_add(bt, "clicked", my_entry_bt_3, en);
145 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
146 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
147 elm_box_pack_end(bx2, bt);
148 evas_object_propagate_events_set(bt, 0);
149 elm_object_focus_allow_set(bt, 0);
150 evas_object_show(bt);
152 bt = elm_button_add(win);
153 elm_button_label_set(bt, "Insert");
154 evas_object_smart_callback_add(bt, "clicked", my_entry_bt_4, en);
155 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
156 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
157 elm_box_pack_end(bx2, bt);
158 evas_object_propagate_events_set(bt, 0);
159 elm_object_focus_allow_set(bt, 0);
160 evas_object_show(bt);
162 elm_box_pack_end(bx, bx2);
163 evas_object_show(bx2);
165 elm_object_focus(en);
166 evas_object_show(win);
170 my_scrolled_entry_bt_1(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
172 Evas_Object *en = data;
173 elm_scrolled_entry_entry_set(en, "");
177 my_scrolled_entry_bt_2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
179 Evas_Object *en = data;
180 const char *s = elm_scrolled_entry_entry_get(en);
182 if (s) printf("%s\n", s);
183 printf("ENTRY PLAIN UTF8:\n");
186 s = elm_entry_markup_to_utf8(s);
196 my_scrolled_entry_bt_3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
198 Evas_Object *en = data;
199 const char *s = elm_scrolled_entry_selection_get(en);
200 printf("SELECTION:\n");
201 if (s) printf("%s\n", s);
202 printf("SELECTION PLAIN UTF8:\n");
205 s = elm_entry_markup_to_utf8(s);
215 my_scrolled_entry_bt_4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
217 Evas_Object *en = data;
218 elm_scrolled_entry_entry_insert(en, "Insert some <b>BOLD</> text");
222 my_scrolled_entry_bt_5(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
224 Evas_Object *en = data;
225 const char *s = elm_scrolled_entry_entry_get(en);
226 printf("PASSWORD: '%s'\n", s ? s : "");
230 scrolled_anchor_test(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
232 Evas_Object *en = data;
233 elm_scrolled_entry_entry_insert(en, "ANCHOR CLICKED");
237 test_entry_scrolled(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
239 Evas_Object *win, *bg, *bx, *bx2, *bt, *en, *en_p, *sp;
240 static Elm_Entry_Filter_Accept_Set digits_filter_data, digits_filter_data2;
241 static Elm_Entry_Filter_Limit_Size limit_filter_data, limit_filter_data2;
243 win = elm_win_add(NULL, "entry-scrolled", ELM_WIN_BASIC);
244 elm_win_title_set(win, "Entry Scrolled");
245 elm_win_autodel_set(win, 1);
247 bg = elm_bg_add(win);
248 elm_win_resize_object_add(win, bg);
249 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
250 evas_object_show(bg);
252 bx = elm_box_add(win);
253 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
254 elm_win_resize_object_add(win, bx);
255 evas_object_show(bx);
258 en = elm_scrolled_entry_add(win);
259 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
260 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
261 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
262 elm_scrolled_entry_entry_set(en, "Disabled entry");
263 elm_scrolled_entry_single_line_set(en, 1);
264 elm_object_disabled_set(en, 1);
265 evas_object_show(en);
266 elm_box_pack_end(bx, en);
269 en = elm_scrolled_entry_add(win);
270 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
271 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
272 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
273 elm_scrolled_entry_password_set(en, 1);
274 elm_scrolled_entry_single_line_set(en, 1);
275 elm_scrolled_entry_entry_set(en, "Access denied, give up!");
276 elm_object_disabled_set(en, 1);
277 evas_object_show(en);
278 elm_box_pack_end(bx, en);
280 /* multi-line disable entry */
281 en = elm_scrolled_entry_add(win);
282 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
283 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
284 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
285 elm_object_disabled_set(en, 1);
286 elm_scrolled_entry_context_menu_item_add(en, "Hello", NULL, ELM_ICON_NONE, NULL, NULL);
287 elm_scrolled_entry_context_menu_item_add(en, "World", NULL, ELM_ICON_NONE, NULL, NULL);
288 elm_scrolled_entry_entry_set(en,
289 "Multi-line disabled entry widget :)<br>"
290 "We can use markup <b>like this</> for styling and<br>"
291 "formatting <em>like this</>, as well as<br>"
292 "<a href=X><link>links in the text</></a>,"
293 "but it won't be editable or clickable.");
294 evas_object_show(en);
295 elm_box_pack_end(bx, en);
297 sp = elm_separator_add(win);
298 elm_separator_horizontal_set(sp, 1);
299 elm_box_pack_end(bx, sp);
300 evas_object_show(sp);
302 /* Single line selected entry */
303 en = elm_scrolled_entry_add(win);
304 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
305 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
306 elm_scrolled_entry_entry_set(en, "This is a single line");
307 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
308 elm_scrolled_entry_single_line_set(en, 1);
309 elm_scrolled_entry_select_all(en);
310 evas_object_show(en);
311 elm_box_pack_end(bx, en);
313 /* Only digits entry */
314 en = elm_scrolled_entry_add(win);
315 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
316 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
317 elm_scrolled_entry_entry_set(en, "01234");
318 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
319 elm_scrolled_entry_single_line_set(en, 1);
320 evas_object_show(en);
321 elm_box_pack_end(bx, en);
323 digits_filter_data.accepted = "0123456789";
324 digits_filter_data.rejected = NULL;
325 elm_scrolled_entry_text_filter_append(en, elm_entry_filter_accept_set, &digits_filter_data);
327 /* No digits entry */
328 en = elm_scrolled_entry_add(win);
329 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
330 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
331 elm_scrolled_entry_entry_set(en, "No numbers here");
332 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
333 elm_scrolled_entry_single_line_set(en, 1);
334 evas_object_show(en);
335 elm_box_pack_end(bx, en);
337 digits_filter_data2.accepted = NULL;
338 digits_filter_data2.rejected = "0123456789";
339 elm_scrolled_entry_text_filter_append(en, elm_entry_filter_accept_set, &digits_filter_data2);
341 /* Size limited entry */
342 en = elm_scrolled_entry_add(win);
343 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
344 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
345 elm_scrolled_entry_entry_set(en, "Just 20 chars");
346 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
347 elm_scrolled_entry_single_line_set(en, 1);
348 evas_object_show(en);
349 elm_box_pack_end(bx, en);
351 limit_filter_data.max_char_count = 20;
352 limit_filter_data.max_byte_count = 0;
353 elm_scrolled_entry_text_filter_append(en, elm_entry_filter_limit_size, &limit_filter_data);
355 /* Byte size limited entry */
356 en = elm_scrolled_entry_add(win);
357 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
358 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
359 elm_scrolled_entry_entry_set(en, "And now only 30 bytes");
360 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
361 elm_scrolled_entry_single_line_set(en, 1);
362 evas_object_show(en);
363 elm_box_pack_end(bx, en);
365 limit_filter_data2.max_char_count = 0;
366 limit_filter_data2.max_byte_count = 30;
367 elm_scrolled_entry_text_filter_append(en, elm_entry_filter_limit_size, &limit_filter_data2);
369 /* Single line password entry */
370 en_p = elm_scrolled_entry_add(win);
371 evas_object_size_hint_weight_set(en_p, EVAS_HINT_EXPAND, 0.0);
372 evas_object_size_hint_align_set(en_p, EVAS_HINT_FILL, 0.5);
373 elm_scrolled_entry_scrollbar_policy_set(en_p, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
374 elm_scrolled_entry_entry_set(en_p, "Password here");
375 elm_scrolled_entry_single_line_set(en_p, 1);
376 elm_scrolled_entry_password_set(en_p, 1);
377 evas_object_show(en_p);
378 elm_box_pack_end(bx, en_p);
380 /* scrolled entry with icon/end widgets*/
381 en = elm_scrolled_entry_add(win);
382 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
383 elm_scrolled_entry_single_line_set(en, 1);
384 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
385 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
386 bt = elm_icon_add(win);
387 elm_icon_standard_set(bt, "home");
388 evas_object_size_hint_min_set(bt, 48, 48);
389 evas_object_color_set(bt, 255, 0, 0, 128);
390 evas_object_show(bt);
391 elm_scrolled_entry_icon_set(en, bt);
392 bt = elm_icon_add(win);
393 elm_icon_standard_set(bt, "delete");
394 evas_object_color_set(bt, 255, 0, 0, 128);
395 evas_object_size_hint_min_set(bt, 48, 48);
396 evas_object_show(bt);
397 elm_scrolled_entry_end_set(en, bt);
398 elm_scrolled_entry_entry_set(en, "scrolled entry with icon and end objects");
399 evas_object_show(en);
400 elm_box_pack_end(bx, en);
402 /* markup scrolled entry */
403 en = elm_scrolled_entry_add(win);
404 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
405 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
406 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
407 elm_scrolled_entry_entry_set(en,
408 "This is an entry widget in this window that<br>"
409 "uses markup <b>like this</> for styling and<br>"
410 "formatting <em>like this</>, as well as<br>"
411 "<a href=X><link>links in the text</></a>, so enter text<br>"
412 "in here to edit it. By them way, links are<br>"
413 "called <a href=anc-02>Anchors</a> so you will need<br>"
414 "to refer to them this way. At the end here is a really long "
415 "line to test line wrapping to see if it works. But just in "
416 "case this line is not long enough I will add more here to "
417 "really test it out, as Elementary really needs some "
418 "good testing to see if entry widgets work as advertised.");
419 evas_object_smart_callback_add(en, "anchor,clicked", scrolled_anchor_test, en);
420 evas_object_show(en);
421 elm_box_pack_end(bx, en);
423 bx2 = elm_box_add(win);
424 elm_box_horizontal_set(bx2, 1);
425 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
426 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
428 bt = elm_button_add(win);
429 elm_button_label_set(bt, "Clear");
430 evas_object_smart_callback_add(bt, "clicked", my_scrolled_entry_bt_1, en);
431 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
432 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
433 elm_box_pack_end(bx2, bt);
434 evas_object_propagate_events_set(bt, 0);
435 elm_object_focus_allow_set(bt, 0);
436 evas_object_show(bt);
438 bt = elm_button_add(win);
439 elm_button_label_set(bt, "Print");
440 evas_object_smart_callback_add(bt, "clicked", my_scrolled_entry_bt_2, en);
441 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
442 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
443 elm_box_pack_end(bx2, bt);
444 evas_object_propagate_events_set(bt, 0);
445 elm_object_focus_allow_set(bt, 0);
446 evas_object_show(bt);
448 bt = elm_button_add(win);
449 elm_button_label_set(bt, "Print pwd");
450 evas_object_smart_callback_add(bt, "clicked", my_scrolled_entry_bt_5, en_p);
451 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
452 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
453 elm_box_pack_end(bx2, bt);
454 evas_object_propagate_events_set(bt, 0);
455 elm_object_focus_allow_set(bt, 0);
456 evas_object_show(bt);
458 bt = elm_button_add(win);
459 elm_button_label_set(bt, "Selection");
460 evas_object_smart_callback_add(bt, "clicked", my_scrolled_entry_bt_3, en);
461 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
462 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
463 elm_box_pack_end(bx2, bt);
464 evas_object_propagate_events_set(bt, 0);
465 elm_object_focus_allow_set(bt, 0);
466 evas_object_show(bt);
468 bt = elm_button_add(win);
469 elm_button_label_set(bt, "Insert");
470 evas_object_smart_callback_add(bt, "clicked", my_scrolled_entry_bt_4, en);
471 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
472 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
473 elm_box_pack_end(bx2, bt);
474 evas_object_propagate_events_set(bt, 0);
475 elm_object_focus_allow_set(bt, 0);
476 evas_object_show(bt);
478 elm_box_pack_end(bx, bx2);
479 evas_object_show(bx2);
481 evas_object_resize(win, 320, 300);
483 elm_object_focus(win);
484 evas_object_show(win);
488 my_ent_bt_clr(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
490 Evas_Object *en = data;
491 elm_scrolled_entry_entry_set(en, "");
495 my_ent_bt_pri(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
497 Evas_Object *en = data;
498 const char *s = elm_scrolled_entry_entry_get(en);
500 if (s) printf("%s\n", s);
501 printf("ENTRY PLAIN UTF8:\n");
504 s = elm_entry_markup_to_utf8(s);
514 my_ent_bt_sel(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
516 Evas_Object *en = data;
517 const char *s = elm_scrolled_entry_selection_get(en);
518 printf("SELECTION:\n");
519 if (s) printf("%s\n", s);
520 printf("SELECTION PLAIN UTF8:\n");
523 s = elm_entry_markup_to_utf8(s);
533 my_ent_bt_all(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
535 Evas_Object *en = data;
536 elm_scrolled_entry_select_all(en);
540 my_ent_bt_non(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
542 Evas_Object *en = data;
543 elm_scrolled_entry_select_none(en);
547 my_ent_bt_ins(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
549 Evas_Object *en = data;
550 elm_scrolled_entry_entry_insert(en, "Insert text");
554 my_ent_bt_lef(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
556 Evas_Object *en = data;
557 elm_scrolled_entry_cursor_prev(en);
561 my_ent_bt_rig(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
563 Evas_Object *en = data;
564 elm_scrolled_entry_cursor_next(en);
568 my_ent_bt_up_(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
570 Evas_Object *en = data;
571 elm_scrolled_entry_cursor_up(en);
575 my_ent_bt_dow(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
577 Evas_Object *en = data;
578 elm_scrolled_entry_cursor_down(en);
582 my_ent_bt_beg(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
584 Evas_Object *en = data;
585 elm_scrolled_entry_cursor_begin_set(en);
589 my_ent_bt_end(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
591 Evas_Object *en = data;
592 elm_scrolled_entry_cursor_end_set(en);
596 my_ent_bt_lbe(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
598 Evas_Object *en = data;
599 elm_scrolled_entry_cursor_line_begin_set(en);
603 my_ent_bt_len(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
605 Evas_Object *en = data;
606 elm_scrolled_entry_cursor_line_end_set(en);
610 my_ent_bt_sbe(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
612 Evas_Object *en = data;
613 elm_scrolled_entry_cursor_selection_begin(en);
617 my_ent_bt_sen(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
619 Evas_Object *en = data;
620 elm_scrolled_entry_cursor_selection_end(en);
624 my_ent_bt_fmt(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
626 Evas_Object *en = data;
627 printf("IS FORMAT: %i\n",
628 (int)elm_scrolled_entry_cursor_is_format_get(en));
632 my_ent_bt_vfm(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
634 Evas_Object *en = data;
635 printf("IS VISIBLE FORMAT %i\n",
636 (int)elm_scrolled_entry_cursor_is_visible_format_get(en));
640 my_ent_bt_chr(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
642 Evas_Object *en = data;
643 printf("CHAR '%s'\n", elm_scrolled_entry_cursor_content_get(en));
647 my_ent_bt_cut(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
649 Evas_Object *en = data;
650 elm_scrolled_entry_selection_cut(en);
654 my_ent_bt_cop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
656 Evas_Object *en = data;
657 elm_scrolled_entry_selection_copy(en);
661 my_ent_bt_pas(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
663 Evas_Object *en = data;
664 elm_scrolled_entry_selection_paste(en);
668 test_entry3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
670 Evas_Object *win, *bg, *bx, *bx2, *bt, *en;
672 win = elm_win_add(NULL, "entry3", ELM_WIN_BASIC);
673 elm_win_title_set(win, "Entry 3");
674 elm_win_autodel_set(win, 1);
676 bg = elm_bg_add(win);
677 elm_win_resize_object_add(win, bg);
678 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
679 evas_object_show(bg);
681 bx = elm_box_add(win);
682 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
683 elm_win_resize_object_add(win, bx);
684 evas_object_show(bx);
686 /* Single line selected entry */
687 en = elm_scrolled_entry_add(win);
688 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
689 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
690 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
691 elm_scrolled_entry_entry_set(en, "This is a single line");
692 elm_scrolled_entry_single_line_set(en, 1);
693 elm_box_pack_end(bx, en);
694 evas_object_show(en);
696 bx2 = elm_box_add(win);
697 elm_box_horizontal_set(bx2, 1);
698 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
699 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
701 bt = elm_button_add(win);
702 elm_button_label_set(bt, "Clr");
703 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_clr, en);
704 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
705 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
706 elm_box_pack_end(bx2, bt);
707 evas_object_propagate_events_set(bt, 0);
708 elm_object_focus_allow_set(bt, 0);
709 evas_object_show(bt);
711 bt = elm_button_add(win);
712 elm_button_label_set(bt, "Pri");
713 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_pri, en);
714 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
715 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
716 elm_box_pack_end(bx2, bt);
717 evas_object_propagate_events_set(bt, 0);
718 elm_object_focus_allow_set(bt, 0);
719 evas_object_show(bt);
721 bt = elm_button_add(win);
722 elm_button_label_set(bt, "Sel");
723 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sel, en);
724 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
725 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
726 elm_box_pack_end(bx2, bt);
727 evas_object_propagate_events_set(bt, 0);
728 elm_object_focus_allow_set(bt, 0);
729 evas_object_show(bt);
731 bt = elm_button_add(win);
732 elm_button_label_set(bt, "All");
733 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_all, en);
734 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
735 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
736 elm_box_pack_end(bx2, bt);
737 evas_object_propagate_events_set(bt, 0);
738 elm_object_focus_allow_set(bt, 0);
739 evas_object_show(bt);
741 bt = elm_button_add(win);
742 elm_button_label_set(bt, "Non");
743 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_non, en);
744 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
745 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
746 elm_box_pack_end(bx2, bt);
747 evas_object_propagate_events_set(bt, 0);
748 elm_object_focus_allow_set(bt, 0);
749 evas_object_show(bt);
751 bt = elm_button_add(win);
752 elm_button_label_set(bt, "Ins");
753 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_ins, en);
754 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
755 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
756 elm_box_pack_end(bx2, bt);
757 evas_object_propagate_events_set(bt, 0);
758 elm_object_focus_allow_set(bt, 0);
759 evas_object_show(bt);
761 elm_box_pack_end(bx, bx2);
762 evas_object_show(bx2);
764 bx2 = elm_box_add(win);
765 elm_box_horizontal_set(bx2, 1);
766 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
767 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
769 bt = elm_button_add(win);
770 elm_button_label_set(bt, "Lef");
771 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_lef, en);
772 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
773 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
774 elm_box_pack_end(bx2, bt);
775 evas_object_propagate_events_set(bt, 0);
776 elm_object_focus_allow_set(bt, 0);
777 evas_object_show(bt);
779 bt = elm_button_add(win);
780 elm_button_label_set(bt, "Rig");
781 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_rig, en);
782 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
783 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
784 elm_box_pack_end(bx2, bt);
785 evas_object_propagate_events_set(bt, 0);
786 elm_object_focus_allow_set(bt, 0);
787 evas_object_show(bt);
789 bt = elm_button_add(win);
790 elm_button_label_set(bt, "Up ");
791 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_up_, en);
792 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
793 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
794 elm_box_pack_end(bx2, bt);
795 evas_object_propagate_events_set(bt, 0);
796 elm_object_focus_allow_set(bt, 0);
797 evas_object_show(bt);
799 bt = elm_button_add(win);
800 elm_button_label_set(bt, "Dow");
801 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_dow, en);
802 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
803 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
804 elm_box_pack_end(bx2, bt);
805 evas_object_propagate_events_set(bt, 0);
806 elm_object_focus_allow_set(bt, 0);
807 evas_object_show(bt);
809 bt = elm_button_add(win);
810 elm_button_label_set(bt, "Beg");
811 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_beg, en);
812 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
813 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
814 elm_box_pack_end(bx2, bt);
815 evas_object_propagate_events_set(bt, 0);
816 elm_object_focus_allow_set(bt, 0);
817 evas_object_show(bt);
819 bt = elm_button_add(win);
820 elm_button_label_set(bt, "End");
821 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_end, en);
822 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
823 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
824 elm_box_pack_end(bx2, bt);
825 evas_object_propagate_events_set(bt, 0);
826 elm_object_focus_allow_set(bt, 0);
827 evas_object_show(bt);
829 elm_box_pack_end(bx, bx2);
830 evas_object_show(bx2);
832 bx2 = elm_box_add(win);
833 elm_box_horizontal_set(bx2, 1);
834 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
835 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
837 bt = elm_button_add(win);
838 elm_button_label_set(bt, "LBe");
839 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_lbe, en);
840 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
841 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
842 elm_box_pack_end(bx2, bt);
843 evas_object_propagate_events_set(bt, 0);
844 elm_object_focus_allow_set(bt, 0);
845 evas_object_show(bt);
847 bt = elm_button_add(win);
848 elm_button_label_set(bt, "LEn");
849 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_len, en);
850 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
851 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
852 elm_box_pack_end(bx2, bt);
853 evas_object_propagate_events_set(bt, 0);
854 elm_object_focus_allow_set(bt, 0);
855 evas_object_show(bt);
857 bt = elm_button_add(win);
858 elm_button_label_set(bt, "SBe");
859 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sbe, en);
860 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
861 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
862 elm_box_pack_end(bx2, bt);
863 evas_object_propagate_events_set(bt, 0);
864 elm_object_focus_allow_set(bt, 0);
865 evas_object_show(bt);
867 bt = elm_button_add(win);
868 elm_button_label_set(bt, "SEn");
869 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sen, en);
870 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
871 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
872 elm_box_pack_end(bx2, bt);
873 evas_object_propagate_events_set(bt, 0);
874 elm_object_focus_allow_set(bt, 0);
875 evas_object_show(bt);
877 bt = elm_button_add(win);
878 elm_button_label_set(bt, "Fmt");
879 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_fmt, en);
880 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
881 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
882 elm_box_pack_end(bx2, bt);
883 evas_object_propagate_events_set(bt, 0);
884 elm_object_focus_allow_set(bt, 0);
885 evas_object_show(bt);
887 bt = elm_button_add(win);
888 elm_button_label_set(bt, "VFm");
889 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_vfm, en);
890 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
891 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
892 elm_box_pack_end(bx2, bt);
893 evas_object_propagate_events_set(bt, 0);
894 elm_object_focus_allow_set(bt, 0);
895 evas_object_show(bt);
897 elm_box_pack_end(bx, bx2);
898 evas_object_show(bx2);
900 bx2 = elm_box_add(win);
901 elm_box_horizontal_set(bx2, 1);
902 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
903 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
905 bt = elm_button_add(win);
906 elm_button_label_set(bt, "Chr");
907 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_chr, en);
908 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
909 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
910 elm_box_pack_end(bx2, bt);
911 evas_object_propagate_events_set(bt, 0);
912 elm_object_focus_allow_set(bt, 0);
913 evas_object_show(bt);
915 bt = elm_button_add(win);
916 elm_button_label_set(bt, "Cut");
917 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_cut, en);
918 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
919 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
920 elm_box_pack_end(bx2, bt);
921 evas_object_propagate_events_set(bt, 0);
922 elm_object_focus_allow_set(bt, 0);
923 evas_object_show(bt);
925 bt = elm_button_add(win);
926 elm_button_label_set(bt, "Cop");
927 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_cop, en);
928 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
929 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
930 elm_box_pack_end(bx2, bt);
931 evas_object_propagate_events_set(bt, 0);
932 elm_object_focus_allow_set(bt, 0);
933 evas_object_show(bt);
935 bt = elm_button_add(win);
936 elm_button_label_set(bt, "Pas");
937 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_pas, en);
938 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
939 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
940 elm_box_pack_end(bx2, bt);
941 evas_object_propagate_events_set(bt, 0);
942 elm_object_focus_allow_set(bt, 0);
943 evas_object_show(bt);
945 elm_box_pack_end(bx, bx2);
946 evas_object_show(bx2);
948 /* markup scrolled entry */
949 en = elm_scrolled_entry_add(win);
950 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
951 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
952 elm_scrolled_entry_entry_set(en,
953 "This is an entry widget in this window that<br>"
954 "uses markup <b>like this</> for styling and<br>"
955 "formatting <em>like this</>, as well as<br>"
956 "<a href=X><link>links in the text</></a>, so enter text<br>"
957 "in here to edit it. By them way, links are<br>"
958 "called <a href=anc-02>Anchors</a> so you will need<br>"
959 "to refer to them this way. At the end here is a really long "
960 "line to test line wrapping to see if it works. But just in "
961 "case this line is not long enough I will add more here to "
962 "really test it out, as Elementary really needs some "
963 "good testing to see if entry widgets work as advertised."
965 evas_object_smart_callback_add(en, "anchor,clicked", scrolled_anchor_test, en);
966 elm_box_pack_end(bx, en);
967 evas_object_show(en);
969 bx2 = elm_box_add(win);
970 elm_box_horizontal_set(bx2, 1);
971 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
972 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
974 bt = elm_button_add(win);
975 elm_button_label_set(bt, "Clr");
976 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_clr, en);
977 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
978 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
979 elm_box_pack_end(bx2, bt);
980 evas_object_propagate_events_set(bt, 0);
981 elm_object_focus_allow_set(bt, 0);
982 evas_object_show(bt);
984 bt = elm_button_add(win);
985 elm_button_label_set(bt, "Pri");
986 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_pri, en);
987 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
988 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
989 elm_box_pack_end(bx2, bt);
990 evas_object_propagate_events_set(bt, 0);
991 elm_object_focus_allow_set(bt, 0);
992 evas_object_show(bt);
994 bt = elm_button_add(win);
995 elm_button_label_set(bt, "Sel");
996 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sel, en);
997 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
998 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
999 elm_box_pack_end(bx2, bt);
1000 evas_object_propagate_events_set(bt, 0);
1001 elm_object_focus_allow_set(bt, 0);
1002 evas_object_show(bt);
1004 bt = elm_button_add(win);
1005 elm_button_label_set(bt, "All");
1006 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_all, en);
1007 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1008 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1009 elm_box_pack_end(bx2, bt);
1010 evas_object_propagate_events_set(bt, 0);
1011 elm_object_focus_allow_set(bt, 0);
1012 evas_object_show(bt);
1014 bt = elm_button_add(win);
1015 elm_button_label_set(bt, "Non");
1016 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_non, en);
1017 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1018 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1019 elm_box_pack_end(bx2, bt);
1020 evas_object_propagate_events_set(bt, 0);
1021 elm_object_focus_allow_set(bt, 0);
1022 evas_object_show(bt);
1024 bt = elm_button_add(win);
1025 elm_button_label_set(bt, "Ins");
1026 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_ins, en);
1027 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1028 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1029 elm_box_pack_end(bx2, bt);
1030 evas_object_propagate_events_set(bt, 0);
1031 elm_object_focus_allow_set(bt, 0);
1032 evas_object_show(bt);
1034 elm_box_pack_end(bx, bx2);
1035 evas_object_show(bx2);
1037 bx2 = elm_box_add(win);
1038 elm_box_horizontal_set(bx2, 1);
1039 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
1040 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1042 bt = elm_button_add(win);
1043 elm_button_label_set(bt, "Lef");
1044 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_lef, en);
1045 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1046 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1047 elm_box_pack_end(bx2, bt);
1048 evas_object_propagate_events_set(bt, 0);
1049 elm_object_focus_allow_set(bt, 0);
1050 evas_object_show(bt);
1052 bt = elm_button_add(win);
1053 elm_button_label_set(bt, "Rig");
1054 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_rig, en);
1055 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1056 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1057 elm_box_pack_end(bx2, bt);
1058 evas_object_propagate_events_set(bt, 0);
1059 elm_object_focus_allow_set(bt, 0);
1060 evas_object_show(bt);
1062 bt = elm_button_add(win);
1063 elm_button_label_set(bt, "Up ");
1064 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_up_, en);
1065 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1066 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1067 elm_box_pack_end(bx2, bt);
1068 evas_object_propagate_events_set(bt, 0);
1069 elm_object_focus_allow_set(bt, 0);
1070 evas_object_show(bt);
1072 bt = elm_button_add(win);
1073 elm_button_label_set(bt, "Dow");
1074 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_dow, en);
1075 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1076 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1077 elm_box_pack_end(bx2, bt);
1078 evas_object_propagate_events_set(bt, 0);
1079 elm_object_focus_allow_set(bt, 0);
1080 evas_object_show(bt);
1082 bt = elm_button_add(win);
1083 elm_button_label_set(bt, "Beg");
1084 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_beg, en);
1085 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1086 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1087 elm_box_pack_end(bx2, bt);
1088 evas_object_propagate_events_set(bt, 0);
1089 elm_object_focus_allow_set(bt, 0);
1090 evas_object_show(bt);
1092 bt = elm_button_add(win);
1093 elm_button_label_set(bt, "End");
1094 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_end, en);
1095 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1096 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1097 elm_box_pack_end(bx2, bt);
1098 evas_object_propagate_events_set(bt, 0);
1099 elm_object_focus_allow_set(bt, 0);
1100 evas_object_show(bt);
1102 elm_box_pack_end(bx, bx2);
1103 evas_object_show(bx2);
1105 bx2 = elm_box_add(win);
1106 elm_box_horizontal_set(bx2, 1);
1107 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
1108 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1110 bt = elm_button_add(win);
1111 elm_button_label_set(bt, "LBe");
1112 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_lbe, en);
1113 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1114 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1115 elm_box_pack_end(bx2, bt);
1116 evas_object_propagate_events_set(bt, 0);
1117 elm_object_focus_allow_set(bt, 0);
1118 evas_object_show(bt);
1120 bt = elm_button_add(win);
1121 elm_button_label_set(bt, "LEn");
1122 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_len, en);
1123 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1124 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1125 elm_box_pack_end(bx2, bt);
1126 evas_object_propagate_events_set(bt, 0);
1127 elm_object_focus_allow_set(bt, 0);
1128 evas_object_show(bt);
1130 bt = elm_button_add(win);
1131 elm_button_label_set(bt, "SBe");
1132 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sbe, en);
1133 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1134 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1135 elm_box_pack_end(bx2, bt);
1136 evas_object_propagate_events_set(bt, 0);
1137 elm_object_focus_allow_set(bt, 0);
1138 evas_object_show(bt);
1140 bt = elm_button_add(win);
1141 elm_button_label_set(bt, "SEn");
1142 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sen, en);
1143 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1144 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1145 elm_box_pack_end(bx2, bt);
1146 evas_object_propagate_events_set(bt, 0);
1147 elm_object_focus_allow_set(bt, 0);
1148 evas_object_show(bt);
1150 bt = elm_button_add(win);
1151 elm_button_label_set(bt, "Fmt");
1152 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_fmt, en);
1153 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1154 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1155 elm_box_pack_end(bx2, bt);
1156 evas_object_propagate_events_set(bt, 0);
1157 elm_object_focus_allow_set(bt, 0);
1158 evas_object_show(bt);
1160 bt = elm_button_add(win);
1161 elm_button_label_set(bt, "VFm");
1162 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_vfm, en);
1163 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1164 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1165 elm_box_pack_end(bx2, bt);
1166 evas_object_propagate_events_set(bt, 0);
1167 elm_object_focus_allow_set(bt, 0);
1168 evas_object_show(bt);
1170 elm_box_pack_end(bx, bx2);
1171 evas_object_show(bx2);
1173 bx2 = elm_box_add(win);
1174 elm_box_horizontal_set(bx2, 1);
1175 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
1176 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1178 bt = elm_button_add(win);
1179 elm_button_label_set(bt, "Chr");
1180 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_chr, en);
1181 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1182 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1183 elm_box_pack_end(bx2, bt);
1184 evas_object_propagate_events_set(bt, 0);
1185 elm_object_focus_allow_set(bt, 0);
1186 evas_object_show(bt);
1188 bt = elm_button_add(win);
1189 elm_button_label_set(bt, "Cut");
1190 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_cut, en);
1191 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1192 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1193 elm_box_pack_end(bx2, bt);
1194 evas_object_propagate_events_set(bt, 0);
1195 elm_object_focus_allow_set(bt, 0);
1196 evas_object_show(bt);
1198 bt = elm_button_add(win);
1199 elm_button_label_set(bt, "Cop");
1200 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_cop, en);
1201 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1202 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1203 elm_box_pack_end(bx2, bt);
1204 evas_object_propagate_events_set(bt, 0);
1205 elm_object_focus_allow_set(bt, 0);
1206 evas_object_show(bt);
1208 bt = elm_button_add(win);
1209 elm_button_label_set(bt, "Pas");
1210 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_pas, en);
1211 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1212 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1213 elm_box_pack_end(bx2, bt);
1214 evas_object_propagate_events_set(bt, 0);
1215 elm_object_focus_allow_set(bt, 0);
1216 evas_object_show(bt);
1218 elm_box_pack_end(bx, bx2);
1219 evas_object_show(bx2);
1221 evas_object_resize(win, 320, 480);
1223 elm_object_focus(win);
1224 evas_object_show(win);
1228 test_entry4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
1230 Evas_Object *win, *bg, *ly, *en;
1233 win = elm_win_add(NULL, "entry4", ELM_WIN_BASIC);
1234 elm_win_title_set(win, "Entry 4");
1235 elm_win_autodel_set(win, 1);
1237 bg = elm_bg_add(win);
1238 elm_win_resize_object_add(win, bg);
1239 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1240 evas_object_show(bg);
1242 ly = elm_layout_add(win);
1243 snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
1244 elm_layout_file_set(ly, buf, "layout");
1245 evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1246 elm_win_resize_object_add(win, ly);
1247 evas_object_show(ly);
1249 en = elm_scrolled_entry_add(win);
1250 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
1251 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
1252 elm_scrolled_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
1253 elm_scrolled_entry_entry_set(en, "This is a single line");
1254 elm_scrolled_entry_single_line_set(en, 1);
1255 elm_layout_content_set(ly, "element1", en);
1256 evas_object_show(en);
1258 en = elm_entry_add(win);
1259 elm_entry_line_wrap_set(en, 0);
1260 elm_entry_entry_set(en,
1261 "This is an entry widget<br>"
1262 "that uses markup<br>"
1263 "<b>like this</> and has<br>"
1264 "no scroller, so you can<br>"
1265 "use it more flexibly.");
1266 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1267 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
1268 elm_layout_content_set(ly, "element2", en);
1269 evas_object_show(en);
1271 en = elm_scrolled_entry_add(win);
1272 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1273 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
1274 elm_scrolled_entry_entry_set(en,
1275 "This is an entry widget in this window that<br>"
1276 "uses markup <b>like this</> for styling and<br>"
1277 "formatting <em>like this</>, as well as<br>"
1278 "<a href=X><link>links in the text</></a>, so enter text<br>"
1279 "in here to edit it. By them way, links are<br>"
1280 "called <a href=anc-02>Anchors</a> so you will need<br>"
1281 "to refer to them this way. At the end here is a really long "
1282 "line to test line wrapping to see if it works. But just in "
1283 "case this line is not long enough I will add more here to "
1284 "really test it out, as Elementary really needs some "
1285 "good testing to see if entry widgets work as advertised."
1287 evas_object_smart_callback_add(en, "anchor,clicked", scrolled_anchor_test, en);
1288 elm_layout_content_set(ly, "element3", en);
1289 evas_object_show(en);
1291 evas_object_show(win);
1295 test_entry5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
1297 Evas_Object *win, *bg, *bx, *bx2, *bt, *en;
1299 win = elm_win_add(NULL, "entry5", ELM_WIN_BASIC);
1300 elm_win_title_set(win, "Entry 5");
1301 elm_win_autodel_set(win, 1);
1303 bg = elm_bg_add(win);
1304 elm_win_resize_object_add(win, bg);
1305 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1306 evas_object_show(bg);
1308 bx = elm_box_add(win);
1309 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1310 elm_win_resize_object_add(win, bx);
1311 evas_object_show(bx);
1313 en = elm_scrolled_entry_add(win);
1314 elm_scrolled_entry_line_char_wrap_set(en, 1);
1315 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1316 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
1317 elm_scrolled_entry_entry_set(en,
1318 "This is an entry widget in this window that "
1319 "uses markup like this for styling and "
1320 "formatting like this, as well as "
1321 "to refer to them this way. At the end here is a really long "
1322 "line to test line wrapping to see if it works. But just in "
1323 "case this line is not long enough I will add more here to "
1324 "really test it out, as Elementary really needs some "
1325 "good testing to see if entry widgets work as advertised."
1327 evas_object_smart_callback_add(en, "anchor,clicked", scrolled_anchor_test, en);
1328 elm_box_pack_end(bx, en);
1329 evas_object_show(en);
1331 bx2 = elm_box_add(win);
1332 elm_box_horizontal_set(bx2, 1);
1333 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
1334 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1336 bt = elm_button_add(win);
1337 elm_button_label_set(bt, "Clr");
1338 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_clr, en);
1339 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1340 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1341 elm_box_pack_end(bx2, bt);
1342 evas_object_propagate_events_set(bt, 0);
1343 elm_object_focus_allow_set(bt, 0);
1344 evas_object_show(bt);
1346 bt = elm_button_add(win);
1347 elm_button_label_set(bt, "Pri");
1348 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_pri, en);
1349 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1350 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1351 elm_box_pack_end(bx2, bt);
1352 evas_object_propagate_events_set(bt, 0);
1353 elm_object_focus_allow_set(bt, 0);
1354 evas_object_show(bt);
1356 bt = elm_button_add(win);
1357 elm_button_label_set(bt, "Sel");
1358 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sel, en);
1359 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1360 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1361 elm_box_pack_end(bx2, bt);
1362 evas_object_propagate_events_set(bt, 0);
1363 elm_object_focus_allow_set(bt, 0);
1364 evas_object_show(bt);
1366 bt = elm_button_add(win);
1367 elm_button_label_set(bt, "All");
1368 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_all, en);
1369 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1370 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1371 elm_box_pack_end(bx2, bt);
1372 evas_object_propagate_events_set(bt, 0);
1373 elm_object_focus_allow_set(bt, 0);
1374 evas_object_show(bt);
1376 bt = elm_button_add(win);
1377 elm_button_label_set(bt, "Non");
1378 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_non, en);
1379 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1380 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1381 elm_box_pack_end(bx2, bt);
1382 evas_object_propagate_events_set(bt, 0);
1383 elm_object_focus_allow_set(bt, 0);
1384 evas_object_show(bt);
1386 bt = elm_button_add(win);
1387 elm_button_label_set(bt, "Ins");
1388 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_ins, en);
1389 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1390 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1391 elm_box_pack_end(bx2, bt);
1392 evas_object_propagate_events_set(bt, 0);
1393 elm_object_focus_allow_set(bt, 0);
1394 evas_object_show(bt);
1396 elm_box_pack_end(bx, bx2);
1397 evas_object_show(bx2);
1399 bx2 = elm_box_add(win);
1400 elm_box_horizontal_set(bx2, 1);
1401 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
1402 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1404 bt = elm_button_add(win);
1405 elm_button_label_set(bt, "Lef");
1406 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_lef, en);
1407 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1408 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1409 elm_box_pack_end(bx2, bt);
1410 evas_object_propagate_events_set(bt, 0);
1411 elm_object_focus_allow_set(bt, 0);
1412 evas_object_show(bt);
1414 bt = elm_button_add(win);
1415 elm_button_label_set(bt, "Rig");
1416 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_rig, en);
1417 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1418 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1419 elm_box_pack_end(bx2, bt);
1420 evas_object_propagate_events_set(bt, 0);
1421 elm_object_focus_allow_set(bt, 0);
1422 evas_object_show(bt);
1424 bt = elm_button_add(win);
1425 elm_button_label_set(bt, "Up ");
1426 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_up_, en);
1427 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1428 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1429 elm_box_pack_end(bx2, bt);
1430 evas_object_propagate_events_set(bt, 0);
1431 elm_object_focus_allow_set(bt, 0);
1432 evas_object_show(bt);
1434 bt = elm_button_add(win);
1435 elm_button_label_set(bt, "Dow");
1436 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_dow, en);
1437 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1438 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1439 elm_box_pack_end(bx2, bt);
1440 evas_object_propagate_events_set(bt, 0);
1441 elm_object_focus_allow_set(bt, 0);
1442 evas_object_show(bt);
1444 bt = elm_button_add(win);
1445 elm_button_label_set(bt, "Beg");
1446 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_beg, en);
1447 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1448 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1449 elm_box_pack_end(bx2, bt);
1450 evas_object_propagate_events_set(bt, 0);
1451 elm_object_focus_allow_set(bt, 0);
1452 evas_object_show(bt);
1454 bt = elm_button_add(win);
1455 elm_button_label_set(bt, "End");
1456 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_end, en);
1457 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1458 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1459 elm_box_pack_end(bx2, bt);
1460 evas_object_propagate_events_set(bt, 0);
1461 elm_object_focus_allow_set(bt, 0);
1462 evas_object_show(bt);
1464 elm_box_pack_end(bx, bx2);
1465 evas_object_show(bx2);
1467 bx2 = elm_box_add(win);
1468 elm_box_horizontal_set(bx2, 1);
1469 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
1470 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1472 bt = elm_button_add(win);
1473 elm_button_label_set(bt, "LBe");
1474 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_lbe, en);
1475 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1476 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1477 elm_box_pack_end(bx2, bt);
1478 evas_object_propagate_events_set(bt, 0);
1479 elm_object_focus_allow_set(bt, 0);
1480 evas_object_show(bt);
1482 bt = elm_button_add(win);
1483 elm_button_label_set(bt, "LEn");
1484 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_len, en);
1485 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1486 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1487 elm_box_pack_end(bx2, bt);
1488 evas_object_propagate_events_set(bt, 0);
1489 elm_object_focus_allow_set(bt, 0);
1490 evas_object_show(bt);
1492 bt = elm_button_add(win);
1493 elm_button_label_set(bt, "SBe");
1494 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sbe, en);
1495 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1496 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1497 elm_box_pack_end(bx2, bt);
1498 evas_object_propagate_events_set(bt, 0);
1499 elm_object_focus_allow_set(bt, 0);
1500 evas_object_show(bt);
1502 bt = elm_button_add(win);
1503 elm_button_label_set(bt, "SEn");
1504 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_sen, en);
1505 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1506 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1507 elm_box_pack_end(bx2, bt);
1508 evas_object_propagate_events_set(bt, 0);
1509 elm_object_focus_allow_set(bt, 0);
1510 evas_object_show(bt);
1512 bt = elm_button_add(win);
1513 elm_button_label_set(bt, "Fmt");
1514 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_fmt, en);
1515 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1516 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1517 elm_box_pack_end(bx2, bt);
1518 evas_object_propagate_events_set(bt, 0);
1519 elm_object_focus_allow_set(bt, 0);
1520 evas_object_show(bt);
1522 bt = elm_button_add(win);
1523 elm_button_label_set(bt, "VFm");
1524 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_vfm, en);
1525 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1526 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1527 elm_box_pack_end(bx2, bt);
1528 evas_object_propagate_events_set(bt, 0);
1529 elm_object_focus_allow_set(bt, 0);
1530 evas_object_show(bt);
1532 elm_box_pack_end(bx, bx2);
1533 evas_object_show(bx2);
1535 bx2 = elm_box_add(win);
1536 elm_box_horizontal_set(bx2, 1);
1537 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
1538 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1540 bt = elm_button_add(win);
1541 elm_button_label_set(bt, "Chr");
1542 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_chr, en);
1543 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1544 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1545 elm_box_pack_end(bx2, bt);
1546 evas_object_propagate_events_set(bt, 0);
1547 elm_object_focus_allow_set(bt, 0);
1548 evas_object_show(bt);
1550 bt = elm_button_add(win);
1551 elm_button_label_set(bt, "Cut");
1552 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_cut, en);
1553 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1554 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1555 elm_box_pack_end(bx2, bt);
1556 evas_object_propagate_events_set(bt, 0);
1557 elm_object_focus_allow_set(bt, 0);
1558 evas_object_show(bt);
1560 bt = elm_button_add(win);
1561 elm_button_label_set(bt, "Cop");
1562 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_cop, en);
1563 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1564 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1565 elm_box_pack_end(bx2, bt);
1566 evas_object_propagate_events_set(bt, 0);
1567 elm_object_focus_allow_set(bt, 0);
1568 evas_object_show(bt);
1570 bt = elm_button_add(win);
1571 elm_button_label_set(bt, "Pas");
1572 evas_object_smart_callback_add(bt, "clicked", my_ent_bt_pas, en);
1573 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1574 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1575 elm_box_pack_end(bx2, bt);
1576 evas_object_propagate_events_set(bt, 0);
1577 elm_object_focus_allow_set(bt, 0);
1578 evas_object_show(bt);
1580 elm_box_pack_end(bx, bx2);
1581 evas_object_show(bx2);
1583 evas_object_resize(win, 320, 480);
1585 elm_object_focus(win);
1586 evas_object_show(win);
1590 _scrolled_entry_clear(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
1592 Evas_Object *en = data;
1593 elm_scrolled_entry_entry_set(en, "");
1597 test_entry_notepad(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
1599 Evas_Object *win, *bg, *bx, *bx2, *bt, *np;
1601 win = elm_win_add(NULL, "entry-notepad", ELM_WIN_BASIC);
1602 elm_win_title_set(win, "Entry Notepad");
1603 elm_win_autodel_set(win, EINA_TRUE);
1605 bg = elm_bg_add(win);
1606 elm_win_resize_object_add(win, bg);
1607 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1608 evas_object_show(bg);
1610 bx = elm_box_add(win);
1611 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1612 elm_win_resize_object_add(win, bx);
1613 evas_object_show(bx);
1615 np = elm_scrolled_entry_add(win);
1616 elm_scrolled_entry_file_set(np, "note.txt", ELM_TEXT_FORMAT_PLAIN_UTF8);
1617 evas_object_size_hint_weight_set(np, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1618 evas_object_size_hint_align_set(np, EVAS_HINT_FILL, EVAS_HINT_FILL);
1619 elm_box_pack_end(bx, np);
1620 evas_object_show(np);
1622 bx2 = elm_box_add(win);
1623 elm_box_horizontal_set(bx2, EINA_TRUE);
1624 elm_box_homogenous_set(bx2, EINA_TRUE);
1625 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
1626 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1628 bt = elm_button_add(win);
1629 elm_button_label_set(bt, "Clear");
1630 evas_object_smart_callback_add(bt, "clicked", _scrolled_entry_clear, np);
1631 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
1632 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
1633 elm_box_pack_end(bx2, bt);
1634 evas_object_show(bt);
1636 elm_box_pack_end(bx, bx2);
1637 evas_object_show(bx2);
1639 evas_object_resize(win, 320, 300);
1641 elm_object_focus(win);
1642 evas_object_show(win);