 |
 |
 |
 |
Etk_Menu_Item
Detailed Description
The Etk_Menu_Item widget is an item that can be packed in a menu shell ( Etk_Menu or Etk_Menu_Bar).
Several widgets inherits from Etk_Menu_Item:
- Object Hierarchy:
-
- Signals:
- "selected": Emitted when the menu item is selected
Callback: Etk_Bool callback(Etk_Menu_Item *menu_item, void *data)
menu_item: the menu item which has been selecteddata: the user data set when the callback has been connected to the signal
- "unselected": Emitted when the menu item is unselected
Callback: Etk_Bool callback(Etk_Menu_Item *menu_item, void *data)
menu_item: the menu item which has been unselecteddata: the user data set when the callback has been connected to the signal
- "activated": Emitted when the menu item is activated (mainly when it has been clicked)
Callback: Etk_Bool callback(Etk_Menu_Item *menu_item, void *data)
menu_item: the menu item which has been activateddata: the user data set when the callback has been connected to the signal
- "toggled" (only for Etk_Menu_Item_Check and Etk_Menu_Item_Radio): Emitted when the menu item (check or radio) has been toggled
Callback: Etk_Bool callback(Etk_Menu_Item_Check *check_item, void *data)
menu_item: the menu item which has been toggleddata: the user data set when the callback has been connected to the signal
- Properties:
- "label": The text of the label of the menu item
Type: String (char *)Access: Read/WriteDefault Value: NULL
- "submenu": The submenu attached to the menu item
Type: Pointer (Etk_Menu *)Access: Read/WriteDefault Value: NULL
-
-
- "group" (only for Etk_Menu_Item_Radio): The group of menu items which the menu item belongs to
Type: Pointer (Evas_List *)Access: Read/WriteDefault Value: NULL
|
Data Structures |
struct | Etk_Menu_Item |
| [Widget] An item that can be packed in a menu shell More...
|
struct | Etk_Menu_Item_Separator |
| [Widget] A menu-item used to separate two other items (looks like an horizontal bar in a menu) More...
|
struct | Etk_Menu_Item_Image |
| [Widget] A menu-item with an image at the left of the label More...
|
struct | Etk_Menu_Item_Check |
| [Widget] A menu-item with a checkbox at the left of the label More...
|
struct | Etk_Menu_Item_Radio |
| [Widget] A menu-item with a radiobox at the left of the label More...
|
Defines |
#define | ETK_MENU_ITEM_TYPE (etk_menu_item_type_get()) |
#define | ETK_MENU_ITEM(obj) (ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_TYPE, Etk_Menu_Item)) |
#define | ETK_IS_MENU_ITEM(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_TYPE)) |
#define | ETK_MENU_ITEM_SEPARATOR_TYPE (etk_menu_item_separator_type_get()) |
#define | ETK_MENU_ITEM_SEPARATOR(obj) (ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_SEPARATOR_TYPE, Etk_Menu_Item_Separator)) |
#define | ETK_IS_MENU_ITEM_SEPARATOR(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_SEPARATOR_TYPE)) |
#define | ETK_MENU_ITEM_IMAGE_TYPE (etk_menu_item_image_type_get()) |
#define | ETK_MENU_ITEM_IMAGE(obj) (ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_IMAGE_TYPE, Etk_Menu_Item_Image)) |
#define | ETK_IS_MENU_ITEM_IMAGE(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_IMAGE_TYPE)) |
#define | ETK_MENU_ITEM_CHECK_TYPE (etk_menu_item_check_type_get()) |
#define | ETK_MENU_ITEM_CHECK(obj) (ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_CHECK_TYPE, Etk_Menu_Item_Check)) |
#define | ETK_IS_MENU_ITEM_CHECK(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_CHECK_TYPE)) |
#define | ETK_MENU_ITEM_RADIO_TYPE (etk_menu_item_radio_type_get()) |
#define | ETK_MENU_ITEM_RADIO(obj) (ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_RADIO_TYPE, Etk_Menu_Item_Radio)) |
#define | ETK_IS_MENU_ITEM_RADIO(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_RADIO_TYPE)) |
Functions |
Etk_Widget * | etk_menu_item_new (void) |
| Creates a new menu-item with an empty label.
|
Etk_Widget * | etk_menu_item_new_with_label (const char *label) |
| Creates a new menu-item and sets its label to label.
|
Etk_Widget * | etk_menu_item_new_from_stock (Etk_Stock_Id stock_id) |
| Creates a new menu-item with a label defined by the stock-id.
|
void | etk_menu_item_label_set (Etk_Menu_Item *menu_item, const char *label) |
| Sets the label of the menu-item.
|
const char * | etk_menu_item_label_get (Etk_Menu_Item *menu_item) |
| Gets the label of the menu-item.
|
void | etk_menu_item_set_from_stock (Etk_Menu_Item *menu_item, Etk_Stock_Id stock_id) |
| Sets the label of the menu-item from a stock-id. If the menu-item is an Etk_Menu_Item_Image, the image is also changed depending on the stock-id.
|
void | etk_menu_item_submenu_set (Etk_Menu_Item *menu_item, Etk_Menu *submenu) |
| Sets the submenu of the menu-item: the submenu will be popped up when the menu-item is selected.
|
Etk_Menu * | etk_menu_item_submenu_get (Etk_Menu_Item *menu_item) |
| Gets the submenu attached to the menu-item.
|
void | etk_menu_item_select (Etk_Menu_Item *menu_item) |
| Selects the menu-item.
|
void | etk_menu_item_unselect (Etk_Menu_Item *menu_item) |
| Unselects the menu-item.
|
void | etk_menu_item_activate (Etk_Menu_Item *menu_item) |
| Activates the menu-item.
|
Etk_Widget * | etk_menu_item_separator_new (void) |
| Creates a new separator menu-item.
|
Etk_Widget * | etk_menu_item_image_new (void) |
| Creates a new image menu-item with an empty label.
|
Etk_Widget * | etk_menu_item_image_new_with_label (const char *label) |
| Creates a new image menu-item and sets its label to label.
|
Etk_Widget * | etk_menu_item_image_new_from_stock (Etk_Stock_Id stock_id) |
| Creates a new image menu-item with the label and the image defined by the stock-id.
|
void | etk_menu_item_image_set (Etk_Menu_Item_Image *image_item, Etk_Image *image) |
| Sets the image of the menu-item. The image will be displayed on the left of the label.
|
Etk_Widget * | etk_menu_item_check_new (void) |
| Creates a new check menu-item with an empty label.
|
Etk_Widget * | etk_menu_item_check_new_with_label (const char *label) |
| Creates a new check menu-item and sets the label to label.
|
void | etk_menu_item_check_active_set (Etk_Menu_Item_Check *check_item, Etk_Bool active) |
| Sets whether or not the check menu item is active (i.e. checked).
|
Etk_Bool | etk_menu_item_check_active_get (Etk_Menu_Item_Check *check_item) |
| Gets whether the check menu-item is active.
|
Etk_Widget * | etk_menu_item_radio_new (Evas_List **group) |
| Creates a new radio menu-item with an empty label.
|
Etk_Widget * | etk_menu_item_radio_new_from_widget (Etk_Menu_Item_Radio *radio_item) |
| Creates a new radio menu-item with an empty label and adds it to the group of another radio menu-item.
|
Etk_Widget * | etk_menu_item_radio_new_with_label (const char *label, Evas_List **group) |
| Creates a new radio menu-item and sets its label to label.
|
Etk_Widget * | etk_menu_item_radio_new_with_label_from_widget (const char *label, Etk_Menu_Item_Radio *radio_item) |
| Creates a new radio menu-item and sets its label to label. It is then added to the group of radio_item.
|
void | etk_menu_item_radio_group_set (Etk_Menu_Item_Radio *radio_item, Evas_List **group) |
| Sets the group of the radio menu-item.
|
Evas_List ** | etk_menu_item_radio_group_get (Etk_Menu_Item_Radio *radio_item) |
| Gets the group of the radio menu-item.
|
Define Documentation
#define ETK_MENU_ITEM_TYPE (etk_menu_item_type_get()) |
#define ETK_MENU_ITEM |
( |
obj |
|
) |
(ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_TYPE, Etk_Menu_Item)) |
#define ETK_IS_MENU_ITEM |
( |
obj |
|
) |
(ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_TYPE)) |
#define ETK_MENU_ITEM_SEPARATOR_TYPE (etk_menu_item_separator_type_get()) |
#define ETK_MENU_ITEM_SEPARATOR |
( |
obj |
|
) |
(ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_SEPARATOR_TYPE, Etk_Menu_Item_Separator)) |
#define ETK_IS_MENU_ITEM_SEPARATOR |
( |
obj |
|
) |
(ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_SEPARATOR_TYPE)) |
#define ETK_MENU_ITEM_IMAGE_TYPE (etk_menu_item_image_type_get()) |
#define ETK_MENU_ITEM_IMAGE |
( |
obj |
|
) |
(ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_IMAGE_TYPE, Etk_Menu_Item_Image)) |
#define ETK_IS_MENU_ITEM_IMAGE |
( |
obj |
|
) |
(ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_IMAGE_TYPE)) |
#define ETK_MENU_ITEM_CHECK_TYPE (etk_menu_item_check_type_get()) |
#define ETK_MENU_ITEM_CHECK |
( |
obj |
|
) |
(ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_CHECK_TYPE, Etk_Menu_Item_Check)) |
#define ETK_IS_MENU_ITEM_CHECK |
( |
obj |
|
) |
(ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_CHECK_TYPE)) |
#define ETK_MENU_ITEM_RADIO_TYPE (etk_menu_item_radio_type_get()) |
#define ETK_MENU_ITEM_RADIO |
( |
obj |
|
) |
(ETK_OBJECT_CAST((obj), ETK_MENU_ITEM_RADIO_TYPE, Etk_Menu_Item_Radio)) |
#define ETK_IS_MENU_ITEM_RADIO |
( |
obj |
|
) |
(ETK_OBJECT_CHECK_TYPE((obj), ETK_MENU_ITEM_RADIO_TYPE)) |
Function Documentation
Etk_Widget * etk_menu_item_new_with_label |
( |
const char * |
label |
) |
|
Creates a new menu-item and sets its label to label.
- Parameters:
-
| label | the label to set to the new menu item |
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References ETK_MENU_ITEM_TYPE, and etk_widget_new().
void etk_menu_item_label_set |
( |
Etk_Menu_Item * |
menu_item, |
|
|
const char * |
label | |
|
) |
| | |
const char * etk_menu_item_label_get |
( |
Etk_Menu_Item * |
menu_item |
) |
|
Gets the label of the menu-item.
- Parameters:
-
- Returns:
- Returns the label of the menu-item
References label.
Sets the label of the menu-item from a stock-id. If the menu-item is an Etk_Menu_Item_Image, the image is also changed depending on the stock-id.
- Parameters:
-
| menu_item | a menu-item |
| stock_id | the stock-id corresponding to the label and the image you want to use |
- See also:
- Etk_Stock
References ETK_IMAGE, etk_image_new_from_stock(), ETK_IS_MENU_ITEM_IMAGE, ETK_MENU_ITEM_IMAGE, etk_menu_item_image_set(), etk_menu_item_label_set(), etk_stock_label_get(), etk_widget_internal_set(), and etk_widget_show().
Referenced by etk_menu_item_image_new_from_stock(), and etk_menu_item_new_from_stock().
Gets the submenu attached to the menu-item.
- Parameters:
-
- Returns:
- Returns the submenu attached to the menu-item
References submenu.
Creates a new separator menu-item.
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References ETK_MENU_ITEM_SEPARATOR_TYPE, and etk_widget_new().
Etk_Widget * etk_menu_item_image_new_with_label |
( |
const char * |
label |
) |
|
Creates a new image menu-item and sets its label to label.
- Parameters:
-
| label | the label to set to the new menu-item |
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References ETK_MENU_ITEM_IMAGE_TYPE, and etk_widget_new().
Creates a new image menu-item with the label and the image defined by the stock-id.
- Parameters:
-
| stock_id | the stock-id corresponding to the label and the image |
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
- See also:
- Etk_Stock
References ETK_MENU_ITEM, etk_menu_item_image_new(), and etk_menu_item_set_from_stock().
Creates a new check menu-item with an empty label.
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References ETK_MENU_ITEM_CHECK_TYPE, and etk_widget_new().
Etk_Widget * etk_menu_item_check_new_with_label |
( |
const char * |
label |
) |
|
Creates a new check menu-item and sets the label to label.
- Parameters:
-
| label | the label to set to the new menu-item |
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References ETK_MENU_ITEM_CHECK_TYPE, and etk_widget_new().
Sets whether or not the check menu item is active (i.e. checked).
- Parameters:
-
| check_item | a check menu-item |
| active | if active == ETK_TRUE, the check menu-item will be active |
References Etk_Menu_Item_Check::active_set.
Referenced by etk_menu_item_radio_group_set().
Gets whether the check menu-item is active.
- Parameters:
-
| check_item | a check menu-item |
- Returns:
- Returns ETK_TRUE if check_item is active, ETK_FALSE otherwise
References Etk_Menu_Item_Check::active.
Etk_Widget * etk_menu_item_radio_new |
( |
Evas_List ** |
group |
) |
|
Creates a new radio menu-item with an empty label.
- Parameters:
-
| group | the group which the radio menu-item will be added to (NULL if the radio menu-item should create its own group) |
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References ETK_MENU_ITEM_RADIO_TYPE, and etk_widget_new().
Creates a new radio menu-item with an empty label and adds it to the group of another radio menu-item.
- Parameters:
-
| radio_item | the radio menu-item whose group will be used for the new radio menu-item |
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References etk_menu_item_radio_group_get(), ETK_MENU_ITEM_RADIO_TYPE, and etk_widget_new().
Etk_Widget * etk_menu_item_radio_new_with_label |
( |
const char * |
label, |
|
|
Evas_List ** |
group | |
|
) |
| | |
Creates a new radio menu-item and sets its label to label.
- Parameters:
-
| label | the label to set to the new menu-item |
| group | the group which the radio menu-item will be added to (NULL if the radio menu-item should create its own group) |
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References ETK_MENU_ITEM_RADIO_TYPE, and etk_widget_new().
Creates a new radio menu-item and sets its label to label. It is then added to the group of radio_item.
- Parameters:
-
| label | the label to set to the new menu-item |
| radio_item | the radio menu-item whose group will be used for the new radio menu-item |
- Returns:
- Returns the new menu-item widget
- Note:
- Unlike the other widgets, the menu-item will automatically shown at its creation
References etk_menu_item_radio_group_get(), ETK_MENU_ITEM_RADIO_TYPE, and etk_widget_new().
|
 |
 |
 |
 |
|