Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

PG_MenuBar Class Reference

Inheritance diagram for PG_MenuBar:

Inheritance graph
[legend]
Collaboration diagram for PG_MenuBar:

Collaboration graph
[legend]
List of all members.

Detailed Description

A menubar. This class provides a MenuBar where you can snap in different PG_PopupMenu objects. Every item creates a button in the bar. By clicking the button the corresponding PopupMenu is opened.

Author:
Alexander Pipelka
Examples:

paratest.cpp.


Public Member Functions

 PG_MenuBar (PG_Widget *parent, const PG_Rect &rect=PG_Rect::null, const char *style="MenuBar")
 Creates a new MenuBar object.

 ~PG_MenuBar ()
 Destroys the MenuBar object.

void Add (const char *text, PG_PopupMenu *menu, Uint16 indent=5, Uint16 width=0)
 Add a new item to the MenuBar.


Protected Attributes

vector< MenuBarItem * > ItemList
Uint16 my_btnOffsetY


Constructor & Destructor Documentation

PG_MenuBar::PG_MenuBar PG_Widget parent,
const PG_Rect rect = PG_Rect::null,
const char *  style = "MenuBar"
 

Creates a new MenuBar object.

Parameters:
parent pointer to the parent widget
rect the position of the menubar
style the default themestyle (MenuBar)
The constructor creates a new MenuBar object without any items. Use the Add member function to insert PG_PopupMenu objects.

PG_MenuBar::~PG_MenuBar  ) 
 

Destroys the MenuBar object.


Member Function Documentation

void PG_MenuBar::Add const char *  text,
PG_PopupMenu menu,
Uint16  indent = 5,
Uint16  width = 0
 

Add a new item to the MenuBar.

Parameters:
text label of the new item
menu pointer to the PG_PopupMenu object to add
indent offset of pixels to the last item
width width of the MenuBar button (if 0 the button will fit the textsize)
Examples:
paratest.cpp.


Member Data Documentation

vector<MenuBarItem*> PG_MenuBar::ItemList [protected]
 

Uint16 PG_MenuBar::my_btnOffsetY [protected]
 



The ParaGUI Project - Alexander Pipelka