Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
ApGetItemText()
Get the text for a menu item
Synopsis:
#include <Ap.h>
char * ApGetItemText( ApMenuLink_t *menu,
int item_name);
Arguments:
- menu
- A pointer to a PhAB menu link structure.
- item_name
- The ABN_ name of the menu item, as generated by PhAB.
Library:
Ap
Description:
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.
Returns:
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.
Examples:
text = ApGetItemText( &mymenu, ABN_item1 );
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
ApModifyItemAccel(), ApModifyItemState(), ApModifyItemText()
"Changing menu-item text" in the Working with Code chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
