Windows: Windows, Alerts, and File Panels


Windows, Alerts, and File Panels

A window is an area on the screen that your application can draw into. Everything that's displayed on the screen is displayed within the bounds of a window. A window's real estate is divided into "content area" and "window dressing." Your app draws in the content area; the window dressing—the title tab, border, and resize control—is drawn automatically by the window.

Windows are created through the BWindow class.

An alert is a type of window that displays an alert icon, a message of some sort, and a set of buttons that gives the user the opportunity to respond to the message. You use an alert to signal situations that require the user's immediate attention, such as errors, unsaved changes, and the like. Alerts are much more uniform in appearance than windows; they all look pretty much like this:

Alerts are created through the BAlert class, which inherits from BWindow.

A file panel is a window that lets the user open or save a file. The panel provides a navigable file list and associated controls:

File panels are created through the BFilePanel class (which creates a BWindow, but doesn't inherit from it).


Groundrules

The fundamental window characteristics are these:

Windows are rectangular, and their sides are parallel to the screen's sides. You can't create round or oddly-shaped windows, nor can you rotate a window so it sits at an angle to the screen's coordinate system.

Windows are non-transparent. You can't "see through" a window. When a window is updated (redrawn), the content area is filled with opaque white.

Windows are non-hierarchical. You can't create a window within another window.


The Rest of this Chapter...

The rest of this chapter is divided into three sections:






The Be Book,
...in lovely HTML...
for BeOS Genki.

Copyright © 1999 Be, Inc. All rights reserved.

Text last modified April 20, 1999.