The logical structure of a document, which underlies its graphical presentation, consists of the embedding relationships among its parts and their frames as shown in Figure 11.
A frame is an area of the display screen that represents a component. Frames are normally rectangular, but they need not be.
Like icons, frames can do the following:
° Provide a handle onto parts, allowing parts to be manipulated as a whole
° Be dragged on the desktop and between windows
° Be the target for drops during drag operations
° Be opened into windows and closed back into frames
° Be closed into icons and reopened back into frames
Unlike an icon, however, a frame allows a part's contents to be seen and edited.
Frames show how a document is composed of embedded parts.
Frames allow a part's content to be edited in place, without requiring the user to open separate windows. In addition, there may be many frames showing the content of a single part.
For example, when editing a 3D drawing, the user may wish to see a top view, side view, face-on view, and wire-frame view. Or, a part might provide a graphical and tabular view of its contents. Or, the header on a page layout part might be showing the same part on each page of a document. Any change the user makes in one frame is immediately reflected in all other visible frames on the same part. Because different kinds of parts have different requirements for passing changes to all frames, OpenDoc provides the capability but does not specify the interface.
Frames (like icons) can be opened into windows. Such windows are transitory views; that means they are not permanent representations of components, while frames are persistent. When a frame is opened into a window, the frame remains visible in its place. Because frames already show the contents of parts, one might ask why one would open a frame into a window. The answer is that some parts contain more content than can be displayed in their frames. For example, a spreadsheet part may be quite large, with only a portion of it appearing in a particular frame. Opening it into a window allows the entire spreadsheet to be seen and edited and allows the user to adjust which portion will appear in the frame.
The preferred representation of contained parts is a property of the container. Some parts, such as folders, prefer to show embedded parts as icons. Others, such as text documents, prefer to show them as frames. When a part is copied from a Desktop folder to an OpenDoc document, the copied part changes its representation from an icon to a frame. On the other hand, when a part is copied from an OpenDoc document to a desktop folder, the copied part changes its representation from a frame to an icon. In either case, the contents or properties of the copied part do not change, but once inside a container, a part's representations may be specified on a part-by-part basis.
The containing part tracks all frames directly embedded within it. An embedded part is logically contained in its containing part, just as its frame is visually embedded in the containing part's frame. A containing part treats its embedded frames as regular elements of its own content. It can move, select, delete, or otherwise manipulate them, without regard to what they display and what data kind they are. The embedded part itself, however, takes care of drawing its contents and event handling within an embedded frame.
The components must render themselves within their frame shape.
Those frames may have any shape, for example, square, uneven linear or any other shape. The frames may even overlay each other. The actual rendering is done by using facets. The facets represent the actual drawing surface associated with a components frame. They simplify the determination of the drawing location and the event dispatching. Facets are only needed when a frame becomes visible.
Figure 11. OpenDoc Frames and Facets
If a part is dragged into another part, frame negotiations take place as shown in Figure 12. The embedded component in this example is indicated by the black solid pattern. The required space of the dragged part may exceed the page limit or may be in conflict with the layout of the containing part, so both have to agree on a common layout. The containing component has the last decision. OpenDoc enables these negotiations by providing a common interface.
Figure 12. OpenDoc Frame Negotiation