PtWidgetExtent()

Get a widget's extent

Synopsis:

PhRect_t *PtWidgetExtent( PtWidget_t *widget,
                          PhRect_t *extent );

Library:

ph

Description:

This macro sets the specified PhRect_t structure to the extent of the specified widget and returns a pointer to that structure.

Returns:

The same pointer as extent, or NULL if no PhRect_t structure is provided or if the widget pointer is invalid.


Note: A widget's extent isn't calculated until the widget is either realized or forced to calculate the extent by a call to PtExtentWidget(). If the widget hasn't been realized, be sure to call PtExtentWidget() first.

Examples:

PhRect_t extent;
PtWidget_t *labelwidget;

PtRealizeWidget( labelwidget );
PtWidgetExtent( labelwidget, &extent);

See also PtContainerGiveFocus().

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhRect_t, PtExtentWidget(), PtRealizeWidget()

Widget geometry in the Introduction to the Photon Programmer's Guide