Scroll to navigation

Scene(3I) InterViews Reference Manual Scene(3I)

NAME

Scene, MonoScene - composite interactors

SYNOPSIS

#include <InterViews/scene.h>

DESCRIPTION

Scene is the base class for all interactors that are defined in terms of one or more instances of other interactors. MonoScene is a subclass for scenes that contain a single instance. A monoscene's shape is copied from its component and the component's canvas is given the same size and location as the monoscene's canvas.

When a scene is deleted, it should delete all its component interactors. A monoscene deletes its existing component if a new component is inserted.

PUBLIC OPERATIONS

Add an interactor to the scene, optionally aligned with respect to a specific position relative to the lower-left corner of the scene. Valid alignment types are TopLeft, TopCenter, TopRight, CenterLeft, Center, CenterRight, BottomLeft, BottomCenter, BottomRight, Left, Right, Top, Bottom, HorizCenter, and VertCenter. The scene uses the interactor's desired shape, if it has non-zero width, to size the interactor. The base scene class always calls Wrap and DoInsert from Insert; thus subclasses only implement DoInsert (and Wrap if they want to wrap additional interactors around the inserted interactor) and users only call Insert. In the case of a monoscene, the current interior interactor, if not nil, is deleted and replaced by the given interactor. If an interactor is inserted into a scene that is already mapped, the interactor and its descendants will be configured before DoInsert is called.
Change notifies a scene that a given interactor has changed its desired shape. If the propagate flag associated with the scene is true, Change will call DoChange and then Change(this) on the scene's parent. If the propagate flag is false, Resize will be called instead. The propagate flag is true by default and can be set with the Propagate operation.
Request that an interactor be moved to the given coordinates using the given alignment. As with Insert and Change, users call Move and subclasses implement DoMove.
Remove an interactor from a scene. Users call Remove and subclasses implement DoRemove.
Put the interactor's canvas below all others in the scene, potentially obscuring it. Users call Lower and subclasses implement DoLower.
Put the interactor's canvas above all others in the scene, making it fully visible. Users call Raise and subclasses implement DoRaise.

PROTECTED OPERATIONS

Construct a new scene or monoscene. Scenes and monoscenes are abstract classes; thus, the constructors should only be called implicitly by subclass constructors.
Assign an interactor's canvas to be a given region of the scene's canvas. Unless the optional sixth parameter is false, the interactor will be mapped. If the interactor is already assigned the given position and size, then this operation will have no effect. This optimization means that a scene can place all of its elements in response to a Change and be assured that only those elements that have really changed will be redrawn.
Make the interactor visible on the display if and when the scene is visible. Unless the optional second parameter is false, the interactor will be raised to the top of the scene.
Make the interactor not be visible on the display if and when the scene is visible.
Let the user interact with the window manager to specify the size and location of the interactor's canvas, whose default width and height must also be supplied by the program.

SEE ALSO

Canvas(3I), Interactor(3I), Shape(3I)

7 Mar 1989 InterViews