Different parts in a document hold data of a different purpose and different format, understandable to different part editors. OpenDoc must be able to associate a part editor only with data that the editor can properly manipulate, in order to avoid file corruption and to have meaningful drawing and editing. Therefore these two part properties, part kind and part category, have to be assigned for each part.
Part kind OpenDoc uses the concept of part kind, a typing scheme similar to file type, to determine which part editor is to be associated with a given part in a document. A part kind refers to the data format of a part's contents.
Part category A component category refers to a set of part kinds. A category describes the type of data contained in a part, such as styled text. For example, the category styled text includes the kinds.
The list of categories is maintained by CI Labs, a consortium that coordinates cross-platform OpenDoc development; Styled Text and Video are two examples of part categories. If SurfWriter is a MacWrite-like text editor, its part kind might be SurfWriter Text and would be in the styled text category. The SurfWriter editor would most likely allow translation from other part kinds in the same category.
View type Your part editor needs to assign the default view type for its embedded parts, which determines how each part is initially displayed, as an icon or in a frame.
° The icon for a part can be not only the standard 32-by-32 and 16-by-16 pixel sizes, but also a thumbnail icon (64-by-64 pixels). The thumbnail shows a miniature representation (a poster page) of the part's contents to help users identify the part.
° A part can be displayed with its contents in a bounded area called a frame (see "Frames and Facets" in topic 2.3.2.1), which allows editing in place (rather than requiring the part to be opened into a separate window). Frames are usually, but not necessarily, rectangular. A part's content may be displayed in more than one frame at a time and may have multiple representations; for example, a tabular part may be seen as a chart in one frame and as a text table in another.
In the finder, documents are displayed only as 32-by-32 or 16-by-16 pixel icons in the initial OpenDoc release; eventually thumbnail icons and frames will also be supported at the finder level.
Figure 14. Frame View for Parts Layout EditingUsers can change the view type with the Part Info command in the Edit menu (and possibly with accelerator commands, such as View as Icon, that are provided by the part editor). In Figure 14, frame view is desirable because it allows the user to see the graphic laid out in the document and to edit it in place. An icon view might be preferable for, say, a spreadsheet part that gives supporting data on a subject covered broadly in the text. Any frame may be reduced to an icon at any time, or any icon opened into a frame, without affecting the view type of any other part; however, the containing part may reflow content when an embedded part's view type is changed.
Except that a part may be edited only when its content is viewed in a frame, icons and frames are functionally equivalent. Operations such as drag and drop that may be applied to one may be applied to the other. Whether viewed as icons or in frames, embedded parts can be opened into separate windows if desired (although they're still embedded parts and not documents).