4.1 Types of Frames
Basically, two types of frames are available in XView: base frames and command frames.
The main frame of the application is called the base frame. The base frame resides on the
root window; its handle is passed to xv_main_loop() to begin application processing.
A special kind of frame, called a command frame, is created with a panel subwindow by
default. Command frames are useful as help frames, property frames and such deﬁned by
OPEN LOOK. Programmatically, a command frame is no different from a frame with one
subwindow that is a panel.
A base frame’s parent is the root window, whereas a subframe’s parent is another frame
(either a base frame or a subframe). When a frame goes away (quit or close), all of its child
windows, including subframes, also go away. For example, assume you create a command
subframe to display application-speciﬁc help. When this command subframe is activated, it
might display explanatory text along with an OK button to dismiss the help. If you close the
base frame, the help subframe also closes.
XView allows for multiple frames that are not children of the base frame. For instance, you
could create a help frame that is independent of the application’s base frame. The parent of
this frame is the root window of the display and not the base frame. The help frame will
remain visible even if the base frame goes away. The term subframe deﬁnes a relationship
among frames at creation time and a slight difference in functionality.
4.1.1 The Role of the Window Manager
It is important to understand what effect the window manager has in determining the appear-
ance and behavior of an XView frame. As mentioned earlier, many attributes deﬁned in the
FRAME package are really hints to the window manager. The window manager is responsible
for frame and window decoration, as well as the size and placement of windows on the
screen (screen geometry). That is, it is the window manager’s job to provide such decora-
tions as title bars and to set attributes such as the color of decorations. It also handles resiz-
ing windows, moving windows, closing windows (iconifying) and so on. The application can
ask the window manager to do things in a certain way, but the window manager is not obli-
gated to act on these requests.
For your application and the window manager to communicate properly, the window man-
ager must comply with the speciﬁcations in the Inter-Client Communication Conventions
).* Since the window manager is a client of the X server just as the applica-
tion is a client, the two clients must follow speciﬁed conventions to communicate with one
another. The FRAME package assumes it is communicating with an OPEN LOOK-compliant
window manager. If not, some of the frame attributes might not work as described here.
*The Inter-Client Communication Conventions Manual is reprinted as Appendix L of Volume Zero, X Protocol Ref-