Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptsuperclassextent.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptsuperclassextent.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptsuperclassextent.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptsuperclassextent.html on line 8

PtSuperClassExtent()

Invoke the Extent method of the specified superclass

Synopsis:

void PtSuperClassExtent( PtWidgetClassRef_t *wc_ref,
                         PtWidget_t *widget );

Arguments:

wc_ref
The superclass whose method you want to invoke.
widget
A pointer to the widget for which to invoke the method.

Description:

This function invokes the Extent method of the specified superclass wc_ref.

The PtLabel class's Extent method handles multiline text (with underlining and margins) and the resize policy.

The PtContainer class's Extent method handles the resize policy for all its subclasses.

The PtGraphic class's Extent method calculates an extent based on an array of points, line weight, origin, and resize policy.

Examples:

To have a widget honor a minimum x dimension resource:

static void my_container_extent( PtWidget_t *widget )
{
  MyWidget_t *mw = (MyWidget_t *)widget;
  PhRect_t canvas, render;

  if( PtResizePolicy( widget ) )
  {
     PtChildBoundingBox( widget, &canvas, &render );
     if( render.lr.x - render.ul.x + 1 < mw->min_x )
       render.lr.x = render.ul.x + mw->min_x -1;
     PtAttemptResize( widget, &canvas, &render );
  }else if( widget->area.size.x < mw->min_x )
     widget->area.size.x = mw->min_x;

  PtSuperClassExtent( PtBasic, widget );

}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptsuperclassextent.html on line 130

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptsuperclassextent.html on line 130