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 /// ButtonAttributes is a class which saves Button'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 ButtonAttributes : ViewAttributes
30 /// Creates a new instance of a ButtonAttributes.
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 ButtonAttributes() : base() { }
37 /// Creates a new instance of a ButtonAttributes with attributes.
39 /// <param name="attributes">Create ButtonAttributes by attributes customized by user.</param>
40 /// <since_tizen> 6 </since_tizen>
41 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
42 [EditorBrowsable(EditorBrowsableState.Never)]
43 public ButtonAttributes(ButtonAttributes attributes) : base(attributes)
45 if(attributes == null)
50 IsSelectable = attributes.IsSelectable;
51 IconRelativeOrientation = attributes.IconRelativeOrientation;
53 if (attributes.ShadowImageAttributes != null)
55 ShadowImageAttributes = attributes.ShadowImageAttributes.Clone() as ImageAttributes;
58 if (attributes.BackgroundImageAttributes != null)
60 BackgroundImageAttributes = attributes.BackgroundImageAttributes.Clone() as ImageAttributes;
63 if (attributes.OverlayImageAttributes != null)
65 OverlayImageAttributes = attributes.OverlayImageAttributes.Clone() as ImageAttributes;
68 if (attributes.TextAttributes != null)
70 TextAttributes = attributes.TextAttributes.Clone() as TextAttributes;
73 if (attributes.IconAttributes != null)
75 IconAttributes = attributes.IconAttributes.Clone() as ImageAttributes;
79 /// Shadow image's attributes.
81 /// <since_tizen> 6 </since_tizen>
82 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
83 [EditorBrowsable(EditorBrowsableState.Never)]
84 public ImageAttributes ShadowImageAttributes
90 /// Background image's attributes.
92 /// <since_tizen> 6 </since_tizen>
93 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
94 [EditorBrowsable(EditorBrowsableState.Never)]
95 public ImageAttributes BackgroundImageAttributes
101 /// Overlay image's attributes.
103 /// <since_tizen> 6 </since_tizen>
104 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
105 [EditorBrowsable(EditorBrowsableState.Never)]
106 public ImageAttributes OverlayImageAttributes
112 /// Text's attributes.
114 /// <since_tizen> 6 </since_tizen>
115 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
116 [EditorBrowsable(EditorBrowsableState.Never)]
117 public TextAttributes TextAttributes
123 /// Icon's attributes.
125 /// <since_tizen> 6 </since_tizen>
126 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
127 [EditorBrowsable(EditorBrowsableState.Never)]
128 public ImageAttributes IconAttributes
134 /// Flag to decide button can be selected or not.
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 bool? IsSelectable
145 /// Icon relative orientation.
147 /// <since_tizen> 6 </since_tizen>
148 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
149 [EditorBrowsable(EditorBrowsableState.Never)]
150 public Button.IconOrientation? IconRelativeOrientation
156 /// Attributes's clone function.
158 /// <since_tizen> 6 </since_tizen>
159 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
160 [EditorBrowsable(EditorBrowsableState.Never)]
161 public override Attributes Clone()
163 return new ButtonAttributes(this);