CARMA C++
carma::ui::rtd::RtMenu Class Reference

A menu for creating new windows. More...

#include <carma/ui/rtd/common/RtMenu.h>

Inheritance diagram for carma::ui::rtd::RtMenu:
carma::ui::rtd::RtTitledObj carma::ui::rtd::RtObject

Public Member Functions

void addItem (const ::std::string &menuName, const ::std::string &codeName)
 Add a menu item to the current menu/submenu. More...
 
void addItem (const ::std::string &menuName)
 Add a menu item without a code to the current menu/submenu. More...
 
void addItemDisabled (const ::std::string &menuName, const ::std::string &codeName)
 Add a disabled menu item to the current menu/submenu. More...
 
void addSubmenu (const ::std::string &submenuName)
 Add a submenu current menu/submenu. More...
 
void addSubmenuDisabled (const ::std::string &submenuName)
 Add a submenu current menu/submenu. More...
 
void endSubmenu ()
 Signifies end of submenu. More...
 
 RtMenu (const ::std::string &title)
 Constructor. More...
 
virtual void serialize (bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
 Static description of the menu to stdout. More...
 
- Public Member Functions inherited from carma::ui::rtd::RtTitledObj
std::string getTitle ()
 Get title. More...
 
void setTitle (const std::string &title)
 Set title for object. More...
 
virtual void update ()
 Update the object. More...
 
- Public Member Functions inherited from carma::ui::rtd::RtObject
void appendToolTipText (const std::string &text)
 Append more text to the existing tool tip text. More...
 
Layout getLayout () const
 Get the layout for this object. More...
 
std::string getToolTipText ()
 
void setFontSize (int fontSize)
 Set the absolute font size for this object. More...
 
void setLayout (Layout layout)
 Set the layout for this object. More...
 
void setToolTipText (const std::string &text)
 Set the tool tip text for this RtObject. More...
 
virtual ~RtObject ()
 Destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from carma::ui::rtd::RtTitledObj
 RtTitledObj (const std::string &title)
 Constructor. More...
 
- Protected Member Functions inherited from carma::ui::rtd::RtObject
int getFontSize (int parentFontSize) const
 Get the absolute font size for this object. More...
 
int getFontSize () const
 Get the absolute font size for this object. More...
 
 RtObject ()
 Constructor. More...
 
- Protected Attributes inherited from carma::ui::rtd::RtTitledObj
std::string title_
 Object title. More...
 

Detailed Description

A menu for creating new windows.

This menu appears at the top of the display window. It is a hierarchical window with Submenus defining the levels. Menus and submenus (they are the same) contain Items which can be disabled. If disabled they appear "greyed out" on the menu. A menu item must specify which window code string is associated with a selection of the item. This code is used to start the new window. See the mipsv.cc program for the association of codes and the service programs that actually create the windows. The menu is static and is sent to the Java client with the description of the window in the initialization packet. Simple prefix characters are used to signify submenus (+=begin, -=end) and disabling (*), and are automatically prepended by the class methods. Control menu items (only visible to a client with control capabilities) have a "~" as an initial character. These prefixed must be manually inserted.

Definition at line 29 of file RtMenu.h.

Constructor & Destructor Documentation

carma::ui::rtd::RtMenu::RtMenu ( const ::std::string &  title)
explicit

Constructor.

Parameters
titlea name for the menu

Member Function Documentation

void carma::ui::rtd::RtMenu::addItem ( const ::std::string &  menuName,
const ::std::string &  codeName 
)

Add a menu item to the current menu/submenu.

Parameters
menuNamethe name that will appear on the menu
codeNamethe string that is used to start the window
void carma::ui::rtd::RtMenu::addItem ( const ::std::string &  menuName)

Add a menu item without a code to the current menu/submenu.

Parameters
menuNamethe name that will appear on the menu
void carma::ui::rtd::RtMenu::addItemDisabled ( const ::std::string &  menuName,
const ::std::string &  codeName 
)

Add a disabled menu item to the current menu/submenu.

Parameters
menuNamethe name that will appear on the menu
codeNamethe string that is used to start the window
void carma::ui::rtd::RtMenu::addSubmenu ( const ::std::string &  submenuName)

Add a submenu current menu/submenu.

Parameters
submenuNamethe name for the new menu that will appear on the menu
void carma::ui::rtd::RtMenu::addSubmenuDisabled ( const ::std::string &  submenuName)

Add a submenu current menu/submenu.

Parameters
submenuNamethe name for the new menu that will appear on the menu
void carma::ui::rtd::RtMenu::endSubmenu ( )

Signifies end of submenu.

virtual void carma::ui::rtd::RtMenu::serialize ( bool  initialize,
int  fontSize,
::rtdproto::RtObject *  rtobj 
)
virtual

Static description of the menu to stdout.

Implements carma::ui::rtd::RtTitledObj.


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