Traverse the widget hierarchy
PtWidget_t *PtWidgetFamily( PtWidget_t *root, PtWidget_t *current );
This function walks the depth of the widget hierarchy, starting from the top widget.
A pointer to the next widget below root in the widget hierarchy. When the hierarchy has been fully traversed, the function returns NULL.
PtWidget_t *mycontainer; PtWidget_t *root; PtWidget_t *current; int n; ... mycontainer = PtCreateWidget( PtContainer, NULL, n, args ); ... /* * Set and highlight all PtLabel widgets * within "mycontainer" */ root = current = mycontainer; PtSetArg( &arg, Pt_ARG_FLAGS, Pt_TRUE, Pt_HIGHLIGHTED|Pt_SET); while( current = PtWidgetFamily( root, current ) ) if( PtWidgetIsClass( current, PtLabel) ) PtSetResources( current, 1, &arg ); PtRealizeWidget( mycontainer );
See also PtWidgetChildBack().
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtWidgetBrotherBehind(), PtWidgetBrotherInFront(), PtWidgetChildBack(), PtWidgetChildFront(), PtWidgetParent(), PtWidgetSkip(), PtWidgetToBack(), PtWidgetToFront(), PtWidgetTree(), PtWidgetTreeTraverse()
"Ordering widgets" in the Creating Widgets in Application Code chapter of the Photon Programmer's Guide