Windows

A window is a generic term for a rectangular area on the screen that behaves in a well defined manner. All windows have basic properties (such as size, position, boundaries, and visibility), and behavior (such as the ability to receive mouse or keyboard input, or to paint when visible).

The IWindow class is the base class for all windows. This class lets you query and set properties shared by all windows. However, you rarely need to create an IWindow object. Instead, create objects of classes derived from IWindow to represent specific types of windows, such as an IFrameWindow object to represent a frame window. Create an IWindow object (for example, from a window handle) only when the specific type of presentation system window is either unknown or unimportant.

ngaix.gif (1051 bytes)An IWindow object is designed to represent a Motif widget.

Frame Windows
A frame window provides the basic structure and support for the elements of an application. You can create and manipulate frame windows with the IFrameWindow class. The frame window provides support for basic components and features such as the following:

The frame window also coordinates these basic elements with the client window.

You can associate a frame window with a set of resources. (Resources are user-interface components, such as text strings, menu bars, icons, bitmaps, and keyboard accelerator tables, that you define in a separate file.)

The client window contains application-specific material; it should be the reason why your frame window exists in the first place. Thus, your application should display or collect data from the user via the client window. The client window fills the client area, the portion of the frame window not occupied by the basic frame components or the frame extensions.

You can add frame extensions to the frame window. A frame extension is a rectangular region that you can add to the outside edge of the client area of a frame window. You can add controls into frame extensions. You can place a frame extension left, right, above, or below the client area of a frame window. The information area implemented by the IInfoArea class is an example of a frame extension.

Presentation System
The presentation system is the windowing system for the operating system.

Desktop Window
The desktop window is the window that represents the entire screen. The IWindow::desktopWindow() function returns an IWindow object that represents the desktop window.

Controls
A control is a specialized window that provides a general-purpose interface, such as buttons, entry fields, and list boxes.

ngaix.gif (1051 bytes)The AIX platform uses the term widgets for controls.

An aggregate or a compound control is a window that is actually comprised of more than one widget or control. The following are examples of aggregates:

Input Focus
The input focus determines which window receives all keyboard input. Only one window at a time may have input focus. A window indicates that it has input focus through a visual cue. For example, when an entry field has the input focus, it displays an input cursor. When a push button has the input focus, it becomes highlighted

The input focus does not determine which window receives mouse input. Instead, the presentation system uses the position of the mouse pointer to determine the window to send mouse input. First it checks whether the topmost window underneath the pointer accepts mouse input. If the window does, it sends the mouse message to that window. If not, it checks the window underneath that window and continues to the desktop window until it finds a window that accepts mouse input, and sends the mouse message there. Some controls, such as static text on some platforms, ignore mouse input.


ngrelc.gif (533 bytes)
Window Relationships
Events and Event Handlers
Resources

ngrelt.gif (466 bytes)
Create a Frame Window
Write an Event Handler
Task and Samples Cross-Reference Table