Ewl_Menu_Item: The basic menu item
Detailed Description
The basic menu item
- Remarks:
- Inherits from Ewl_Button.
Data Structures | |
struct | Ewl_Menu_Item |
Inherits from Ewl_Button and provides a basic menu item widget. More... | |
Defines | |
#define | EWL_MENU_ITEM(mi) ((Ewl_Menu_Item *) mi) |
#define | EWL_MENU_ITEM_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_MENU_ITEM_TYPE)) |
#define | EWL_MENU_ITEM_TYPE "menu_item" |
Typedefs | |
typedef struct Ewl_Menu_Item | Ewl_Menu_Item |
Functions | |
int | ewl_menu_item_init (Ewl_Menu_Item *menu) |
Initialize the fields of a menu item to their defaults. | |
Ewl_Widget * | ewl_menu_item_new (void) |
Create a new menu item to place in a menu. |
Define Documentation
#define EWL_MENU_ITEM | ( | mi | ) | ((Ewl_Menu_Item *) mi) |
Typecasts a pointer to an Ewl_Menu_Item pointer.
Referenced by ewl_context_menu_cb_child_add(), ewl_context_menu_cb_child_remove(), ewl_menu_cb_configure(), ewl_menu_cb_expand(), and ewl_menu_init().
#define EWL_MENU_ITEM_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_MENU_ITEM_TYPE)) |
Returns TRUE if the widget is an Ewl_Menu_Item, FALSE otherwise
#define EWL_MENU_ITEM_TYPE "menu_item" |
- Widget Theme Keys:
- /menu_item/file
- Widget Theme Keys:
- /menu_item/group
Referenced by ewl_menu_item_init().
Typedef Documentation
typedef struct Ewl_Menu_Item Ewl_Menu_Item |
This serves as a basis for all menu related entries. It provides the most basic layout facilities for items in a menu.
Function Documentation
int ewl_menu_item_init | ( | Ewl_Menu_Item * | item | ) |
Initialize the fields of a menu item to their defaults.
- Parameters:
-
item,: the item to be initialized
- Returns:
- Returns TRUE on success or FALSE on failure
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BUTTON, ewl_button_alignment_set(), ewl_button_fill_policy_set(), ewl_button_image_size_set(), ewl_button_init(), ewl_button_label_set(), EWL_FLAG_ALIGN_LEFT, EWL_FLAG_FILL_HFILL, EWL_MENU_ITEM_TYPE, EWL_OBJECT, ewl_object_fill_policy_set(), EWL_WIDGET, ewl_widget_appearance_set(), and ewl_widget_inherit().
Referenced by ewl_menu_init(), and ewl_menu_item_new().
Ewl_Widget* ewl_menu_item_new | ( | void | ) |
Create a new menu item to place in a menu.
- Returns:
- Returns a pointer to a new menu item on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_menu_item_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
Referenced by ewl_filedialog_init(), and ewl_menu_from_info().