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

os::Menu Class Reference

#include <menu.h>

Inheritance diagram for os::Menu:

os::View os::Handler List of all members.

Public Methods

 Menu (Rect cFrame, const char *pzName, MenuLayout_e eLayout, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_RIGHT|CF_FOLLOW_TOP, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND|WID_FULL_UPDATE_ON_RESIZE)
 ~Menu ()
int Lock (void) const
void Unlock (void) const
virtual void TimerTick (int nID)
void AttachedToWindow (void)
void DetachedFromWindow (void)
void WindowActivated (bool bIsActive)
 Hook called when the window hosting this view gain or loose focus. More...

Point GetPreferredSize (bool bLargest) const
virtual void MouseDown (const Point &cPosition, uint32 nButtons)
virtual void MouseUp (const Point &cPosition, uint32 nButtons, Message *pcData)
virtual void MouseMove (const Point &cNewPos, int nCode, uint32 nButtons, Message *pcData)
virtual void KeyDown (const char *pzString, const char *pzRawString, uint32 nQualifiers)
virtual void FrameSized (const Point &cDelta)
virtual void Paint (const Rect &cUpdateRect)
 Called by the system update "damaged" areas of the view. More...

const char* GetLabel (void) const
bool AddItem (const char *pzLabel, Message *pcMessage)
bool AddItem (MenuItem *pcItem)
bool AddItem (MenuItem *pcItem, int nIndex)
bool AddItem (Menu *pcItem)
bool AddItem (Menu *pcItem, int nIndex)
MenuItemRemoveItem (int nIndex)
bool RemoveItem (MenuItem *pcItem)
bool RemoveItem (Menu *pcMenu)
MenuItemGetItemAt (int nIndex) const
MenuItemGetItemAt (Point cPos) const
Menu* GetSubMenuAt (int nIndex) const
int GetItemCount (void) const
int GetIndexOf (MenuItem *pcItem) const
int GetIndexOf (Menu *pcMenu) const
MenuItemFindItem (int nCode) const
MenuItemFindItem (const char *pzName) const
virtual status_t SetTargetForItems (Handler *pcTarget)
virtual status_t SetTargetForItems (Messenger cMessenger)
MenuItemFindMarked (void) const
Menu* GetSuperMenu (void) const
MenuItemGetSuperItem (void)
void InvalidateLayout (void)
MenuItemTrack (const Point &cScreenPos)
void Open (Point cScrPos)

Friends

class  MenuItem

Detailed Description

Description:
See also:
Author(s):
Kurt Skauen (kurt@atheos.cx)


Constructor & Destructor Documentation

Menu::Menu ( Rect cFrame,
const char * pzTitle,
MenuLayout_e eLayout,
uint32 nResizeMask = CF_FOLLOW_LEFT | CF_FOLLOW_RIGHT | CF_FOLLOW_TOP,
uint32 nFlags = WID_WILL_DRAW | WID_CLEAR_BACKGROUND | WID_FULL_UPDATE_ON_RESIZE )
 

Menu::~Menu ( )
 


Member Function Documentation

bool Menu::AddItem ( Menu * pcMenu,
int nIndex )
 

bool Menu::AddItem ( Menu * pcMenu )
 

bool Menu::AddItem ( MenuItem * pcItem,
int nIndex )
 

bool Menu::AddItem ( MenuItem * pcItem )
 

bool Menu::AddItem ( const char * pzLabel,
Message * pcMessage )
 

void Menu::AttachedToWindow ( void ) [virtual]
 

Reimplemented from os::View.

void Menu::DetachedFromWindow ( void ) [virtual]
 

Reimplemented from os::View.

MenuItem * Menu::FindItem ( const char * pzName ) const
 

MenuItem * Menu::FindItem ( int nCode ) const
 

MenuItem * Menu::FindMarked ( void ) const
 

void Menu::FrameSized ( const Point & cDelta ) [virtual]
 

Reimplemented from os::View.

int Menu::GetIndexOf ( Menu * pcMenu ) const
 

int Menu::GetIndexOf ( MenuItem * pcItem ) const
 

MenuItem * Menu::GetItemAt ( Point cPosition ) const
 

MenuItem * Menu::GetItemAt ( int nIndex ) const
 

int Menu::GetItemCount ( void ) const
 

const char * os::Menu::GetLabel ( void ) const [inline]
 

Point Menu::GetPreferredSize ( bool bLargest ) const [virtual]
 

Reimplemented from os::View.

Menu * Menu::GetSubMenuAt ( int nIndex ) const
 

MenuItem * Menu::GetSuperItem ( void )
 

Menu * Menu::GetSuperMenu ( void ) const
 

void Menu::InvalidateLayout ( void )
 

void Menu::KeyDown ( const char * pzString,
const char * pzRawString,
uint32 nQualifiers ) [virtual]
 

Reimplemented from os::View.

int os::Menu::Lock ( void ) const
 

void Menu::MouseDown ( const Point & cPosition,
uint32 nButtons ) [virtual]
 

Reimplemented from os::View.

void Menu::MouseMove ( const Point & cPosition,
int nCode,
uint32 nButtons,
Message * pcData ) [virtual]
 

Reimplemented from os::View.

void Menu::MouseUp ( const Point & cPosition,
uint32 nButtons,
Message * pcData ) [virtual]
 

Reimplemented from os::View.

void Menu::Open ( Point cScrPos )
 

void Menu::Paint ( const Rect & cUpdateRect ) [virtual]
 

Called by the system update "damaged" areas of the view.

Description:
Note:
Warning:
Parameters:
cUpdateRect   A rectangle enclosing all damaged areas. This is just a rough "worst-case", further fine-grained clipping will be performed by the Application Server to avoid updating non-damaged pixels and make the update as fast and flicker-free as possible.

See also:
Invalidate(), Flush()
Author(s):
Kurt Skauen (kurt@atheos.cx)

Reimplemented from os::View.

bool Menu::RemoveItem ( Menu * pcMenu )
 

bool Menu::RemoveItem ( MenuItem * pcItem )
 

MenuItem * Menu::RemoveItem ( int nIndex )
 

status_t Menu::SetTargetForItems ( Messenger cMessenger ) [virtual]
 

status_t Menu::SetTargetForItems ( Handler * pcTarget ) [virtual]
 

void Menu::TimerTick ( int nID ) [virtual]
 

Reimplemented from os::Handler.

MenuItem * Menu::Track ( const Point & cScreenPos )
 

void os::Menu::Unlock ( void ) const
 

void Menu::WindowActivated ( bool bIsActive ) [virtual]
 

Hook called when the window hosting this view gain or loose focus.

Description:
This is a callback member that can be overloaded by derived classes to learn when the window that this view is hosted by is activated and when it is deactivated. The bIsActive parameter tell whether the focus was lost or gained. This member is called whenever the window changes focus independent of whether the view is active or not.
Note:
This is a hook function that is called by the system to notify about an event. You should never call this member yourself.

The window is locked when this member is called.
Parameters:
bIsActive   - true if the window gain and false if it loose focus.
See also:
MakeFocus(), Activated()
Author(s):
Kurt Skauen (kurt.skauen@c2i.net)

Reimplemented from os::View.


Friends And Related Function Documentation

class MenuItem [friend]
 


The documentation for this class was generated from the following files:
Generated at Sat Apr 7 16:11:37 2001 for AtheOS higlevel API by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001