Flip

Enumerations | Functions
Flip
Elementary

## Enumerations
enum | Elm_Flip_Mode { ELM_FLIP_ROTATE_Y_CENTER_AXIS = 0 , ELM_FLIP_ROTATE_X_CENTER_AXIS , ELM_FLIP_ROTATE_XZ_CENTER_AXIS , ELM_FLIP_ROTATE_YZ_CENTER_AXIS , ELM_FLIP_CUBE_LEFT , ELM_FLIP_CUBE_RIGHT , ELM_FLIP_CUBE_UP , ELM_FLIP_CUBE_DOWN , ELM_FLIP_PAGE_LEFT , ELM_FLIP_PAGE_RIGHT , ELM_FLIP_PAGE_UP , ELM_FLIP_PAGE_DOWN , ELM_FLIP_CROSS_FADE }
| Elm flip mode. More...

## Functions
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...
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

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:

- "front" - A front content of the flip
- "back" - A back content of the flip

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

- elm_object_part_content_set
- elm_object_part_content_get
- elm_object_part_content_unset

Flip example show how to use most of the API.

## Enumeration Type Documentation

## ◆ Elm_Flip_Mode

enum Elm_Flip_Mode

Elm flip mode.

Enumerator
ELM_FLIP_ROTATE_Y_CENTER_AXIS | Rotate Y center axis flip mode.
ELM_FLIP_ROTATE_X_CENTER_AXIS | Rotate X center axis flip mode.
ELM_FLIP_ROTATE_XZ_CENTER_AXIS | Rotate XZ center axis flip mode.
ELM_FLIP_ROTATE_YZ_CENTER_AXIS | Rotate YZ center axis flip mode.
ELM_FLIP_CUBE_LEFT | Cube left flip mode.
ELM_FLIP_CUBE_RIGHT | Cube right flip mode.
ELM_FLIP_CUBE_UP | Cube up flip mode.
ELM_FLIP_CUBE_DOWN | Cube down flip mode.
ELM_FLIP_PAGE_LEFT | Page left flip mode.
ELM_FLIP_PAGE_RIGHT | Page right flip mode.
ELM_FLIP_PAGE_UP | Page up flip mode.
ELM_FLIP_PAGE_DOWN | Page down flip mode.
ELM_FLIP_CROSS_FADE | Cross fade flip mode.

## Function Documentation

## ◆ elm_flip_interaction_direction_hitsize_set()

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] | hitsize | The amount of that dimension (0.0 to 1.0) to use.

Examples
  flip_example_01.c.

## ◆ elm_flip_interaction_direction_hitsize_get()

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] | dir | The direction to check.

Returns
  The size set for that direction.

## ◆ elm_flip_interaction_direction_enabled_set()

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 efl_ui_flip_interaction_direction_hitsize_set. By default, a minimum hit area will be created on the opposite edge of the flip.

Parameters

  [in] | enabled | If that direction is enabled or not.

Examples
  flip_example_01.c.

## ◆ elm_flip_interaction_direction_enabled_get()

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] | dir | The direction to check.

Returns
  If that direction is enabled or not.

## ◆ elm_flip_add()

Evas_Object* elm_flip_add | ( | Evas_Object * | parent | ) |

Add a new flip to the parent.

Parameters

  parent | The parent object

Returns
  The new object or NULL if it cannot be created

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ◆ elm_flip_perspective_set()

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

Set flip perspective.

Parameters

  obj | The flip object
  foc | The coordinate to set the focus on
  x | The X coordinate
  y | The Y coordinate

Warning
  This function currently does nothing.