Get a widget's extent
PhRect_t *PtWidgetExtent( PtWidget_t *widget, PhRect_t *extent );
This function sets the specified PhRect_t structure to the extent of the specified widget and returns a pointer to that structure.
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.
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. |
PhRect_t extent; PtWidget_t *labelwidget; PtRealizeWidget( labelwidget ); PtWidgetExtent( labelwidget, &extent);
See also PtContainerGiveFocus().
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtExtentWidget(), PtRealizeWidget()