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

PtSetAreaFromExtent()

Set an area based on the extent of a widget

Synopsis:

PhArea_t * PtSetAreaFromExtent( 
               PtWidget_t *widget,
               PhRect_t const *extent_rect, 
               PhArea_t *area);

Description:

This function sets area to an area that would produce the extent extent_rect, given the attributes, borders, etc. of widget.


Note: The area argument must be provided and have its own storage. This function doesn't allocate any memory.

Returns:

A pointer to the area argument, or NULL if an error occurred.

Examples:

// Change widget so its extent will be {5,5,25,15}.
PhRect_t extent = { 5,5,25,15 };
PhArea_t area;

// Produce area required for widget's extent 
// to match "extent."

PtSetAreaFromExtent( widget, &extent, &area);
PtSetArg( &argt, Pt_ARG_AREA, &area, 0 );
PtSetResources( widget, 1, &argt );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtSetAreaFromWidgetCanvas()


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