99547884f9afd5a4c49a9e022653cbbe8a6dc4d6
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.CommonUI / Attributes / PopupAttributes.cs
1 /*
2  * Copyright(c) 2019 Samsung Electronics Co., Ltd.
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.ComponentModel;
18
19 namespace Tizen.NUI.CommonUI
20 {
21     /// <summary>
22     /// PopupAttributes is a class which saves Popup's ux data.
23     /// </summary>
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
28     {
29         /// <summary>
30         /// Creates a new instance of a PopupAttributes.
31         /// </summary>
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() { }
36         /// <summary>
37         /// Creates a new instance of a PopupAttributes with attributes.
38         /// </summary>
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)
44         {
45             if (attributes.ShadowImageAttributes != null)
46             {
47                 ShadowImageAttributes = attributes.ShadowImageAttributes.Clone() as ImageAttributes;
48             }
49
50             if (attributes.BackgroundImageAttributes != null)
51             {
52                 BackgroundImageAttributes = attributes.BackgroundImageAttributes.Clone() as ImageAttributes;
53             }
54
55             if (attributes.TitleTextAttributes != null)
56             {
57                 TitleTextAttributes = attributes.TitleTextAttributes.Clone() as TextAttributes;
58             }
59
60             if (attributes.ButtonAttributes != null)
61             {
62                 ButtonAttributes = attributes.ButtonAttributes.Clone() as ButtonAttributes;
63             }
64
65             if(attributes.ShadowOffset != null)
66             {
67                 ShadowOffset = new Vector4(attributes.ShadowOffset.W, attributes.ShadowOffset.X, attributes.ShadowOffset.Y, attributes.ShadowOffset.Z);
68             }
69
70         }
71
72         /// <summary>
73         /// Shadow image's attributes.
74         /// </summary>
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
79         {
80             get;
81             set;
82         }
83
84         /// <summary>
85         /// Background image's attributes.
86         /// </summary>
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
91         {
92             get;
93             set;
94         }
95
96         /// <summary>
97         /// Title Text's attributes.
98         /// </summary>
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
103         {
104             get;
105             set;
106         }
107
108         /// <summary>
109         /// Shadow offset.
110         /// </summary>
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
115         {
116             get;
117             set;
118         }
119
120         /// <summary>
121         /// Popup button's attributes.
122         /// </summary>
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
127         {
128             get;
129             set;
130         }
131
132         /// <summary>
133         /// Attributes's clone function.
134         /// </summary>
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()
139         {
140             return new PopupAttributes(this);
141         }
142     }
143 }