2 using System.ComponentModel;
3 using System.Diagnostics;
12 /// CircleProgressBarBar is a part used to set the color of the bar.
14 /// <since_tizen> 6 </since_tizen>
15 public class CircleProgressBarBar : ICircleColor
18 public CircleProgressBarBar(IntPtr CircleHandle) { _handle = CircleHandle; }
21 /// Sets the color of the bar on the circle progressbar.
23 /// <since_tizen> 6 </since_tizen>
24 public void SetColor(int r, int g, int b, int a)
27 Interop.Eext.eext_circle_object_color_set(_handle, r, g, b, a);
31 /// Gets the color of the bar on the circle progressbar.
33 /// <since_tizen> 6 </since_tizen>
34 public void GetColor(out int r, out int g, out int b, out int a)
38 Interop.Eext.eext_circle_object_color_get(_handle, out r, out g, out b, out a);
43 /// CircleProgressBarBarBackground is a part used to set the background color of the bar.
45 /// <since_tizen> 6 </since_tizen>
46 public class CircleProgressBarBarBackground : ICircleColor
49 public CircleProgressBarBarBackground(IntPtr CircleHandle) { _handle = CircleHandle; }
52 /// Sets the background color of the bar on the circle progressbar.
54 /// <since_tizen> 6 </since_tizen>
55 public void SetColor(int r, int g, int b, int a)
58 Interop.Eext.eext_circle_object_item_color_set(_handle, "bg", r, g, b, a);
62 /// Gets the background color of the bar on the circle progressbar.
64 /// <since_tizen> 6 </since_tizen>
65 public void GetColor(out int r, out int g, out int b, out int a)
69 Interop.Eext.eext_circle_object_item_color_get(_handle, "bg", out r, out g, out b, out a);
74 /// The CircleProgressBar is a widget for visually representing the progress status of a given job or task with the circular design.
76 /// <since_tizen> 6 </since_tizen>
77 public class CircleProgressBar : Efl.Ui.Layout, ICircleWidget
82 /// Get the handle for the circle widget.
84 /// <since_tizen> 6 </since_tizen>
85 public virtual IntPtr CircleHandle => _handle;
88 /// Sets or gets the color of the bar.
90 /// <since_tizen> 6 </since_tizen>
91 public CircleProgressBarBar Bar;
94 /// Sets or gets the background color of the bar.
96 /// <since_tizen> 6 </since_tizen>
97 public CircleProgressBarBarBackground BarBackground;
100 /// Creates and initializes a new instance of the CircleProgressBar class.
102 /// <param name="parent">The Efl.Ui.Widget to which the new CircleProgressBar will be attached as a child.</param>
103 /// <since_tizen> 6 </since_tizen>
104 public CircleProgressBar(Efl.Ui.Widget parent) : base(parent)
106 _handle = Interop.Eext.eext_circle_object_progressbar_add(parent.NativeHandle, IntPtr.Zero);
108 Bar = new CircleProgressBarBar(_handle);
109 BarBackground = new CircleProgressBarBarBackground(_handle);
111 elm_layout_content_set(this.NativeHandle, "efl.swallow.vg", CircleHandle);
114 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)]
115 internal static extern bool elm_layout_content_set(IntPtr obj, string swallow, IntPtr content);
117 public override Efl.Object FinalizeAdd()
119 this.SetTheme("circle_progressbar", null, null);
124 /// Sets or gets the disabled state of the circle progressbar.
126 /// <since_tizen> 6 </since_tizen>
130 set => IsEnable = !value;
134 /// Sets or gets the enabled state of the circle progressbar.
136 /// <since_tizen> 6 </since_tizen>
141 return !Interop.Eext.eext_circle_object_disabled_get(CircleHandle);
145 Interop.Eext.eext_circle_object_disabled_set(CircleHandle, !value);
150 /// Gets or sets the value displayed by the circle progressbar.
152 /// <since_tizen> 6 </since_tizen>
157 return Interop.Eext.eext_circle_object_value_get(CircleHandle);
161 Interop.Eext.eext_circle_object_value_set(CircleHandle, value);
166 /// Sets or gets the maximum values for the circle progressbar.
168 /// <since_tizen> 6 </since_tizen>
169 public double Maximum
175 Interop.Eext.eext_circle_object_value_min_max_get(CircleHandle, out min, out max);
180 double min = Minimum;
181 Interop.Eext.eext_circle_object_value_min_max_set(CircleHandle, min, value);
186 /// Sets or gets the minimum values for the circle progressbar.
188 /// <since_tizen> 6 </since_tizen>
189 public double Minimum
195 Interop.Eext.eext_circle_object_value_min_max_get(CircleHandle, out min, out max);
200 double max = Maximum;
201 Interop.Eext.eext_circle_object_value_min_max_set(CircleHandle, value, max);
206 /// Sets or gets the angle in degree of the circle progressbar bar.
208 /// <since_tizen> 6 </since_tizen>
209 public double BarAngle
213 return Interop.Eext.eext_circle_object_angle_get(CircleHandle);
217 Interop.Eext.eext_circle_object_angle_set(CircleHandle, value);
222 /// Sets or gets the angle in degree of the circle progressbar background.
224 /// <since_tizen> 6 </since_tizen>
225 public double BackgroundAngle
229 return Interop.Eext.eext_circle_object_item_angle_get(CircleHandle, "bg");
233 Interop.Eext.eext_circle_object_item_angle_set(CircleHandle, "bg", value);
238 /// Sets or gets the angle offset for the circle progressbar bar.
239 /// Offset value means start position of the circle progressbar bar.
241 /// <since_tizen> 6 </since_tizen>
242 public double BarAngleOffset
246 return Interop.Eext.eext_circle_object_angle_offset_get(CircleHandle);
250 Interop.Eext.eext_circle_object_angle_offset_set(CircleHandle, value);
255 /// Sets or gets the angle offset for the circle progressbar background.
256 /// Offset value means start position of the circle progressbar background.
258 /// <since_tizen> 6 </since_tizen>
259 public double BackgroundAngleOffset
263 return Interop.Eext.eext_circle_object_item_angle_offset_get(CircleHandle, "bg");
267 Interop.Eext.eext_circle_object_item_angle_offset_set(CircleHandle, "bg", value);
272 /// Sets or gets the maximum angle of the circle progressbar bar.
274 /// <since_tizen> 6 </since_tizen>
275 public double BarAngleMaximum
281 Interop.Eext.eext_circle_object_angle_min_max_get(CircleHandle, out min, out max);
286 double min = BarAngleMinimum;
287 Interop.Eext.eext_circle_object_angle_min_max_set(CircleHandle, min, value);
292 /// Sets or gets the minimum angle of the circle progressbar bar.
294 /// <since_tizen> 6 </since_tizen>
295 public double BarAngleMinimum
301 Interop.Eext.eext_circle_object_angle_min_max_get(CircleHandle, out min, out max);
306 double max = BarAngleMaximum;
307 Interop.Eext.eext_circle_object_angle_min_max_set(CircleHandle, value, max);
312 /// Sets or gets the line width of the circle progressbar bar.
314 /// <since_tizen> 6 </since_tizen>
315 public int BarLineWidth
319 return Interop.Eext.eext_circle_object_line_width_get(CircleHandle);
323 Interop.Eext.eext_circle_object_line_width_set(CircleHandle, value);
328 /// Sets or gets the line width of the circle progressbar background.
330 /// <since_tizen> 6 </since_tizen>
331 public int BackgroundLineWidth
335 return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "bg");
339 Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "bg", value);
344 /// Gets or sets the radius value for the circle progressbar bar.
346 /// <since_tizen> 6 </since_tizen>
347 public double BarRadius
351 return Interop.Eext.eext_circle_object_radius_get(CircleHandle);
355 Interop.Eext.eext_circle_object_radius_set(CircleHandle, value);
360 /// Gets or sets the radius value for the circle progressbar background.
362 /// <since_tizen> 6 </since_tizen>
363 public double BackgroundRadius
367 return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "bg");
371 Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "bg", value);