Get the text for a menu item
#include <Ap.h> char * ApGetItemText( ApMenuLink_t *menu, int item_name);
Ap
ApGetItemText() is used to extract the text of a menu item in a PhAB menu module. If a language translation is in effect, the translated string is returned rather than the default text built into the application.
A pointer to a text string or translated text, or NULL if the ABN_ name is invalid.
Don't free the returned text string, or your application will crash. |
If you call ApModifyItemText() after calling ApGetItemText() for the same menu item, the string returned by ApGetItemText() becomes invalid.
text = ApGetItemText( &mymenu, ABN_item1 );
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
ApModifyItemAccel(), ApModifyItemState(), ApModifyItemText()
“Changing menu-item text” in the Working with Code chapter of the Photon Programmer's Guide