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

PtWidgetExtent()

Get a widget's extent

Synopsis:

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

Description:

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

Returns:

A pointer to a PhRect_t structure. If no PhRect_t structure is provided or if the widget pointer is invalid, the function returns NULL.


Note: A widget's extent isn't calculated until the widget is either realized or forced to calculate the extent by a PtExtentWidget() call. 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:

PtExtentWidget(), PtRealizeWidget()


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