Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptattemptresize.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptattemptresize.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptattemptresize.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptattemptresize.html on line 8
Adjust the size of a widget
int PtAttemptResize( PtWidget_t *widget,
PhRect_t const *canvas,
PhRect_t const *render );
- widget
- A pointer to the widget whose size you want to adjust.
- canvas
- A pointer to a
PhRect_t
structure (see the Photon Library Reference) that describes
the widget's canvas.
- render
- A pointer to a PhRect_t structure that defines the
part of the widget you want to render.
This function adjusts the size of the widget based on the
differences between canvas and render and on the
widget's resize flags.
PtResizeCanvas()
is similar to this function but easier to use.
You should call it instead of PtAttemptResize().
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.
- 1
- Successful completion.
- 0
- No resize occurred.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PtChildBoundingBox(),
PtClipAdd(),
PtClipRemove(),
PtResizeCanvas()
PgExtentText(),
PhRect_t,
PtCalcCanvas()
in the Photon Library Reference
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptattemptresize.html on line 141
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptattemptresize.html on line 141