By default, when you create a window, the AVM parents that window transparently to the window system. In this way, windows you create are siblings of each other. You can also parent a window to another window by setting the one window’s PARENT attribute to the handle of the other. Windows that are parented to another window form a window family. A window parented directly to the window system can be called the root window of a window family. Windows parented by any child window, in turn, form a child window family. A window can be parented to only one other window at a time, but can have multiple child windows.

Window families share a number of properties that make them convenient for both applications and users to manage:

  • Coordinated viewing and hiding — When you view any member of a window family (by setting its VISIBLE attribute to true, setting its HIDDEN attribute to false, or using the VIEW statement), the whole window family is viewed unless the HIDDEN attribute is true for at least one other member. If HIDDEN is true for a parent or other ancestor of the window that is viewed, no windows in the family are viewed. The only effect is that the HIDDEN attribute for the window you try to view is set to false. If, on the other hand, any child or descendant window has HIDDEN set to true, then all the windows in the family are viewed, except the descendant window and its descendants. When you hide a member of a window family by setting its VISIBLE attribute to false, that window and all its descendants are hidden, but their HIDDEN attributes are not changed. In this way, you can hide and view an entire family of windows by changing the VISIBLE attribute of the top window. You can leave any window or part of a hierarchy of windows out of the hiding and viewing by setting the HIDDEN attribute of the window at the head of that part of the hierarchy to true.
  • Coordinated minimizing and restoring — When you minimize a window, all of its descendants disappear from view, unless they are already minimized. Any minimized descendants appear separately in the taskbar and can be restored individually. When you restore a parent window, any of its hidden descendants are redisplayed.
  • Coordinated close events — If a parent window receives a WINDOW-CLOSE event, it propagates the PARENT-WINDOW-CLOSE event to all of its descendant windows. ABL supports these as two separate events so that a procedure can react in a special way to the parent of its window being closed. The WINDOW-CLOSE event does not propagate any events upward to its parent window.