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 /// PopupAttributes is a class which saves Popup'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 PopupAttributes : ViewAttributes
30 /// Creates a new instance of a PopupAttributes.
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 PopupAttributes() : base() { }
37 /// Creates a new instance of a PopupAttributes with attributes.
39 /// <param name="attributes">Create PopupAttributes 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 PopupAttributes(PopupAttributes attributes) : base(attributes)
45 if (attributes.ShadowImageAttributes != null)
47 ShadowImageAttributes = attributes.ShadowImageAttributes.Clone() as ImageAttributes;
50 if (attributes.BackgroundImageAttributes != null)
52 BackgroundImageAttributes = attributes.BackgroundImageAttributes.Clone() as ImageAttributes;
55 if (attributes.TitleTextAttributes != null)
57 TitleTextAttributes = attributes.TitleTextAttributes.Clone() as TextAttributes;
60 if (attributes.ButtonAttributes != null)
62 ButtonAttributes = attributes.ButtonAttributes.Clone() as ButtonAttributes;
65 if(attributes.ShadowOffset != null)
67 ShadowOffset = new Vector4(attributes.ShadowOffset.W, attributes.ShadowOffset.X, attributes.ShadowOffset.Y, attributes.ShadowOffset.Z);
73 /// Shadow image's attributes.
75 /// <since_tizen> 6 </since_tizen>
76 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
77 [EditorBrowsable(EditorBrowsableState.Never)]
78 public ImageAttributes ShadowImageAttributes
85 /// Background image's attributes.
87 /// <since_tizen> 6 </since_tizen>
88 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
89 [EditorBrowsable(EditorBrowsableState.Never)]
90 public ImageAttributes BackgroundImageAttributes
97 /// Title Text's attributes.
99 /// <since_tizen> 6 </since_tizen>
100 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
101 [EditorBrowsable(EditorBrowsableState.Never)]
102 public TextAttributes TitleTextAttributes
111 /// <since_tizen> 6 </since_tizen>
112 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
113 [EditorBrowsable(EditorBrowsableState.Never)]
114 public Vector4 ShadowOffset
121 /// Popup button's attributes.
123 /// <since_tizen> 6 </since_tizen>
124 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
125 [EditorBrowsable(EditorBrowsableState.Never)]
126 public ButtonAttributes ButtonAttributes
133 /// Attributes's clone function.
135 /// <since_tizen> 6 </since_tizen>
136 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
137 [EditorBrowsable(EditorBrowsableState.Never)]
138 public override Attributes Clone()
140 return new PopupAttributes(this);