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

PtAttemptResize()

Adjust the size of a widget

Synopsis:

int PtAttemptResize( PtWidget_t *widget, 
                     PhRect_t const *canvas,
                     PhRect_t const *render );

Description:

This function adjusts the size of the widget based on the differences between canvas and render and on the widget's resize flags.

The widget's actual size is modified (widget->area.size). If the resize policy of the widget prevents PtAttemptResize() from adjusting the widget's size (i.e. the canvas won't fit within the provided render rectangle), PtAttemptResize() sets the Pt_UCLIP bit of the widget's resize flags. If this bit is set, the widget's Draw method should apply clipping via PtClipAdd() prior to rendering its data.

Returns:

1
Successful completion.
0
No resize occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgExtentText(), PtChildBoundingBox(), PtClipAdd(), PtClipRemove(), PtWidgetCanvas()


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