ObjectView
The objectView class provides a generic framework for editors which
manipulate structured graphics.
It is abstract in that it does not define the behavior of its
components or how they are represented.
However, it provides the common functions required to:
- select elements
- move elements (dragging)
- scroll the document in both directions
- redraw elements as uncovered
- zoom in/out
Concrete subclasses have to define how elements are to be highlighted and
what to do when elements are (double) clicked upon.
ObjectViews can operate on any object which responds to some basic protocol,
which consists of:
- returning its boundary
- hit-detection when given a point in 2D space
- redraw itself in a graphicContext
Concrete examples of how objectView is used are found in DrawTool
,
LogicTool
and DirectoryView
.
ObjectView has proven to provide a very valuable framework for this kind of
editor - saving lots of coding work. Several commercial applications
have been built basing the graphic on sibclasses of it.
Copyright © 1995 Claus Gittinger Development & Consulting
<cg at exept.de>
Doc $Revision: 1.14 $ $Date: 2021/03/13 18:24:50 $