Flipselector¶
Widget description¶
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.
Emitted signals¶
selected
- when the widget’s selected text item is changedoverflowed
- when the widget’s current selection is changed from the first item in its list to the lastunderflowed
- when the widget’s current selection is changed from the last item in its list to the first
Layout text parts¶
default
- label of the flipselector item
Inheritance diagram¶
- class efl.elementary.FlipSelector(Object parent, *args, **kwargs)¶
Bases:
efl.elementary.__init__.Object
This is the class that actually implements the widget.
- Parameters
parent (
efl.evas.Object
) – The parent object**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
- callback_overflowed_add(func, *args, **kwargs)¶
When the widget’s current selection is changed from the first item in its list to the last.
- callback_overflowed_del(func)¶
- callback_selected_add(func, *args, **kwargs)¶
When the widget’s selected text item is changed.
- callback_selected_del(func)¶
- callback_underflowed_add(func, *args, **kwargs)¶
When the widget’s current selection is changed from the last item in its list to the first.
- callback_underflowed_del(func)¶
- 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.
- Type
float
- first_item¶
Get the first item in the given flip selector widget’s list of items.
See also
- Type
- item_append(label=None, callback=None, *args, **kwargs)¶
A constructor for a
FlipSelectorItem
- item_prepend(label=None, callback=None, *args, **kwargs)¶
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.- Type
tuple of
FlipSelectorItem
- last_item¶
Get the last item in the given flip selector widget’s list of items.
See also
- Type
- 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.
- Type
- class efl.elementary.FlipSelectorItem(label=None, callback=None, cb_data=None, *args, **kwargs)¶
Bases:
efl.elementary.__init__.ObjectItem
An item for the
FlipSelector
widget.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.
- Parameters
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(flipselector)¶
Append a (text) item to a flip selector widget
- Parameters
flipselector (
FlipSelector
) – The widget to append this item to- Returns
A handle to the item added or
None
, on errors- Return type
- label¶
The label of this item
- Type
string
- next¶
Gets the item after
item
in a flip selector widget’s internal list of items.- Type
- prepend_to(flipselector)¶
Append a (text) item to a flip selector widget
- Parameters
flipselector (
FlipSelector
) – The widget to prepend this item to- Returns
A handle to the item added or
None
, on errors- Return type
- prev¶
Gets the item before
item
in a flip selector widget’s internal list of items.- Type
- 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. Ifitem
is different than the one under display, the latter will be unselected. If theitem
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.- Type
bool