Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

Menubar: A menu bar widget

Defines a class for displaying menu bars. More...

Data Structures

struct  Ewl_Menubar
 Inherits from the Ewl_Box class and extends it to provide for a menubar. More...

struct  Ewl_Menubar
 Inherits from the Ewl_Box class and extends it to provide for a menubar. More...


Defines

#define EWL_MENUBAR(menubar)   ((Ewl_Menubar *) menubar)
 Typecasts a pointer to a Ewl_Menubar pointer.

#define ewl_hmenubar_new()   ewl_menubar_new(EWL_ORIENTATION_HORIZONTAL)
 Shortcut to allocate a new horizontal Ewl_Menubar.

#define ewl_vmenubar_new()   ewl_menubar_new(EWL_ORIENTATION_VERTICAL)
 Shortcut to allocate a new vertical Ewl_Menubar.


Functions

Ewl_Widgetewl_menubar_new (Ewl_Orientation orientation)
 Allocate and initialize a new menubar widget.

int ewl_menubar_init (Ewl_Menubar *mb, Ewl_Orientation orientation)
 Initialize a menubar to default values.

Ewl_Widgetewl_menubar_menu_add (Ewl_Menubar *mb, char *img, char *title)
 Creates a new menu and adds it to the menubar. Returns the menu to be setup as required by the app.

Ewl_Widgetewl_menubar_seperator_add (Ewl_Menubar *mb)
 Creates a new seperator in the menubar and returns it to the app.


Detailed Description

Defines a class for displaying menu bars.


Function Documentation

int ewl_menubar_init Ewl_Menubar mb,
Ewl_Orientation  orientation
 

Initialize a menubar to default values.

Parameters:
mb: the menubar to initialize
orientation: the orientation for the menubar
Returns:
Returns 1 on success and 0 on failure

Ewl_Widget* ewl_menubar_menu_add Ewl_Menubar mb,
char *  img,
char *  title
 

Creates a new menu and adds it to the menubar. Returns the menu to be setup as required by the app.

Parameters:
mb: The Ewl_Menubar to add the menu too.
img: The image to place beside the menu.
title: The name to give the menu.
Returns:
Returns NULL on failure and a new IMenu on success

Ewl_Widget* ewl_menubar_new Ewl_Orientation  orientation  ) 
 

Allocate and initialize a new menubar widget.

Parameters:
orientation: the desirec orientation of the menubar
Returns:
Returns NULL on failure, or a pointer to a new menubar on success.

Ewl_Widget* ewl_menubar_seperator_add Ewl_Menubar mb  ) 
 

Creates a new seperator in the menubar and returns it to the app.

Parameters:
mb: The Ewl_Menubar to add the seperator too.
Returns:
Returns NULL on failure and a new Seperator on success