Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

Etk_Menu_Shell


Detailed Description

Etk_Menu_Shell is the base class used by Etk_Menu and Etk_Menu_Bar.

A menu-item can be added to the menu-shell with etk_menu_shell_append(), etk_menu_shell_insert()...
It can be then removed from the menu-shell with etk_menu_shell_remove().
You can also get the list of the menu-items of the menu-shell using etk_menu_shell_items_get().

Object Hierarchy:
  • Etk_Object
    • Etk_Widget
      • Etk_Menu_Shell


Data Structures

struct  Etk_Menu_Shell
 [Widget] A base class used by Etk_Menu and Etk_Menu_Bar More...

Defines

#define ETK_MENU_SHELL_TYPE   (etk_menu_shell_type_get())
#define ETK_MENU_SHELL(obj)   (ETK_OBJECT_CAST((obj), ETK_MENU_SHELL_TYPE, Etk_Menu_Shell))
#define ETK_IS_MENU_SHELL(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_SHELL_TYPE))

Functions

void etk_menu_shell_prepend (Etk_Menu_Shell *menu_shell, Etk_Menu_Item *item)
 Adds a menu-item at the start of the menu-shell.
void etk_menu_shell_append (Etk_Menu_Shell *menu_shell, Etk_Menu_Item *item)
 Adds a menu-item at the end of the menu-shell.
void etk_menu_shell_prepend_relative (Etk_Menu_Shell *menu_shell, Etk_Menu_Item *item, Etk_Menu_Item *relative)
 Adds a menu-item before an existing item of the menu-shell.
void etk_menu_shell_append_relative (Etk_Menu_Shell *menu_shell, Etk_Menu_Item *item, Etk_Menu_Item *relative)
 Adds a menu-item after an existing item of the menu-shell.
void etk_menu_shell_insert (Etk_Menu_Shell *menu_shell, Etk_Menu_Item *item, int position)
 Inserts a menu-item to the menu-shell at a specific position.
void etk_menu_shell_remove (Etk_Menu_Shell *menu_shell, Etk_Menu_Item *item)
 Removes an item from the menu-shell.
Evas_List * etk_menu_shell_items_get (Etk_Menu_Shell *menu_shell)
 Gets the list of the items of the menu-shell.


Define Documentation

#define ETK_MENU_SHELL_TYPE   (etk_menu_shell_type_get())

Gets the type of a menu shell

#define ETK_MENU_SHELL ( obj   )     (ETK_OBJECT_CAST((obj), ETK_MENU_SHELL_TYPE, Etk_Menu_Shell))

Casts the object to an Etk_Menu_Shell

#define ETK_IS_MENU_SHELL ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_SHELL_TYPE))

Check if the object is an Etk_Menu_Shell


Function Documentation

void etk_menu_shell_prepend ( Etk_Menu_Shell *  menu_shell,
Etk_Menu_Item *  item 
)

Adds a menu-item at the start of the menu-shell.

Parameters:
menu_shell a menu-shell
item the menu-item to prepend to the menu-shell

References items.

void etk_menu_shell_append ( Etk_Menu_Shell *  menu_shell,
Etk_Menu_Item *  item 
)

Adds a menu-item at the end of the menu-shell.

Parameters:
menu_shell a menu-shell
item the menu-item to append to the menu-shell

References items.

void etk_menu_shell_prepend_relative ( Etk_Menu_Shell *  menu_shell,
Etk_Menu_Item *  item,
Etk_Menu_Item *  relative 
)

Adds a menu-item before an existing item of the menu-shell.

Parameters:
menu_shell a menu-shell
item the menu-item to add
relative the item before which item will be added. If relative is not in the menu-shell, item will be added at the start of the menu-shell

References items.

void etk_menu_shell_append_relative ( Etk_Menu_Shell *  menu_shell,
Etk_Menu_Item *  item,
Etk_Menu_Item *  relative 
)

Adds a menu-item after an existing item of the menu-shell.

Parameters:
menu_shell a menu-shell
item the menu-item to add
relative the item after which item will be added. If relative is not in the menu-shell, item will be added at the end of the menu-shell

References items.

void etk_menu_shell_insert ( Etk_Menu_Shell *  menu_shell,
Etk_Menu_Item *  item,
int  position 
)

Inserts a menu-item to the menu-shell at a specific position.

Parameters:
menu_shell a menu-shell
item the menu-item to insert
position the position where to insert the item (0 being the first).
If position is less than 0, the item will be prepended.
If position is greater than the number of items of the menu-shell, the item will be appended

References items.

void etk_menu_shell_remove ( Etk_Menu_Shell *  menu_shell,
Etk_Menu_Item *  item 
)

Removes an item from the menu-shell.

Parameters:
menu_shell a menu-shell
item the item to remove

References ETK_OBJECT, etk_signal_emit(), ETK_WIDGET, etk_widget_parent_set(), etk_widget_size_recalc_queue(), items, and Etk_Menu_Item::parent_shell.

Evas_List * etk_menu_shell_items_get ( Etk_Menu_Shell *  menu_shell  ) 

Gets the list of the items of the menu-shell.

Parameters:
menu_shell a menu-shell
Returns:
Returns the list of the items of the menu-shell. The returned list will have to be freed with evas_list_free()

References items.