CreateFrame
TheCreateFramemethod creates a new frame in this draft.
ODFrame CreateFrame (in ODObjectType frameType, in ODFrame containingFrame, in ODShape frameShape, in ODCanvas biasCanvas, in ODPart part, in ODTypeToken viewType, in ODTypeToken presentation, in ODBoolean isSubframe, in ODBoolean isOverlaid);
frameType- The type of the frame to be created. The frame type must be either a regular frame (
kODFrameObject) or a nonpersistent frame (kODNonPersistentFrameObject).containingFrame- A reference to the containing frame of the frame being created.
frameShape- A reference to the frame shape to be created.
biasCanvas- A reference to the canvas to whose coordinate space the new frame is biased, or
kODNULLto use the standard platform coordinate bias.part- A reference to the part to be displayed in the new frame.
viewType- A tokenized string representing the initial view type for the new frame.
presentation- The initial presentation for the new frame.
isSubframe- kODTrue if the new frame is a subframe, otherwise
kODFalse.isOverlaidkODTrueif the new frame should be an overlaid frame, otherwisekODFalse.- return value
- A reference to the newly created frame object.
DISCUSSION
This method constructs and returns a frame object in this draft; the new frame has the characteristics specified by parameters. You can create a regular frame (kODFrameObject) only if this draft's current permissions provide write access.The
viewTypeparameter must be the tokenized form of one of the view-type constants (kODViewAsFrame,kODViewAsLargeIcon,kODViewAsSmallIcon, orkODViewAsThumbnail). You can call the session object'sTokenizemethod to obtain a token corresponding to one of these constants.This method initializes the reference count of the returned frame. When you have finished using that frame, you should call its
Releasemethod.If this method executes successfully, it marks this draft as dirty.
EXCEPTIONS
kODErrCannotCreateFrame- Cannot create the frame object.
kODErrInvalidObjectType- The specified frame type is not
kODFrameObjectorkODNonPersistentFrameObject.SEE ALSO
TheODObjectTypetype (page 903).
TheODTypeTokentype (page 877).
TheODDraft::AcquireFramemethod (page 153).
TheODSession::Tokenizemethod (page 622).
TheODFrameclass (page 294).
"Creating a New Embedded Frame" on page 119 in OpenDoc Programmer's Guide.
"Adding an Embedded Part" on page 305 in OpenDoc Programmer's Guide.
"Embedding a Single Part" on page 347 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.