Important: The information in this document is obsolete and should not be used for new development.
CreateCyberPart
Creates a new Cyberdog display part to replace an opener part.
ODPart CreateCyberPart (in ODPart openerPart, in ODType partType, in ODEditor optionalEditor);
openerPart
- The opener part to be replaced by the new display part.
partType
- The part kind to create.
optionalEditor
- The part editor to create.
- return value
- The newly created part.
DISCUSSION
This method is called by a Cyberdog item during the opening process to create a new Cyberdog display part. This method determines the correct draft in which to create the new part by calling the specified opener part'sGetDestinationDraft
method.If
GetDestinationDraft
returns a draft, the opener part is contained in some OpenDoc document other than the Cyberdog session document;CreateCyberPart
creates the new part in the same draft that contains the opener part. IfGetDestinationDraft
returnskODNULL
, the opener part is contained in the session document. In this case,CreateCyberPart
callsCreatePartInCyberDocument
to create the new part in the Cyberdog session document.If you specify
kODNULL
for theoptionalEditor
parameter,CreateCyberPart
creates the default editor for the part kind specified by thepartType
parameter.Do not subclass this class.
SEE ALSO
TheCreatePartInCyberDocument
method (page 357).
TheCyberOpenerPartExtension::GetDestinationDraft
method (page 272).