Download

Support

Ewl_Context_Menu: A context menu


Detailed Description

Remarks:
Inherits from Ewl_Popup.


Data Structures

struct  Ewl_Context_Menu
 Inherits from Ewl_Popup and extends to provide a context menu. More...

Defines

#define EWL_CONTEXT_MENU(context_menu)   ((Ewl_Context_Menu *) context_menu)
#define EWL_CONTEXT_MENU_IS(w)
#define EWL_CONTEXT_MENU_TYPE   "context_menu"

Typedefs

typedef Ewl_Context_Menu Ewl_Context_Menu

Functions

void ewl_context_menu_attach (Ewl_Context_Menu *cm, Ewl_Widget *w)
void ewl_context_menu_cb_attach_mouse_down (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_context_menu_cb_child_add (Ewl_Container *c, Ewl_Widget *w)
void ewl_context_menu_cb_child_clicked (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_context_menu_cb_child_mouse_in (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_context_menu_cb_child_remove (Ewl_Container *c, Ewl_Widget *w, int idx)
void ewl_context_menu_cb_focus_in (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_context_menu_cb_hide (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_context_menu_cb_mouse_down (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_context_menu_cb_mouse_move (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_context_menu_container_set (Ewl_Context_Menu *cm, Ewl_Container *c)
 set a custom container for the context menu
void ewl_context_menu_detach (Ewl_Context_Menu *cm, Ewl_Widget *w)
int ewl_context_menu_init (Ewl_Context_Menu *cm)
 Initialize the context_menu and inherited fields.
Ewl_Widgetewl_context_menu_new (void)
 Allocate a new context_menu widget.

Define Documentation

#define EWL_CONTEXT_MENU ( context_menu   )     ((Ewl_Context_Menu *) context_menu)

Typecast a pointer to an Ewl_Context_Menu pointer.

#define EWL_CONTEXT_MENU_IS (  ) 

Value:

Returns TRUE if the widget is an Ewl_Context_Menu, FALSE otherwise

#define EWL_CONTEXT_MENU_TYPE   "context_menu"

The type name for the Ewl_Context_Menu widget


Typedef Documentation


Function Documentation

void ewl_context_menu_attach ( Ewl_Context_Menu cm,
Ewl_Widget w 
)

Parameters:
cm,: the context menu to attach
w,: a widget that gets the context menu attached
This function attaches a context menu to a widget. You can attach one context menu to more than one widget but all widgets have to share the same embed. i.e. they must be in the same window or embed.

void ewl_context_menu_cb_attach_mouse_down ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_context_menu_cb_child_add ( Ewl_Container c,
Ewl_Widget w 
)

void ewl_context_menu_cb_child_clicked ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_context_menu_cb_child_mouse_in ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_context_menu_cb_child_remove ( Ewl_Container c,
Ewl_Widget w,
int  idx 
)

void ewl_context_menu_cb_focus_in ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_context_menu_cb_hide ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_context_menu_cb_mouse_down ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_context_menu_cb_mouse_move ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_context_menu_container_set ( Ewl_Context_Menu cm,
Ewl_Container c 
)

set a custom container for the context menu

Parameters:
cm,: the context menu to set the container
c,: the container to use inside of the context menu, if c is NULL then this function will use a vbox instead
This function give you the ability to set a custom container as the internal used container of the context menu. It is not necessary to use this function, because the context menu uses a vbox as default, if you do not add an own one. If you override a previous added container, this container will be destroyed, but the children will be moved into the new container.

void ewl_context_menu_detach ( Ewl_Context_Menu cm,
Ewl_Widget w 
)

Parameters:
cm,: the context menu to detach
w,: a widget that has cm attached
This function detachs an earlier attached context menu to a widget

int ewl_context_menu_init ( Ewl_Context_Menu cm  ) 

Initialize the context_menu and inherited fields.

Parameters:
cm,: the context_menu to initialize
Returns:
Returns TRUE on success, FALSE on failure.
Clears the contents of the context_menu and stores the default values.

Ewl_Widget* ewl_context_menu_new ( void   ) 

Allocate a new context_menu widget.

Returns:
Returns pointer to new context_menu widget on success, NULL on failure.


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:49:46 2009