CARMA C++
|
A menu for creating new windows. More...
#include <carma/ui/rtd/common/RtMenu.h>
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... | |
![]() | |
std::string | getTitle () |
Get title. More... | |
void | setTitle (const std::string &title) |
Set title for object. More... | |
virtual void | update () |
Update the object. More... | |
![]() | |
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 | |
![]() | |
RtTitledObj (const std::string &title) | |
Constructor. More... | |
![]() | |
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... | |
![]() | |
std::string | title_ |
Object title. More... | |
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.
|
explicit |
Constructor.
title | a name for the menu |
void carma::ui::rtd::RtMenu::addItem | ( | const ::std::string & | menuName, |
const ::std::string & | codeName | ||
) |
Add a menu item to the current menu/submenu.
menuName | the name that will appear on the menu |
codeName | the 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.
menuName | the 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.
menuName | the name that will appear on the menu |
codeName | the string that is used to start the window |
void carma::ui::rtd::RtMenu::addSubmenu | ( | const ::std::string & | submenuName | ) |
Add a submenu current menu/submenu.
submenuName | the 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.
submenuName | the name for the new menu that will appear on the menu |
void carma::ui::rtd::RtMenu::endSubmenu | ( | ) |
Signifies end of submenu.
|
virtual |
Static description of the menu to stdout.
Implements carma::ui::rtd::RtTitledObj.