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.
22 /// Enumeration for the selection modes of GenItem.
24 /// <since_tizen> preview </since_tizen>
25 [Obsolete("This has been deprecated in API12")]
26 public enum GenItemSelectionMode
29 /// Default select mode.
34 /// Always select mode.
44 /// No select mode with no finger size rule.
50 /// It inherits <see cref="ItemObject"/>.
51 /// A base class for <see cref="GenGridItem"/> and <see cref="GenListItem"/>.
52 /// It contains the GenItem class and data to display the data.
54 /// <since_tizen> preview </since_tizen>
55 [Obsolete("This has been deprecated in API12")]
56 public abstract class GenItem : ItemObject
58 internal Interop.Elementary.Elm_Tooltip_Item_Content_Cb _tooltipCb;
59 GetTooltipContentDelegate _tooltipContentDelegate = null;
62 /// The delegate returning the tooltip contents.
64 /// <since_tizen> preview </since_tizen>
65 [Obsolete("This has been deprecated in API12")]
66 public delegate EvasObject GetTooltipContentDelegate();
68 internal GenItem(object data, GenItemClass itemClass) : base(IntPtr.Zero)
71 ItemClass = itemClass;
72 _tooltipCb = (d, obj, tooltip, item) => { return TooltipContentDelegate(); };
75 internal GenItem(object data, GenItemClass itemClass, EvasObject parent) : base(IntPtr.Zero, parent)
78 ItemClass = itemClass;
79 _tooltipCb = (d, obj, tooltip, item) => { return TooltipContentDelegate(); };
83 /// Gets the item class that defines how to display data. It returns <see cref="GenItemClass"/> type.
85 /// <since_tizen> preview </since_tizen>
86 [Obsolete("This has been deprecated in API12")]
87 public GenItemClass ItemClass { get; protected set; }
90 /// Sets or gets the tooltip content delegate.
92 /// <since_tizen> preview </since_tizen>
93 [Obsolete("This has been deprecated in API12")]
94 public GetTooltipContentDelegate TooltipContentDelegate
98 return _tooltipContentDelegate;
102 _tooltipContentDelegate = value;
103 UpdateTooltipDelegate();
108 /// It's an abstract property.
110 /// <since_tizen> preview </since_tizen>
111 [Obsolete("This has been deprecated in API12")]
112 public abstract GenItemSelectionMode SelectionMode { get; set; }
115 /// Sets or gets the cursor to be shown when the mouse is over the gengrid item.
117 /// <since_tizen> preview </since_tizen>
118 [Obsolete("This has been deprecated in API12")]
119 public abstract string Cursor { get; set; }
122 /// Sets or gets the style for this item cursor.
124 /// <since_tizen> preview </since_tizen>
125 [Obsolete("This has been deprecated in API12")]
126 public abstract string CursorStyle { get; set; }
129 /// Sets or gets the cursor engine only usage for this item cursor.
131 /// <since_tizen> preview </since_tizen>
132 [Obsolete("This has been deprecated in API12")]
133 public abstract bool IsUseEngineCursor { get; set; }
136 /// Gets the item data that is added through calling <see cref="GenGrid.Append(GenItemClass, object)"/>, <see cref="GenGrid.Prepend(GenItemClass, object)"/>, or <see cref="GenGrid.InsertBefore(GenItemClass, object, GenGridItem)"/> methods.
138 /// <since_tizen> preview </since_tizen>
139 [Obsolete("This has been deprecated in API12")]
140 public object Data { get; protected set; }
143 /// It's an abstract property. It's implemented by <see cref="GenGridItem.IsSelected"/> and <see cref="GenListItem.IsSelected"/>.
145 /// <since_tizen> preview </since_tizen>
146 [Obsolete("This has been deprecated in API12")]
147 public abstract bool IsSelected { get; set; }
150 /// It's an abstract property. It's implemented by <see cref="GenGridItem.TooltipStyle"/> and <see cref="GenListItem.TooltipStyle"/>.
152 /// <since_tizen> preview </since_tizen>
153 [Obsolete("This has been deprecated in API12")]
154 public abstract string TooltipStyle { get; set; }
157 /// Sets the tooltip text.
159 /// <param name="tooltip">The text to set.</param>
160 /// <since_tizen> preview </since_tizen>
161 [Obsolete("This has been deprecated in API12")]
162 public abstract void SetTooltipText(string tooltip);
165 /// Unsets the tooltip.
167 /// <since_tizen> preview </since_tizen>
168 [Obsolete("This has been deprecated in API12")]
169 public abstract void UnsetTooltip();
172 /// It's an abstract method. It's implemented by <see cref="GenGridItem.Update"/> and <see cref="GenListItem.Update"/>.
174 /// <since_tizen> preview </since_tizen>
175 [Obsolete("This has been deprecated in API12")]
176 public abstract void Update();
179 /// The override method for deleting the item class and item data. It's called when the item is deleted.
181 /// <since_tizen> preview </since_tizen>
182 [Obsolete("This has been deprecated in API12")]
183 protected override void OnInvalidate()
185 ItemClass?.SendItemDeleted(Data);
191 /// Abstract method for updating the tooltip content.
193 /// <since_tizen> preview </since_tizen>
194 [Obsolete("This has been deprecated in API12")]
195 protected abstract void UpdateTooltipDelegate();