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

PtSuperClassDraw()

Invoke the Draw method of the specified superclass

Synopsis:

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

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 );

  PtBasicWidgetCanvas( 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

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