forked from enlightenment/efl
elementary/elm_menu : Deprecated one API and modified test codes.
SVN revision: 68619
This commit is contained in:
parent
58f440f3c8
commit
123bcbfc06
|
@ -79,7 +79,7 @@ _populate_2(Elm_Object_Item *menu_it)
|
|||
static void
|
||||
_populate_1(Evas_Object *win, Elm_Object_Item *menu_it)
|
||||
{
|
||||
Elm_Object_Item *menu_it2;
|
||||
Elm_Object_Item *menu_it2, *menu_it3;
|
||||
Evas_Object *radio;
|
||||
|
||||
radio = elm_radio_add(win);
|
||||
|
@ -88,7 +88,8 @@ _populate_1(Evas_Object *win, Elm_Object_Item *menu_it)
|
|||
elm_object_text_set(radio, "radio in menu");
|
||||
menu_it2 = elm_menu_item_add(menu, menu_it, "object-rotate-left", "menu 1",
|
||||
NULL, NULL);
|
||||
elm_menu_item_add_object(menu, menu_it, radio, NULL, NULL);
|
||||
menu_it3 = elm_menu_item_add(menu, menu_it, NULL, NULL, NULL, NULL);
|
||||
elm_object_item_content_set(menu_it3, radio);
|
||||
|
||||
_populate_2(menu_it2);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ EAPI_MAIN int
|
|||
elm_main(int argc, char **argv)
|
||||
{
|
||||
Evas_Object *win, *bg, *menu, *button, *rect;
|
||||
Elm_Object_Item *menu_it;
|
||||
Elm_Object_Item *menu_it, *menu_it1;
|
||||
|
||||
win = elm_win_add(NULL, "menu", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "Menu");
|
||||
|
@ -51,7 +51,8 @@ elm_main(int argc, char **argv)
|
|||
elm_menu_item_add(menu, menu_it, "object-rotate-left", "menu 1", NULL, NULL);
|
||||
button = elm_button_add(win);
|
||||
elm_object_text_set(button, "button - delete items");
|
||||
elm_menu_item_add_object(menu, menu_it, button, NULL, NULL);
|
||||
menu_it1 = elm_menu_item_add(menu, menu_it, NULL, NULL, NULL, NULL);
|
||||
elm_object_item_content_set(menu_it1, button);
|
||||
evas_object_smart_callback_add(button, "clicked", _del_it, menu);
|
||||
elm_menu_item_separator_add(menu, menu_it);
|
||||
elm_menu_item_add(menu, menu_it, NULL, "third item", NULL, NULL);
|
||||
|
|
|
@ -4564,6 +4564,22 @@ EINA_DEPRECATED EAPI Eina_Bool elm_web_history_enable_get(const Evas_Obj
|
|||
*/
|
||||
EINA_DEPRECATED EAPI void elm_web_history_enable_set(Evas_Object *obj, Eina_Bool enable);
|
||||
|
||||
/**
|
||||
* @brief Add an object swallowed in an item at the end of the given menu
|
||||
* widget
|
||||
*
|
||||
* @param obj The menu object.
|
||||
* @param parent The parent menu item (optional)
|
||||
* @param subobj The object to swallow
|
||||
* @param func Function called when the user select the item.
|
||||
* @param data Data sent by the callback.
|
||||
* @return Returns the new item.
|
||||
*
|
||||
* Add an evas object as an item to the menu.
|
||||
* @deprecated please use "elm_menu_item_add" + "elm_object_item_content_set" instead.
|
||||
*/
|
||||
EINA_DEPRECATED EAPI Elm_Object_Item *elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -751,7 +751,7 @@ elm_menu_item_add(Evas_Object *obj, Elm_Object_Item *parent, const char *icon, c
|
|||
return (Elm_Object_Item *) subitem;
|
||||
}
|
||||
|
||||
EAPI Elm_Object_Item *
|
||||
EINA_DEPRECATED EAPI Elm_Object_Item *
|
||||
elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data)
|
||||
{
|
||||
Elm_Menu_Item *subitem;
|
||||
|
|
|
@ -111,27 +111,11 @@ EAPI Evas_Object *elm_menu_item_object_get(const Elm_Object_Item
|
|||
*/
|
||||
EAPI Elm_Object_Item *elm_menu_item_add(Evas_Object *obj, Elm_Object_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
|
||||
|
||||
/**
|
||||
* @brief Add an object swallowed in an item at the end of the given menu
|
||||
* widget
|
||||
*
|
||||
* @param obj The menu object.
|
||||
* @param parent The parent menu item (optional)
|
||||
* @param subobj The object to swallow
|
||||
* @param func Function called when the user select the item.
|
||||
* @param data Data sent by the callback.
|
||||
* @return Returns the new item.
|
||||
*
|
||||
* Add an evas object as an item to the menu.
|
||||
*/
|
||||
//XXX: Any better API name? "_item_add_object" looks not good enough.
|
||||
EAPI Elm_Object_Item *elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data);
|
||||
|
||||
/**
|
||||
* @brief Set the icon of a menu item to the standard icon with name @p icon
|
||||
*
|
||||
* @param it The menu item object.
|
||||
* @param icon The icon object to set for the content of @p item
|
||||
* @param icon The name of icon object to set for the content of @p item
|
||||
*
|
||||
* Once this icon is set, any previously set icon will be deleted.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue