Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtCompoundRedirect()

Redirect widgets to a parent

Synopsis:

PtWidget_t *PtCompoundRedirect( 
                PtWidget_t *container,
                PtWidgetClassRef_t *child_cref );

Arguments:

container
A pointer to the container widget from which you want to redirect the children.
child_cref
The class of the child widget (e.g. PtButton).

Description:

This function returns the parent of a compound widget, making the compound widget seem like a simple widget (i.e. users can't place widgets inside container).

This is especially useful for rejecting widgets or redirecting widgets to subordinate containers (e.g. PtScrollArea does this).

This redirector function can be added to a custom compound widget by using the Pt_SET_CHILD_REDIRECT_F manifest defined by PtContainer.

Returns:

A pointer to the parent of the given compound widget.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

"Container widget anatomy" in the Anatomy of a Widget chapter.