The ctview is a viewing tool which allows us to manipulate
programs through a graphical interface. Clicking on the
button in the View pulldown of the Centaur main menu opens a new
ctview which contains an empty Centaur editor, called
a ctedit. The ctedit is in charge of displaying
information and communicating with the X server (thus, it handles mouse
events, keyboard events, etc.) The ctedit contains two items: its
subject, which is the thing being edited, and its formatter, which determines the subject's visual presentation. In this
tutorial, the ctedit's subject is a Centaur variable
structure.
The
formatter will be the Ppml formatter, which displays a syntax tree
textually.
Each ctview menu bar has the following pulldown menus:
When we read a program written in L into a ctview, Centaur loads the L environment which typically decorates the ctview with a graphic interface for L tools. If we have described a graphical environment for L, the ctview is transformed by the addition of the environment's buttons, menus, mouse behavior, etc. The enclosed ctedit becomes a structured editor that only allows edition according to L's syntax definition.