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.
18 using System.Collections.Generic;
19 using System.ComponentModel;
20 using Tizen.NUI.BaseComponents;
22 namespace Tizen.NUI.Components
25 /// The control component is class of image. Temporarily for SelectButton.
27 /// <since_tizen> 6 </since_tizen>
28 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public class ImageControl : Control
35 /// <since_tizen> 6 </since_tizen>
36 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
37 [EditorBrowsable(EditorBrowsableState.Never)]
38 private ImageControlStyle imageControlStyle;
40 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
41 [EditorBrowsable(EditorBrowsableState.Never)]
42 public new ImageControlStyle Style => imageControlStyle;
44 internal ImageView imageView;
47 /// Construct an empty Control.
49 /// <since_tizen> 6 </since_tizen>
50 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
51 [EditorBrowsable(EditorBrowsableState.Never)]
52 public ImageControl() : base()
57 /// Construct with style.
59 /// <param name="style">Create style customized by user</param>
60 /// <since_tizen> 6 </since_tizen>
61 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
62 [EditorBrowsable(EditorBrowsableState.Never)]
63 public ImageControl(ImageControlStyle style) : base(style)
68 /// Construct with style
70 /// <param name="style">Style to be applied</param>
71 /// <since_tizen> 6 </since_tizen>
72 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
73 [EditorBrowsable(EditorBrowsableState.Never)]
74 public ImageControl(string style) : base(style)
78 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
79 [EditorBrowsable(EditorBrowsableState.Never)]
80 public override void ApplyStyle(ViewStyle viewStyle)
82 base.ApplyStyle(viewStyle);
84 ImageControlStyle imageControlStyle = viewStyle as ImageControlStyle;
85 if (null != imageControlStyle)
87 if (null == imageView)
89 imageView = new ImageView();
94 imageView.ApplyStyle(imageControlStyle.Image);
98 /// Dispose Control and all children on it.
100 /// <param name="type">Dispose type.</param>
101 /// <since_tizen> 6 </since_tizen>
102 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
103 [EditorBrowsable(EditorBrowsableState.Never)]
104 protected override void Dispose(DisposeTypes type)
111 if (imageView != null)
113 Utility.Dispose(imageView);
119 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
120 [EditorBrowsable(EditorBrowsableState.Never)]
121 protected override ViewStyle GetViewStyle()
123 imageControlStyle = new ImageControlStyle();
124 return imageControlStyle;