Next: The MenuBar Up: The MainWindow Widget and Menus Previous: The MainWindow Widget and Menus

The MainWindow widget

The MainWindow is typically used as the top level container for an application's child widgets.

A MainWindow will usually consist of a menu bar along the top of the application and some work area below this as illustrated in Fig. 5.1.

Fig. 5.1 menu_cascade.c output

You can use menu bar items to perform selections directly. However, more usually a pulldown menu is attached to a menu bar item allowing greater selection opportunities.

The function of the work area is to perform the main application's functions. The work area can be any widget class. We will look at aspects of this later in the course.

In addition to the work area the MainWindow allows and manages a command area - where you can enter single-line commands, scrolling facilities and also a message area - where the program can write to.

For the moment let's concentrate on how to create menus in a MainWindow.


Dave.Marshall@cm.cf.ac.uk
Tue May 24 16:52:56 BST 1994