Tizen Native API
|
Functions | |
Evas_Object * | elm_popup_add (Evas_Object *parent) |
Adds a new Popup to the parent. | |
Elm_Object_Item * | elm_popup_item_append (Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) |
Add a new item to a Popup object. | |
void | elm_popup_content_text_wrap_type_set (Evas_Object *obj, Elm_Wrap_Type wrap) |
Sets the wrapping type of content text packed in content area of popup object. | |
Elm_Wrap_Type | elm_popup_content_text_wrap_type_get (const Evas_Object *obj) |
Returns the wrapping type of content text packed in content area of popup object. | |
void | elm_popup_orient_set (Evas_Object *obj, Elm_Popup_Orient orient) |
Sets the orientation of the popup in the parent region. | |
Elm_Popup_Orient | elm_popup_orient_get (const Evas_Object *obj) |
Returns the orientation of Popup. | |
void | elm_popup_timeout_set (Evas_Object *obj, double timeout) |
Sets a timeout to hide popup automatically. | |
double | elm_popup_timeout_get (const Evas_Object *obj) |
Returns the timeout value set to the popup (in seconds) | |
void | elm_popup_allow_events_set (Evas_Object *obj, Eina_Bool allow) |
Sets whether events should be passed to by a click outside. | |
Eina_Bool | elm_popup_allow_events_get (const Evas_Object *obj) |
Returns value indicating whether allow event is enabled or not. | |
void | elm_popup_align_set (Evas_Object *obj, double horizontal, double vertical) |
Set the alignment of the popup object. | |
void | elm_popup_align_get (const Evas_Object *obj, double *horizontal, double *vertical) |
Get the alignment of the popup object. | |
void | elm_popup_dismiss (Evas_Object *obj) |
Dismiss a popup object. |
This widget is an enhancement of Notify. In addition to content area, there are two optional sections, namely title area and action area.
The popup widget displays its content with a particular orientation in the parent area. This orientation can be one among top, center, bottom, left, top-left, top-right, bottom-left and bottom-right. Content part of Popup can be an Evas Object set by application or it can be Text set by application or set of items containing an icon and/or text. The content/item-list can be removed using elm_object_content_set with second parameter passed as NULL.
The following figures show the textual layouts of popup in which Title Area and Action area area are optional ones. Action area can have up to 3 buttons handled using elm_object common APIs mentioned below. If user wants to have more than 3 buttons then these buttons can be put inside the items of a list as content. User needs to handle the clicked signal of these action buttons if required. No event is processed by the widget automatically when clicked on these action buttons.
Timeout can be set on expiry of which popup instance hides and sends a smart signal "timeout" to the user. The visible region of popup is surrounded by a translucent region called Blocked Event area. By clicking on Blocked Event area, the signal "block,clicked" is sent to the application. This block event area can be avoided by using API elm_popup_allow_events_set. When gets hidden, popup does not get destroyed automatically, application should destroy the popup instance after use. To control the maximum height of the internal scroller for item, we use the height of the action area which is passed by theme based on the number of buttons currently set to popup.
This widget inherits from the Layout one, so that all the functions acting on it also work for popup objects (
This widget emits the following signals, besides the ones sent from Layout :
"timeout"
- whenever popup is closed as a result of timeout. "block,clicked"
- whenever user taps on Blocked Event area. "language,changed"
- The program's language changed. ("show,finished"
- When the popup transition is finished in showing.Styles available for Popup
Default contents parts of the popup widget that you can use are:
Default text parts of the popup widget that you can use are:
Default contents parts of the popup items that you can use are:
Default text parts of the popup items that you can use are:
Supported elm_object_item common APIs.
enum Elm_Popup_Orient |
Possible orient values for popup.
These values should be used in conjunction to elm_popup_orient_set() to set the position in which the popup should appear(relative to its parent) and in conjunction with elm_popup_orient_get() to know where the popup is appearing.
Evas_Object* elm_popup_add | ( | Evas_Object * | parent | ) |
Adds a new Popup to the parent.
[in] | parent | The parent object |
void elm_popup_align_get | ( | const Evas_Object * | obj, |
double * | horizontal, | ||
double * | vertical | ||
) |
Get the alignment of the popup object.
[in] | obj | The popup object |
[out] | horizontal | The horizontal alignment of the popup |
[out] | vertical | The vertical alignment of the popup |
void elm_popup_align_set | ( | Evas_Object * | obj, |
double | horizontal, | ||
double | vertical | ||
) |
Set the alignment of the popup object.
Sets the alignment in which the popup will appear in its parent.
[in] | obj | popup object |
[in] | horizontal | The horizontal alignment of the popup |
[in] | vertical | The vertical alignment of the popup |
Eina_Bool elm_popup_allow_events_get | ( | const Evas_Object * | obj | ) |
Returns value indicating whether allow event is enabled or not.
[in] | obj | The popup object |
void elm_popup_allow_events_set | ( | Evas_Object * | obj, |
Eina_Bool | allow | ||
) |
Sets whether events should be passed to by a click outside.
[in] | obj | The popup object |
[in] | allow | EINA_TRUE Events are passed to lower objects, else not |
Elm_Wrap_Type elm_popup_content_text_wrap_type_get | ( | const Evas_Object * | obj | ) |
Returns the wrapping type of content text packed in content area of popup object.
[in] | obj | The Popup object |
void elm_popup_content_text_wrap_type_set | ( | Evas_Object * | obj, |
Elm_Wrap_Type | wrap | ||
) |
Sets the wrapping type of content text packed in content area of popup object.
[in] | obj | The Popup object |
[in] | wrap | wrapping type of type Elm_Wrap_Type |
void elm_popup_dismiss | ( | Evas_Object * | obj | ) |
Dismiss a popup object.
[in] | obj | The popup object |
Use this function to dismiss the popup with hide effect. when the popup is dismissed, the "dismissed" signal will be emitted.
Elm_Object_Item* elm_popup_item_append | ( | Evas_Object * | obj, |
const char * | label, | ||
Evas_Object * | icon, | ||
Evas_Smart_Cb | func, | ||
const void * | data | ||
) |
Add a new item to a Popup object.
[in] | obj | popup object |
[in] | icon | Icon to be set on new item |
[in] | label | The Label of the new item |
[in] | func | Convenience function called when item selected |
[in] | data | Data passed to func above |
NULL
, on errors Elm_Popup_Orient elm_popup_orient_get | ( | const Evas_Object * | obj | ) |
Returns the orientation of Popup.
[in] | obj | The popup object |
void elm_popup_orient_set | ( | Evas_Object * | obj, |
Elm_Popup_Orient | orient | ||
) |
Sets the orientation of the popup in the parent region.
[in] | obj | The popup object |
[in] | orient | the orientation of the popup |
Sets the position in which popup will appear in its parent
double elm_popup_timeout_get | ( | const Evas_Object * | obj | ) |
Returns the timeout value set to the popup (in seconds)
[in] | obj | The popup object |
void elm_popup_timeout_set | ( | Evas_Object * | obj, |
double | timeout | ||
) |
Sets a timeout to hide popup automatically.
[in] | obj | The popup object |
[in] | timeout | The timeout in seconds |
This function sets a timeout and starts the timer controlling when the popup is hidden.