2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Collections.Generic;
19 using System.Runtime.InteropServices;
24 /// Enumeration for describing the InputPanel layout types.
26 /// <since_tizen> preview </since_tizen>
27 [Obsolete("This has been deprecated in API12")]
28 public enum InputPanelLayout
31 /// The InputPanel layout type default.
36 /// The InputPanel layout type number.
41 /// The InputPanel layout type email.
46 /// The InputPanel layout type URL.
51 /// The InputPanel layout type phone.
56 /// The InputPanel layout type IP.
61 /// The InputPanel layout type month.
66 /// The InputPanel layout type number.
71 /// The InputPanel layout type error type. Do not use it directly!
76 /// The InputPanel layout type hexadecimal.
81 /// The InputPanel layout type terminal type: Esc, Alt, Ctrl, etc.
86 /// The InputPanel layout type password.
91 /// The keyboard layout type date and time.
96 /// The InputPanel layout type emoticons.
102 /// Enumeration for defining the "Return" key types on the input panel (virtual keyboard).
104 /// <since_tizen> preview </since_tizen>
105 [Obsolete("This has been deprecated in API12")]
106 public enum InputPanelReturnKeyType
109 /// The Default key type.
114 /// The Done key type.
124 /// The Join key type.
129 /// The Login key type.
134 /// The Next key type.
139 /// The Search string or magnifier icon key type.
144 /// The Send key type.
149 /// The Sign-in key type.
155 /// Enumeration for defining the autocapitalization types.
157 /// <since_tizen> preview </since_tizen>
158 [Obsolete("This has been deprecated in API12")]
159 public enum AutoCapital
162 /// No autocapitalization when typing.
167 /// Autocapitalize each of the typed word.
172 /// Autocapitalize the start of each sentence.
177 /// Autocapitalize all the letters.
183 /// Enumeration for defining the entry's copy and paste policy.
185 /// <since_tizen> preview </since_tizen>
186 [Obsolete("This has been deprecated in API12")]
187 public enum CopyAndPasteMode
190 /// Copy and paste text with a markup tag.
195 /// Copy and paste text without an item (image) tag.
200 /// Copy and paste text without a markup tag.
206 /// Enumeration for the text format types.
208 /// <since_tizen> preview </since_tizen>
209 [Obsolete("This has been deprecated in API12")]
210 public enum TextFormat
224 /// Enumeration that defines the types of Input Hints.
226 /// <since_tizen> preview </since_tizen>
227 [Obsolete("This has been deprecated in API12")]
228 public enum InputHints
236 /// Suggest word auto-completion.
241 /// The typed text should not be stored.
247 /// Enumeration for defining the input panel (virtual keyboard) language modes.
249 /// <since_tizen> preview </since_tizen>
250 [Obsolete("This has been deprecated in API12")]
251 public enum InputPanelLanguage
254 /// Automatic language mode.
259 /// Alphabet language mode.
265 /// The Entry is a convenience widget that shows a box in which the user can enter text.
267 /// <since_tizen> preview </since_tizen>
268 [Obsolete("This has been deprecated in API12")]
269 public class Entry : Layout
272 SmartEvent _changedByUser;
273 SmartEvent _cursorChanged;
274 SmartEvent _activated;
276 Dictionary<Func<string, EvasObject>, Interop.Elementary.Elm_Entry_Item_Provider_Cb> _itemsProvider = new Dictionary<Func<string, EvasObject>, Interop.Elementary.Elm_Entry_Item_Provider_Cb>();
277 Dictionary<Func<Entry, string, string>, Interop.Elementary.Elm_Entry_Filter_Cb> _textFilters = new Dictionary<Func<Entry, string, string>, Interop.Elementary.Elm_Entry_Filter_Cb>();
280 /// Creates and initializes a new instance of the Entry class.
282 /// <param name="parent">The EvasObject to which the new Entry will be attached as a child.</param>
283 /// <since_tizen> preview </since_tizen>
284 [Obsolete("This has been deprecated in API12")]
285 public Entry(EvasObject parent) : base(parent)
287 _clicked = new SmartEvent(this, this.RealHandle, "clicked");
288 _clicked.On += (s, e) => Clicked?.Invoke(this, EventArgs.Empty);
290 _changedByUser = new SmartEvent(this, this.RealHandle, "changed,user");
291 _changedByUser.On += (s, e) => ChangedByUser?.Invoke(this, EventArgs.Empty);
293 _cursorChanged = new SmartEvent(this, this.RealHandle, "cursor,changed");
294 _cursorChanged.On += (s, e) => CursorChanged?.Invoke(this, EventArgs.Empty);
296 _activated = new SmartEvent(this, this.RealHandle, "activated");
297 _activated.On += (s, e) => Activated?.Invoke(this, EventArgs.Empty);
301 /// Activated will be triggered when the entry is activated.
303 /// <since_tizen> preview </since_tizen>
304 [Obsolete("This has been deprecated in API12")]
305 public event EventHandler Activated;
308 /// Clicked will be triggered when the entry is clicked.
310 /// <since_tizen> preview </since_tizen>
311 [Obsolete("This has been deprecated in API12")]
312 public event EventHandler Clicked;
315 /// ChangedByUser will be triggered when the entry is changed by user.
317 /// <since_tizen> preview </since_tizen>
318 [Obsolete("This has been deprecated in API12")]
319 public event EventHandler ChangedByUser;
322 /// CursorChanged will be triggered when the cursor in the entry is changed.
324 /// <since_tizen> preview </since_tizen>
325 [Obsolete("This has been deprecated in API12")]
326 public event EventHandler CursorChanged;
329 /// Sets or gets the entry to the single line mode.
331 /// <since_tizen> preview </since_tizen>
332 [Obsolete("This has been deprecated in API12")]
333 public bool IsSingleLine
337 return Interop.Elementary.elm_entry_single_line_get(RealHandle);
341 Interop.Elementary.elm_entry_single_line_set(RealHandle, value);
346 /// Sets or gets the entry to the password mode.
348 /// <since_tizen> preview </since_tizen>
349 [Obsolete("This has been deprecated in API12")]
350 public bool IsPassword
354 return Interop.Elementary.elm_entry_password_get(RealHandle);
358 Interop.Elementary.elm_entry_password_set(RealHandle, value);
363 /// Sets or gets whether the entry is editable.
365 /// <since_tizen> preview </since_tizen>
366 [Obsolete("This has been deprecated in API12")]
367 public bool IsEditable
371 return Interop.Elementary.elm_entry_editable_get(RealHandle);
375 Interop.Elementary.elm_entry_editable_set(RealHandle, value);
380 /// Sets or gets whether the entry is empty.
382 /// <since_tizen> preview </since_tizen>
383 [Obsolete("This has been deprecated in API12")]
388 return Interop.Elementary.elm_entry_is_empty(RealHandle);
393 /// Sets or gets the text currently shown in the object entry.
395 /// <since_tizen> preview </since_tizen>
396 [Obsolete("This has been deprecated in API12")]
397 public override string Text
401 return Interop.Elementary.elm_entry_entry_get(RealHandle);
405 Interop.Elementary.elm_entry_entry_set(RealHandle, value);
410 /// Sets or gets the style on top of the user style stack.
412 /// <remarks>If there are styles in the user style stack, the properties in the top style of the user style stack will replace the properties in current theme. The input style is specified in the format, tag='property=value' (i.e., DEFAULT='font=Sans font_size=60'hilight=' + font_weight=Bold').</remarks>
413 /// <since_tizen> preview </since_tizen>
414 [Obsolete("This has been deprecated in API12")]
415 public string TextStyle
419 return Interop.Elementary.elm_entry_text_style_user_peek(RealHandle);
423 Interop.Elementary.elm_entry_text_style_user_push(RealHandle, value);
428 /// Sets or gets the current position of the cursor in the entry.
430 /// <since_tizen> preview </since_tizen>
431 [Obsolete("This has been deprecated in API12")]
432 public int CursorPosition
436 return Interop.Elementary.elm_entry_cursor_pos_get(RealHandle);
440 Interop.Elementary.elm_entry_cursor_pos_set(RealHandle, value);
445 /// Sets or gets the scrollable state of the entry.
447 /// <since_tizen> preview </since_tizen>
448 [Obsolete("This has been deprecated in API12")]
449 public bool Scrollable
453 return Interop.Elementary.elm_entry_scrollable_get(RealHandle);
457 // HACK: Enabling the scrollable property of an entry causes its internal
458 // hierarchy to change, making the internal edje object inaccessible.
459 // Access it before the property is set, to cache the edje object's handle.
462 var dummy = EdjeObject;
464 Interop.Elementary.elm_entry_scrollable_set(RealHandle, value);
469 /// Sets or gets the autocapitalization type on the immodule.
471 /// <since_tizen> preview </since_tizen>
472 [Obsolete("This has been deprecated in API12")]
473 public AutoCapital AutoCapital
477 return (AutoCapital)Interop.Elementary.elm_entry_autocapital_type_get(RealHandle);
481 Interop.Elementary.elm_entry_autocapital_type_set(RealHandle, (Interop.Elementary.AutocapitalType)value);
486 /// Sets or gets the entry object's 'autosave' status.
488 /// <since_tizen> preview </since_tizen>
489 [Obsolete("This has been deprecated in API12")]
490 public bool IsAutoSave
494 return Interop.Elementary.elm_entry_autosave_get(RealHandle);
498 Interop.Elementary.elm_entry_autosave_set(RealHandle, value);
503 /// Sets or gets the entry text paste/drop mode.
505 /// <since_tizen> preview </since_tizen>
506 [Obsolete("This has been deprecated in API12")]
507 public CopyAndPasteMode CopyAndPasteMode
511 return (CopyAndPasteMode)Interop.Elementary.elm_entry_cnp_mode_get(RealHandle);
515 Interop.Elementary.elm_entry_cnp_mode_set(RealHandle, (Interop.Elementary.CopyAndPasteMode)value);
520 /// Gets the geometry of the cursor.
522 /// <since_tizen> preview </since_tizen>
523 [Obsolete("This has been deprecated in API12")]
524 public Rect CursorGeometry
529 Interop.Elementary.elm_entry_cursor_geometry_get(RealHandle, out x, out y, out w, out h);
530 return new Rect(x, y, w, h);
535 /// Gets whether a format node exists at the current cursor position.
537 /// <since_tizen> preview </since_tizen>
538 [Obsolete("This has been deprecated in API12")]
539 public bool IsCursorFormat
543 return Interop.Elementary.elm_entry_cursor_is_format_get(RealHandle);
548 /// Gets if the current cursor position holds a visible format node.
550 /// <since_tizen> preview </since_tizen>
551 [Obsolete("This has been deprecated in API12")]
552 public bool IsCursorVisibelFormat
556 return Interop.Elementary.elm_entry_cursor_is_visible_format_get(RealHandle);
561 /// Sets or gets the value of the input hint.
563 /// <since_tizen> preview </since_tizen>
564 [Obsolete("This has been deprecated in API12")]
565 public InputHints InputHint
569 return (InputHints)Interop.Elementary.elm_entry_input_hint_get(RealHandle);
573 Interop.Elementary.elm_entry_input_hint_set(RealHandle, (Interop.Elementary.InputHints)value);
578 /// Sets or gets the language mode of the input panel.
580 /// <since_tizen> preview </since_tizen>
581 [Obsolete("This has been deprecated in API12")]
582 public InputPanelLanguage InputPanelLanguage
586 return (InputPanelLanguage)Interop.Elementary.elm_entry_input_panel_language_get(RealHandle);
590 Interop.Elementary.elm_entry_input_panel_language_set(RealHandle, (Interop.Elementary.InputPanelLanguage)value);
595 /// Sets or gets the input panel layout variation of the entry.
597 /// <since_tizen> preview </since_tizen>
598 [Obsolete("This has been deprecated in API12")]
599 public int InputPanelVariation
603 return Interop.Elementary.elm_entry_input_panel_layout_variation_get(RealHandle);
607 Interop.Elementary.elm_entry_input_panel_layout_variation_set(RealHandle, value);
612 /// Sets or gets the line wrap type to use on multiline entries.
614 /// <since_tizen> preview </since_tizen>
615 [Obsolete("This has been deprecated in API12")]
616 public WrapType LineWrapType
620 return (WrapType)Interop.Elementary.elm_entry_line_wrap_get(RealHandle);
624 Interop.Elementary.elm_entry_line_wrap_set(RealHandle, (Interop.Elementary.WrapType)value);
629 /// Sets or gets whether the entry should allow to use the text prediction.
631 /// <since_tizen> preview </since_tizen>
632 [Obsolete("This has been deprecated in API12")]
633 public bool PredictionAllowed
637 return Interop.Elementary.elm_entry_prediction_allow_get(RealHandle);
641 Interop.Elementary.elm_entry_prediction_allow_set(RealHandle, value);
646 /// Sets or gets whether the return key on the input panel should be disabled or not.
648 /// <since_tizen> preview </since_tizen>
649 [Obsolete("This has been deprecated in API12")]
650 public bool InputPanelReturnKeyDisabled
654 return Interop.Elementary.elm_entry_input_panel_return_key_disabled_get(RealHandle);
658 Interop.Elementary.elm_entry_input_panel_return_key_disabled_set(RealHandle, value);
663 /// Sets or gets the attribute to show the input panel, in case of only an user's explicit Mouse Up event.
664 /// It doesn't request to show the input panel even though it has focus.
665 /// If true, the input panel will be shown only in case of the Mouse up event (Focus event will be ignored).
667 /// <since_tizen> preview </since_tizen>
668 [Obsolete("This has been deprecated in API12")]
669 public bool InputPanelShowByOnDemand
673 return Interop.Elementary.elm_entry_input_panel_show_on_demand_get(RealHandle);
677 Interop.Elementary.elm_entry_input_panel_show_on_demand_set(RealHandle, value);
682 /// Sets the file (and implicitly loads it) for the text to display and then edit.
684 /// <param name="file">The path to the file to load and save.</param>
685 /// <param name="textFormat">The file format.</param>
686 /// <since_tizen> preview </since_tizen>
687 [Obsolete("This has been deprecated in API12")]
688 public void SetFile(string file, TextFormat textFormat)
690 Interop.Elementary.elm_entry_file_set(RealHandle, file, (Interop.Elementary.TextFormat)textFormat);
694 /// Converts a markup (HTML-like) string into UTF-8.
696 /// <param name="markup">The string (in markup) to be converted.</param>
697 /// <returns>The converted string (in UTF-8).</returns>
698 /// <since_tizen> preview </since_tizen>
699 [Obsolete("This has been deprecated in API12")]
700 public static string ConvertMarkupToUtf8(string markup)
702 return Interop.Elementary.elm_entry_markup_to_utf8(markup);
706 /// Moves the cursor by one position to the right within the entry.
708 /// <returns></returns>
709 /// <since_tizen> preview </since_tizen>
710 [Obsolete("This has been deprecated in API12")]
711 public bool MoveCursorNext()
713 return Interop.Elementary.elm_entry_cursor_next(RealHandle);
717 /// Moves the cursor one place to the left within the entry.
719 /// <returns>TRUE on success, otherwise FALSE on failure.</returns>
720 /// <since_tizen> preview </since_tizen>
721 [Obsolete("This has been deprecated in API12")]
722 public bool MoveCursorPrev()
724 return Interop.Elementary.elm_entry_cursor_prev(RealHandle);
728 /// Moves the cursor one line up within the entry.
730 /// <returns>TRUE on success, otherwise FALSE on failure.</returns>
731 /// <since_tizen> preview </since_tizen>
732 [Obsolete("This has been deprecated in API12")]
733 public bool MoveCursorUp()
735 return Interop.Elementary.elm_entry_cursor_up(RealHandle);
739 /// Moves the cursor one line down within the entry.
741 /// <returns>TRUE on success, otherwise FALSE on failure.</returns>
742 /// <since_tizen> preview </since_tizen>
743 [Obsolete("This has been deprecated in API12")]
744 public bool MoveCursorDown()
746 return Interop.Elementary.elm_entry_cursor_down(RealHandle);
750 /// Moves the cursor to the beginning of the entry.
752 /// <since_tizen> preview </since_tizen>
753 [Obsolete("This has been deprecated in API12")]
754 public void MoveCursorBegin()
756 Interop.Elementary.elm_entry_cursor_begin_set(RealHandle);
760 /// Moves the cursor to the end of the entry.
762 /// <since_tizen> preview </since_tizen>
763 [Obsolete("This has been deprecated in API12")]
764 public void MoveCursorEnd()
766 Interop.Elementary.elm_entry_cursor_end_set(RealHandle);
770 /// Moves the cursor to the beginning of the current line.
772 /// <since_tizen> preview </since_tizen>
773 [Obsolete("This has been deprecated in API12")]
774 public void MoveCursorLineBegin()
776 Interop.Elementary.elm_entry_cursor_line_begin_set(RealHandle);
780 /// Moves the cursor to the end of the current line.
782 /// <since_tizen> preview </since_tizen>
783 [Obsolete("This has been deprecated in API12")]
784 public void MoveCursorLineEnd()
786 Interop.Elementary.elm_entry_cursor_line_end_set(RealHandle);
790 /// Sets the input panel layout of the entry.
792 /// <param name="layout">The layout type.</param>
793 /// <since_tizen> preview </since_tizen>
794 [Obsolete("This has been deprecated in API12")]
795 public void SetInputPanelLayout(InputPanelLayout layout)
797 Interop.Elementary.elm_entry_input_panel_layout_set(RealHandle, (Interop.Elementary.InputPanelLayout)layout);
801 /// Sets the attribute to show the input panel automatically.
803 /// <param name="enabled">If true, the input panel appears when the entry is clicked or has focus, otherwise false.</param>
804 /// <since_tizen> preview </since_tizen>
805 [Obsolete("This has been deprecated in API12")]
806 public void SetInputPanelEnabled(bool enabled)
808 Interop.Elementary.elm_entry_input_panel_enabled_set(RealHandle, enabled);
812 /// Sets the "return" key type. This type is used to set the string or icon on the "return" key of the input panel.
814 /// <param name="keyType">The type of "return" key on the input panel.</param>
815 /// <since_tizen> preview </since_tizen>
816 [Obsolete("This has been deprecated in API12")]
817 public void SetInputPanelReturnKeyType(InputPanelReturnKeyType keyType)
819 Interop.Elementary.elm_entry_input_panel_return_key_type_set(RealHandle, (Interop.Elementary.ReturnKeyType)keyType);
823 /// Hides the input panel (virtual keyboard).
826 /// Note that the input panel is shown or hidden automatically according to the focus state of the entry widget.
827 /// This API can be used in case of manually controlling by using SetInputPanelEnabled(false).
829 /// <since_tizen> preview </since_tizen>
830 [Obsolete("This has been deprecated in API12")]
831 public void HideInputPanel()
833 Interop.Elementary.elm_entry_input_panel_hide(RealHandle);
837 /// Selects all the text within the entry.
839 /// <since_tizen> preview </since_tizen>
840 [Obsolete("This has been deprecated in API12")]
841 public void SelectAll()
843 Interop.Elementary.elm_entry_select_all(RealHandle);
847 /// Drops any existing text selection within the entry.
849 /// <since_tizen> preview </since_tizen>
850 [Obsolete("This has been deprecated in API12")]
851 public void SelectNone()
853 Interop.Elementary.elm_entry_select_none(RealHandle);
857 /// Forces calculation of the entry size and text layout.
859 /// <since_tizen> preview </since_tizen>
860 [Obsolete("This has been deprecated in API12")]
861 public void ForceCalculation()
863 Interop.Elementary.elm_entry_calc_force(RealHandle);
867 /// Gets the string by the cursor at its current position.
869 /// <returns></returns>
870 /// <since_tizen> preview </since_tizen>
871 [Obsolete("This has been deprecated in API12")]
872 public string GetCursorContent()
874 return Interop.Elementary.elm_entry_cursor_content_get(RealHandle);
878 /// Begins a selection within the entry, as though the user was holding down the mouse button to make a selection.
880 /// <since_tizen> preview </since_tizen>
881 [Obsolete("This has been deprecated in API12")]
882 public void BeginCursorSelection()
884 Interop.Elementary.elm_entry_cursor_selection_begin(RealHandle);
888 /// Appends the text of the entry.
890 /// <param name="text">The text to be displayed.</param>
891 /// <since_tizen> preview </since_tizen>
892 [Obsolete("This has been deprecated in API12")]
893 public void AppendText(string text)
895 Interop.Elementary.elm_entry_entry_append(RealHandle, text);
899 /// Sets or gets the value of the HorizontalScrollBarVisiblePolicy.
902 /// ScrollBarVisiblePolicy.Auto means that the horizontal scrollbar is made visible if it is needed, or otherwise kept hidden.
903 /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
905 /// <since_tizen> preview </since_tizen>
906 [Obsolete("This has been deprecated in API12")]
907 public virtual ScrollBarVisiblePolicy HorizontalScrollBarVisiblePolicy
912 Interop.Elementary.elm_scroller_policy_get(RealHandle, out policy, IntPtr.Zero);
913 return (ScrollBarVisiblePolicy)policy;
917 ScrollBarVisiblePolicy v = VerticalScrollBarVisiblePolicy;
918 Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)value, (int)v);
923 /// Sets or gets the value of VerticalScrollBarVisiblePolicy.
926 /// ScrollBarVisiblePolicy.Auto means that the vertical scrollbar is made visible if it is needed, or otherwise kept hidden.
927 /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
929 /// <since_tizen> preview </since_tizen>
930 [Obsolete("This has been deprecated in API12")]
931 public virtual ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy
936 Interop.Elementary.elm_scroller_policy_get(RealHandle, IntPtr.Zero, out policy);
937 return (ScrollBarVisiblePolicy)policy;
941 ScrollBarVisiblePolicy h = HorizontalScrollBarVisiblePolicy;
942 Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)h, (int)value);
947 /// Sets or gets the vertical bounce behavior.
948 /// When scrolling, the scroller may "bounce" when reaching an edge of the content object.
949 /// This is a visual way to indicate that the end has reached.
950 /// This is enabled by default for both the axis.
951 /// This API will be set if it is enabled for the given axis with boolean parameters for each axis.
953 /// <since_tizen> preview </since_tizen>
954 [Obsolete("This has been deprecated in API12")]
955 public bool VerticalBounce
960 Interop.Elementary.elm_scroller_bounce_get(RealHandle, out h, out v);
965 bool h = HorizontalBounce;
966 Interop.Elementary.elm_scroller_bounce_set(RealHandle, h, value);
971 /// Sets or gets the horizontal bounce behavior.
972 /// When scrolling, the scroller may "bounce" when reaching an edge of the content object.
973 /// This is a visual way to indicate that the end has reached.
974 /// This is enabled by default for both the axis.
975 /// This API will be set if it is enabled for the given axis with boolean parameters for each axis.
977 /// <since_tizen> preview </since_tizen>
978 [Obsolete("This has been deprecated in API12")]
979 public bool HorizontalBounce
984 Interop.Elementary.elm_scroller_bounce_get(RealHandle, out h, out v);
989 bool v = VerticalBounce;
990 Interop.Elementary.elm_scroller_bounce_set(RealHandle, value, v);
995 /// Inserts the given text into the entry at the current cursor position.
997 /// <param name="text">The text to be inserted.</param>
998 /// <since_tizen> preview </since_tizen>
999 [Obsolete("This has been deprecated in API12")]
1000 public void InsertTextToCursor(string text)
1002 Interop.Elementary.elm_entry_entry_insert(RealHandle, text);
1006 /// Ends a selection within the entry as though the user had just released the mouse button while making a selection.
1008 /// <since_tizen> preview </since_tizen>
1009 [Obsolete("This has been deprecated in API12")]
1010 public void EndCursorSelection()
1012 Interop.Elementary.elm_entry_cursor_selection_end(RealHandle);
1016 /// Writes any changes made to the file that is set by a file.
1018 /// <since_tizen> preview </since_tizen>
1019 [Obsolete("This has been deprecated in API12")]
1020 public void SaveFile()
1022 Interop.Elementary.elm_entry_file_save(RealHandle);
1026 /// Show the input panel (virtual keyboard) based on the input panel property of the entry such as layout, autocapital types, and so on.
1029 /// Note that the input panel is shown or hidden automatically according to the focus state of the entry widget.
1030 /// This API can be used in the case of manual control by using the SetInputPanelEnabled(false).
1032 /// <since_tizen> preview </since_tizen>
1033 [Obsolete("This has been deprecated in API12")]
1034 public void ShowInputPanel()
1036 Interop.Elementary.elm_entry_input_panel_show(RealHandle);
1040 /// This appends a custom item provider to the list for that entry.
1042 /// <param name="func">This function is used to provide items.</param>
1043 /// <since_tizen> preview </since_tizen>
1044 [Obsolete("This has been deprecated in API12")]
1045 public void AppendItemProvider(Func<string, EvasObject> func)
1049 if (!_itemsProvider.ContainsKey(func))
1051 Interop.Elementary.Elm_Entry_Item_Provider_Cb itemProviderCallback;
1053 itemProviderCallback = (d, o, t) =>
1055 return func?.Invoke(t);
1057 Interop.Elementary.elm_entry_item_provider_append(RealHandle, itemProviderCallback, IntPtr.Zero);
1058 _itemsProvider.Add(func, itemProviderCallback);
1064 /// This prepends a custom item provider to the list for that entry.
1066 /// <param name="func">This function is used to provide items.</param>
1067 /// <since_tizen> preview </since_tizen>
1068 [Obsolete("This has been deprecated in API12")]
1069 public void PrependItemProvider(Func<string, EvasObject> func)
1071 if (!_itemsProvider.ContainsKey(func))
1073 Interop.Elementary.Elm_Entry_Item_Provider_Cb itemProviderCallback;
1075 itemProviderCallback = (d, o, t) =>
1077 return func?.Invoke(t);
1079 Interop.Elementary.elm_entry_item_provider_prepend(RealHandle, itemProviderCallback, IntPtr.Zero);
1080 _itemsProvider.Add(func, itemProviderCallback);
1085 /// This removes a custom item provider to the list for that entry.
1087 /// <param name="func">This function is used to provide items.</param>
1088 /// <since_tizen> preview </since_tizen>
1089 [Obsolete("This has been deprecated in API12")]
1090 public void RemoveItemProvider(Func<string, EvasObject> func)
1092 if (_itemsProvider.ContainsKey(func))
1094 Interop.Elementary.Elm_Entry_Item_Provider_Cb itemProviderCallback;
1095 _itemsProvider.TryGetValue(func, out itemProviderCallback);
1097 Interop.Elementary.elm_entry_item_provider_remove(RealHandle, itemProviderCallback, IntPtr.Zero);
1098 _itemsProvider.Remove(func);
1103 /// Appends a markup filter function for text inserted in the entry.
1105 /// <param name="filter">This function type is used by entry filters to modify text.</param>
1106 /// <since_tizen> preview </since_tizen>
1107 [Obsolete("This has been deprecated in API12")]
1108 public void AppendMarkUpFilter(Func<Entry, string, string> filter)
1110 if (!_textFilters.ContainsKey(filter))
1112 Interop.Elementary.Elm_Entry_Filter_Cb textFilterCallback = (IntPtr d, IntPtr e, ref IntPtr t) =>
1114 var text = Marshal.PtrToStringAnsi(t);
1116 var updateText = filter(this, text);
1118 if (updateText != text)
1120 Interop.Libc.Free(t);
1121 t = Marshal.StringToHGlobalAnsi(updateText);
1124 Interop.Elementary.elm_entry_markup_filter_append(RealHandle, textFilterCallback, IntPtr.Zero);
1125 _textFilters.Add(filter, textFilterCallback);
1130 /// Prepends a markup filter function for text inserted in the entry.
1132 /// <param name="filter">This function type is used by entry filters to modify text.</param>
1133 /// <since_tizen> preview </since_tizen>
1134 [Obsolete("This has been deprecated in API12")]
1135 public void PrependMarkUpFilter(Func<Entry, string, string> filter)
1137 if (!_textFilters.ContainsKey(filter))
1139 Interop.Elementary.Elm_Entry_Filter_Cb textFilterCallback = (IntPtr d, IntPtr e, ref IntPtr t) =>
1141 var text = Marshal.PtrToStringAnsi(t);
1143 var updateText = filter(this, text);
1145 if (updateText != text)
1147 Interop.Libc.Free(t);
1148 t = Marshal.StringToHGlobalAnsi(updateText);
1151 Interop.Elementary.elm_entry_markup_filter_prepend(RealHandle, textFilterCallback, IntPtr.Zero);
1152 _textFilters.Add(filter, textFilterCallback);
1157 /// Removes a markup filter.
1159 /// <param name="filter">This function type is used by entry filters to modify text.</param>
1160 /// <since_tizen> preview </since_tizen>
1161 [Obsolete("This has been deprecated in API12")]
1162 public void RemoveMarkUpFilter(Func<Entry, string, string> filter)
1164 if (_textFilters.ContainsKey(filter))
1166 Interop.Elementary.Elm_Entry_Filter_Cb textFilterCallback;
1167 _textFilters.TryGetValue(filter, out textFilterCallback);
1169 Interop.Elementary.elm_entry_markup_filter_remove(RealHandle, textFilterCallback, IntPtr.Zero);
1170 _textFilters.Remove(filter);
1175 /// This executes a "copy" action on the selected text in the entry.
1177 /// <since_tizen> preview </since_tizen>
1178 [Obsolete("This has been deprecated in API12")]
1179 public void CopySelection()
1181 Interop.Elementary.elm_entry_selection_copy(RealHandle);
1185 /// This executes a "cut" action on the selected text in the entry.
1187 /// <since_tizen> preview </since_tizen>
1188 [Obsolete("This has been deprecated in API12")]
1189 public void CutSelection()
1191 Interop.Elementary.elm_entry_selection_cut(RealHandle);
1195 /// This executes a "paste" action in the entry.
1197 /// <since_tizen> preview </since_tizen>
1198 [Obsolete("This has been deprecated in API12")]
1199 public void PasteSelection()
1201 Interop.Elementary.elm_entry_selection_paste(RealHandle);
1205 /// This disables the entry's selection handlers.
1206 /// This works properly on the profile that provides selection handlers.
1208 /// <param name="disable">If true, the selection handlers are disabled.</param>
1209 /// <since_tizen> preview </since_tizen>
1210 [Obsolete("This has been deprecated in API12")]
1211 public void DisableSelection(bool disable)
1213 Interop.Elementary.elm_entry_selection_handler_disabled_set(RealHandle, disable);
1217 /// Gets any selected text within the entry.
1219 /// <returns>Selection's value.</returns>
1220 /// <since_tizen> preview </since_tizen>
1221 [Obsolete("This has been deprecated in API12")]
1222 public string GetSelection()
1224 return Interop.Elementary.elm_entry_selection_get(RealHandle);
1228 /// This selects a region of text within the entry.
1230 /// <param name="start">The start position.</param>
1231 /// <param name="end">The end position.</param>
1232 /// <since_tizen> preview </since_tizen>
1233 [Obsolete("This has been deprecated in API12")]
1234 public void SetSelectionRegion(int start, int end)
1236 Interop.Elementary.elm_entry_select_region_set(RealHandle, start, end);
1240 /// Sets the visibility of the left-side widget of the entry.
1242 /// <param name="isDisplay">true if the object should be displayed, otherwise false.</param>
1243 /// <since_tizen> preview </since_tizen>
1244 [Obsolete("This has been deprecated in API12")]
1245 public void SetIconVisible(bool isDisplay)
1247 Interop.Elementary.elm_entry_icon_visible_set(RealHandle, isDisplay);
1251 /// Sets whether the return key on the input panel is disabled automatically, when the entry has no text.
1253 /// <param name="enable">If enabled is true, the return key is automatically disabled when the entry has no text.</param>
1254 /// <since_tizen> preview </since_tizen>
1255 [Obsolete("This has been deprecated in API12")]
1256 public void SetInputPanelReturnKeyAutoEnable(bool enable)
1258 Interop.Elementary.elm_entry_input_panel_return_key_autoenabled_set(RealHandle, enable);
1262 /// Creates a widget handle.
1264 /// <param name="parent">Parent EvasObject.</param>
1265 /// <returns>Handle IntPtr.</returns>
1266 /// <since_tizen> preview </since_tizen>
1267 [Obsolete("This has been deprecated in API12")]
1268 protected override IntPtr CreateHandle(EvasObject parent)
1270 return Interop.Elementary.elm_entry_add(parent.Handle);