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

PtGetAnchoredExtent()

Calculate a new anchor rectangle

Synopsis:

int PtGetAnchoredExtent( PtWidget_t *container, 
                         PhRect_t const *old_anchor_rect, 
                         PhRect_t *new_anchor_rect );

Description:

This function calculates a new anchor rectangle new_anchor_rect using the canvas rectangle derived from the PtBasic-class level and the anchor flags and offsets associated with container.

The anchor flags and anchor offsets are calculated by PtCalcAnchorOffsets(). All parameters must be provided. The new_anchor_rect argument is used only if PtGetAnchoredExtent() returns a value of 1.

Returns:

0
An error occurred - the widget shouldn't be anchored (i.e. it isn't a container widget); there's no anchor flags set; or new_anchor_rect == old_anchor_rect.
-1
The widget's anchor offsets were calculated.
1
The widget's anchor offsets were used to yield new_anchor_rect.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtCalcAnchorOffsets()


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