newspeoplefor developersdocumentationdownloads

nGuiContextMenu Class Reference
[Graphical User Interface]

#include <nguicontextmenu.h>

Inheritance diagram for nGuiContextMenu:

nGuiClientWindow nGuiWindow nGuiWidget nRoot nObject nNode nReferenced nSignalEmitter List of all members.

Detailed Description

A context menu base class. Implement OnEvent() behavior in a derived subclass.

(C) 2004 RadonLabs GmbH

Definition at line 19 of file nguicontextmenu.h.


Public Member Functions

 nGuiContextMenu ()
 constructor
virtual ~nGuiContextMenu ()
 destructor
void AddEntry (const char *title)
 add a menu entry
virtual void OnShow ()
 called when widget is becoming visible
virtual void OnHide ()
 called when widget is becoming invisible
virtual void OnEvent (const nGuiEvent &event)
 notify widget of an event
int GetSelectedIndex () const
 get resulting selection index (-1 if no selection)
const char * GetSelectedEntry () const
 get resulting selection entry text (0 if no selection)

Protected Attributes

nArray< nStringentryArray
nArray< nRef< nGuiTextButton > > buttonArray
int selectedIndex

Constructor & Destructor Documentation

nGuiContextMenu::nGuiContextMenu  ) 
 

constructor

Definition at line 16 of file nguicontextmenu_main.cc.

nGuiContextMenu::~nGuiContextMenu  )  [virtual]
 

destructor

Definition at line 25 of file nguicontextmenu_main.cc.


Member Function Documentation

void nGuiContextMenu::AddEntry const char *  entry  )  [inline]
 

add a menu entry

Creates a text button as a menu entry

Definition at line 51 of file nguicontextmenu.h.

void nGuiContextMenu::OnShow  )  [virtual]
 

called when widget is becoming visible

Attaches the text buttons and sizes to the proper size

reset selection index

Reimplemented from nGuiClientWindow.

Definition at line 35 of file nguicontextmenu_main.cc.

void nGuiContextMenu::OnHide  )  [virtual]
 

called when widget is becoming invisible

Releases all buttons

Reimplemented from nGuiClientWindow.

Definition at line 124 of file nguicontextmenu_main.cc.

void nGuiContextMenu::OnEvent const nGuiEvent event  )  [virtual]
 

notify widget of an event

Reimplemented from nGuiClientWindow.

Definition at line 142 of file nguicontextmenu_main.cc.

int nGuiContextMenu::GetSelectedIndex  )  const [inline]
 

get resulting selection index (-1 if no selection)

Definition at line 62 of file nguicontextmenu.h.

const char * nGuiContextMenu::GetSelectedEntry  )  const [inline]
 

get resulting selection entry text (0 if no selection)

Definition at line 72 of file nguicontextmenu.h.


Member Data Documentation

nArray<nString> nGuiContextMenu::entryArray [protected]
 

Definition at line 40 of file nguicontextmenu.h.

nArray<nRef<nGuiTextButton> > nGuiContextMenu::buttonArray [protected]
 

Definition at line 41 of file nguicontextmenu.h.

int nGuiContextMenu::selectedIndex [protected]
 

Definition at line 42 of file nguicontextmenu.h.


The documentation for this class was generated from the following files:

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.