Added help text functionality.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8117 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-06-22 02:52:38 +00:00
parent a104674fdf
commit 649f65cc3a
2 changed files with 20 additions and 1 deletions
+16 -1
View File
@@ -29,7 +29,8 @@ MenuItem::MenuItem(const char *label, Menu *subMenu)
fType(MENU_ITEM_STANDARD),
fMenu(NULL),
fSubMenu(subMenu),
fData(NULL)
fData(NULL),
fHelpText(NULL)
{
}
@@ -101,6 +102,20 @@ MenuItem::SetData(void *data)
}
/** This sets a help text that is shown when the item is
* selected.
* Note, unlike the label, the string is not copied, it's
* just referenced and has to stay valid as long as the
* item's menu is being used.
*/
void
MenuItem::SetHelpText(const char *text)
{
fHelpText = text;
}
void
MenuItem::SetMenu(Menu *menu)
{