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;
21 namespace ElmSharp.Wearable
24 /// The MoreOptionItem is an item of the MoreOption widget.
26 /// <since_tizen> preview </since_tizen>
27 public class MoreOptionItem
29 const string MainTextPartName = "selector,main_text";
30 const string SubTextPartName = "selector,sub_text";
31 const string IconPartName = "item,icon";
39 /// Sets or gets the more option item handle.
41 /// <since_tizen> preview </since_tizen>
50 if (_handle == value) return;
52 if (_mainText != null)
53 Interop.Eext.eext_more_option_item_part_text_set(Handle, MainTextPartName, _mainText);
55 Interop.Eext.eext_more_option_item_part_text_set(Handle, SubTextPartName, _subText);
57 Interop.Eext.eext_more_option_item_part_content_set(Handle, IconPartName, _icon);
62 /// Creates and initializes a new instance of the MoreOptionItem class.
64 /// <since_tizen> preview </since_tizen>
65 public MoreOptionItem()
71 /// Sets or gets the main text of the more option object.
73 /// <since_tizen> preview </since_tizen>
74 public string MainText
78 if (_mainText == value) return;
80 if (Handle != IntPtr.Zero)
82 Interop.Eext.eext_more_option_item_part_text_set(Handle, MainTextPartName, _mainText);
93 /// Sets or gets the subtext of the more option object.
95 /// <since_tizen> preview </since_tizen>
100 if (_subText == value) return;
102 if (Handle != IntPtr.Zero)
104 Interop.Eext.eext_more_option_item_part_text_set(Handle, SubTextPartName, _subText);
115 /// Sets or gets the icon image.
117 /// <since_tizen> preview </since_tizen>
122 if (_icon == value) return;
124 if (Handle != IntPtr.Zero)
126 Interop.Eext.eext_more_option_item_part_content_set(Handle, IconPartName, _icon);