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 a item of MoreOption widget.
26 public class MoreOptionItem
28 const string MainTextPartName = "selector,main_text";
29 const string SubTextPartName = "selector,sub_text";
30 const string IconPartName = "item,icon";
38 /// Sets or gets the more option item handle.
48 if (_handle == value) return;
50 if (_mainText != null)
51 Interop.Eext.eext_more_option_item_part_text_set(Handle, MainTextPartName, _mainText);
53 Interop.Eext.eext_more_option_item_part_text_set(Handle, SubTextPartName, _subText);
55 Interop.Eext.eext_more_option_item_part_content_set(Handle, IconPartName, _icon);
60 /// Creates and initializes a new instance of MoreOptionItem class.
62 public MoreOptionItem()
68 /// Sets or gets the main text of a more option object.
70 public string MainText
74 if (_mainText == value) return;
76 if (Handle != IntPtr.Zero)
78 Interop.Eext.eext_more_option_item_part_text_set(Handle, MainTextPartName, _mainText);
89 /// Sets or gets the sub text of a more option object.
95 if (_subText == value) return;
97 if (Handle != IntPtr.Zero)
99 Interop.Eext.eext_more_option_item_part_text_set(Handle, SubTextPartName, _subText);
110 /// Sets or gets the icon image
116 if (_icon == value) return;
118 if (Handle != IntPtr.Zero)
120 Interop.Eext.eext_more_option_item_part_content_set(Handle, IconPartName, _icon);