| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) | 
Determine whether a widget belongs to a specified class
int PtWidgetIsClassMember( 
        PtWidget_t *widget,
        PtWidgetClassRef_t *class );
This function determines whether or not the specified widget is a member of the specified widget class. You can use this function to determine whether the widget is of the specified class or a subclass of the specified class.
Test to see if widget belongs to the PtGraphic class (i.e. is it a line, rectangle, polygon, etc.):
if( PtWidgetIsClassMember( widget, PtGraphic ) )
    printf( "PtGraphic-class widget\n" );
else
    printf( "non-PtGraphic-class widget\n" );
Photon
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) |