summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/elementary/spinner.rst2
-rw-r--r--efl/elementary/spinner.pxi22
-rw-r--r--examples/elementary/test_spinner.py2
3 files changed, 26 insertions, 0 deletions
diff --git a/doc/elementary/spinner.rst b/doc/elementary/spinner.rst
index 3f0d236..68a1ed5 100644
--- a/doc/elementary/spinner.rst
+++ b/doc/elementary/spinner.rst
@@ -33,6 +33,8 @@ Emitted signals
33 so it avoids possibly expensive reactions to the value change. 33 so it avoids possibly expensive reactions to the value change.
34- ``spinner,drag,start`` - When dragging has started. 34- ``spinner,drag,start`` - When dragging has started.
35- ``spinner,drag,stop`` - When dragging has stopped. 35- ``spinner,drag,stop`` - When dragging has stopped.
36- ``min,reached`` - Called when spinner value reached min (since 1.20)
37- ``max,reached`` - Called when spinner value reached max (since 1.20)
36 38
37 39
38Available styles 40Available styles
diff --git a/efl/elementary/spinner.pxi b/efl/elementary/spinner.pxi
index 27fc60d..5d80c8b 100644
--- a/efl/elementary/spinner.pxi
+++ b/efl/elementary/spinner.pxi
@@ -387,5 +387,27 @@ cdef class Spinner(LayoutClass):
387 def callback_drag_stop_del(self, func): 387 def callback_drag_stop_del(self, func):
388 self._callback_del("spinner,drag,stop", func) 388 self._callback_del("spinner,drag,stop", func)
389 389
390 def callback_min_reached_add(self, func, *args, **kwargs):
391 """When spinner value reached min.
392
393 .. versionadded:: 1.20
394
395 """
396 self._callback_add("min,reached", func, args, kwargs)
397
398 def callback_min_reached_del(self, func):
399 self._callback_del("min,reached", func)
400
401 def callback_max_reached_add(self, func, *args, **kwargs):
402 """When spinner value reached max.
403
404 .. versionadded:: 1.20
405
406 """
407 self._callback_add("max,reached", func, args, kwargs)
408
409 def callback_max_reached_del(self, func):
410 self._callback_del("max,reached", func)
411
390 412
391_object_mapping_register("Elm.Spinner", Spinner) 413_object_mapping_register("Elm.Spinner", Spinner)
diff --git a/examples/elementary/test_spinner.py b/examples/elementary/test_spinner.py
index 6b9457a..727cc41 100644
--- a/examples/elementary/test_spinner.py
+++ b/examples/elementary/test_spinner.py
@@ -34,6 +34,8 @@ def spinner_clicked(obj):
34 sp = Spinner(win, label_format="Percentage %%%1.2f something", 34 sp = Spinner(win, label_format="Percentage %%%1.2f something",
35 step=5.0, min_max=(0.0, 100.0), size_hint_weight=EXPAND_BOTH, 35 step=5.0, min_max=(0.0, 100.0), size_hint_weight=EXPAND_BOTH,
36 size_hint_align=FILL_HORIZ) 36 size_hint_align=FILL_HORIZ)
37 sp.callback_min_reached_add(lambda o: print("Min reached"))
38 sp.callback_max_reached_add(lambda o: print("Max reached"))
37 bx.pack_end(sp) 39 bx.pack_end(sp)
38 sp.show() 40 sp.show()
39 41