2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
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.
17 using System.ComponentModel;
19 namespace Tizen.NUI.Components
22 /// DropDownAttributes is a class which saves DropDown's ux data.
24 /// <since_tizen> 6 </since_tizen>
25 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
26 [EditorBrowsable(EditorBrowsableState.Never)]
27 public class DropDownAttributes : ViewAttributes
30 /// Creates a new instance of a DropDownAttributes.
32 /// <since_tizen> 6 </since_tizen>
33 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
34 [EditorBrowsable(EditorBrowsableState.Never)]
35 public DropDownAttributes() : base()
37 SpaceBetweenButtonTextAndIcon = 0;
38 Space = new Vector4(0, 0, 0, 0);
39 ListRelativeOrientation = DropDown.ListOrientation.Left;
40 ListMargin = new Vector4(0, 0, 0, 0);
44 /// Creates a new instance of a DropDownAttributes with attributes.
46 /// <param name="attributes">Create DropDownAttributes by attributes customized by user.</param>
47 /// <since_tizen> 6 </since_tizen>
48 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 public DropDownAttributes(DropDownAttributes attributes) : base(attributes)
52 if(attributes == null)
57 if (attributes.ButtonAttributes != null)
59 ButtonAttributes = attributes.ButtonAttributes.Clone() as ButtonAttributes;
62 if (attributes.HeaderTextAttributes != null)
64 HeaderTextAttributes = attributes.HeaderTextAttributes.Clone() as TextAttributes;
67 if (attributes.ListBackgroundImageAttributes != null)
69 ListBackgroundImageAttributes = attributes.ListBackgroundImageAttributes.Clone() as ImageAttributes;
72 if (attributes.Space != null)
74 Space = new Vector4(attributes.Space.X, attributes.Space.Y, attributes.Space.Z, attributes.Space.W);
77 if (attributes.ListMargin != null)
79 ListMargin = new Vector4(attributes.ListMargin.X, attributes.ListMargin.Y, attributes.ListMargin.Z, attributes.ListMargin.W);
82 if (attributes.ListSize2D != null)
84 ListSize2D = new Size2D(attributes.ListSize2D.Width, attributes.ListSize2D.Height);
87 if (attributes.ListPadding != null)
89 ListPadding = attributes.ListPadding;
92 SpaceBetweenButtonTextAndIcon = attributes.SpaceBetweenButtonTextAndIcon;
93 ListRelativeOrientation = attributes.ListRelativeOrientation;
94 FocusedItemIndex = attributes.FocusedItemIndex;
98 /// DropDown button's attributes.
100 /// <since_tizen> 6 </since_tizen>
101 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
102 [EditorBrowsable(EditorBrowsableState.Never)]
103 public ButtonAttributes ButtonAttributes
110 /// Header text's attributes.
112 /// <since_tizen> 6 </since_tizen>
113 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
114 [EditorBrowsable(EditorBrowsableState.Never)]
115 public TextAttributes HeaderTextAttributes
122 /// Space between button text and button icon.
124 /// <since_tizen> 6 </since_tizen>
125 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
126 [EditorBrowsable(EditorBrowsableState.Never)]
127 public int SpaceBetweenButtonTextAndIcon
134 /// List background image's attributes.
136 /// <since_tizen> 6 </since_tizen>
137 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
138 [EditorBrowsable(EditorBrowsableState.Never)]
139 public ImageAttributes ListBackgroundImageAttributes
146 /// Space in DropDown.
148 /// <since_tizen> 6 </since_tizen>
149 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
150 [EditorBrowsable(EditorBrowsableState.Never)]
158 /// List relative orientation.
160 /// <since_tizen> 6 </since_tizen>
161 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
162 [EditorBrowsable(EditorBrowsableState.Never)]
163 public DropDown.ListOrientation ListRelativeOrientation
172 /// <since_tizen> 6 </since_tizen>
173 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
174 [EditorBrowsable(EditorBrowsableState.Never)]
175 public Vector4 ListMargin
182 /// Focused item index.
184 /// <since_tizen> 6 </since_tizen>
185 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
186 [EditorBrowsable(EditorBrowsableState.Never)]
187 public int FocusedItemIndex
196 /// <since_tizen> 6 </since_tizen>
197 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
198 [EditorBrowsable(EditorBrowsableState.Never)]
199 public Size2D ListSize2D
208 /// <since_tizen> 6 </since_tizen>
209 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
210 [EditorBrowsable(EditorBrowsableState.Never)]
211 public Extents ListPadding
218 /// Attributes's clone function.
220 /// <since_tizen> 6 </since_tizen>
221 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
222 [EditorBrowsable(EditorBrowsableState.Never)]
223 public override Attributes Clone()
225 return new DropDownAttributes(this);
230 /// DropDownItemAttributes is a class which saves DropDownItem's ux data.
232 /// <since_tizen> 6 </since_tizen>
233 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
234 [EditorBrowsable(EditorBrowsableState.Never)]
235 public class DropDownItemAttributes : ViewAttributes
238 /// Creates a new instance of a DropDownItemAttributes.
240 /// <since_tizen> 6 </since_tizen>
241 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
242 [EditorBrowsable(EditorBrowsableState.Never)]
243 public DropDownItemAttributes() : base() { }
245 /// Creates a new instance of a DropDownItemAttributes with attributes.
247 /// <param name="attributes">Create DropDownItemAttributes by attributes customized by user.</param>
248 /// <since_tizen> 6 </since_tizen>
249 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
250 [EditorBrowsable(EditorBrowsableState.Never)]
251 public DropDownItemAttributes(DropDownItemAttributes attributes) : base(attributes)
253 if (attributes.TextAttributes != null)
255 TextAttributes = attributes.TextAttributes.Clone() as TextAttributes;
258 if (attributes.IconAttributes != null)
260 IconAttributes = attributes.IconAttributes.Clone() as ImageAttributes;
263 if (attributes.CheckImageAttributes != null)
265 CheckImageAttributes = attributes.CheckImageAttributes.Clone() as ImageAttributes;
268 CheckImageRightSpace = attributes.CheckImageRightSpace;
269 IsSelected = attributes.IsSelected;
273 /// Text's attributes.
275 /// <since_tizen> 6 </since_tizen>
276 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
277 [EditorBrowsable(EditorBrowsableState.Never)]
278 public TextAttributes TextAttributes
285 /// Icon's attributes.
287 /// <since_tizen> 6 </since_tizen>
288 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
289 [EditorBrowsable(EditorBrowsableState.Never)]
290 public ImageAttributes IconAttributes
297 /// Check image's attributes.
299 /// <since_tizen> 6 </since_tizen>
300 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
301 [EditorBrowsable(EditorBrowsableState.Never)]
302 public ImageAttributes CheckImageAttributes
309 /// Right space from check image.
311 /// <since_tizen> 6 </since_tizen>
312 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
313 [EditorBrowsable(EditorBrowsableState.Never)]
314 public int CheckImageRightSpace
321 /// Flag to decide item is selected or not.
323 /// <since_tizen> 6 </since_tizen>
324 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
325 [EditorBrowsable(EditorBrowsableState.Never)]
326 public bool IsSelected
333 /// Attributes's clone function.
335 /// <since_tizen> 6 </since_tizen>
336 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
337 [EditorBrowsable(EditorBrowsableState.Never)]
338 public override Attributes Clone()
340 return new DropDownItemAttributes(this);