Enumerations | Functions
Flip

Enumerations

enum  Elm_Flip_Mode
 No description supplied.
 
enum  Elm_Flip_Interaction
 No description supplied.
 
enum  Elm_Flip_Mode
 No description supplied.
 
enum  Elm_Flip_Interaction
 No description supplied.
 

Functions

EOAPI void elm_obj_flip_interaction_set (Elm_Flip_Interaction mode)
 Set the interactive flip mode. More...
 
EOAPI Elm_Flip_Interaction elm_obj_flip_interaction_get (void)
 Get the interactive flip mode. More...
 
EOAPI Eina_Bool elm_obj_flip_front_visible_get (void)
 Get flip front visibility state. More...
 
EOAPI void elm_obj_flip_interaction_direction_hitsize_set (Elm_Flip_Direction dir, double hitsize)
 Set the amount of the flip that is sensitive to interactive flip. More...
 
EOAPI double elm_obj_flip_interaction_direction_hitsize_get (Elm_Flip_Direction dir)
 Get the amount of the flip that is sensitive to interactive flip. More...
 
EOAPI void elm_obj_flip_interaction_direction_enabled_set (Elm_Flip_Direction dir, Eina_Bool enabled)
 Set which directions of the flip respond to interactive flip. More...
 
EOAPI Eina_Bool elm_obj_flip_interaction_direction_enabled_get (Elm_Flip_Direction dir)
 Get the enabled state of that flip direction. More...
 
EOAPI void elm_obj_flip_go (Elm_Flip_Mode mode)
 Runs the flip animation. More...
 
EOAPI void elm_obj_flip_go_to (Eina_Bool front, Elm_Flip_Mode mode)
 Runs the flip animation to front or back. More...
 
void elm_flip_interaction_set (Elm_Flip *obj, Elm_Flip_Interaction mode)
 Set the interactive flip mode. More...
 
Elm_Flip_Interaction elm_flip_interaction_get (const Elm_Flip *obj)
 Get the interactive flip mode. More...
 
Eina_Bool elm_flip_front_visible_get (const Elm_Flip *obj)
 Get flip front visibility state. More...
 
void elm_flip_interaction_direction_hitsize_set (Elm_Flip *obj, Elm_Flip_Direction dir, double hitsize)
 Set the amount of the flip that is sensitive to interactive flip. More...
 
double elm_flip_interaction_direction_hitsize_get (Elm_Flip *obj, Elm_Flip_Direction dir)
 Get the amount of the flip that is sensitive to interactive flip. More...
 
void elm_flip_interaction_direction_enabled_set (Elm_Flip *obj, Elm_Flip_Direction dir, Eina_Bool enabled)
 Set which directions of the flip respond to interactive flip. More...
 
Eina_Bool elm_flip_interaction_direction_enabled_get (Elm_Flip *obj, Elm_Flip_Direction dir)
 Get the enabled state of that flip direction. More...
 
void elm_flip_go (Elm_Flip *obj, Elm_Flip_Mode mode)
 Runs the flip animation. More...
 
void elm_flip_go_to (Elm_Flip *obj, Eina_Bool front, Elm_Flip_Mode mode)
 Runs the flip animation to front or back. More...
 
Evas_Object * elm_flip_add (Evas_Object *parent)
 Add a new flip to the parent. More...
 
void elm_flip_perspective_set (Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y)
 Set flip perspective. More...
 

Detailed Description

flip_inheritance_tree.png
preview-00.png

This widget holds 2 content objects(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 wore to set the front content but not the back, and then call elm_flip_go() you would see whatever is below the flip.

For a list of supported animations see elm_flip_go().

Signals that you can add callbacks for are: "animate,begin" - when a flip animation was started "animate,done" - when a flip animation is finished

Default content parts of the flip widget that you can use for are:

This widget inherits from The Elementary Container Class, so that the functions meant to act on it will work for mapbuf objects:

Flip example show how to use most of the API.

Function Documentation

Evas_Object* elm_flip_add ( Evas_Object *  parent)

Add a new flip to the parent.

Parameters
parentThe parent object
Returns
The new object or NULL if it cannot be created
Eina_Bool elm_flip_front_visible_get ( const Elm_Flip *  obj)

Get flip front visibility state.

Returns
true if front front is showing, false if the back is showing.

References elm_obj_flip_front_visible_get().

void elm_flip_go ( Elm_Flip *  obj,
Elm_Flip_Mode  mode 
)

Runs the flip animation.

Flips the front and back contents using the mode animation. This effectively hides the currently visible content and shows the hidden one.

There a number of possible animations to use for the flipping, these being #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), #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), #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), #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 hown as the other side of the flip). #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), #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), #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), #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), #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), #ELM_FLIP_PAGE_RIGHT (move the currently visible content to the right s if the flip was a book, the other content is shown as the page below that), #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) and #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).

Parameters
[in]modeThe mode type.

References elm_obj_flip_go().

void elm_flip_go_to ( Elm_Flip *  obj,
Eina_Bool  front,
Elm_Flip_Mode  mode 
)

Runs the flip animation to front or back.

Flips the front and back contents using the mode animation. This effectively hides the currently visible content and shows he hidden one.

There a number of possible animations to use for the flipping, these being #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), #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), #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), #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 hown as the other side of the flip). #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), #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), #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), #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), #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), #ELM_FLIP_PAGE_RIGHT (move the currently visible content to the right s if the flip was a book, the other content is shown as the page below that), #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) and #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).

Parameters
[in]modeThe mode type.

References elm_obj_flip_go_to().

Eina_Bool elm_flip_interaction_direction_enabled_get ( Elm_Flip *  obj,
Elm_Flip_Direction  dir 
)

Get the enabled state of that flip direction.

Parameters
[in]dirThe direction to check.
Returns
If that direction is enabled or not.

References elm_obj_flip_interaction_direction_enabled_get().

void elm_flip_interaction_direction_enabled_set ( Elm_Flip *  obj,
Elm_Flip_Direction  dir,
Eina_Bool  enabled 
)

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.

You can also set the appropriate hit area size by calling elm_flip_interaction_direction_hitsize_set. By default, a minimum hit area will be created on the opposite edge of the flip.

Parameters
[in]enabledIf that direction is enabled or not.

References elm_obj_flip_interaction_direction_enabled_set().

double elm_flip_interaction_direction_hitsize_get ( Elm_Flip *  obj,
Elm_Flip_Direction  dir 
)

Get the amount of the flip that is sensitive to interactive flip.

Parameters
[in]dirThe direction to check.
Returns
The size set for that direction.

References elm_obj_flip_interaction_direction_hitsize_get().

void elm_flip_interaction_direction_hitsize_set ( Elm_Flip *  obj,
Elm_Flip_Direction  dir,
double  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), and dragging must always start from the opposite half of the flip (eg. right half of the flip when dragging to the left).

Note
The dir parameter is not actually related to the direction of the drag, it only refers to the area in the flip where interaction can occur (top, bottom, left, right).

Negative values of hitsize will disable this hit area.

See also elm_flip_interaction_set.

Parameters
[in]hitsizeThe amount of that dimension (0.0 to 1.0) to use.

References elm_obj_flip_interaction_direction_hitsize_set().

Elm_Flip_Interaction elm_flip_interaction_get ( const Elm_Flip *  obj)

Get the interactive flip mode.

Returns
The interactive flip mode to use.

References elm_obj_flip_interaction_get().

void elm_flip_interaction_set ( Elm_Flip *  obj,
Elm_Flip_Interaction  mode 
)

Set the interactive flip mode.

This sets if 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 elm_flip_interaction_direction_enabled_set and elm_flip_interaction_direction_hitsize_set.

The four available mode of interaction are #ELM_FLIP_INTERACTION_NONE, #ELM_FLIP_INTERACTION_ROTATE, #ELM_FLIP_INTERACTION_CUBE and #ELM_FLIP_INTERACTION_PAGE.

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 elm_flip_go.
Parameters
[in]modeThe interactive flip mode to use.

References elm_obj_flip_interaction_set().

void elm_flip_perspective_set ( Evas_Object *  obj,
Evas_Coord  foc,
Evas_Coord  x,
Evas_Coord  y 
)

Set flip perspective.

Parameters
objThe flip object
focThe coordinate to set the focus on
xThe X coordinate
yThe Y coordinate
Warning
This function currently does nothing.
EOAPI Eina_Bool elm_obj_flip_front_visible_get ( void  )

Get flip front visibility state.

Returns
true if front front is showing, false if the back is showing.

Referenced by elm_flip_front_visible_get().

EOAPI void elm_obj_flip_go ( Elm_Flip_Mode  mode)

Runs the flip animation.

Flips the front and back contents using the mode animation. This effectively hides the currently visible content and shows the hidden one.

There a number of possible animations to use for the flipping, these being #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), #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), #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), #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 hown as the other side of the flip). #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), #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), #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), #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), #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), #ELM_FLIP_PAGE_RIGHT (move the currently visible content to the right s if the flip was a book, the other content is shown as the page below that), #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) and #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).

Parameters
[in]modeThe mode type.

Referenced by elm_flip_go().

EOAPI void elm_obj_flip_go_to ( Eina_Bool  front,
Elm_Flip_Mode  mode 
)

Runs the flip animation to front or back.

Flips the front and back contents using the mode animation. This effectively hides the currently visible content and shows he hidden one.

There a number of possible animations to use for the flipping, these being #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), #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), #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), #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 hown as the other side of the flip). #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), #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), #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), #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), #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), #ELM_FLIP_PAGE_RIGHT (move the currently visible content to the right s if the flip was a book, the other content is shown as the page below that), #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) and #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).

Parameters
[in]modeThe mode type.

Referenced by elm_flip_go_to().

EOAPI Eina_Bool elm_obj_flip_interaction_direction_enabled_get ( Elm_Flip_Direction  dir)

Get the enabled state of that flip direction.

Parameters
[in]dirThe direction to check.
Returns
If that direction is enabled or not.

Referenced by elm_flip_interaction_direction_enabled_get().

EOAPI void elm_obj_flip_interaction_direction_enabled_set ( Elm_Flip_Direction  dir,
Eina_Bool  enabled 
)

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.

You can also set the appropriate hit area size by calling elm_obj_flip_interaction_direction_hitsize_set. By default, a minimum hit area will be created on the opposite edge of the flip.

Parameters
[in]enabledIf that direction is enabled or not.

Referenced by elm_flip_interaction_direction_enabled_set().

EOAPI double elm_obj_flip_interaction_direction_hitsize_get ( Elm_Flip_Direction  dir)

Get the amount of the flip that is sensitive to interactive flip.

Parameters
[in]dirThe direction to check.
Returns
The size set for that direction.

Referenced by elm_flip_interaction_direction_hitsize_get().

EOAPI void elm_obj_flip_interaction_direction_hitsize_set ( Elm_Flip_Direction  dir,
double  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), and dragging must always start from the opposite half of the flip (eg. right half of the flip when dragging to the left).

Note
The dir parameter is not actually related to the direction of the drag, it only refers to the area in the flip where interaction can occur (top, bottom, left, right).

Negative values of hitsize will disable this hit area.

See also elm_obj_flip_interaction_set.

Parameters
[in]hitsizeThe amount of that dimension (0.0 to 1.0) to use.

Referenced by elm_flip_interaction_direction_hitsize_set().

EOAPI Elm_Flip_Interaction elm_obj_flip_interaction_get ( void  )

Get the interactive flip mode.

Returns
The interactive flip mode to use.

Referenced by elm_flip_interaction_get().

EOAPI void elm_obj_flip_interaction_set ( Elm_Flip_Interaction  mode)

Set the interactive flip mode.

This sets if 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 elm_obj_flip_interaction_direction_enabled_set and elm_obj_flip_interaction_direction_hitsize_set.

The four available mode of interaction are #ELM_FLIP_INTERACTION_NONE, #ELM_FLIP_INTERACTION_ROTATE, #ELM_FLIP_INTERACTION_CUBE and #ELM_FLIP_INTERACTION_PAGE.

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 elm_obj_flip_go.
Parameters
[in]modeThe interactive flip mode to use.

Referenced by elm_flip_interaction_set().