[previous] [up] [next]     [index]
Next: Geometry Management Up: Windowing Toolbox Overview Previous: Windowing Toolbox Overview

Core Windowing Classes

The fundamental graphical element in MrEd's windowing toolbox is an area. The following classes implement the different types of areas in the windowing toolbox:

As suggested by the above listing, certain areas, called containers, manage certain other areas, called containees. Some areas, such as panels, are both containers and containees.

Most areas are windows, but some are non-windows. A window, such as a panel, has a graphical representation,[footnote] receives keyboard and mouse events, and can be disabled or hidden. In contrast, a non-window, such as a pane, is useful only for geomerty management; a non-window does not receive mouse events, and it cannot be disabled or hidden.

Every area is an instance of the area<%> interface. Each container is also an instance of the area-container<%> interface, whereas each containee is an instance of subarea<%>. Windows are instances of window<%>. The area-container<%>, subarea<%>, and window<%> interfaces are subinterfaces of area<%>. Figure 2.1 shows more of the type hierarchy under area<%>.

                           area<%>
       ______________________|_______________
       |                  |                 |
  subarea<%>          window<%>      area-container<%>      
       |____       _______|__________       |
            |      |                |       |
           subwindow<%>          area-container-window<%>
        ________|________                |
        |               |                |
     control<%>       canvas<%>   top-level-window<%>

-- Figure: Core area type hierarchy --

Figure 2.2 extends the previous figure to show the complete type hierarchy under area<%>.[footnote] To avoid intersecting lines, the hierarchy is drawn for a cylindrical surface; lines from subarea<%> and subwindow<%> wrap from the left edge of the diagram to the right edge.

                           area<%>
        _____________________|_______________
        |               |                   |
      subarea<%>     window<%>       area-container<%>      
<<<____|____       _____|__________       __|___  ___________________<<<
            |      |              |       |    |  |                  
           subwindow<%>           |       |    |  |                  
<<<______________|___________     |       |    |  |                 _<<<
            |               |     |       |    pane%                |
       control<%>           |     |       |     |- horizontal-pane% |
        |- message%         |     |       |     |- vertical-pane%   |
        |- button%          |     |       |                         |
        |- check-box%       |  area-container-window<%>             |
        |- slider%          |        |                              |
        |- gauge%           |        |            __________________|
        |- text-field%      |        |            |   
        |- radio-box%       |        |-------- panel%       
        |- list-control<%>  |        |          |- horizontal-panel%
            |- choice%      |        |          |- vertical-panel%
            |- list-box%    |        |          
                            |        |- top-level-window<%>
                            |           |- frame% 
                            |           |- dialog%
                         canvas<%>
                          |- canvas%
                          |- editor-canvas%

-- Figure: Complete area type hierarchy (drawn on a cylinder with wraparound lines) --

Menu bars, menus, and menu items are graphical elements, but not areas (i.e., they do not have all of the properties that are common to areas, such as an adjustable graphical size). Instead, the menu classes form a separate container-containee hierarchy:

The complete type hierarchy for the menu system is shown in Figure 2.3.

menu-item<%>                menu-item-container<%>
    |                              |
    |- separator-menu-item%   _____|___
    |- labelled-menu-item<%>  |       |- menu-bar%
        _________|_________   |       |- popup-menu%
        |                 |   | 
        |                 menu%
        |
        |- selectable-menu-item<%>
            |- menu-item%
            |- checkable-menu-item%

-- Figure: Menu type hierarchy --


[previous] [up] [next]     [index]
Next: Geometry Management Up: Windowing Toolbox Overview Previous: Windowing Toolbox Overview

PLT