[top] [up] [next]

What is a window


A window is an entity which processes messages and usually controls a visible rectangular area. Messages are send by the operating system to the window and vice versa. These messages inform the window about its visible state, its size and many other properties.

Windows hierarchy

A window can have one or more child windows but each window can only have one parent window. While creating a window it is possible to specify the parent of a window, the new window is called the child window. If a parent window is destroyed all of its child windows are also destroyed.

Related methods:

A sibling of a window is a another window that has the same parent.

    pl_img95.gif (3124 bytes)
Size and position

The position of a window is expressed in pixels and it is the distance between the upper-left corner and the upper-left corner of its parent window. If the window has no parent window then the position is the distance between the upper-left corner of the window and the upper-left corner of the desktop window.

The size of a window includes the menu bar and border. The area including the menu bar and border is called the window rectangle. It is not possible to draw inside the area of the menu or the border. The area inside a window (excluding menu bar and border) is called the client area. The client area is the area in which a window can draw output.

A window may be minimized and maximized. A minimized window only draws an icon, a maximized window occupies the entire screen.

    pl_img96.gif (3481 bytes)

All windows are ordered on the Z-axis. The Z-order determines how windows overlap eachother. A window with a lower Z-order is below another window with a higher Z-order. The topmost window in the Z-order is completely visible and not covered by another window.

The active window is the window with which the user is currently working, the menu bar of the active window has a different color than the other visible windows. The active window also has the keyboard focus, this means that all keyboard messages are send to this window.

A window can be enabled and disabled by the method window::enable/1, a disabled window does not process any messages coming from the keyboard, mouse or any other input device.

[top] [up] [next]

 

info@trinc-prolog.com