Flip¶
Widget description¶
This widget holds two content efl.evas.Object
: one on
the front and one on the back. It allows you to flip from front to back
and vice-versa using various animations.
If either the front or back contents are not set the flip will treat that
as transparent. So if you were to set the front content but not the back,
and then call Flip.go()
you would see whatever is below the flip.
For a list of supported animations see Flip.go()
.
Emitted signals¶
animate,begin
- when a flip animation was startedanimate,done
- when a flip animation is finished
Layout content parts¶
front
- A front content of the flipback
- A back content of the flip
Enumerations¶
Flip directions¶
- efl.elementary.ELM_FLIP_DIRECTION_UP¶
Allows interaction with the top of the widget.
- efl.elementary.ELM_FLIP_DIRECTION_DOWN¶
Allows interaction with the bottom of the widget.
- efl.elementary.ELM_FLIP_DIRECTION_LEFT¶
Allows interaction with the left portion of
the widget.
- efl.elementary.ELM_FLIP_DIRECTION_RIGHT¶
Allows interaction with the right portion of
the widget.
Flip interaction modes¶
- efl.elementary.ELM_FLIP_INTERACTION_NONE¶
No interaction is allowed
- efl.elementary.ELM_FLIP_INTERACTION_ROTATE¶
Interaction will cause rotate animation
- efl.elementary.ELM_FLIP_INTERACTION_CUBE¶
Interaction will cause cube animation
- efl.elementary.ELM_FLIP_INTERACTION_PAGE¶
Interaction will cause page animation
Flip types¶
- efl.elementary.ELM_FLIP_ROTATE_Y_CENTER_AXIS¶
Rotate the currently visible content around a vertical axis in the middle of its width, the other content is shown as the other side of the flip.
- efl.elementary.ELM_FLIP_ROTATE_X_CENTER_AXIS¶
Rotate the currently visible content around a horizontal axis in the middle of its height, the other content is shown as the other side of the flip.
- efl.elementary.ELM_FLIP_ROTATE_XZ_CENTER_AXIS¶
Rotate the currently visible content around a diagonal axis in the middle of its width, the other content is shown as the other side of the flip.
- efl.elementary.ELM_FLIP_ROTATE_YZ_CENTER_AXIS¶
Rotate the currently visible content around a diagonal axis in the middle of its height, the other content is shown as the other side of the flip.
- efl.elementary.ELM_FLIP_CUBE_LEFT¶
Rotate the currently visible content to the left as if the flip was a cube, the other content is show as the right face of the cube.
- efl.elementary.ELM_FLIP_CUBE_RIGHT¶
Rotate the currently visible content to the right as if the flip was a cube, the other content is show as the left face of the cube.
- efl.elementary.ELM_FLIP_CUBE_UP¶
Rotate the currently visible content up as if the flip was a cube, the other content is show as the bottom face of the cube.
- efl.elementary.ELM_FLIP_CUBE_DOWN¶
Rotate the currently visible content down as if the flip was a cube, the other content is show as the upper face of the cube.
- efl.elementary.ELM_FLIP_PAGE_LEFT¶
Move the currently visible content to the left as if the flip was a book, the other content is shown as the page below that.
- efl.elementary.ELM_FLIP_PAGE_RIGHT¶
Move the currently visible content to the right as if the flip was a book, the other content is shown as the page below that.
- efl.elementary.ELM_FLIP_PAGE_UP¶
Move the currently visible content up as if the flip was a book, the other content is shown as the page below that.
- efl.elementary.ELM_FLIP_PAGE_DOWN¶
Move the currently visible content down as if the flip was a book, the other content is shown as the page below that.
Inheritance diagram¶
- class efl.elementary.Flip(Object parent, *args, **kwargs)¶
Bases:
efl.elementary.__init__.Object
This is the class that actually implement the widget.
- Parameters
parent (
efl.evas.Object
) – The parent object**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
- callback_animate_begin_add(func, *args, **kwargs)¶
When a flip animation was started.
- callback_animate_begin_del(func)¶
- callback_animate_done_add(func, *args, **kwargs)¶
When a flip animation is finished.
- callback_animate_done_del(func)¶
- flip_go_to(front, flip_mode)¶
Runs the flip animation to front or back.
- Parameters
front (bool) – if True, makes front visible, otherwise makes back.
flip_mode (Flip types) – The mode type
Flips the front and back contents using the
flip_mode
animation. This effectively hides the currently visible content and shows the hidden one.New in version 1.8.
- front_visible¶
Front visibility state
- Type
bool
- front_visible_get()¶
- go(flip_mode)¶
Runs the flip animation
Flips the front and back contents using the
flip_mode
animation. This effectively hides the currently visible content and shows the hidden one.- Parameters
flip_mode (Flip types) – The mode type
- interaction¶
The interactive flip mode
Whether the flip should be interactive (allow user to click and drag a side of the flip to reveal the back page and cause it to flip). By default a flip is not interactive. You may also need to set which sides of the flip are “active” for flipping and how much space they use (a minimum of a finger size) with
interaction_direction_enabled_set()
andinteraction_direction_hitsize_set()
Note
ELM_FLIP_INTERACTION_ROTATE won’t cause ELM_FLIP_ROTATE_XZ_CENTER_AXIS or ELM_FLIP_ROTATE_YZ_CENTER_AXIS to happen, those can only be achieved with
go()
- interaction_direction_enabled_get(direction)¶
Get the enabled state of that flip direction
Gets the enabled state set by
interaction_direction_enabled_set()
See also
- Parameters
dir (Flip directions) – The direction to check
- Returns
If that direction is enabled or not
- Return type
bool
- interaction_direction_enabled_set(direction, enable)¶
Set which directions of the flip respond to interactive flip
By default all directions are disabled, so you may want to enable the desired directions for flipping if you need interactive flipping. You must call this function once for each direction that should be enabled.
See also
- Parameters
direction (Flip directions) – The direction to change
enabled (bool) – If that direction is enabled or not
- interaction_direction_hitsize_get(direction)¶
Get the amount of the flip that is sensitive to interactive flip
Returns the amount of sensitive area set by
interaction_direction_hitsize_set()
.- Parameters
dir (Flip directions) – The direction to check
- Returns
The size set for that direction
- Return type
double
- interaction_direction_hitsize_set(direction, hitsize)¶
Set the amount of the flip that is sensitive to interactive flip
Set the amount of the flip that is sensitive to interactive flip, with 0 representing no area in the flip and 1 representing the entire flip. There is however a consideration to be made in that the area will never be smaller than the finger size set(as set in your Elementary configuration).
See also
- Parameters
dir (Flip directions) – The direction to modify
hitsize (float) – The amount of that dimension (0.0 to 1.0) to use
- interaction_get()¶
- interaction_set(mode)¶
- perspective¶
Set flip perspective
Warning
This function currently does nothing.
- Type
tuple of Evas_Coords (int)
- perspective_set(foc, x, y)¶