Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

os::MenuItem Class Reference

#include <menu.h>

Inheritance diagram for os::MenuItem::

os::Invoker os::MenuSeparator List of all members.

Public Methods

 MenuItem (const char *pzLabel, Message *pcMsg)
 MenuItem (Menu *pcMenu, Message *pcMsg)
 ~MenuItem ()
MenuGetSubMenu () const
MenuGetSuperMenu () const
Rect GetFrame () const
virtual Point GetContentSize ()
const char * GetLabel () const
virtual void Draw ()
virtual void DrawContent ()
virtual void Highlight (bool bHighlight)
Point GetContentLocation () const
virtual bool Invoked (Message *pcMessage)
 Intercept outgoing messages. More...


Friends

class Menu

Detailed Description

Description:
See also:
Author:
Kurt Skauen ([email protected])


Constructor & Destructor Documentation

MenuItem::MenuItem const char * pzLabel,
Message * pcMsg
 

MenuItem::MenuItem Menu * pcMenu,
Message * pcMsg
 

MenuItem::~MenuItem
 


Member Function Documentation

void MenuItem::Draw [virtual]
 

Reimplemented in os::MenuSeparator.

void MenuItem::DrawContent [virtual]
 

Reimplemented in os::MenuSeparator.

Point MenuItem::GetContentLocation const
 

Point MenuItem::GetContentSize [virtual]
 

Reimplemented in os::MenuSeparator.

Rect MenuItem::GetFrame const
 

const char * MenuItem::GetLabel const
 

Menu * MenuItem::GetSubMenu const
 

Menu * MenuItem::GetSuperMenu const
 

void MenuItem::Highlight bool bHighlight [virtual]
 

Reimplemented in os::MenuSeparator.

bool MenuItem::Invoked Message * pcMessage [virtual]
 

Description:
This member is called from Invoke() just before a message is sendt to the target.

This allow classes that inherits from os::Invoker to add data to or otherwhice modify the message before it is sendt. The message can also be canceled entirely by returning false from this member.

The message passed to Invoked() is a copy of the internal message or the message passed to Invoke() (if any) so any changes made here will not affect the internal message or the message passed to Invoke(). When this method returns the message will imidiatly be sendt to the target and then discarded (unless false is returned in which case the message is simply discarded).

The default implementation of this member does nothing and return true.

Parameters:
pcMessage   Pointer to the message that is about to be sendt. You can do any modification you like to this message (but never delete it).
Returns:
Normally you should return true to indicate that the message should be sendt. You can however return false if you for some reason want to cancel the invokation.
See also:
Invoke(), SetMessage(), SetTarget()
Author:
Kurt Skauen ([email protected])

Reimplemented from os::Invoker.


Friends And Related Function Documentation

friend class Menu [friend]
 


Generated at Tue Sep 11 15:27:51 2001 for AtheOS higlevel API by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001