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.
21 public class ToolbarItem : ItemObject
25 internal ToolbarItem(string text, string icon) : base(IntPtr.Zero)
40 Interop.Elementary.elm_toolbar_item_icon_set(Handle, value);
52 SetPartText(null, value);
59 return !Interop.Elementary.elm_object_disabled_get(Handle);
63 Interop.Elementary.elm_object_disabled_set(Handle, !value);
66 public bool IsSeparator
70 return Interop.Elementary.elm_toolbar_item_separator_get(Handle);
74 Interop.Elementary.elm_toolbar_item_separator_set(Handle, value);
77 public bool IsSelected
81 return Interop.Elementary.elm_toolbar_item_selected_get(Handle);
85 Interop.Elementary.elm_toolbar_item_selected_set(Handle, value);
89 public event EventHandler Selected;
90 public event EventHandler LongPressed;
91 public event EventHandler Clicked;
93 internal void SendSelected()
95 Selected?.Invoke(this, EventArgs.Empty);
97 internal void SendLongPressed()
99 LongPressed?.Invoke(this, EventArgs.Empty);
101 internal void SendClicked()
103 Clicked?.Invoke(this, EventArgs.Empty);