[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp.Wearable / ElmSharp.Wearable / MoreOptionItem.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18 using System.Collections.Generic;
19 using System.Text;
20
21 namespace ElmSharp.Wearable
22 {
23     /// <summary>
24     /// The MoreOptionItem is an item of the MoreOption widget.
25     /// </summary>
26     /// <since_tizen> preview </since_tizen>
27     [Obsolete("This has been deprecated in API12")]
28     public class MoreOptionItem
29     {
30         const string MainTextPartName = "selector,main_text";
31         const string SubTextPartName = "selector,sub_text";
32         const string IconPartName = "item,icon";
33
34         string _mainText;
35         string _subText;
36         Image _icon;
37         IntPtr _handle;
38
39         /// <summary>
40         /// Sets or gets the more option item handle.
41         /// </summary>
42         /// <since_tizen> preview </since_tizen>
43         [Obsolete("This has been deprecated in API12")]
44         public IntPtr Handle
45         {
46             get
47             {
48                 return _handle;
49             }
50             set
51             {
52                 if (_handle == value) return;
53                 _handle = value;
54                 if (_mainText != null)
55                     Interop.Eext.eext_more_option_item_part_text_set(Handle, MainTextPartName, _mainText);
56                 if (_subText != null)
57                     Interop.Eext.eext_more_option_item_part_text_set(Handle, SubTextPartName, _subText);
58                 if (_icon != null)
59                     Interop.Eext.eext_more_option_item_part_content_set(Handle, IconPartName, _icon);
60             }
61         }
62
63         /// <summary>
64         /// Creates and initializes a new instance of the MoreOptionItem class.
65         /// </summary>
66         /// <since_tizen> preview </since_tizen>
67         [Obsolete("This has been deprecated in API12")]
68         public MoreOptionItem()
69         {
70             _icon = null;
71         }
72
73         /// <summary>
74         /// Sets or gets the main text of the more option object.
75         /// </summary>
76         /// <since_tizen> preview </since_tizen>
77         [Obsolete("This has been deprecated in API12")]
78         public string MainText
79         {
80             set
81             {
82                 if (_mainText == value) return;
83                 _mainText = value;
84                 if (Handle != IntPtr.Zero)
85                 {
86                     Interop.Eext.eext_more_option_item_part_text_set(Handle, MainTextPartName, _mainText);
87                 }
88             }
89
90             get
91             {
92                 return _mainText;
93             }
94         }
95
96         /// <summary>
97         /// Sets or gets the subtext of the more option object.
98         /// </summary>
99         /// <since_tizen> preview </since_tizen>
100         [Obsolete("This has been deprecated in API12")]
101         public string SubText
102         {
103             set
104             {
105                 if (_subText == value) return;
106                 _subText = value;
107                 if (Handle != IntPtr.Zero)
108                 {
109                     Interop.Eext.eext_more_option_item_part_text_set(Handle, SubTextPartName, _subText);
110                 }
111             }
112
113             get
114             {
115                 return _subText;
116             }
117         }
118
119         /// <summary>
120         /// Sets or gets the icon image.
121         /// </summary>
122         /// <since_tizen> preview </since_tizen>
123         [Obsolete("This has been deprecated in API12")]
124         public Image Icon
125         {
126             set
127             {
128                 if (_icon == value) return;
129                 _icon = value;
130                 if (Handle != IntPtr.Zero)
131                 {
132                     Interop.Eext.eext_more_option_item_part_content_set(Handle, IconPartName, _icon);
133                 }
134             }
135             get
136             {
137                 return _icon;
138             }
139         }
140     }
141 }