Layered Architecture of Graphical User-Interfaces
- Window systems with overlapping windows and menus and dialog boxes that
pop up give a "two and a half D" impression. Windows appear to be
on top of each other, and one can raise and lower windows.
- User-interfaces in a window system need not be aware of the absolute
position of windows on the screen. The window system itself handles the
necessary offsets.
- The window system's support toolkit offers the same possibility:
most widgets (window gadgets) operate independently of their position
within the application's window and also independently of their position
on the screen.
- A user-interface is built in two and a half D by placing objects
on top of each other: a menu is placed on top of a window;
buttons are placed on top of the menu, etc.
When the window is moved, all the widgets that are placed on top of that
window move as well.
- When an application receives (keyboard or mouse) events it has to
figure out which widget should handle the event.
Each widget wishes to handle some events, and possibly to ignore some
other events.
The window system's toolkit offers methods for widgets to indicate which
events they wish to handle.
An event is sent to the "top most" widget. If it handles it, none of
the lower widgets see the event. If it ignores it, the event is passed
to the lower widget, and thus down to the topmost event that handles
the event.