2 Bitmaps, Viewports, and Windows
Viewports and windows are mappings between bitmaps and the screen. Thus, the pixels on the screen in a viewport or a window's screen clipping region correspond to the bits on the underlying bitmap.
Unlike a viewport, a window can have a title, borders, a bitmap output stream, and a mouse input stream. The title and borders are optional and are specifiable. The input and output streams make input to and output from the window more convenient. In most other ways windows and viewports are the same, and any Window Tool Kit function that accepts a viewport as an argument also accepts a window.
A viewport or window is always created with an associated bitmap; if you do not supply a bitmap, a new one is created automatically. All viewports and windows have associated bitmaps; however, a bitmap can be created and kept independent of a viewport or window. A bitmap can be associated with a viewport or window at any time or not at all. Since all viewports and windows have associated bitmaps, any function that accepts a bitmap as an argument also accepts a viewport or a window and uses the viewport or window's associated bitmap.
Unlike bitmaps, which have no screen location, viewports and windows can be moved, reshaped, deactivated, activated, hidden, or exposed. All viewports and windows are present in the viewport hierarchy, which describes the relationships between all viewports and windows in the Window Tool Kit. Functions are provided that allow you to change these relationships and to control how viewports or windows overlap.
Note: You cannot perform the following operations unless the Window Tool Kit has been initialized:
Generated with Harlequin WebMaker