Each parent has its own linked list of windows for its children. If you have not assigned a parent to a window, it has FULL_WNP as its parent by default. We have already noted that windows come to the top automatically when dragging and resizing them. They are also brought to the top when you process them. This ordering of windows is done automatically for you. If you wish to change the order of windows, you can do this for either the main linked list of windows (those that have FULL_WNP as their parent) or for child windows.
To reorder windows, you bring a window to the top with the window to the top function, wn_top(). Vermont Views will take care of reorganizing the linked list of windows and updating the screen as necessary. The call to wn_top() is as follows:
|
||
|
|
|
|
|
|
For scope, specify which linked list you wish to work with. The following scopes are supported:
| SIBLINGS | Just move the window to the top of its parent's linked list. |
| ALL_WN | Link the window to the top of its parent's linked list, and call wn_top() recursively for all parents until you reach FULL_WNP. This will result in bringing the window and all of its ancestors to the top. |
If you have not made a window a child of another window by calling sw_parent(), there is no difference between specifying ALL_WN or SIBLINGS. Only for child windows does the scope become an issue. When using wn_top() on the child window, you will always bring it to the top of the parent's linked list of windows; the scope controls whether you also bring its Window:ancestors the top of their parents' linked lists.