2 using System.Collections.Generic;
12 /// CircleSpinnerMarker is a part used to set the color of the marker.
14 /// <since_tizen> 6 </since_tizen>
15 public class CircleSpinnerMarker : ICircleColor
18 public CircleSpinnerMarker(IntPtr CircleHandle) { _handle = CircleHandle; }
21 /// Sets the color of the marker on the circle spinner.
23 /// <since_tizen> 6 </since_tizen>
24 public void SetColor(int r, int g, int b, int a)
27 Interop.Eext.eext_circle_object_item_color_set(_handle, "default", r, g, b, a);
31 /// Gets the color of the marker on the circle spinner.
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_item_color_get(_handle, "default", out r, out g, out b, out a);
43 /// The CircleSpinner is a widget to display and handle the spinner value by the rotary event.
45 /// <since_tizen> 6 </since_tizen>
46 public class CircleSpinner : Efl.Ui.Spin, ICircleWidget
48 double _angleRatio = -1.0;
51 public virtual IntPtr CircleHandle => _handle;
54 /// Sets or gets the color of the marker.
56 /// <since_tizen> 6 </since_tizen>
57 public CircleSpinnerMarker Marker;
60 /// Creates and initializes a new instance of the CircleSpinner class.
62 /// <param name="parent">The Efl.Ui.Widget to which the new CircleSpinner will be attached as a child.</param>
63 /// <since_tizen> 6 </since_tizen>
64 public CircleSpinner(Efl.Ui.Widget parent) : base(parent)
66 _handle = Interop.Eext.eext_circle_object_spinner_add(this.NativeHandle, IntPtr.Zero);
68 Marker = new CircleSpinnerMarker(_handle);
70 elm_layout_content_set(this.NativeHandle, "efl.swallow.vg", CircleHandle);
73 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)]
74 internal static extern bool elm_layout_content_set(IntPtr obj, string swallow, IntPtr content);
77 /// Sets or gets the circle spinner angle per each spinner value.
79 /// <since_tizen> 6 </since_tizen>
80 public double AngleRatio
86 double Minimum, Maximum;
88 GetRangeMinMax(out Minimum, out Maximum);
89 if (Maximum == Minimum)
95 return 360 / (Maximum - Minimum);
105 if (_angleRatio == value) return;
109 Interop.Eext.eext_circle_object_spinner_angle_set(CircleHandle, _angleRatio);
115 /// Sets or gets the disabled state of the circle spinner.
117 /// <since_tizen> 6 </since_tizen>
121 set => Enable = !value;
125 /// Sets or gets the enabled state of the circle spinner.
127 /// <since_tizen> 6 </since_tizen>
132 return !Interop.Eext.eext_circle_object_disabled_get(CircleHandle);
136 Interop.Eext.eext_circle_object_disabled_set(CircleHandle, !value);
141 /// Sets or gets the line width of the marker.
143 /// <since_tizen> 6 </since_tizen>
144 public int MarkerLineWidth
148 return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "default");
152 Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "default", value);
157 /// Sets or gets the radius of the marker.
159 /// <since_tizen> 6 </since_tizen>
160 public double MarkerRadius
164 return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "default");
168 Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "default", value);