![]() |
![]() |
![]() |
![]() |
![]() |
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Walk the widget tree from front to back
int PtWidgetTree( PtWidget_t *root,
PtWidget_t **cur,
int D );
ph
This function walks the widget tree pointed to by root from front to back. The cur argument is the address of a pointer to the current widget in the tree. The D argument is the direction control.
![]() |
This function performs a simple traversal of the widget tree. If you need more control over how the tree is traversed (for example, specifying the direction, or skipping certain branches), use PtWidgetTreeTraverse(). |
To start the traversal, set cur to be the address of a pointer to the root widget, and set D to Pt_TRAVERSE_START. Use the result returned by PtWidgetTree() as the value of D for the next call.
The traversal is done when PtWidgetTree() returns Pt_TRAVERSE_DONE.
PtWidget_t *cur, *window;
int d;
...
cur=window
d=Pt_TRAVERSE_START;
while( ( d=PtWidgetTree( window, &cur, d ) ) !=
Pt_TRAVERSE_DONE)
PtSetResources( cur, 1, argt );
...
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
PtNextTopLevelWidget(), PtValidParent(), PtWidgetBrotherBehind(), PtWidgetBrotherInFront(), PtWidgetChildBack(), PtWidgetChildFront(), PtWidgetFamily(), PtWidgetParent(), PtWidgetSkip(), PtWidgetTreeTraverse()
"Ordering widgets" in the Managing Widgets in Application Code chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |