1 #include <Elementary.h>
5 * @defgroup Scrolled_Entry Scrolled_Entry
7 * A scrolled entry is a convenience widget which shows
8 * a box that the user can enter text into. Unlike an
9 * @ref Entry widget, scrolled entries scroll with user
10 * input so that the window will not expand if the length
11 * of text inside the entry exceeds the initial size of the
14 * Signals that you can add callbacks for are:
16 * "changed" - The text within the entry was changed
17 * "activated" - The entry has received focus and the cursor
18 * "press" - The entry has been clicked
19 * "longpressed" - The entry has been clicked for a couple seconds
20 * "clicked" - The entry has been clicked
21 * "clicked,double" - The entry has been double clicked
22 * "focused" - The entry has received focus
23 * "unfocused" - The entry has lost focus
24 * "selection,paste" - A paste action has occurred
25 * "selection,copy" - A copy action has occurred
26 * "selection,cut" - A cut action has occurred
27 * "selection,start" - A selection has begun
28 * "selection,changed" - The selection has changed
29 * "selection,cleared" - The selection has been cleared
30 * "cursor,changed" - The cursor has changed
31 * "anchor,clicked" - The anchor has been clicked
34 typedef struct _Widget_Data Widget_Data;
35 typedef struct _Elm_Entry_Context_Menu_Item Elm_Entry_Context_Menu_Item;
36 typedef struct _Elm_Entry_Item_Provider Elm_Entry_Item_Provider;
37 typedef struct _Elm_Entry_Text_Filter Elm_Entry_Text_Filter;
41 Evas_Object *scroller;
45 Elm_Scroller_Policy policy_h, policy_v;
47 Eina_List *item_providers;
48 Eina_List *text_filters;
49 Eina_Bool single_line : 1;
52 struct _Elm_Entry_Context_Menu_Item
59 struct _Elm_Entry_Item_Provider
61 Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item);
65 struct _Elm_Entry_Text_Filter
67 void (*func) (void *data, Evas_Object *entry, char **text);
71 static const char *widtype = NULL;
73 static const char SIG_CHANGED[] = "changed";
74 static const char SIG_ACTIVATED[] = "activated";
75 static const char SIG_PRESS[] = "press";
76 static const char SIG_LONGPRESSED[] = "longpressed";
77 static const char SIG_CLICKED[] = "clicked";
78 static const char SIG_CLICKED_DOUBLE[] = "clicked,double";
79 static const char SIG_FOCUSED[] = "focused";
80 static const char SIG_UNFOCUSED[] = "unfocused";
81 static const char SIG_SELECTION_PASTE[] = "selection,paste";
82 static const char SIG_SELECTION_COPY[] = "selection,copy";
83 static const char SIG_SELECTION_CUT[] = "selection,cut";
84 static const char SIG_SELECTION_START[] = "selection,start";
85 static const char SIG_SELECTION_CHANGED[] = "selection,changed";
86 static const char SIG_SELECTION_CLEARED[] = "selection,cleared";
87 static const char SIG_CURSOR_CHANGED[] = "cursor,changed";
88 static const char SIG_ANCHOR_CLICKED[] = "anchor,clicked";
89 static const Evas_Smart_Cb_Description _signals[] = {
93 {SIG_LONGPRESSED, ""},
95 {SIG_CLICKED_DOUBLE, ""},
98 {SIG_SELECTION_PASTE, ""},
99 {SIG_SELECTION_COPY, ""},
100 {SIG_SELECTION_CUT, ""},
101 {SIG_SELECTION_START, ""},
102 {SIG_SELECTION_CHANGED, ""},
103 {SIG_SELECTION_CLEARED, ""},
104 {SIG_CURSOR_CHANGED, ""},
105 {SIG_ANCHOR_CLICKED, ""},
110 _del_hook(Evas_Object *obj)
112 Elm_Entry_Context_Menu_Item *ci;
113 Elm_Entry_Item_Provider *ip;
114 Elm_Entry_Text_Filter *tf;
116 Widget_Data *wd = elm_widget_data_get(obj);
118 EINA_LIST_FREE(wd->items, ci)
120 EINA_LIST_FREE(wd->item_providers, ip)
122 EINA_LIST_FREE(wd->text_filters, tf)
130 _sizing_eval(Evas_Object *obj)
133 Evas_Coord minw, minh, minw_scr, minh_scr;
134 wd = elm_widget_data_get(obj);
137 evas_object_size_hint_min_get(obj, &minw, &minh);
138 evas_object_size_hint_min_get(wd->scroller, &minw_scr, &minh_scr);
139 if (minw < minw_scr) minw = minw_scr;
140 if (minh < minh_scr) minh = minh_scr;
142 evas_object_size_hint_min_set(obj, minw, minh);
144 evas_object_size_hint_max_set(obj, -1, minh);
146 evas_object_size_hint_max_set(obj, -1, -1);
150 _theme_hook(Evas_Object *obj)
152 Widget_Data *wd = elm_widget_data_get(obj);
154 elm_object_style_set(wd->entry, elm_widget_style_get(obj));
155 elm_object_style_set(wd->scroller, elm_widget_style_get(obj));
156 elm_object_disabled_set(wd->entry, elm_widget_disabled_get(obj));
157 elm_object_disabled_set(wd->scroller, elm_widget_disabled_get(obj));
162 _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
164 Widget_Data *wd = elm_widget_data_get(obj);
166 if (elm_widget_focus_get(obj))
167 elm_widget_focus_steal(wd->entry);
171 _disable_hook(Evas_Object *obj)
173 Widget_Data *wd = elm_widget_data_get(obj);
175 elm_object_disabled_set(wd->entry, elm_widget_disabled_get(obj));
179 _signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
181 Widget_Data *wd = elm_widget_data_get(obj);
183 elm_object_signal_emit(wd->entry, emission, source);
184 elm_object_signal_emit(wd->scroller, emission, source);
188 _signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
190 Widget_Data *wd = elm_widget_data_get(obj);
192 elm_object_signal_callback_add(wd->entry, emission, source, func_cb, data);
193 elm_object_signal_callback_add(wd->scroller, emission, source, func_cb,
198 _signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data __UNUSED__)
200 Widget_Data *wd = elm_widget_data_get(obj);
201 elm_object_signal_callback_del(wd->entry, emission, source, func_cb);
202 elm_object_signal_callback_del(wd->scroller, emission, source, func_cb);
206 _on_focus_region_hook(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
208 Widget_Data *wd = elm_widget_data_get(obj);
209 elm_widget_focus_region_get(wd->entry, x, y, w, h);
213 _changed_size_hints(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
219 _entry_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info)
222 evas_object_smart_callback_call(data, SIG_CHANGED, event_info);
226 _entry_activated(void *data, Evas_Object *obj __UNUSED__, void *event_info)
228 evas_object_smart_callback_call(data, SIG_ACTIVATED, event_info);
232 _entry_press(void *data, Evas_Object *obj __UNUSED__, void *event_info)
234 evas_object_smart_callback_call(data, SIG_PRESS, event_info);
238 _entry_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info)
240 evas_object_smart_callback_call(data, SIG_CLICKED, event_info);
244 _entry_clicked_double(void *data, Evas_Object *obj __UNUSED__, void *event_info)
246 evas_object_smart_callback_call(data, SIG_CLICKED_DOUBLE, event_info);
250 _entry_cursor_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info)
252 evas_object_smart_callback_call(data, SIG_CURSOR_CHANGED, event_info);
256 _entry_anchor_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info)
258 evas_object_smart_callback_call(data, SIG_ANCHOR_CLICKED, event_info);
262 _entry_selection_start(void *data, Evas_Object *obj __UNUSED__, void *event_info)
264 evas_object_smart_callback_call(data, SIG_SELECTION_START, event_info);
268 _entry_selection_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info)
270 evas_object_smart_callback_call(data, SIG_SELECTION_CHANGED, event_info);
274 _entry_selection_cleared(void *data, Evas_Object *obj __UNUSED__, void *event_info)
276 evas_object_smart_callback_call(data, SIG_SELECTION_CLEARED, event_info);
280 _entry_selection_paste(void *data, Evas_Object *obj __UNUSED__, void *event_info)
282 evas_object_smart_callback_call(data, SIG_SELECTION_PASTE, event_info);
286 _entry_selection_copy(void *data, Evas_Object *obj __UNUSED__, void *event_info)
288 evas_object_smart_callback_call(data, SIG_SELECTION_COPY, event_info);
292 _entry_selection_cut(void *data, Evas_Object *obj __UNUSED__, void *event_info)
294 evas_object_smart_callback_call(data, SIG_SELECTION_CUT, event_info);
298 _entry_longpressed(void *data, Evas_Object *obj __UNUSED__, void *event_info)
300 evas_object_smart_callback_call(data, SIG_LONGPRESSED, event_info);
304 _entry_focused(void *data, Evas_Object *obj __UNUSED__, void *event_info)
306 evas_object_smart_callback_call(data, SIG_FOCUSED, event_info);
310 _entry_unfocused(void *data, Evas_Object *obj __UNUSED__, void *event_info)
312 evas_object_smart_callback_call(data, SIG_UNFOCUSED, event_info);
316 _context_item_wrap_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info)
318 Elm_Entry_Context_Menu_Item *ci = data;
319 ci->func(ci->data, ci->obj, event_info);
323 _item_provider_wrap_cb(void *data, Evas_Object *obj __UNUSED__, const char *item)
325 Widget_Data *wd = elm_widget_data_get(data);
327 Elm_Entry_Item_Provider *ip;
329 EINA_LIST_FOREACH(wd->item_providers, l, ip)
332 o = ip->func(ip->data, data, item);
339 _text_filter_wrap_cb(void *data, Evas_Object *obj __UNUSED__, char **text)
341 Widget_Data *wd = elm_widget_data_get(data);
343 Elm_Entry_Text_Filter *tf;
345 EINA_LIST_FOREACH(wd->text_filters, l, tf)
347 tf->func(tf->data, data, text);
353 * This adds a scrolled entry to @p parent object.
355 * @param parent The parent object
356 * @return The new object or NULL if it cannot be created
358 * @ingroup Scrolled_Entry
361 elm_scrolled_entry_add(Evas_Object *parent)
367 ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
369 ELM_SET_WIDTYPE(widtype, "scrolled_entry");
370 elm_widget_type_set(obj, "scrolled_entry");
371 elm_widget_sub_object_add(parent, obj);
372 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
373 elm_widget_data_set(obj, wd);
374 elm_widget_del_hook_set(obj, _del_hook);
375 elm_widget_disable_hook_set(obj, _disable_hook);
376 elm_widget_can_focus_set(obj, EINA_TRUE);
377 elm_widget_theme_hook_set(obj, _theme_hook);
378 elm_widget_on_focus_region_hook_set(obj, _on_focus_region_hook);
379 elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
380 elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
381 elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
383 wd->scroller = elm_scroller_add(obj);
384 elm_scroller_custom_widget_base_theme_set(wd->scroller, "scroller", "entry");
385 elm_widget_resize_object_set(obj, wd->scroller);
386 evas_object_size_hint_weight_set(wd->scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
387 evas_object_size_hint_align_set(wd->scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
388 elm_scroller_bounce_set(wd->scroller, EINA_FALSE, EINA_FALSE);
389 elm_scroller_propagate_events_set(wd->scroller, EINA_TRUE);
390 evas_object_show(wd->scroller);
392 wd->entry = elm_entry_add(obj);
393 evas_object_size_hint_weight_set(wd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
394 evas_object_size_hint_align_set(wd->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
395 elm_scroller_content_set(wd->scroller, wd->entry);
396 evas_object_show(wd->entry);
398 elm_entry_text_filter_prepend(wd->entry, _text_filter_wrap_cb, obj);
399 elm_entry_item_provider_prepend(wd->entry, _item_provider_wrap_cb, obj);
401 evas_object_smart_callback_add(wd->entry, "changed", _entry_changed, obj);
402 evas_object_smart_callback_add(wd->entry, "activated", _entry_activated, obj);
403 evas_object_smart_callback_add(wd->entry, "press", _entry_press, obj);
404 evas_object_smart_callback_add(wd->entry, "clicked", _entry_clicked, obj);
405 evas_object_smart_callback_add(wd->entry, "clicked,double", _entry_clicked_double, obj);
406 evas_object_smart_callback_add(wd->entry, "cursor,changed", _entry_cursor_changed, obj);
407 evas_object_smart_callback_add(wd->entry, "anchor,clicked", _entry_anchor_clicked, obj);
408 evas_object_smart_callback_add(wd->entry, "selection,start", _entry_selection_start, obj);
409 evas_object_smart_callback_add(wd->entry, "selection,changed", _entry_selection_changed, obj);
410 evas_object_smart_callback_add(wd->entry, "selection,cleared", _entry_selection_cleared, obj);
411 evas_object_smart_callback_add(wd->entry, "selection,paste", _entry_selection_paste, obj);
412 evas_object_smart_callback_add(wd->entry, "selection,copy", _entry_selection_copy, obj);
413 evas_object_smart_callback_add(wd->entry, "selection,cut", _entry_selection_cut, obj);
414 evas_object_smart_callback_add(wd->entry, "longpressed", _entry_longpressed, obj);
415 evas_object_smart_callback_add(wd->entry, "focused", _entry_focused, obj);
416 evas_object_smart_callback_add(wd->entry, "unfocused", _entry_unfocused, obj);
418 evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
419 _changed_size_hints, NULL);
423 // TODO: convert Elementary to subclassing of Evas_Smart_Class
424 // TODO: and save some bytes, making descriptions per-class and not instance!
425 evas_object_smart_callbacks_descriptions_set(obj, _signals);
430 * This sets a widget to be displayed to the left of a scrolled entry.
432 * @param obj The scrolled entry object
433 * @param icon The widget to display on the left side of the scrolled
436 * @note A previously set widget will be destroyed.
437 * @note If the object being set does not have minimum size hints set,
438 * it won't get properly displayed.
440 * @ingroup Scrolled_Entry
441 * @see elm_scrolled_entry_end_set
444 elm_scrolled_entry_icon_set(Evas_Object *obj, Evas_Object *icon)
446 ELM_CHECK_WIDTYPE(obj, widtype);
447 Widget_Data *wd = elm_widget_data_get(obj);
450 EINA_SAFETY_ON_NULL_RETURN(icon);
451 if (wd->icon == icon) return;
452 if (wd->icon) evas_object_del(wd->icon);
454 edje = _elm_scroller_edje_object_get(wd->scroller);
456 edje_object_part_swallow(edje, "elm.swallow.icon", wd->icon);
457 edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
462 * Gets the leftmost widget of the scrolled entry. This object is
463 * owned by the scrolled entry and should not be modified.
465 * @param obj The scrolled entry object
466 * @return the left widget inside the scroller
468 * @ingroup Scrolled_Entry
471 elm_scrolled_entry_icon_get(const Evas_Object *obj)
473 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
474 Widget_Data *wd = elm_widget_data_get(obj);
475 if (!wd) return NULL;
480 * Unset the leftmost widget of the scrolled entry, unparenting and
483 * @param obj The scrolled entry object
484 * @return the previously set icon sub-object of this entry, on
487 * @see elm_scrolled_entry_icon_set()
489 * @ingroup Scrolled_Entry
492 elm_scrolled_entry_icon_unset(Evas_Object *obj)
494 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
495 Widget_Data *wd = elm_widget_data_get(obj);
496 Evas_Object *ret = NULL;
497 if (!wd) return NULL;
500 Evas_Object *edje = _elm_scroller_edje_object_get(wd->scroller);
501 if (!edje) return NULL;
503 edje_object_part_unswallow(edje, wd->icon);
504 edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
512 * Sets the visibility of the left-side widget of the scrolled entry,
513 * set by @elm_scrolled_entry_icon_set().
515 * @param obj The scrolled entry object
516 * @param setting EINA_TRUE if the object should be displayed,
519 * @ingroup Scrolled_Entry
522 elm_scrolled_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting)
524 ELM_CHECK_WIDTYPE(obj, widtype);
525 Widget_Data *wd = elm_widget_data_get(obj);
526 if ((!wd) || (!wd->icon)) return;
528 evas_object_hide(wd->icon);
530 evas_object_show(wd->icon);
535 * This sets a widget to be displayed to the end of a scrolled entry.
537 * @param obj The scrolled entry object
538 * @param end The widget to display on the right side of the scrolled
541 * @note A previously set widget will be destroyed.
542 * @note If the object being set does not have minimum size hints set,
543 * it won't get properly displayed.
545 * @ingroup Scrolled_Entry
546 * @see elm_scrolled_entry_icon_set
549 elm_scrolled_entry_end_set(Evas_Object *obj, Evas_Object *end)
551 ELM_CHECK_WIDTYPE(obj, widtype);
552 Widget_Data *wd = elm_widget_data_get(obj);
555 EINA_SAFETY_ON_NULL_RETURN(end);
556 if (wd->end == end) return;
557 if (wd->end) evas_object_del(wd->end);
559 edje = _elm_scroller_edje_object_get(wd->scroller);
561 edje_object_part_swallow(edje, "elm.swallow.end", wd->end);
562 edje_object_signal_emit(edje, "elm,action,show,end", "elm");
567 * Gets the endmost widget of the scrolled entry. This object is owned
568 * by the scrolled entry and should not be modified.
570 * @param obj The scrolled entry object
571 * @return the right widget inside the scroller
573 * @ingroup Scrolled_Entry
576 elm_scrolled_entry_end_get(const Evas_Object *obj)
578 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
579 Widget_Data *wd = elm_widget_data_get(obj);
580 if (!wd) return NULL;
585 * Unset the endmost widget of the scrolled entry, unparenting and
588 * @param obj The scrolled entry object
589 * @return the previously set icon sub-object of this entry, on
592 * @see elm_scrolled_entry_icon_set()
594 * @ingroup Scrolled_Entry
597 elm_scrolled_entry_end_unset(Evas_Object *obj)
599 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
600 Widget_Data *wd = elm_widget_data_get(obj);
601 Evas_Object *ret = NULL;
602 if (!wd) return NULL;
605 Evas_Object *edje = _elm_scroller_edje_object_get(wd->scroller);
606 if (!edje) return NULL;
608 edje_object_part_unswallow(edje, wd->end);
609 edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
617 * Sets the visibility of the end widget of the scrolled entry, set by
618 * @elm_scrolled_entry_end_set().
620 * @param obj The scrolled entry object
621 * @param setting EINA_TRUE if the object should be displayed,
624 * @ingroup Scrolled_Entry
627 elm_scrolled_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting)
629 ELM_CHECK_WIDTYPE(obj, widtype);
630 Widget_Data *wd = elm_widget_data_get(obj);
631 if ((!wd) || (!wd->end)) return;
633 evas_object_hide(wd->end);
635 evas_object_show(wd->end);
640 * This sets the scrolled entry object not to line wrap. All input will
641 * be on a single line, and the entry box will scroll with user input.
643 * @param obj The scrolled entry object
644 * @param single_line If true, the text in the scrolled entry
645 * will be on a single line.
647 * @ingroup Scrolled_Entry
650 elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
652 ELM_CHECK_WIDTYPE(obj, widtype);
653 Widget_Data *wd = elm_widget_data_get(obj);
655 if (wd->single_line == single_line) return;
656 elm_entry_single_line_set(wd->entry, single_line);
657 wd->single_line = single_line;
660 elm_scroller_policy_set(wd->scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
661 elm_scroller_content_min_limit(wd->scroller, 0, 1);
665 elm_scroller_policy_set(wd->scroller, wd->policy_h, wd->policy_v);
666 elm_scroller_content_min_limit(wd->scroller, 0, 0);
672 * This returns true if the scrolled entry has been set to single line mode.
673 * See also elm_scrolled_entry_single_line_set().
675 * @param obj The scrolled entry object
676 * @return single_line If true, the text in the scrolled entry is set to display
679 * @ingroup Scrolled_Entry
682 elm_scrolled_entry_single_line_get(const Evas_Object *obj)
684 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
685 Widget_Data *wd = elm_widget_data_get(obj);
686 if (!wd) return EINA_FALSE;
687 return elm_entry_single_line_get(wd->entry);
692 * This sets the scrolled entry object to password mode. All text entered
693 * and/or displayed within the widget will be replaced with asterisks (*).
695 * @param obj The scrolled entry object
696 * @param password If true, password mode is enabled.
698 * @ingroup Scrolled_Entry
701 elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password)
703 ELM_CHECK_WIDTYPE(obj, widtype);
704 Widget_Data *wd = elm_widget_data_get(obj);
706 elm_entry_password_set(wd->entry, password);
710 * This returns whether password mode is enabled.
711 * See also elm_scrolled_entry_password_set().
713 * @param obj The scrolled entry object
714 * @return If true, the scrolled entry is set to display all characters
717 * @ingroup Scrolled_Entry
720 elm_scrolled_entry_password_get(const Evas_Object *obj)
722 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
723 Widget_Data *wd = elm_widget_data_get(obj);
724 if (!wd) return EINA_FALSE;
725 return elm_entry_password_get(wd->entry);
730 * This sets the text displayed within the scrolled entry to @p entry.
732 * @param obj The scrolled entry object
733 * @param entry The text to be displayed
735 * @ingroup Scrolled_Entry
738 elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry)
740 ELM_CHECK_WIDTYPE(obj, widtype);
741 Widget_Data *wd = elm_widget_data_get(obj);
743 elm_entry_entry_set(wd->entry, entry);
747 * This appends @p entry to the scrolled entry
749 * @param obj The scrolled entry object
750 * @param entry The text to be displayed
752 * @ingroup Scrolled_Entry
755 elm_scrolled_entry_entry_append(Evas_Object *obj, const char *entry)
757 ELM_CHECK_WIDTYPE(obj, widtype);
758 Widget_Data *wd = elm_widget_data_get(obj);
760 elm_entry_entry_append(wd->entry, entry);
764 * This returns the text currently shown in object @p entry.
765 * See also elm_scrolled_entry_entry_set().
767 * @param obj The scrolled entry object
768 * @return The currently displayed text or NULL on failure
770 * @ingroup Scrolled_Entry
773 elm_scrolled_entry_entry_get(const Evas_Object *obj)
775 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
776 Widget_Data *wd = elm_widget_data_get(obj);
777 if (!wd) return NULL;
778 return elm_entry_entry_get(wd->entry);
782 * This returns EINA_TRUE if the entry is empty/there was an error
783 * and EINA_FALSE if it is not empty.
785 * @param obj The entry object
786 * @return If the entry is empty or not.
788 * @ingroup Scrolled_Entry
791 elm_scrolled_entry_is_empty(const Evas_Object *obj)
793 ELM_CHECK_WIDTYPE(obj, widtype) EINA_TRUE;
794 Widget_Data *wd = elm_widget_data_get(obj);
795 if (!wd) return EINA_TRUE;
796 return elm_entry_is_empty(wd->entry);
800 * This returns all selected text within the scrolled entry.
802 * @param obj The scrolled entry object
803 * @return The selected text within the scrolled entry or NULL on failure
805 * @ingroup Scrolled_Entry
808 elm_scrolled_entry_selection_get(const Evas_Object *obj)
810 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
811 Widget_Data *wd = elm_widget_data_get(obj);
812 if (!wd) return NULL;
813 return elm_entry_selection_get(wd->entry);
817 * This inserts text in @p entry at the beginning of the scrolled entry
820 * @param obj The scrolled entry object
821 * @param entry The text to insert
823 * @ingroup Scrolled_Entry
826 elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry)
828 ELM_CHECK_WIDTYPE(obj, widtype);
829 Widget_Data *wd = elm_widget_data_get(obj);
831 elm_entry_entry_insert(wd->entry, entry);
835 * This enables word line wrapping in the scrolled entry object. It is the opposite
836 * of elm_scrolled_entry_single_line_set(). Additionally, setting this disables
837 * character line wrapping.
838 * See also elm_scrolled_entry_line_char_wrap_set().
840 * @param obj The scrolled entry object
841 * @param wrap wrap according to Elm_Wrap_Type
842 * of the object. Wrapping will occur at the end of the word before the end of the
845 * @ingroup Scrolled_Entry
848 elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap)
850 ELM_CHECK_WIDTYPE(obj, widtype);
851 Widget_Data *wd = elm_widget_data_get(obj);
853 elm_entry_line_wrap_set(wd->entry, wrap);
857 * This sets the editable attribute of the scrolled entry.
859 * @param obj The scrolled entry object
860 * @param editable If true, the scrolled entry will be editable by the user.
861 * If false, it will be set to the disabled state.
863 * @ingroup Scrolled_Entry
866 elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
868 ELM_CHECK_WIDTYPE(obj, widtype);
869 Widget_Data *wd = elm_widget_data_get(obj);
871 elm_entry_editable_set(wd->entry, editable);
875 * This gets the editable attribute of the scrolled entry.
876 * See also elm_scrolled_entry_editable_set().
878 * @param obj The scrolled entry object
879 * @return If true, the scrolled entry is editable by the user.
880 * If false, it is not editable by the user
882 * @ingroup Scrolled_Entry
885 elm_scrolled_entry_editable_get(const Evas_Object *obj)
887 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
888 Widget_Data *wd = elm_widget_data_get(obj);
889 if (!wd) return EINA_FALSE;
890 return elm_entry_editable_get(wd->entry);
895 * This drops any existing text selection within the scrolled entry.
897 * @param obj The scrolled entry object
899 * @ingroup Scrolled_Entry
902 elm_scrolled_entry_select_none(Evas_Object *obj)
904 ELM_CHECK_WIDTYPE(obj, widtype);
905 Widget_Data *wd = elm_widget_data_get(obj);
907 elm_entry_select_none(wd->entry);
911 * This selects all text within the scrolled entry.
913 * @param obj The scrolled entry object
915 * @ingroup Scrolled_Entry
918 elm_scrolled_entry_select_all(Evas_Object *obj)
920 ELM_CHECK_WIDTYPE(obj, widtype);
921 Widget_Data *wd = elm_widget_data_get(obj);
923 elm_entry_select_all(wd->entry);
927 * This moves the cursor one place to the right within the entry.
929 * @param obj The scrolled entry object
930 * @return EINA_TRUE upon success, EINA_FALSE upon failure
932 * @ingroup Scrolled_Entry
935 elm_scrolled_entry_cursor_next(Evas_Object *obj)
937 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
938 Widget_Data *wd = elm_widget_data_get(obj);
939 if (!wd) return EINA_FALSE;
940 return elm_entry_cursor_next(wd->entry);
944 * This moves the cursor one place to the left within the entry.
946 * @param obj The scrolled entry object
947 * @return EINA_TRUE upon success, EINA_FALSE upon failure
949 * @ingroup Scrolled_Entry
952 elm_scrolled_entry_cursor_prev(Evas_Object *obj)
954 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
955 Widget_Data *wd = elm_widget_data_get(obj);
956 if (!wd) return EINA_FALSE;
957 return elm_entry_cursor_prev(wd->entry);
961 * This moves the cursor one line up within the entry.
963 * @param obj The scrolled entry object
964 * @return EINA_TRUE upon success, EINA_FALSE upon failure
966 * @ingroup Scrolled_Entry
969 elm_scrolled_entry_cursor_up(Evas_Object *obj)
971 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
972 Widget_Data *wd = elm_widget_data_get(obj);
973 if (!wd) return EINA_FALSE;
974 return elm_entry_cursor_up(wd->entry);
978 * This moves the cursor one line down within the entry.
980 * @param obj The scrolled entry object
981 * @return EINA_TRUE upon success, EINA_FALSE upon failure
983 * @ingroup Scrolled_Entry
986 elm_scrolled_entry_cursor_down(Evas_Object *obj)
988 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
989 Widget_Data *wd = elm_widget_data_get(obj);
990 if (!wd) return EINA_FALSE;
991 return elm_entry_cursor_down(wd->entry);
995 * This moves the cursor to the beginning of the entry.
997 * @param obj The scrolled entry object
999 * @ingroup Scrolled_Entry
1002 elm_scrolled_entry_cursor_begin_set(Evas_Object *obj)
1004 ELM_CHECK_WIDTYPE(obj, widtype);
1005 Widget_Data *wd = elm_widget_data_get(obj);
1007 elm_entry_cursor_begin_set(wd->entry);
1011 * This moves the cursor to the end of the entry.
1013 * @param obj The scrolled entry object
1015 * @ingroup Scrolled_Entry
1018 elm_scrolled_entry_cursor_end_set(Evas_Object *obj)
1020 ELM_CHECK_WIDTYPE(obj, widtype);
1021 Widget_Data *wd = elm_widget_data_get(obj);
1024 elm_entry_cursor_end_set(wd->entry);
1025 elm_widget_show_region_get(wd->entry, &x, &y, &w, &h);
1026 elm_scroller_region_show(wd->scroller, x, y, w, h);
1030 * This moves the cursor to the beginning of the current line.
1032 * @param obj The scrolled entry object
1034 * @ingroup Scrolled_Entry
1037 elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj)
1039 ELM_CHECK_WIDTYPE(obj, widtype);
1040 Widget_Data *wd = elm_widget_data_get(obj);
1042 elm_entry_cursor_line_begin_set(wd->entry);
1046 * This moves the cursor to the end of the current line.
1048 * @param obj The scrolled entry object
1050 * @ingroup Scrolled_Entry
1053 elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj)
1055 ELM_CHECK_WIDTYPE(obj, widtype);
1056 Widget_Data *wd = elm_widget_data_get(obj);
1058 elm_entry_cursor_line_end_set(wd->entry);
1062 * This begins a selection within the scrolled entry as though
1063 * the user were holding down the mouse button to make a selection.
1065 * @param obj The scrolled entry object
1067 * @ingroup Scrolled_Entry
1070 elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj)
1072 ELM_CHECK_WIDTYPE(obj, widtype);
1073 Widget_Data *wd = elm_widget_data_get(obj);
1075 elm_entry_cursor_selection_begin(wd->entry);
1079 * This ends a selection within the scrolled entry as though
1080 * the user had just released the mouse button while making a selection.
1082 * @param obj The scrolled entry object
1084 * @ingroup Scrolled_Entry
1087 elm_scrolled_entry_cursor_selection_end(Evas_Object *obj)
1089 ELM_CHECK_WIDTYPE(obj, widtype);
1090 Widget_Data *wd = elm_widget_data_get(obj);
1092 elm_entry_cursor_selection_end(wd->entry);
1096 * TODO: fill this in
1098 * @param obj The scrolled entry object
1099 * @return TODO: fill this in
1101 * @ingroup Scrolled_Entry
1104 elm_scrolled_entry_cursor_is_format_get(const Evas_Object *obj)
1106 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
1107 Widget_Data *wd = elm_widget_data_get(obj);
1108 if (!wd) return EINA_FALSE;
1109 return elm_entry_cursor_is_format_get(wd->entry);
1113 * This returns whether the cursor is visible.
1115 * @param obj The scrolled entry object
1116 * @return If true, the cursor is visible.
1118 * @ingroup Scrolled_Entry
1121 elm_scrolled_entry_cursor_is_visible_format_get(const Evas_Object *obj)
1123 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
1124 Widget_Data *wd = elm_widget_data_get(obj);
1125 if (!wd) return EINA_FALSE;
1126 return elm_entry_cursor_is_visible_format_get(wd->entry);
1130 * TODO: fill this in
1132 * @param obj The scrolled entry object
1133 * @return TODO: fill this in
1135 * @ingroup Scrolled_Entry
1138 elm_scrolled_entry_cursor_content_get(const Evas_Object *obj)
1140 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1141 Widget_Data *wd = elm_widget_data_get(obj);
1142 if (!wd) return NULL;
1143 return elm_entry_cursor_content_get(wd->entry);
1147 * Sets the cursor position in the scrolled entry to the given value
1149 * @param obj The scrolled entry object
1150 * @param pos the position of the cursor
1152 * @ingroup Scrolled_Entry
1155 elm_scrolled_entry_cursor_pos_set(Evas_Object *obj, int pos)
1157 ELM_CHECK_WIDTYPE(obj, widtype);
1158 Widget_Data *wd = elm_widget_data_get(obj);
1160 elm_entry_cursor_pos_set(wd->entry, pos);
1164 * Retrieves the current position of the cursor in the scrolled entry
1166 * @param obj The entry object
1167 * @return the cursor position
1169 * @ingroup Scrolled_Entry
1172 elm_scrolled_entry_cursor_pos_get(const Evas_Object *obj)
1174 ELM_CHECK_WIDTYPE(obj, widtype) 0;
1175 Widget_Data *wd = elm_widget_data_get(obj);
1177 return elm_entry_cursor_pos_get(wd->entry);
1181 * This executes a "cut" action on the selected text in the scrolled entry.
1183 * @param obj The scrolled entry object
1185 * @ingroup Scrolled_Entry
1188 elm_scrolled_entry_selection_cut(Evas_Object *obj)
1190 ELM_CHECK_WIDTYPE(obj, widtype);
1191 Widget_Data *wd = elm_widget_data_get(obj);
1193 elm_entry_selection_cut(wd->entry);
1197 * This executes a "copy" action on the selected text in the scrolled entry.
1199 * @param obj The scrolled entry object
1201 * @ingroup Scrolled_Entry
1204 elm_scrolled_entry_selection_copy(Evas_Object *obj)
1206 ELM_CHECK_WIDTYPE(obj, widtype);
1207 Widget_Data *wd = elm_widget_data_get(obj);
1209 elm_entry_selection_copy(wd->entry);
1213 * This executes a "paste" action in the scrolled entry.
1215 * @param obj The scrolled entry object
1217 * @ingroup Scrolled_Entry
1220 elm_scrolled_entry_selection_paste(Evas_Object *obj)
1222 ELM_CHECK_WIDTYPE(obj, widtype);
1223 Widget_Data *wd = elm_widget_data_get(obj);
1225 elm_entry_selection_paste(wd->entry);
1229 * This clears and frees the items in a scrolled entry's contextual (right click) menu.
1231 * @param obj The scrolled entry object
1233 * @ingroup Scrolled_Entry
1236 elm_scrolled_entry_context_menu_clear(Evas_Object *obj)
1238 ELM_CHECK_WIDTYPE(obj, widtype);
1239 Widget_Data *wd = elm_widget_data_get(obj);
1241 elm_entry_context_menu_clear(wd->entry);
1245 * This adds an item to the scrolled entry's contextual menu.
1247 * @param obj The scrolled entry object
1248 * @param label The item's text label
1249 * @param icon_file The item's icon file
1250 * @param icon_type The item's icon type
1251 * @param func The callback to execute when the item is clicked
1252 * @param data The data to associate with the item for related functions
1254 * @ingroup Scrolled_Entry
1257 elm_scrolled_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data)
1259 Elm_Entry_Context_Menu_Item *ci;
1260 ELM_CHECK_WIDTYPE(obj, widtype);
1261 Widget_Data *wd = elm_widget_data_get(obj);
1264 ci = malloc(sizeof(Elm_Entry_Context_Menu_Item));
1267 ci->data = (void *)data;
1269 wd->items = eina_list_append(wd->items, ci);
1270 elm_entry_context_menu_item_add(wd->entry, label, icon_file, icon_type, _context_item_wrap_cb, ci);
1274 * This disables the scrolled entry's contextual (right click) menu.
1276 * @param obj The scrolled entry object
1277 * @param disabled If true, the menu is disabled
1279 * @ingroup Scrolled_Entry
1282 elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled)
1284 ELM_CHECK_WIDTYPE(obj, widtype);
1285 Widget_Data *wd = elm_widget_data_get(obj);
1287 elm_entry_context_menu_disabled_set(wd->entry, disabled);
1291 * This returns whether the scrolled entry's contextual (right click) menu is disabled.
1293 * @param obj The scrolled entry object
1294 * @return If true, the menu is disabled
1296 * @ingroup Scrolled_Entry
1299 elm_scrolled_entry_context_menu_disabled_get(const Evas_Object *obj)
1301 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
1302 Widget_Data *wd = elm_widget_data_get(obj);
1303 if (!wd) return EINA_FALSE;
1304 return elm_entry_context_menu_disabled_get(wd->entry);
1308 * This sets the scrolled entry's scrollbar policy (ie. enabling/disabling them).
1310 * @param obj The scrolled entry object
1311 * @param h The horizontal scrollbar policy to apply
1312 * @param v The vertical scrollbar policy to apply
1314 * @ingroup Scrolled_Entry
1317 elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v)
1319 ELM_CHECK_WIDTYPE(obj, widtype);
1320 Widget_Data *wd = elm_widget_data_get(obj);
1324 elm_scroller_policy_set(wd->scroller, h, v);
1328 * This enables/disables bouncing within the entry.
1330 * @param obj The scrolled entry object
1331 * @param h The horizontal bounce state
1332 * @param v The vertical bounce state
1334 * @ingroup Scrolled_Entry
1337 elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
1339 ELM_CHECK_WIDTYPE(obj, widtype);
1340 Widget_Data *wd = elm_widget_data_get(obj);
1342 elm_scroller_bounce_set(wd->scroller, h_bounce, v_bounce);
1346 * Get the bounce mode
1348 * @param obj The Scrolled_Entry object
1349 * @param h_bounce Allow bounce horizontally
1350 * @param v_bounce Allow bounce vertically
1352 * @ingroup Scrolled_Entry
1355 elm_scrolled_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
1357 ELM_CHECK_WIDTYPE(obj, widtype);
1358 Widget_Data *wd = elm_widget_data_get(obj);
1360 elm_scroller_bounce_get(wd->scroller, h_bounce, v_bounce);
1364 * This appends a custom item provider to the list for that entry
1366 * This appends the given callback. The list is walked from beginning to end
1367 * with each function called given the item href string in the text. If the
1368 * function returns an object handle other than NULL (it should create an
1369 * and object to do this), then this object is used to replace that item. If
1370 * not the next provider is called until one provides an item object, or the
1371 * default provider in entry does.
1373 * @param obj The entry object
1374 * @param func The function called to provide the item object
1375 * @param data The data passed to @p func
1377 * @ingroup Scrolled_Entry
1380 elm_scrolled_entry_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data)
1382 ELM_CHECK_WIDTYPE(obj, widtype);
1383 Widget_Data *wd = elm_widget_data_get(obj);
1385 EINA_SAFETY_ON_NULL_RETURN(func);
1386 Elm_Entry_Item_Provider *ip = calloc(1, sizeof(Elm_Entry_Item_Provider));
1390 wd->item_providers = eina_list_append(wd->item_providers, ip);
1394 * This prepends a custom item provider to the list for that entry
1396 * This prepends the given callback. See elm_scrolled_entry_item_provider_append() for
1399 * @param obj The entry object
1400 * @param func The function called to provide the item object
1401 * @param data The data passed to @p func
1403 * @ingroup Scrolled_Entry
1406 elm_scrolled_entry_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data)
1408 ELM_CHECK_WIDTYPE(obj, widtype);
1409 Widget_Data *wd = elm_widget_data_get(obj);
1411 EINA_SAFETY_ON_NULL_RETURN(func);
1412 Elm_Entry_Item_Provider *ip = calloc(1, sizeof(Elm_Entry_Item_Provider));
1416 wd->item_providers = eina_list_prepend(wd->item_providers, ip);
1420 * This removes a custom item provider to the list for that entry
1422 * This removes the given callback. See elm_scrolled_entry_item_provider_append() for
1425 * @param obj The entry object
1426 * @param func The function called to provide the item object
1427 * @param data The data passed to @p func
1429 * @ingroup Scrolled_Entry
1432 elm_scrolled_entry_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data)
1434 ELM_CHECK_WIDTYPE(obj, widtype);
1435 Widget_Data *wd = elm_widget_data_get(obj);
1437 Elm_Entry_Item_Provider *ip;
1439 EINA_SAFETY_ON_NULL_RETURN(func);
1440 EINA_LIST_FOREACH(wd->item_providers, l, ip)
1442 if ((ip->func == func) && (ip->data == data))
1444 wd->item_providers = eina_list_remove_list(wd->item_providers, l);
1452 * Append a filter function for text inserted in the entry
1454 * Append the given callback to the list. This functions will be called
1455 * whenever any text is inserted into the entry, with the text to be inserted
1456 * as a parameter. The callback function is free to alter the text in any way
1457 * it wants, but it must remember to free the given pointer and update it.
1458 * If the new text is to be discarded, the function can free it and set it text
1459 * parameter to NULL. This will also prevent any following filters from being
1462 * @param obj The entry object
1463 * @param func The function to use as text filter
1464 * @param data User data to pass to @p func
1466 * @ingroup Scrolled_Entry
1469 elm_scrolled_entry_text_filter_append(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data)
1472 Elm_Entry_Text_Filter *tf;
1473 ELM_CHECK_WIDTYPE(obj, widtype);
1475 wd = elm_widget_data_get(obj);
1477 EINA_SAFETY_ON_NULL_RETURN(func);
1479 tf = ELM_NEW(Elm_Entry_Text_Filter);
1483 wd->text_filters = eina_list_append(wd->text_filters, tf);
1487 * Prepend a filter function for text insdrted in the entry
1489 * Prepend the given callback to the list. See elm_scrolled_entry_text_filter_append()
1490 * for more information
1492 * @param obj The entry object
1493 * @param func The function to use as text filter
1494 * @param data User data to pass to @p func
1496 * @ingroup Scrolled_Entry
1499 elm_scrolled_entry_text_filter_prepend(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data)
1502 Elm_Entry_Text_Filter *tf;
1503 ELM_CHECK_WIDTYPE(obj, widtype);
1505 wd = elm_widget_data_get(obj);
1507 EINA_SAFETY_ON_NULL_RETURN(func);
1509 tf = ELM_NEW(Elm_Entry_Text_Filter);
1513 wd->text_filters = eina_list_prepend(wd->text_filters, tf);
1517 * Remove a filter from the list
1519 * Removes the given callback from the filter list. See elm_scrolled_entry_text_filter_append()
1520 * for more information.
1522 * @param obj The entry object
1523 * @param func The filter function to remove
1524 * @param data The user data passed when adding the function
1526 * @ingroup Scrolled_Entry
1529 elm_scrolled_entry_text_filter_remove(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data)
1533 Elm_Entry_Text_Filter *tf;
1534 ELM_CHECK_WIDTYPE(obj, widtype);
1536 wd = elm_widget_data_get(obj);
1538 EINA_SAFETY_ON_NULL_RETURN(func);
1540 EINA_LIST_FOREACH(wd->text_filters, l, tf)
1542 if ((tf->func == func) && (tf->data == data))
1544 wd->text_filters = eina_list_remove_list(wd->text_filters, l);
1552 * This sets the file (and implicitly loads it) for the text to display and
1553 * then edit. All changes are written back to the file after a short delay if
1554 * the entry object is set to autosave.
1556 * @param obj The scrolled entry object
1557 * @param file The path to the file to load and save
1558 * @param format The file format
1560 * @ingroup Scrolled_Entry
1563 elm_scrolled_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
1565 ELM_CHECK_WIDTYPE(obj, widtype);
1566 Widget_Data *wd = elm_widget_data_get(obj);
1568 elm_entry_file_set(wd->entry, file, format);
1572 * Gets the file to load and save and the file format
1574 * @param obj The scrolled entry object
1575 * @param file The path to the file to load and save
1576 * @param format The file format
1578 * @ingroup Scrolled_Entry
1581 elm_scrolled_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format)
1583 ELM_CHECK_WIDTYPE(obj, widtype);
1584 Widget_Data *wd = elm_widget_data_get(obj);
1586 elm_entry_file_get(wd->entry, file, format);
1590 * This function writes any changes made to the file set with
1591 * elm_scrolled_entry_file_set()
1593 * @param obj The scrolled entry object
1595 * @ingroup Scrolled_Entry
1598 elm_scrolled_entry_file_save(Evas_Object *obj)
1600 ELM_CHECK_WIDTYPE(obj, widtype);
1601 Widget_Data *wd = elm_widget_data_get(obj);
1603 elm_entry_file_save(wd->entry);
1607 * This sets the entry object to 'autosave' the loaded text file or not.
1609 * @param obj The scrolled entry object
1610 * @param autosave Autosave the loaded file or not
1612 * @ingroup Scrolled_Entry
1615 elm_scrolled_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave)
1617 ELM_CHECK_WIDTYPE(obj, widtype);
1618 Widget_Data *wd = elm_widget_data_get(obj);
1620 elm_entry_autosave_set(wd->entry, autosave);
1624 * This gets the entry object's 'autosave' status.
1626 * @param obj The scrolled entry object
1627 * @return Autosave the loaded file or not
1629 * @ingroup Scrolled_Entry
1632 elm_scrolled_entry_autosave_get(const Evas_Object *obj)
1634 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
1635 Widget_Data *wd = elm_widget_data_get(obj);
1636 if (!wd) return EINA_FALSE;
1637 return elm_entry_autosave_get(wd->entry);
1641 * Control pasting of text and images for the widget.
1643 * Normally the scrolled entry allows both text and images to be pasted.
1644 * By setting textonly to be true, this prevents images from being pasted.
1646 * Note this only changes the behaviour of text.
1648 * @param obj The scrolled entry object
1649 * @param textonly paste mode - EINA_TRUE is text only, EINA_FALSE is text+image+other.
1651 * @see elm_entry_cnp_textonly_set
1652 * @ingroup Scrolled_Entry
1655 elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly)
1657 ELM_CHECK_WIDTYPE(obj, widtype);
1658 Widget_Data *wd = elm_widget_data_get(obj);
1660 elm_entry_cnp_textonly_set(wd->entry, textonly);
1664 * Getting elm_scrolled_entry text paste/drop mode.
1666 * In textonly mode, only text may be pasted or dropped into the widget.
1668 * @param obj The scrolled entry object
1669 * @return If the widget only accepts text from pastes.
1671 * @see elm_entry_cnp_textonly_get
1672 * @ingroup Scrolled_Entry
1675 elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj)
1677 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
1678 Widget_Data *wd = elm_widget_data_get(obj);
1679 if (!wd) return EINA_FALSE;
1680 return elm_entry_cnp_textonly_get(wd->entry);