Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TMenuBox Class Reference

These objects represent vertical menu boxes. More...

#include <menus.h>

Inheritance diagram for TMenuBox::

TMenuView TView TObject TStreamable TMenuPopup List of all members.

Public Methods

 TMenuBox (const TRect &bounds, TMenu *aMenu, TMenuView *aParentMenu)
virtual void draw ()
virtual TRect getItemRect (TMenuItem *item)

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* frameChars
const char* const name

Protected Methods

 TMenuBox (StreamableInit)

Detailed Description

TMenuBox objects represent vertical menu boxes. Color coding is used to indicate disabled items. Menu boxes can be instantiated as submenus of the menu bar or other menu boxes, or can be used alone as pop-up menus.

Definition at line 569 of file menus.h.


Constructor & Destructor Documentation

TMenuBox::TMenuBox ( const TRect & bounds,
TMenu * aMenu,
TMenuView * aParentMenu )
 

Creates a TMenuBox object by calling TMenuView::TMenuView(bounds). The `bounds' parameter is then adjusted to accommodate the width and length of the items in `aMenu'.

See also:
TMenuView::TMenuView

The ofPreProcess bit in the options data member is set so that hot keys will operate. Data member state is set to include sfShadow.

The menu data member is set to `aMenu', which provides the menu selections. Allows an explicit `aParentMenu' which is set to parentMenu.

TMenuBox::TMenuBox ( StreamableInit ) [protected]
 

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.


Member Function Documentation

TStreamable * TMenuBox::build ( ) [static]
 

Called to create an object in certain stream-reading situations.

Reimplemented from TMenuView.

void TMenuBox::draw ( ) [virtual]
 

Draws the framed menu box and associated menu items in the default colors.

Reimplemented from TView.

TRect TMenuBox::getItemRect ( TMenuItem * item ) [virtual]
 

Returns the rectangle occupied by the given menu item. It can be used to determine if a mouse click has occurred on a given menu selection.

Reimplemented from TMenuView.


Member Data Documentation

const char * TMenuBox::frameChars [static]
 

Undocumented.

Definition at line 600 of file menus.h.

const char *const TMenuBox::name [static]
 

Undocumented.

Reimplemented from TMenuView.

Reimplemented in TMenuPopup.

Definition at line 618 of file menus.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:29 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001