#include <menus.h>
Inheritance diagram for TMenuView::
Public Methods | |
TMenuView (const TRect &bounds, TMenu *aMenu, TMenuView *aParent=0) | |
TMenuView (const TRect &bounds) | |
void | setBounds (const TRect &bounds) |
virtual ushort | execute () |
TMenuItem* | findItem (char ch) |
virtual TRect | getItemRect (TMenuItem *item) |
virtual ushort | getHelpCtx () |
virtual TPalette& | getPalette () const |
virtual void | handleEvent (TEvent &event) |
TMenuItem* | hotKey (ushort keyCode) |
TMenuView* | newSubView (const TRect &bounds, TMenu *aMenu, TMenuView *aParentMenu) |
Static Public Methods | |
TStreamable* | build () |
Static Public Attributes | |
const char* const | name |
Protected Methods | |
TMenuView (StreamableInit) | |
virtual void | write (opstream &os) |
virtual void* | read (ipstream &is) |
Protected Attributes | |
TMenuView* | parentMenu |
TMenu* | menu |
TMenuItem* | current |
Definition at line 249 of file menus.h.
|
Undocumented. |
|
Calls TView constructor to create a TMenuView object of size `bounds'.
|
|
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 TView. |
|
Executes a menu view until the user selects a menu item or cancels the process. Returns the command assigned to the selected menu item, or zero if the menu was canceled. Should never be called except by TGroup::execView(). Reimplemented from TView. |
|
Returns a pointer to the menu item that has toupper(ch) as its hot key (the highlighted character). Returns 0 if no such menu item is found or if the menu item is disabled. Note that findItem() is case insensitive. |
|
By default, this member function returns the help context of the current menu selection. If this is hcNoContext, the parent menu's current context is checked. If there is no parent menu, getHelpCtx() returns hcNoContext.
Reimplemented from TView. |
|
Classes derived from TMenuView must override this member function in order to respond to mouse events. Your overriding functions in derived classes must return the rectangle occupied by the given menu item. |
|
Returns the default palette string. Reimplemented from TView. |
|
Called whenever a menu event needs to be handled. Determines which menu item has been mouse or keyboard selected (including hot keys) and generates the appropriate command event with putEvent(). Reimplemented from TView. |
|
Returns a pointer to the menu item associated with the hot key given by `keyCode'. Returns 0 if no such menu item exists, or if the item is disabled. hotKey() is used by handleEvent() to determine whether a keystroke event selects an item in the menu. |
|
Undocumented. |
|
Reads from the input stream `is'. Reimplemented from TView. |
|
Undocumented. Reimplemented from TView. |
|
Writes to the output stream `os'. Reimplemented from TView. |
|
A pointer to the currently selected menu item. |
|
A pointer to the TMenu object for this menu, which provides a linked list of menu items. The menu pointer allows access to all the data members of the menu items in this menu view. |
|
Undocumented. Reimplemented from TView. Reimplemented in TMenuBar, TMenuBox, and TMenuPopup. |
|
A pointer to the TMenuView object (or any class derived from TMenuView) that owns this menu. |