Part editor and part handler are two terms that are used in the OpenDoc literature in a synonymous way, just as the words parts and components.There's little difference between the appearance of the OpenDoc window in Figure 13 and that of a similar window in a page-layout application of today; manipulation of the window contents, however, can be very different. When users interact with OpenDoc parts, the resulting behavior is determined by part editors and part viewers. A part editor is a full-featured OpenDoc software component that allows the creation, editing, and viewing of parts of a particular kind, just as a conventional application allows manipulation of documents now.
Figure 13. An OpenDoc Document with Different PartsLike applications, part editors are sold or licensed and are legally protected from unauthorized copying and distribution. You supply users with the part editor (which the user installs in the Editors folder in the System Folder) and also a stationery pad (which the user will double-click or drag to create an OpenDoc document or part).
A part viewer is a special, limited type of part editor that can display and print a particular kind of part but can't be used to create or edit such a part. Often a part viewer will just be a part editor with its editing and part-creation capabilities removed. It's important that part viewers be widely available, to allow portability of OpenDoc compound documents across machines and platforms. Wide availability of a particular part viewer encourages purchase and use of its equivalent part editor, because users will know that other users will be able to view parts created with that editor.
___ Note: ______________________________________________________________ | | | It may be possible to view a part even when neither its editor nor its | | viewer is present. The application might have to translate the part | | to be able to use another compatible editor. For example, suppose a | | user creates a document with a text editor named SurfWriter and sends | | it to someone who doesn't have the SurfWriter editor; the document is | | translated to a similar format supported by a text editor that the | | receiving user does have (see "Binding" in topic 2.4.1). | | | |________________________________________________________________________|
Users don't work with icons for part editors and part viewers the way they work with application icons today. Editors and viewers are not launched by double-clicking. The icons for editors and viewers have a unique shape. This shape provides maximum customizable space for your identifying elements, with no required badges or identifiers such as hands and pencils.
As a step toward becoming fully OpenDoc-compliant (that is, becoming part editors themselves), some applications will be converted to container applications, applications that allow parts to be embedded in their documents, much as some documents today allow the embedding of QuickTime format movies.
Many of today's applications have plug-in or extension APIs that may be used to add functionality to the application. These will continue to be important to extending the capabilities of part editors.
OpenDoc part handlers are the applications in the OpenDoc architecture. When a part is being displayed or edited, a part handler is invoked to perform those tasks. Just as an application performs basic editing, display, and printing tasks for a given document, part handlers perform these functions for parts.
Each part handler is responsible for the following basic functions:
° Rendering the part (both on-screen and printing). The part handler may be asked to display the part on a dynamic medium such as a screen or a static medium such as the printed page.
° Editing the part. The part handler must accept events and change the state of the part so that you can edit and script the part.
° Storage and memory management for the part. The part handler is able to read the part from the storage medium into the memory, and manages its association with the part. It is also able to write the part back out to storage medium.
A part and its part handler together form the equivalent of a programmatic object, in the object-oriented programming sense of the word. The OpenDoc part provides the data, while the part handler deals with the behavior of the data. When bound together, they form an editable segment of a document.