Ewl_Menu: A Simple Windowed Menu
Detailed Description
Defines a menu used globally. The contents on the menu are drawn outside of the canvas.
- Remarks:
- Inherits from Ewl_Menu_Item.
Tutorial
Data Structures | |
struct | Ewl_Menu |
Inherits from the Ewl_Menu_Base and extends to provide a simple menu. More... | |
struct | Ewl_Menu_Info |
Provides a simple structure to contain menu information. More... | |
Defines | |
#define | EWL_MENU(menu) ((Ewl_Menu *) menu) |
#define | EWL_MENU_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_MENU_TYPE)) |
#define | EWL_MENU_TYPE "menu" |
Typedefs | |
typedef struct Ewl_Menu | Ewl_Menu |
typedef struct Ewl_Menu_Info | Ewl_Menu_Info |
Functions | |
void | ewl_menu_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_menu_cb_destroy (Ewl_Widget *w, void *ev, void *data) |
void | ewl_menu_cb_expand (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_menu_cb_hide (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_menu_cb_mouse_move (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_menu_cb_popup_destroy (Ewl_Widget *w, void *ev, void *data) |
void | ewl_menu_cb_realize (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_menu_collapse (Ewl_Menu *menu) |
Collapses the popup portion of the menu. | |
void | ewl_menu_from_info (Ewl_Menu *menu, Ewl_Menu_Info *info) |
Initializes menu with info. | |
int | ewl_menu_init (Ewl_Menu *menu) |
Initialize an internal menu to starting values. | |
int | ewl_menu_mouse_feed (Ewl_Menu *menu, int x, int y) |
Ewl_Widget * | ewl_menu_new (void) |
Create a new internal menu. |
Define Documentation
#define EWL_MENU | ( | menu | ) | ((Ewl_Menu *) menu) |
Typecasts a pointer to an Ewl_Menu pointer.
Referenced by ewl_combo_submenu_new(), ewl_context_menu_cb_child_mouse_in(), ewl_context_menu_cb_hide(), ewl_context_menu_cb_mouse_down(), ewl_context_menu_cb_mouse_move(), ewl_menu_cb_configure(), ewl_menu_cb_destroy(), ewl_menu_cb_expand(), ewl_menu_cb_mouse_move(), ewl_menubar_cb_child_add(), and ewl_menubar_from_info().
#define EWL_MENU_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_MENU_TYPE)) |
Returns TRUE if the widget is an Ewl_Menu, FALSE otherwise
Referenced by ewl_context_menu_cb_child_add(), ewl_context_menu_cb_child_remove(), ewl_menu_cb_mouse_move(), and ewl_menubar_cb_child_add().
#define EWL_MENU_TYPE "menu" |
- Widget Theme Keys:
- /menu/file
- Widget Theme Keys:
- /menu/group
Referenced by ewl_context_menu_init(), ewl_menu_cb_configure(), ewl_menu_cb_destroy(), ewl_menu_cb_expand(), ewl_menu_cb_mouse_move(), ewl_menu_cb_popup_destroy(), ewl_menu_collapse(), ewl_menu_from_info(), ewl_menu_init(), and ewl_menu_mouse_feed().
Typedef Documentation
A simple internal menu, it is limited to drawing within the current evas.
typedef struct Ewl_Menu_Info Ewl_Menu_Info |
A simple struct to contain menu information
Function Documentation
void ewl_menu_cb_configure | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_BOX, ewl_box_orientation_get(), EWL_MENU, EWL_MENU_ITEM, EWL_MENU_TYPE, EWL_ORIENTATION_VERTICAL, EWL_POPUP, EWL_POPUP_TYPE_MENU_HORIZONTAL, EWL_POPUP_TYPE_MENU_VERTICAL, ewl_popup_type_set(), menubar_parent, and popup.
Referenced by ewl_menu_init().
void ewl_menu_cb_destroy | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_callback_del(), EWL_CALLBACK_DESTROY, EWL_MENU, ewl_menu_cb_popup_destroy(), EWL_MENU_TYPE, ewl_widget_destroy(), and popup.
Referenced by ewl_menu_init().
void ewl_menu_cb_expand | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTEXT_MENU, EWL_MENU, EWL_MENU_ITEM, EWL_MENU_TYPE, EWL_WIDGET, ewl_widget_focus_send(), ewl_widget_show(), EWL_WINDOW, ewl_window_raise(), Ewl_Menu_Item::inmenu, Ewl_Context_Menu::open_menu, and popup.
Referenced by ewl_menu_init().
void ewl_menu_cb_hide | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
void ewl_menu_cb_mouse_move | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_callback_call(), EWL_CALLBACK_FOCUS_IN, EWL_CONTAINER, ewl_container_child_iterate_begin(), ewl_container_child_next(), EWL_MENU, EWL_MENU_IS, EWL_MENU_TYPE, ewl_widget_hide(), menubar_parent, popup, and VISIBLE.
Referenced by ewl_menu_init().
void ewl_menu_cb_popup_destroy | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_MENU_TYPE, and popup.
Referenced by ewl_menu_cb_destroy(), and ewl_menu_init().
void ewl_menu_cb_realize | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
void ewl_menu_collapse | ( | Ewl_Menu * | menu | ) |
Collapses the popup portion of the menu.
- Parameters:
-
menu,: the menu to work with
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_MENU_TYPE, ewl_widget_hide(), and popup.
Referenced by ewl_context_menu_cb_child_mouse_in(), ewl_context_menu_cb_hide(), and ewl_context_menu_cb_mouse_down().
void ewl_menu_from_info | ( | Ewl_Menu * | menu, | |
Ewl_Menu_Info * | info | |||
) |
Initializes menu with info.
- Parameters:
-
menu,: The menu to setup info,: The info to set into the menu
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_BUTTON, ewl_button_image_set(), ewl_button_label_set(), ewl_callback_append(), EWL_CALLBACK_CLICKED, EWL_CONTAINER, ewl_container_child_append(), ewl_menu_item_new(), EWL_MENU_TYPE, ewl_widget_show(), and Ewl_Menu_Info::name.
Referenced by ewl_menubar_from_info().
int ewl_menu_init | ( | Ewl_Menu * | menu | ) |
Initialize an internal menu to starting values.
- Parameters:
-
menu,: the menu to initialize
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_callback_append(), EWL_CALLBACK_CONFIGURE, EWL_CALLBACK_DESTROY, EWL_CALLBACK_FOCUS_IN, EWL_CALLBACK_MOUSE_MOVE, ewl_callback_prepend(), EWL_CONTAINER, ewl_container_redirect_set(), ewl_context_menu_new(), ewl_menu_cb_configure(), ewl_menu_cb_destroy(), ewl_menu_cb_expand(), ewl_menu_cb_mouse_move(), ewl_menu_cb_popup_destroy(), EWL_MENU_ITEM, ewl_menu_item_init(), EWL_MENU_TYPE, EWL_POPUP, ewl_popup_follow_set(), EWL_POPUP_TYPE_MENU_VERTICAL, ewl_popup_type_set(), EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), ewl_widget_internal_set(), and popup.
Referenced by ewl_menu_new().
int ewl_menu_mouse_feed | ( | Ewl_Menu * | menu, | |
int | x, | |||
int | y | |||
) |
Ewl_Widget* ewl_menu_new | ( | void | ) |
Create a new internal menu.
- Returns:
- Returns a pointer to a new menu on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_menu_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
Referenced by ewl_combo_submenu_new(), ewl_filedialog_init(), and ewl_menubar_from_info().