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.CommonUI
22 /// ToastAttributes is a class which saves Toast'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 ToastAttributes : ViewAttributes
30 /// Creates a new instance of a ToastAttributes.
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 ToastAttributes() : base() { }
38 /// Creates a new instance of a ToastAttributes with attributes.
40 /// <param name="attributes">Create ToastAttributes by attributes customized by user.</param>
41 /// <since_tizen> 6 </since_tizen>
42 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
43 [EditorBrowsable(EditorBrowsableState.Never)]
44 public ToastAttributes(ToastAttributes attributes) : base(attributes)
46 if(null == attributes)
50 if(null != attributes.BackgroundImageAttributes)
52 BackgroundImageAttributes = attributes.BackgroundImageAttributes.Clone() as ImageAttributes;
54 if(null != attributes.TextAttributes)
56 TextAttributes = attributes.TextAttributes.Clone() as TextAttributes;
58 TextLineHeight = attributes.TextLineHeight;
59 TextLineSpace = attributes.TextLineSpace;
60 Duration = attributes.Duration;
64 /// Gets or sets background image attributes.
66 /// <since_tizen> 6 </since_tizen>
67 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
68 [EditorBrowsable(EditorBrowsableState.Never)]
69 public ImageAttributes BackgroundImageAttributes
76 /// Gets or sets text attributes.
78 /// <since_tizen> 6 </since_tizen>
79 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
80 [EditorBrowsable(EditorBrowsableState.Never)]
81 public TextAttributes TextAttributes
88 /// Gets or sets toast text line height.
90 /// <since_tizen> 6 </since_tizen>
91 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
92 [EditorBrowsable(EditorBrowsableState.Never)]
93 public uint? TextLineHeight
100 /// Gets or sets toast text line space.
102 /// <since_tizen> 6 </since_tizen>
103 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
104 [EditorBrowsable(EditorBrowsableState.Never)]
105 public uint? TextLineSpace
112 /// Gets or sets toast show duration time.
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 uint? Duration
124 /// Attributes's clone function.
126 /// <since_tizen> 6 </since_tizen>
127 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
128 [EditorBrowsable(EditorBrowsableState.Never)]
129 public override Attributes Clone()
131 return new ToastAttributes(this);