Architecture of an editor
Editor fills in the central role of coordinator between the data model and the different components of the interface. The function calls are in black with black arrows. Notification messages are in italics with blue arrows.
Model is the data model which also directly manages an Undo which is not on the diagram. A model notifies the messages modeSet, modelValueChanged and undoValueChanged. A model can go through a Delegate to read and write data. A delegate can for example write the data in JSON in a cookie, in the storage of the navigator or in a file or a BD through a HTTP server.
View displays the result of editing the data. The editor updates the view as soon as the model changes. NOTE: The instance of View is optional.
Inspector is a group of instances of specialized inspectors which all send the nofication message inspectorValueChanged. Depending on the sender of the message, the editor knows which property has been modified and can call the corresponding modification function of the model.
UndoPanel displays two buttons which respectively notify the messages undo and redo. When the state of the Undo of the model changes, the editor enables or disables these buttons. NOTE: The instance of UndoPanel is optional.
A ClipEditor is an Editor with the option to display the duration of a clip.
ClipModel is standard data model which the programmer must use in prevision of an extension.
Clip is a View which displays the clip for the editor. The editor updates it as soon as the model changes.
Timing is a simple view which the editor can use to display the duration of the clip. NOTE: The instance of Timing is optional.