PtSuperClassDraw()

Invoke the Draw method of the specified superclass

Synopsis:

void PtSuperClassDraw( PtWidgetClassRef_t *wc_ref,
                       PtWidget_t *widget, 
                       PhTile_t const *damage );

Arguments:

wc_ref
The superclass whose method you want to invoke.
widget
A pointer to the widget being drawn.
damage
A pointer to a list of PhTile_t structures (see the Photon Library Reference) that define the damaged areas to be drawn.

Description:

This function invokes the Draw method of the specified superclass wc_ref. Use this function to save code and complexity in your subclass's Draw method.

Examples:

static void my_draw( PtWidget_t *widget, PhTile_t *damage )
{
  // draw fill & borders as needed.
  PtSuperClassDraw( PtBasic, widget, damage );

  PtCalcCanvas( widget, &canvas );

  // Check if PtAttemptResize() function set Pt_UCLIP flag
  // in the Extent method.
  if( widget->resize_flags & Pt_UCLIP )
     PtClipAdd( widget, &canvas );

  PgDrawLine( canvas.ul, canvas.lr );
  PgDrawLine( canvas.lr, canvas.ul );

  if( widget->resize_flags & Pt_UCLIP )
     PtClipRemove();
}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhTile_t in the Photon Library Reference