Retrieve the preferred size of a widget
PhDim_t *PtWidgetPreferredSize( PtWidget_t const *widget, PhDim_t *dim );
ph
This function retrieves the optimal size of a widget, which is recorded whenever the widget calls PtResizeCanvas() or PtAttemptResize() while calculating its extent (see Building Custom Widgets).
The preferred size is the size the widget would be if Pt_RESIZE_XY_ALWAYS were set in its Pt_ARG_RESIZE_FLAGS. The preferred size is never any smaller than the widget's minimum size. The resulting dimension is stored in the PhDim_t structure pointed to by dim.
A pointer to the PhDim_t structure that was passed in.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PhDim_t, PtWidgetMinimumSize()
PtAttemptResize(), PtResizeCanvas() in Building Custom Widgets