A flip selector is a widget to show a set of text items, one at a time, with
the same sheet switching style as the Clock
widget, when one changes the current displaying sheet (thus, the “flip” in the
name).
User clicks to flip sheets which are held for some time will make the flip selector to flip continuously and automatically for the user. The interval between flips will keep growing in time, so that it helps the user to reach an item which is distant from the current selection.
selected
- when the widget’s selected text item is changed
overflowed
- when the widget’s current selection is changed
from the first item in its list to the last
underflowed
- when the widget’s current selection is changed
from the last item in its list to the first
default
- label of the flipselector item
efl.elementary.
FlipSelector
(Object parent, *args, **kwargs)¶Bases: efl.elementary.__init__.Object
parent (efl.evas.Object
) – The parent object
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
callback_overflowed_add
¶When the widget’s current selection is changed from the first item in its list to the last.
callback_overflowed_del
¶callback_selected_add
¶When the widget’s selected text item is changed.
callback_selected_del
¶callback_underflowed_add
¶When the widget’s current selection is changed from the last item in its list to the first.
callback_underflowed_del
¶first_interval
¶The interval on time updates for a user mouse button hold on a flip selector widget.
This interval value is decreased while the user holds the mouse pointer either flipping up or flipping down a given flip selector.
This helps the user to get to a given item distant from the current one easier/faster, as it will start to flip quicker and quicker on mouse button holds.
The calculation for the next flip interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little bit.
The default starting interval value for automatic flips is 0.85 seconds.
float
first_item
¶Get the first item in the given flip selector widget’s list of items.
See also
item_append
¶A constructor for a FlipSelectorItem
item_prepend
¶A constructor for a FlipSelectorItem
items
¶Get the internal list of items in a given flip selector widget.
This list is not to be modified in any way and must not be
freed. Use the list members with functions like
efl.elementary.object_item.ObjectItem.text
,
efl.elementary.object_item.ObjectItem.delete()
,
FlipselectorItem.selected
.
Warning
This list is only valid until obj
object’s internal
items list is changed. It should be fetched again with another
call to this function when changes happen.
tuple of FlipSelectorItem
last_item
¶Get the last item in the given flip selector widget’s list of items.
See also
next
¶Programmatically select the next item of a flip selector widget
Note
The selection will be animated. Also, if it reaches the end of its list of member items, it will continue with the first one onwards.
prev
¶Programmatically select the previous item of a flip selector widget
Note
The selection will be animated. Also, if it reaches the beginning of its list of member items, it will continue with the last one backwards.
selected_item
¶Get the currently selected item in a flip selector widget.
efl.elementary.
FlipSelectorItem
(label=None, callback=None, cb_data=None, *args, **kwargs)¶Bases: efl.elementary.__init__.ObjectItem
The widget’s list of labels to show will be appended with the given value. If the user wishes so, a callback function can be passed, which will get called when this same item is selected.
Note
The current selection won’t be modified by appending an element to the list.
Note
The maximum length of the text label is going to be determined by the widget’s theme. Strings larger than that value are going to be truncated.
label (string) – The (text) label of the new item
callback (callable) – Convenience callback function to take place when item is selected
cb_data – User data for the callback function
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
append_to
¶Append a (text) item to a flip selector widget
flipselector (FlipSelector
) – The widget to append this item to
A handle to the item added or None
, on errors
label
¶The label of this item
string
next
¶Gets the item after item
in a flip selector widget’s internal
list of items.
prepend_to
¶Append a (text) item to a flip selector widget
flipselector (FlipSelector
) – The widget to prepend this item to
A handle to the item added or None
, on errors
prev
¶Gets the item before item
in a flip selector widget’s internal
list of items.
selected
¶Set whether a given flip selector widget’s item should be the currently selected one.
This sets whether item
is or not the selected (thus, under
display) one. If item
is different than the one under display,
the latter will be unselected. If the item
is set to be
unselected, on the other hand, the first item in the widget’s
internal members list will be the new selected one.
bool