Overview

Windows in FreeWorld OS can have parent-child relationships, creating a hierarchical window structure similar to Windows and other modern operating systems.

Window Hierarchy

Parent-Child Relationships

  • Top-level Windows - Windows with no parent (desktop windows)
  • Child Windows - Windows with a parent (dialogs, controls)
  • Owned Windows - Modal dialogs owned by parent

Z-Ordering

Windows are ordered by z-index, with child windows always appearing above their parents. The window manager maintains z-order for proper rendering.

Window States

  • Normal - Standard window state
  • Minimized - Window minimized to taskbar
  • Maximized - Window fills screen
  • Hidden - Window not visible
  • Modal - Window blocks parent interaction

Window Manager Functions

  • createWindow(parent, x, y, width, height) - Create window
  • setParent(window, parent) - Set window parent
  • bringToFront(window) - Bring window to front
  • setZOrder(window, z) - Set window z-order