The View and Displayer Classes

Tycho's View and Displayer classes act in concert to present a window to the user containing graphics and text editors, and other kinds of display. A Displayer is a top-level window; a View is a widget that can be placed into a Displayer. Displayer is used as-is; View is an abstract class that is subclassed in order to provide appropriate functionality. Displayers can contain more than one View; some Views can themselves contain other Views.

Note: Although the Displayer-View architecture is designed to support multiple view of data within the one top-level window, this functionality is not yet used anywhere within Tycho. The rest of this description will onyl place a single view into each displayer.

Creating a new Displayer is the same as creating any other widget:

::tycho::Displayer .d
.d centerOnScreen
You will see an empty displayer containing a status bar. A view is created as a child of the displayer; for example, we can create a text editor and it will place itself into its displayer:
::tycho::Edit .d.e -name aView
set bogus ""
The Edit widget has placed itself into the Displayer and configured its menubar. To better illustrate this, we'll just use an empty View. First delete the Edit view:
.d destroyView aView

Finally, deleting a Displayer and the Views contained in it is the same as deleting any other widget:

delete object .d

Decorator classes
Displayer class documentation
View class documentation
Tycho Home Page


Copyright © 1996, The Regents of the University of California. All rights reserved.
Last updated: 96/12/13, comments to: tycho@eecs.berkeley.edu