Important: The information in this document is obsolete and should not be used for new development.
CyberPartExtension
- Superclasses
CyberExtension --> ODExtension --> ODRefCntObject --> ODObject
- Subclasses
- none
CyberPartExtension
defines extra behaviors for Cyberdog display parts, parts that display content referenced by a Cyberdog item.Description
TheCyberPartExtension
class is a part extension that allows an OpenDoc part to be a Cyberdog display part, a part that displays content referenced by a Cyberdog item.CyberPartExtension
is an abstract superclass that you must subclass and implement to create a Cyberdog display part. Any part that displays content referenced by a Cyberdog item must be composed of an object of classODPart
(or one of its subclasses) paired with an object of a class derived from theCyberPartExtension
class.The
CyberPartExtension
object is the public interface for a Cyberdog display part. External entities that want to communicate with a Cyberdog display part obtain the part'sCyberPartExtension
object and send the Cyberdog-related messages to it.A Cyberdog item's
Open
method creates a Cyberdog display part to display the content referenced by the Cyberdog item and calls the display part'sOpenCyberItem
method. Typically, theOpenCyberItem
method performs the following tasks:
The display part's
- It calls
SetCyberItem
to store a reference to the Cyberdog item in the display part.- It performs any tasks necessary to prepare to display the data referenced by the Cyberdog item. For example, the display part might request a stream from the Cyberdog item and use it to download the data referenced by the Cyberdog item.
- Calls its inherited
OpenCyberItem
method. If an opener part was passed in as a parameter toOpenCyberItem
, the inherited method calls the opener part'sOpenPart
method to open the display part. If no opener part was passed in,OpenCyberItem
calls the display part'sOpen
method.
ShowCyberItem
method, on the other hand, assumes that the display part is already displaying the content referenced by the Cyberdog item. You callShowCyberItem
once you have determined (by callingCanShowCyberItem
orGetCyberItemWindow
) that the display part is already displaying a Cyberdog item equal to (or, for example, on the same page as) the Cyberdog item whose referenced content you want to display. Typically, you callShowCyberItem
when you want a display part to scroll to display a particular Cyberdog item.Methods
This section presents summary descriptions of theCyberPartExtension
methods grouped according to purpose, followed by detailed descriptions.Initialization and Cleanup
Displaying Cyberdog Items
ICyberPartExtension
- Initializes this
CyberPartExtension
object.
Embedding Cyberdog Items
CanShowCyberItem
- Tests whether this part is displaying content referenced by the specified Cyberdog item.
GetCyberItem
- Retrieves the Cyberdog item whose referenced content is displayed by this part.
GetCyberItemWindow
- Retrieves the window in which a Cyberdog item's referenced content is displayed.
OpenCyberItem
- Opens a Cyberdog item in this display part.
SetCyberItem
- Assigns the specified Cyberdog item to this display part.
ShowCyberItem
- Displays the content referenced by the specified Cyberdog item in this display part.
Opening a Selected URL
AcquireSelectedCyberItems
- Acquires references to the selected Cyberdog items.
IsCyberItemSelected
- Tests whether any Cyberdog items are selected in this part.
Adding Commands
GetSelectedURL
- Retrieves the selected URL.
IsURLSelected
- Tests whether the selected text in this part is a URL.
HandleCommand
- Handles semantic events for this Cyberdog display part.
Methods
- AcquireSelectedCyberItems
- CanShowCyberItem
- GetCyberItem
- GetCyberItemWindow
- GetSelectedURL
- HandleCommand
- ICyberPartExtension
- IsCyberItemSelected
- IsURLSelected
- OpenCyberItem
- SetCyberItem
- ShowCyberItem