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 /// The ToolbarItem is an item of the toolbar.
24 /// <since_tizen> preview </since_tizen>
25 [Obsolete("This has been deprecated in API12")]
26 public class ToolbarItem : ItemObject
31 internal ToolbarItem(string text, string icon) : base(IntPtr.Zero)
37 internal ToolbarItem(string text, string icon, EvasObject parent) : base(IntPtr.Zero, parent)
44 /// Sets or gets the icon path of the item.
46 /// <since_tizen> preview </since_tizen>
47 [Obsolete("This has been deprecated in API12")]
57 Interop.Elementary.elm_toolbar_item_icon_set(Handle, value);
62 /// Sets or gets the text string of the item.
64 /// <since_tizen> preview </since_tizen>
65 [Obsolete("This has been deprecated in API12")]
75 SetPartText(null, value);
80 /// Sets or gets the enable of the item.
82 /// <since_tizen> preview </since_tizen>
83 [Obsolete("Enabled is obsolete as of version v1.1.0-beta-023. Please use IsEnabled instead.")]
97 /// Sets or gets whether displaying the item as a separator.
99 /// <remarks>Items aren't set as a separator by default. If set as a separator, it displays a separator theme, so it won't display the icons or labels.</remarks>
100 /// <since_tizen> preview </since_tizen>
101 [Obsolete("This has been deprecated in API12")]
102 public bool IsSeparator
106 return Interop.Elementary.elm_toolbar_item_separator_get(Handle);
110 Interop.Elementary.elm_toolbar_item_separator_set(Handle, value);
115 /// Sets or gets whether the item is selected.
117 /// <since_tizen> preview </since_tizen>
118 [Obsolete("This has been deprecated in API12")]
119 public bool IsSelected
123 return Interop.Elementary.elm_toolbar_item_selected_get(Handle);
127 Interop.Elementary.elm_toolbar_item_selected_set(Handle, value);
132 /// Selected will be triggered when the item is selected.
134 /// <since_tizen> preview </since_tizen>
135 [Obsolete("This has been deprecated in API12")]
136 public event EventHandler Selected;
139 /// LongPressed will be triggered when the item is pressed for a long time.
141 /// <since_tizen> preview </since_tizen>
142 [Obsolete("This has been deprecated in API12")]
143 public event EventHandler LongPressed;
146 /// Clicked will be triggered when the item is clicked.
148 /// <since_tizen> preview </since_tizen>
149 [Obsolete("This has been deprecated in API12")]
150 public event EventHandler Clicked;
152 internal void SendSelected()
154 Selected?.Invoke(this, EventArgs.Empty);
156 internal void SendLongPressed()
158 LongPressed?.Invoke(this, EventArgs.Empty);
160 internal void SendClicked()
162 Clicked?.Invoke(this, EventArgs.Empty);