- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
Ctxpopup

Context popup widget. More...

## Macros
#define | elm_obj_ctxpopup_hover_parent_set(parent) ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_HOVER_PARENT_SET), EO_TYPECHECK(Evas_Object *, parent)
| Set the Ctxpopup's parent. More...
#define | elm_obj_ctxpopup_hover_parent_get(ret) ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_HOVER_PARENT_GET), EO_TYPECHECK(Evas_Object **, ret)
| Get the Ctxpopup's parent. More...
#define | elm_obj_ctxpopup_clear() ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_CLEAR)
| Clear all items in the given ctxpopup object. More...
#define | elm_obj_ctxpopup_horizontal_set(horizontal) ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)
| Change the ctxpopup's orientation to horizontal or vertical. More...
#define | elm_obj_ctxpopup_horizontal_get(ret) ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Get the value of current ctxpopup object's orientation. More...
#define | elm_obj_ctxpopup_item_append(label, icon, func, data, ret) ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
| Add a new item to a ctxpopup object. More...
#define | elm_obj_ctxpopup_direction_priority_set(first, second, third, fourth) ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_DIRECTION_PRIORITY_SET), EO_TYPECHECK(Elm_Ctxpopup_Direction, first), EO_TYPECHECK(Elm_Ctxpopup_Direction, second), EO_TYPECHECK(Elm_Ctxpopup_Direction, third), EO_TYPECHECK(Elm_Ctxpopup_Direction, fourth)
| Set the direction priority of a ctxpopup. More...
#define | elm_obj_ctxpopup_direction_priority_get(first, second, third, fourth) ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_DIRECTION_PRIORITY_GET), EO_TYPECHECK(Elm_Ctxpopup_Direction *, first), EO_TYPECHECK(Elm_Ctxpopup_Direction *, second), EO_TYPECHECK(Elm_Ctxpopup_Direction *, third), EO_TYPECHECK(Elm_Ctxpopup_Direction *, fourth)
| Get the direction priority of a ctxpopup. More...
#define | elm_obj_ctxpopup_direction_get(ret) ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_DIRECTION_GET), EO_TYPECHECK(Elm_Ctxpopup_Direction *, ret)
| Get the current direction of a ctxpopup. More...
#define | elm_obj_ctxpopup_dismiss() ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_DISMISS)
| Dismiss a ctxpopup object. More...

## Functions
Evas_Object * | elm_ctxpopup_add (Evas_Object *parent)
| Add a new Ctxpopup object to the parent. More...
void | elm_ctxpopup_hover_parent_set (Evas_Object *obj, Evas_Object *parent)
| Set the Ctxpopup's parent. More...
Evas_Object * | elm_ctxpopup_hover_parent_get (const Evas_Object *obj)
| Get the Ctxpopup's parent. More...
void | elm_ctxpopup_clear (Evas_Object *obj)
| Clear all items in the given ctxpopup object. More...
void | elm_ctxpopup_horizontal_set (Evas_Object *obj, Eina_Bool horizontal)
| Change the ctxpopup's orientation to horizontal or vertical. More...
Eina_Bool | elm_ctxpopup_horizontal_get (const Evas_Object *obj)
| Get the value of current ctxpopup object's orientation. More...
Elm_Object_Item * | elm_ctxpopup_item_append (Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data)
| Add a new item to a ctxpopup object. More...
void | elm_ctxpopup_direction_priority_set (Evas_Object *obj, Elm_Ctxpopup_Direction first, Elm_Ctxpopup_Direction second, Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth)
| Set the direction priority of a ctxpopup. More...
void | elm_ctxpopup_direction_priority_get (Evas_Object *obj, Elm_Ctxpopup_Direction *first, Elm_Ctxpopup_Direction *second, Elm_Ctxpopup_Direction *third, Elm_Ctxpopup_Direction *fourth)
| Get the direction priority of a ctxpopup. More...
Elm_Ctxpopup_Direction | elm_ctxpopup_direction_get (const Evas_Object *obj)
| Get the current direction of a ctxpopup. More...

## Detailed Description

Context popup widget.

A ctxpopup is a widget that, when shown, pops up a list of items. It automatically chooses an area inside its parent object's view (set via elm_ctxpopup_add() and elm_ctxpopup_hover_parent_set()) to optimally fit into it. In the default theme, it will also point an arrow to it's top left position at the time one shows it. Ctxpopup items have a label and/or an icon. It is intended for a small number of items (hence the use of list, not genlist).

This widget inherits from the Layout one, so that all the functions acting on it also work for context popup objects (

Since
  1.8).

This widget emits the following signals, besides the ones sent from Layout:

- `"dismissed"` - This is called when 1. the outside of ctxpopup was clicked or 2. its parent area is changed or 3. the language is changed and also when

1. the parent object is resized due to the window rotation. Then ctxpopup is dismissed.

- `"language,changed"` - This is called when the program's language is changed.
- `"focused"` - When the ctxpopup has received focus. (since 1.8)
- `"unfocused"` - When the ctxpopup has lost focus. (since 1.8) Default content parts of the ctxpopup widget that you can use for are:
  - "default" - A content of the ctxpopup
  Default content parts of the ctxpopup items that you can use for are:
  - "icon" - An icon in the title area
  Default text parts of the ctxpopup items that you can use for are:
  - "default" - Title label in the title area
  Supported elm_object common APIs.
  - elm_object_disabled_set
  - elm_object_disabled_get
  Supported elm_object_item common APIs.
  - elm_object_item_del
  - elm_object_item_disabled_set
  - elm_object_item_disabled_get
  - elm_object_item_part_text_set
  - elm_object_item_part_text_get
  - elm_object_item_part_content_set
  - elm_object_item_part_content_get
  - elm_object_item_signal_emit
  Ctxpopup example shows the usage of a good deal of the API.

## Macro Definition Documentation

#define elm_obj_ctxpopup_clear | ( |  | ) | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_CLEAR)

Clear all items in the given ctxpopup object.

Since
  1.8

See Also
  elm_ctxpopup_clear

Referenced by elm_ctxpopup_clear().

#define elm_obj_ctxpopup_direction_get | ( |  | ret | ) | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_DIRECTION_GET), EO_TYPECHECK(Elm_Ctxpopup_Direction *, ret)

Get the current direction of a ctxpopup.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_ctxpopup_direction_get

Referenced by elm_ctxpopup_direction_get().

#define elm_obj_ctxpopup_direction_priority_get | ( |  | first,
|  |  | second,
|  |  | third,
|  |  | fourth
| ) |  | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_DIRECTION_PRIORITY_GET), EO_TYPECHECK(Elm_Ctxpopup_Direction *, first), EO_TYPECHECK(Elm_Ctxpopup_Direction *, second), EO_TYPECHECK(Elm_Ctxpopup_Direction *, third), EO_TYPECHECK(Elm_Ctxpopup_Direction *, fourth)

Get the direction priority of a ctxpopup.

Since
  1.8

Parameters

  [out] | first |
  [out] | second |
  [out] | third |
  [out] | fourth |

See Also
  elm_ctxpopup_direction_priority_get

Referenced by elm_ctxpopup_direction_priority_get().

#define elm_obj_ctxpopup_direction_priority_set | ( |  | first,
|  |  | second,
|  |  | third,
|  |  | fourth
| ) |  | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_DIRECTION_PRIORITY_SET), EO_TYPECHECK(Elm_Ctxpopup_Direction, first), EO_TYPECHECK(Elm_Ctxpopup_Direction, second), EO_TYPECHECK(Elm_Ctxpopup_Direction, third), EO_TYPECHECK(Elm_Ctxpopup_Direction, fourth)

Set the direction priority of a ctxpopup.

Since
  1.8

Parameters

  [in] | first |
  [in] | second |
  [in] | third |
  [in] | fourth |

See Also
  elm_ctxpopup_direction_priority_set

Referenced by elm_ctxpopup_direction_priority_set().

#define elm_obj_ctxpopup_dismiss | ( |  | ) | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_DISMISS)

Dismiss a ctxpopup object.

Since
  1.8

See Also
  elm_ctxpopup_dismiss

#define elm_obj_ctxpopup_horizontal_get | ( |  | ret | ) | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)

Get the value of current ctxpopup object's orientation.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_ctxpopup_horizontal_get

Referenced by elm_ctxpopup_horizontal_get().

#define elm_obj_ctxpopup_horizontal_set | ( |  | horizontal | ) | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)

Change the ctxpopup's orientation to horizontal or vertical.

Since
  1.8

Parameters

  [in] | horizontal |

See Also
  elm_ctxpopup_horizontal_set

Referenced by elm_ctxpopup_horizontal_set().

#define elm_obj_ctxpopup_hover_parent_get | ( |  | ret | ) | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_HOVER_PARENT_GET), EO_TYPECHECK(Evas_Object **, ret)

Get the Ctxpopup's parent.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_ctxpopup_hover_parent_get

Referenced by elm_ctxpopup_hover_parent_get().

#define elm_obj_ctxpopup_hover_parent_set | ( |  | parent | ) | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_HOVER_PARENT_SET), EO_TYPECHECK(Evas_Object *, parent)

Set the Ctxpopup's parent.

Since
  1.8

Parameters

  [in] | parent |

See Also
  elm_ctxpopup_hover_parent_set

Referenced by elm_ctxpopup_hover_parent_set().

#define elm_obj_ctxpopup_item_append | ( |  | label,
|  |  | icon,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_CTXPOPUP_ID(ELM_OBJ_CTXPOPUP_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Add a new item to a ctxpopup object.

Since
  1.8

Parameters

  [in] | label |
  [in] | icon |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_ctxpopup_item_append

Referenced by elm_ctxpopup_item_append().

## Function Documentation

Evas_Object* elm_ctxpopup_add | ( | Evas_Object * | parent | ) |

Add a new Ctxpopup object to the parent.

Parameters

  parent | Parent object

Returns
  New object or `NULL`, if it cannot be created

void elm_ctxpopup_clear | ( | Evas_Object * | obj | ) |

Clear all items in the given ctxpopup object.

Parameters

  obj | Ctxpopup object

References elm_obj_ctxpopup_clear.

Elm_Ctxpopup_Direction elm_ctxpopup_direction_get | ( | const Evas_Object * | obj | ) |

Get the current direction of a ctxpopup.

Parameters

  obj | Ctxpopup object

Returns
  current direction of a ctxpopup

Warning
  Once the ctxpopup showed up, the direction would be determined

References elm_obj_ctxpopup_direction_get.

void elm_ctxpopup_direction_priority_get | ( | Evas_Object * | obj,
|  | Elm_Ctxpopup_Direction * | first,
|  | Elm_Ctxpopup_Direction * | second,
|  | Elm_Ctxpopup_Direction * | third,
|  | Elm_Ctxpopup_Direction * | fourth
| ) |  |

Get the direction priority of a ctxpopup.

Parameters

  obj | Ctxpopup object
  first | 1st priority of direction to be returned
  second | 2nd priority of direction to be returned
  third | 3th priority of direction to be returned
  fourth | 4th priority of direction to be returned

See Also
  elm_ctxpopup_direction_priority_set() for more information.

References elm_obj_ctxpopup_direction_priority_get.

void elm_ctxpopup_direction_priority_set | ( | Evas_Object * | obj,
|  | Elm_Ctxpopup_Direction | first,
|  | Elm_Ctxpopup_Direction | second,
|  | Elm_Ctxpopup_Direction | third,
|  | Elm_Ctxpopup_Direction | fourth
| ) |  |

Set the direction priority of a ctxpopup.

Parameters

  obj | Ctxpopup object
  first | 1st priority of direction
  second | 2nd priority of direction
  third | 3th priority of direction
  fourth | 4th priority of direction

This functions gives a chance to user to set the priority of ctxpopup showing direction. This doesn't guarantee the ctxpopup will appear in the requested direction.

See Also
  Elm_Ctxpopup_Direction

References elm_obj_ctxpopup_direction_priority_set.

Eina_Bool elm_ctxpopup_horizontal_get | ( | const Evas_Object * | obj | ) |

Get the value of current ctxpopup object's orientation.

Parameters

  obj | Ctxpopup object

Returns
  `EINA_TRUE` for horizontal mode, `EINA_FALSE` for vertical mode (or errors)

See Also
  elm_ctxpopup_horizontal_set()

References elm_obj_ctxpopup_horizontal_get.

void elm_ctxpopup_horizontal_set | ( | Evas_Object * | obj,
|  | Eina_Bool | horizontal
| ) |  |

Change the ctxpopup's orientation to horizontal or vertical.

Parameters

  obj | Ctxpopup object
  horizontal | `EINA_TRUE` for horizontal mode, `EINA_FALSE` for vertical

References elm_obj_ctxpopup_horizontal_set.

Evas_Object* elm_ctxpopup_hover_parent_get | ( | const Evas_Object * | obj | ) |

Get the Ctxpopup's parent.

Parameters

  obj | The ctxpopup object

See Also
  elm_ctxpopup_hover_parent_set() for more information

References elm_obj_ctxpopup_hover_parent_get.

void elm_ctxpopup_hover_parent_set | ( | Evas_Object * | obj,
|  | Evas_Object * | parent
| ) |  |

Set the Ctxpopup's parent.

Parameters

  obj | The ctxpopup object
  parent | The parent to use

Set the parent object.

Note
  elm_ctxpopup_add() will automatically call this function with its `parent` argument.

See Also
  elm_ctxpopup_add()
  elm_hover_parent_set()

References elm_obj_ctxpopup_hover_parent_set.

Elm_Object_Item* elm_ctxpopup_item_append | ( | Evas_Object * | obj,
|  | const char * | label,
|  | Evas_Object * | icon,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Add a new item to a ctxpopup object.

Parameters

  obj | Ctxpopup object
  icon | Icon to be set on new item
  label | The Label of the new item
  func | Convenience function called when item selected
  data | Data passed to `func`

Returns
  A handle to the item added or `NULL`, on errors

Warning
  Ctxpopup can't hold both an item list and a content at the same time. When an item is added, any previous content will be removed.

See Also
  elm_object_content_set()

References elm_obj_ctxpopup_item_append.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:12