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, Efl.Ui.IRangeInteractive, ICircleWidget
48 double _angleRatio = -1.0;
52 public virtual IntPtr CircleHandle => _handle;
55 /// Sets or gets the color of the marker.
57 /// <since_tizen> 6 </since_tizen>
58 public CircleSpinnerMarker Marker;
60 public event EventHandler SteadyEvt;
63 /// Creates and initializes a new instance of the CircleSpinner class.
65 /// <param name="parent">The Efl.Ui.Widget to which the new CircleSpinner will be attached as a child.</param>
66 /// <since_tizen> 6 </since_tizen>
67 public CircleSpinner(Efl.Ui.Widget parent) : base(parent)
69 _handle = Interop.Eext.eext_circle_object_spinner_add(this.NativeHandle, IntPtr.Zero);
71 Marker = new CircleSpinnerMarker(_handle);
73 elm_layout_content_set(this.NativeHandle, "efl.swallow.vg", CircleHandle);
76 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)]
77 internal static extern bool elm_layout_content_set(IntPtr obj, string swallow, IntPtr content);
80 /// Sets or gets the circle spinner angle per each spinner value.
82 /// <since_tizen> 6 </since_tizen>
83 public double AngleRatio
89 double Minimum, Maximum;
91 GetRangeLimits(out Minimum, out Maximum);
92 if (Maximum == Minimum)
98 return 360 / (Maximum - Minimum);
108 if (_angleRatio == value) return;
112 Interop.Eext.eext_circle_object_spinner_angle_set(CircleHandle, _angleRatio);
118 /// Sets or gets the disabled state of the circle spinner.
120 /// <since_tizen> 6 </since_tizen>
124 set => Enable = !value;
128 /// Sets or gets the enabled state of the circle spinner.
130 /// <since_tizen> 6 </since_tizen>
135 return !Interop.Eext.eext_circle_object_disabled_get(CircleHandle);
139 Interop.Eext.eext_circle_object_disabled_set(CircleHandle, !value);
144 /// Sets or gets the line width of the marker.
146 /// <since_tizen> 6 </since_tizen>
147 public int MarkerLineWidth
151 return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "default");
155 Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "default", value);
160 /// Sets or gets the radius of the marker.
162 /// <since_tizen> 6 </since_tizen>
163 public double MarkerRadius
167 return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "default");
171 Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "default", value);
175 public double GetRangeStep()
180 public void SetRangeStep(double step)
185 public double RangeStep
189 return GetRangeStep();