Get a widget's extent
PhRect_t *PtWidgetExtent( PtWidget_t *widget, PhRect_t *extent );
ph
This macro sets the specified PhRect_t structure to the extent of the specified widget and returns a pointer to that structure.
The same pointer as extent, or NULL if no PhRect_t structure is provided or if the widget pointer is invalid.
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. |
PhRect_t extent; PtWidget_t *labelwidget; PtRealizeWidget( labelwidget ); PtWidgetExtent( labelwidget, &extent);
See also PtContainerGiveFocus().
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PhRect_t, PtExtentWidget(), PtRealizeWidget()
“Widget geometry” in the Introduction to the Photon Programmer's Guide