[Previous] [Contents] [Index] [Next]

ApInstanceName()

Return the widget's instance name string

Synopsis:

#include <Ap.h>

char * ApInstanceName( PtWidget_t *widget );

Description:

ApInstanceName() returns a widget's instance string name if it's defined. The string name is the name given to the widget in the Widget Instance Name field of the Control Panel. By default, string names are not saved with the widget, in order to save memory.

To embed string names in the widget, you must enable this feature:

  1. In PhAB, select the Startup Info/Modules command from the Application menu.
  2. In the Application Startup Information dialog, click the Incl Names button.

Returns:

The widget's instance name string, or NULL if the widget doesn't have string name data attached.

Examples:

my_callback( PtWidget_t *widget, ... )
{

    if ( strcmp( ApInstanceName( widget ), 
                 "done_button" ) == 0 ) {
        /* done button processing */
    }

}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

[Previous] [Contents] [Index] [Next]