|
wxMaxima
|
Implements MenuHelpString(); see MenuHelpString.h for the rationale. More...
Functions | |
| wxString | MenuHelpString (wxMenu *menu, int id) |
Returns the help string of the item with the given id inside menu. | |
Implements MenuHelpString(); see MenuHelpString.h for the rationale.
| wxString MenuHelpString | ( | wxMenu * | menu, |
| int | id | ||
| ) |
Returns the help string of the item with the given id inside menu.
This is what wxMaxima shows in the status bar while a menu item is highlighted. It exists as a separate, testable function because wxMenu::GetHelpString() asserts ("item" failed) in wxWidgets 3.3 when the highlighted id is not an item of that menu – a situation the native menu code (notably on Windows) can produce for menu/submenu titles or ids that belong to another menu. Instead of relying on GetHelpString()'s not-found behaviour we look the item up with wxMenu::FindItem(), which recurses into submenus and simply returns nullptr when nothing matches.
| menu | The menu whose item is being highlighted (may be nullptr). |
| id | The highlighted item id (ids <= 0 are treated as "no item"). |