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;
18 using Tizen.NUI.BaseComponents;
19 using Tizen.NUI.Binding;
21 namespace Tizen.NUI.Components
24 /// ProgressStyle is a class which saves Progress's ux data.
26 /// <since_tizen> 6 </since_tizen>
27 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class ProgressStyle : ControlStyle
32 /// Creates a new instance of a ProgressStyle.
34 /// <since_tizen> 6 </since_tizen>
35 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 public ProgressStyle() : base()
43 /// Creates a new instance of a ProgressStyle with style.
45 /// <param name="style">Create ProgressStyle by style customized by user.</param>
46 /// <since_tizen> 6 </since_tizen>
47 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
48 [EditorBrowsable(EditorBrowsableState.Never)]
49 public ProgressStyle(ProgressStyle style) : base(style)
51 if (null == style) return;
59 /// Get or set track image.
61 /// <since_tizen> 6 </since_tizen>
62 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
63 [EditorBrowsable(EditorBrowsableState.Never)]
64 public ImageViewStyle Track
71 /// Get or set progress image.
73 /// <since_tizen> 6 </since_tizen>
74 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
75 [EditorBrowsable(EditorBrowsableState.Never)]
76 public ImageViewStyle Progress
83 /// Get or set buffer image.
85 /// <since_tizen> 6 </since_tizen>
86 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
87 [EditorBrowsable(EditorBrowsableState.Never)]
88 public ImageViewStyle Buffer
97 /// <since_tizen> 6 </since_tizen>
98 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
99 [EditorBrowsable(EditorBrowsableState.Never)]
100 public override void CopyFrom(BindableObject bindableObject)
102 base.CopyFrom(bindableObject);
104 ProgressStyle progressStyle = bindableObject as ProgressStyle;
106 if (null != progressStyle)
108 if (null != progressStyle.Track)
110 Track.CopyFrom(progressStyle.Track);
113 if (null != progressStyle.Progress)
115 Progress.CopyFrom(progressStyle.Progress);
118 if (null != progressStyle.Buffer)
120 Buffer.CopyFrom(progressStyle.Buffer);
125 private void InitSubStyle()
127 Track = new ImageViewStyle()
129 WidthResizePolicy = ResizePolicyType.FillToParent,
130 HeightResizePolicy = ResizePolicyType.FillToParent,
131 PositionUsesPivotPoint = true,
132 ParentOrigin = NUI.ParentOrigin.TopLeft,
133 PivotPoint = NUI.PivotPoint.TopLeft
136 Progress = new ImageViewStyle()
138 WidthResizePolicy = ResizePolicyType.FillToParent,
139 HeightResizePolicy = ResizePolicyType.FillToParent,
140 PositionUsesPivotPoint = true,
141 ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
142 PivotPoint = Tizen.NUI.PivotPoint.TopLeft
145 Buffer = new ImageViewStyle()
147 WidthResizePolicy = ResizePolicyType.FillToParent,
148 HeightResizePolicy = ResizePolicyType.FillToParent,
149 PositionUsesPivotPoint = true,
150 ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
151 PivotPoint = Tizen.NUI.PivotPoint.TopLeft