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

PtWidgetClass()

Return the class of a widget

Synopsis:

PtWidgetClassRef_t *PtWidgetClass( 
                       PtWidget_t *widget );

Description:

This function lets you determine a widget's class. Using the PtWidgetClassRef_t pointer, you can create new widgets of the same class or check for specific widget classes.

Returns:

A pointer to a PtWidgetClassRef_t, or NULL if the widget is NULL.

Examples:

/* check the class type of a widget */
if ( PtWidgetClass( widget ) == PtWindow ) {
    /* window processing */
    }
else {
    /* nonwindow processing */
    }

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtWidgetIsClass(), PtWidgetIsClassMember()


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