Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Cyberdog Programmer's Kit / Part 3 - Cyberdog Reference
Chapter 7 - Classes and Methods


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

The CyberPartExtension 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 class ODPart (or one of its subclasses) paired with an object of a class derived from the CyberPartExtension 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's CyberPartExtension 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's OpenCyberItem method. Typically, the OpenCyberItem method performs the following tasks:

The display part's ShowCyberItem method, on the other hand, assumes that the display part is already displaying the content referenced by the Cyberdog item. You call ShowCyberItem once you have determined (by calling CanShowCyberItem or GetCyberItemWindow) 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 call ShowCyberItem when you want a display part to scroll to display a particular Cyberdog item.

Methods

This section presents summary descriptions of the CyberPartExtension methods grouped according to purpose, followed by detailed descriptions.

Initialization and Cleanup

ICyberPartExtension
Initializes this CyberPartExtension object.
Displaying 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.
Embedding Cyberdog Items

AcquireSelectedCyberItems
Acquires references to the selected Cyberdog items.
IsCyberItemSelected
Tests whether any Cyberdog items are selected in this part.
Opening a Selected URL

GetSelectedURL
Retrieves the selected URL.
IsURLSelected
Tests whether the selected text in this part is a URL.
Adding Commands

HandleCommand
Handles semantic events for this Cyberdog display part.

Methods
AcquireSelectedCyberItems
CanShowCyberItem
GetCyberItem
GetCyberItemWindow
GetSelectedURL
HandleCommand
ICyberPartExtension
IsCyberItemSelected
IsURLSelected
OpenCyberItem
SetCyberItem
ShowCyberItem

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996