Commit 5e1f6d92 authored by Ludovic Fauvet's avatar Ludovic Fauvet

popup menu: add a function to specify the position of the popup

parent f314e509
......@@ -112,6 +112,12 @@ popup_menu_close_cb(void *data, Evas_Object *obj, void *event_info)
Evas_Object *
popup_menu_add(popup_menu *menu, void *data, Evas_Object *parent)
{
return popup_menu_orient_add(menu, ELM_POPUP_ORIENT_BOTTOM, data, parent);
}
Evas_Object *
popup_menu_orient_add(popup_menu *menu, Elm_Popup_Orient orient, void *data, Evas_Object *parent)
{
Evas_Object *popup = elm_popup_add(parent);
Evas_Object *box = elm_box_add(popup);
......@@ -119,6 +125,8 @@ popup_menu_add(popup_menu *menu, void *data, Evas_Object *parent)
Evas_Object *genlist;
int index;
elm_popup_orient_set(popup, orient);
/* */
Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
......
......@@ -42,4 +42,7 @@ typedef struct popup_menu
Evas_Object *
popup_menu_add(popup_menu *menu, void *data, Evas_Object *parent);
Evas_Object *
popup_menu_orient_add(popup_menu *menu, Elm_Popup_Orient orient, void *data, Evas_Object *parent);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment