Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
ApGetItemText

ApGetItemText

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

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.


Caution: 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