#include <menus.h>
Inheritance diagram for TMenuBar::
Public Methods | |
TMenuBar (const TRect &bounds, TMenu *aMenu) | |
TMenuBar (const TRect &bounds, TSubMenu &aMenu) | |
~TMenuBar () | |
virtual void | draw () |
virtual TRect | getItemRect (TMenuItem *item) |
Static Public Methods | |
TStreamable* | build () |
Static Public Attributes | |
const char* const | name |
Protected Methods | |
TMenuBar (StreamableInit) |
Submenus are displayed in objects of type TMenuBox. Both TMenuBar and TMenuBox are derived from TMenuView (which is in turn derived from TView).
For most TVision applications, you will not be involved directly with menu objects. By overriding TApplication::initMenuBar() with a suitable set of nested new TMenuItem and new TMenu calls, TVision takes care of all the standard menu mechanisms.
Definition at line 462 of file menus.h.
|
Creates a menu bar by calling TMenuView::TMenuView(bounds). The growMode data member is set to gfGrowHiX. The options data member is set to ofPreProcess to allow hot keys to operate.
|
|
Undocumented. |
|
Undocumented. |
|
Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized virtual table pointers. This is achieved by calling this constructor with an argument of type StreamableInit. |
|
Called to create an object in certain stream-reading situations. Reimplemented from TMenuView. |
|
Draws the menu bar with the default palette. The TMenuItem::name and TMenuItem::disabled data members of each TMenuItem object in the menu linked list are read to give the menu legends in the correct colors. The current (selected) item is highlighted. Reimplemented from TView. |
|
Returns the rectangle occupied by the given menu item. It can be used with mouseInView() to determine if a mouse click has occurred on a given menu selection. Reimplemented from TMenuView. |
|
Undocumented. Reimplemented from TMenuView. |