1999-12-08 15:04:57 +00:00
|
|
|
|
|
|
|
Notes on implementation
|
|
|
|
=======================
|
|
|
|
|
|
|
|
|
|
|
|
The IB documentation on how object selection is managed and how editors and
|
|
|
|
inspectors are used is unclear ... so I've gone my own way.
|
|
|
|
|
|
|
|
1. When a document is loaded, the document object creates an editor attached
|
|
|
|
to each top-level object in the user interface (NSMenu and NSWindow objects).
|
|
|
|
|
|
|
|
These editors must be aware of their edited objects being clicked upon, and
|
|
|
|
clicking on one of these should cause the corresponding editor to become the
|
|
|
|
active editor.
|
|
|
|
|
|
|
|
The active editor is responsible for handling selection of the edited object
|
|
|
|
(and any objects below it in the object hierarchy). Upon change of selection,
|
|
|
|
the editor is responsible for sending an IBSelectionChangedNotification with
|
|
|
|
the selection owner (normally the editor itsself) as the notification owner.
|
|
|
|
|
|
|
|
The main application watches for these notifications in order to keep track
|
|
|
|
of who has the selection.
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
Connections
|
|
|
|
===========
|
|
|
|
The connection API is the same as that for IB, but with the extension that the
|
|
|
|
document object must implement [-windowAndRect:forObject:] to return the
|
|
|
|
window in which the object is being displayed, and the rectangle enclosing
|
|
|
|
the object (in window base coordinates).
|
|
|
|
|
|
|
|
This information is neede by Gorm so that it can mark the connection.
|
|
|
|
|
|
|
|
The editors mananging the drag-and-drop operation for a connection must call
|
|
|
|
[NSApp -displayConnectionBetween:and:] to tell Gorm to update its display.
|
|
|
|
This method sets the values currently returned by
|
|
|
|
[BSApp -connectSource] and [NSApp -connectDestination]
|
|
|
|
|