DYNAMIC LINKING SYSTEM

Abstract: A method and system for selecting a location in a first document, selecting a location in a second document, performing an action on the second document and performing the identical action on the first document at the defined location. An alternative embodiment links a first objet to a second object and performs an action, such as launching an application of the second object, and remembering the location where the document was last accessed. Another embodiment, termed the whole model embodiment, provides an anchor to an entire object. The anchor enables an action to be applied to the whole object. For example, to copy data from a clipboard object, the copy command is directed to the anchor of the clipboard object. Still another embodiment provides an anchor representative of the first misspelled word or highest value in a document or a spreadsheet.

Description: DYNAMIC LINKING SYSTEM COPYRIGAHT NOTIFICATION Portions of this patent application contain materials that are subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever. CROSS-REFERENCE TO RELATED PATENT APPLICATIONS This patent application is related to the patent application entitled Object Oriented Framework System, by Debra L. Orton, David B. Goldsmith, Christopher P. Moeller, and Andrew G. Heninger, filed 12/23/92, and assigned to Taligent, the disclosure of which is hereby incorporated by reference. Field of the Invention This invention generally relates to improvements in computer systems and more particularly to a system and method for linking operations and areas of information between documents. Background of the Invention Document processing is currently the most prevalent application of personal computer technology. Examples of state of the art word processing technology include the WordPerfect ® text processor and the Word text processor from Microsoft ® Corporation. These products are designed to rim on various operating systems and different hardware platforms. It would be convenient to share information between applications resident on a single hardware platform. This capability has been hard coded into some applications establishing an automatic update of business chart data by editing a graphic chart as illustrated in US Patent 4,674,043. However, dynamic anchoring of information in a first document and exchanging updates based on actions taken in a second document is not possible in today's word processing environment. Summary of the Invention Accordingly, it is a primary objective of the present invention to provide a system and method for selecting a location in a first document, selecting a location in a second document, performing an action on the second document and automatically performing the identical action on the first document at the defined location. An alternative embodiment links a first object to a second object and performs an action, such as launching an application of the second object, and remembering the location where the document was last accessed. Another embodiment, termed the whole model embodiment, provides an anchor to an entire object. The anchor enables an action to be applied to the whole object. For example, to copy data from a clipboard object, the copy command is directed to the whole object anchor of the clipboard object. Still another embodiment provides an anchor representative of the first misspelled word or highest value in a document or a spreadsheet. Brief Description of the Drawings Figure 1 is a block diagram of a personal computer system in accordance with a preferred embodiment- Figure 2 is an illustration of a document display with a selected area and an anchor in accordance with a preferred embodiment; Figure 3 is a flowchart presenting the processing that transpires in accordance with a preferred embodiment; Figure 4 is an illustration of a document display illustrating two documents with their corresponding anchors; Figure 5 is an illustration of a document display when a first command has been executed on a first document in accordance with a preferred embodiment; and Figure 6 is an illustration of a document display when a first command has been executed on a second anchored document in accordance with a preferred embodiment. Detailed Description Of The Invention The invention is preferably practiced in the context of an operating system resident on a personal computer such as the IBM ® PS/2 ® or Apple ® Macintosh ® computer. A representative hardware environment is depicted in Figure 1, which illustrates a typical hardware configuration of a workstation in accordance with the subject invention having a central processing unit 10, such as a conventional microprocessor, with a built in non-volatile storage 11, and a number of other units interconnected via a system bus 12. The workstation shown in Figure 1 includes a Random Access Memory (RAM) 14, Read Only Memory (ROM) 16, an I/O adapter 18 for connecting peripheral devices such as a disk unit 20, and a diskette unit 21 to the bus, a user interface adapter 22 for connecting a keyboard 24, a mouse 26, a speaker 28, a microphone 32, and /or other user interface devices such as a touch screen device (not shown) to the bus, a communication adapter 34 for connecting the workstation to a data processing network 23 and a display adapter 36 for connecting the bus to a display device 38. The workstation has resident thereon an operating system such as the Apple System/7 ® operating system. In a preferred embodiment, the invention is implemented in the C++ programming language using object oriented programming techniques. As will be understood by those skilled in the art, Object-Oriented Programming (OOP) objects are software entities comprising data structures and operations on the data. Together, these elements enable objects to model virtually any real-world entity in terms of its characteristics, represented by its data elements, and its behavior, represented by its data manipulation functions. In this way, objects can model concrete things like people and computers, and they can model abstract concepts like numbers or geometrical concepts. The benefits of object technology arise out of three basic principles: encapsulation, polymorphism and inheritance. Objects hide, or encapsulate, the internal structure of their data and the algorithms by which their functions work. Instead of exposing these implementation details, objects present interfaces that represent their abstractions cleanly with no extraneous information. Polymorphism takes encapsulation a step further. The idea is many shapes, one interface. A software component can make a request of another component without knowing exactly what that component is. The component that receives the request interprets it and figures out according to its variables and data, how to execute the request. The third principle is inheritance, which allows developers to reuse pre-existing design and code. This capability allows developers to avoid creating software from scratch. Rather, through inheritance, developers derive subclasses that inherit behaviors, which the developer then customizes to meet their particular needs. A prior art approach is to layer objects and class libraries in a procedural environment. Many application frameworks on the market take this design approach. In this design, there are one or more object layers on top of a monolithic operating system. While this approach utilizes all the principles of encapsulation, polymorphism, and inheritance in the object layer, and is a substantial improvement over procedural programming techniques, there are limitations to this approach. These difficulties arise from the fact that while it is easy for a developer to reuse their own objects, it is difficult to use objects from other systems and the developer still needs to reach into the lower non-object layers with procedural Operating System (OS) calls. . Another aspect of object oriented programming is a framework approach to application development. One of the most rational definitions of frameworks come from Ralph E. Johnson of the University of Illinois and Vincent F. Russo of Purdue. In their 1991 paper, Reusing Object-Oriented Designs, University of Illinois tech report UIUCDCS91-1696 they offer the following definition: "An abstract class is a design of a set of objects that collaborate to carry out a set of responsibilities. Thus, a framework is a set of object classes that collaborate to execute defined sets of computing responsibilities." From a programming standpoint, frameworks are essentially groups of interconnected object classes that provide a pre-fabricated structure of a working application. For example, a user interface framework might provide the support and "default" behavior of drawing windows, scrollbars, menus, etc. Since frameworks are based on object technology, this behavior can be inherited and overridden to allow developers to extend the framework and create customized solutions in a particular area of expertise. This is a major advantage over traditional programming since the programmer is not changing the original code, but rather extending the software. In addition, developers are not blindly working through layers of code because the framework provides architectural guidance and modeling but at the same time frees them to then supply the specific actions unique to the problem domain. From a business perspective, frameworks can be viewed as a way to encapsulate or embody expertise in a particular knowledge area. Corporate development organizations, Independent Software Vendors (ISV)s and systems integrators have acquired expertise in particular areas, such as manufacturing, accounting, or currency transactions. This expertise is embodied in their code. Frameworks allow these development organizations to capture and package the common characteristics of that expertise by embodying it in the organization's code. First, this allows developers to create or extend an application that utilizes the expertise, thus the problem gets solved once and the business rules and design are enforced and used consistently. Also, frameworks and the embodied expertise behind the frameworks have a strategic asset implication for those organizations who have acquired expertise in vertical markets such as manufacturing, accounting, or bio-technology would have a distribution mechanism for packaging, reselling, and deploying their expertise, and furthering the progress and dissemination of technology. Historically, frameworks have only recently emerged as a mainstream concept on personal computing platforms. This migration has been assisted by the availability of object-oriented languages, such as C++. Traditionally, C++ was found mostly on UNIX systems and researcher's workstations, rather than on Personal Computers in commercial settings. It is languages such as C++ and other object-oriented languages, such as Smalltalk and others, that enabled a number of university and research projects to produce the precursors to today's commercial frameworks and class libraries. Some examples of these are Interviews from Stanford University, the Andrew toolkit from Carnegie-Mellon University and University of Zurich's ET++ framework. There are many kinds of frameworks depending on what level of the system you are concerned with and what kind of problem you are trying to solve. The types of frameworks range from application frameworks that assist in developing the user interface, to lower level frameworks that provide basic system software services such as communications, printing, file systems support, graphics, etc. Commercial examples of application frameworks are MacApp (Apple), Bedrock (Symantec), OWL (Borland), NeXTStep App Kit (NeXT), and Smalltalk-80 MVC (ParcPlace) to name a few. Programming with frameworks requires a new way of thinking for developers accustomed to other kinds of systems. In fact, it is not like "programming" at all in the traditional sense. In old-style operating systems such as DOS or UNIX, the developer's own program provides all of the structure. The operating system provides services through system calls — the developer's program makes the calls when it needs the service and control returns when the service has been provided. The program structure is based on the flow-of-control, which is embodied in the code the developer writes. When frameworks are used, this is reversed. The developer is no longer responsible for the flow-of-control. The developer must forego the tendency to understand programming tasks in term of flow of execution. Rather, the thinking must be in terms of the responsibilities of the objects, which must rely on the framework to determine when the tasks should execute. Routines written by the developer are activated by code the developer did not write and that the developer never even sees. This flip-flop in control flow can be a significant psychological barrier for developers experienced only in procedural programming. Once this is understood, however, framework programming requires much less work than other types of programming. In the same way that an application framework provides the developer with prefab functionality, system frameworks, such as those included in a preferred embodiment, leverage the same concept by providing system level services, which developers, such as system programmers, use to subclass /override to create customized solutions. For example, consider a multi-media framework which could provide the foundation for supporting new and diverse devices such as audio, video, MIDI, animation, etc. The developer that needed to support a new kind of device would have to write a device driver. To do this with a framework, the developer only needs to supply the characteristics and behavior that is specific to that new device. The developer in this case supplies an implementation for certain member functions that will be called by the multi-media framework. An immediate benefit to the developer is that the generic code needed for each category of device is already provided by the multi-media framework. This means less code for the device driver developer to write, test, and debug. Another example of using system framework would be to have separate I/O frameworks for SCSI devices, NuBus cards, and graphics devices. Because there is inherited functionality, each framework provides support for common functionality found in its device category. Other developers could then depend on these consistent interfaces to all kinds of devices. A preferred embodiment takes the concept of frameworks and applies it throughout the entire system. For the commercial or corporate developer, systems integrator, or OEM, this means all the advantages that have been illustrated for a framework such as MacApp can be leveraged not only at the application level for such things as text and user interfaces, but also at the system level, for services such as graphics, multi-media, file systems, I/O, testing, etc. Application creation in the architecture of a preferred embodiment will essentially be like writing domain-specific puzzle pieces that adhere to the framework protocol. In this manner, the whole concept of programming changes. Instead of writing line after line of code that calls multiple API hierarchies, software will be developed by deriving classes from the preexisting frameworks within this environment, and then adding new behavior and /or overriding inherited behavior as desired. Thus, the developer's application becomes the collection of code that is written and shared with all the other framework applications. This is a powerful concept because developers will be able to build on each other's work. This also provides the developer the flexibility to customize as much or as little as needed. Some frameworks will be used just as they are. In some cases, the amount of customization will be minimal, so the puzzle piece the developer plugs in will be small. In other cases, the developer may make very extensive modifications and create something completely new. In a preferred embodiment, as shown in Figure 1, a program resident in the RAM 14, and under the control of the CPU 10, is responsible for managing various tasks using an object oriented document framework. Overview of Synchronization Links The system's document architecture provides the technology for linking. One part of this architecture includes the presentation and commands for general purpose data-oriented links. The linking architecture will also be used to implement other features that may not resemble the general purpose data linking human interface, such as annotation. In addition, third party developers may use the linking architecture to implement special capabilities in their own applications, like a calendar, or a classic hypertext environment. A synchronization link enables the same information to be seen in more than one location. The frequency and direction that the two pieces of information are updated with each other can be controlled at either end of the link. A link anchor is the special visual indication of the extent of the linked data in a document. Creating Links Creating a synchronization link is very similar to cut/copy and paste. To initiate a link, a user selects some data, using whatever means necessary and appropriate for the data type. Using the menu commands, the user would copy the selection. Then, in the desired destination, the user selects a command from a menu item and selects another command from the ensuing dialog box. Something can be copied, then pasted as a link later or more than once, even after the source document is closed. When the original source document is reopened, it will show the link anchor where the source data was copied from. A direct manipulation method would be to choose a special drag-with-link tool to drag the selection to the new location. Holding down the option and command keys would be a shortcut for getting into this tool. This adds together the semantic of the other two modifier keys - the option key for copy and the command key for reference link. The modifier keys, therefore, are a shortcut for getting into a tool. The Link Preferences menu item is available after a selection was pasted (or option dragged) and is still selected. Then, a user could copy and paste something in the normal manner, then while the pasted information was still selected, turn the link on to facilitate application of the command to another document. Deleting Deleting a link that only receives information would be just like deleting any other object. The source object would at some point be informed that the receiver no longer exists. Deleting a link that sends out information may require an alert to notify the user that deleting the link will affect parts of other documents. When a document is opened, a notification indicates that the sending link no longer exists. When a link source is deleted, it's receiving links will be embedded or absorbed data. Editing data A user interacts with linked data as they would with any other embedded or absorbed data. When linked data is selected, the anchor showing the extent of the link and commands pertaining to the linking capabilities are available in the menus. Depending on the privileges of the document and the properties of the link, the user may be able to fully edit and make changes, or may be restricted to only making selections in the data. When linked data is editable at either end, changes made in one end appear at the other end, in accord with how frequently the link is set to be updated. When a link's information flows only from one end to the other, the data on the receiving end is not editable, but it is selectable. Words and sentences can be selected inside a paragraph of linked text, for example. A document's privileges can also affect the editability of a link within that document. Linked information may be selectable but uneditable in a locked document. Selections containing links retain their links when copied and pasted. For example, copying and pasting a word from a linked sentence will copy and paste the link as well. Paste Special would allow the data to be pasted without the link. Linked extents can contain links, and overlap with other linked areas. How much the information can be changed in one end of the link without affecting the other end of the link is dependent on the implementation of that type of data. It is possible that through the use of styles users can make local changes to linked data. Following the link The other end of the link can be found by getting preferences ("Get info" or "Link info" menu items) on the link. A preferences panel contains an actual reference link to the other end. Or at the very least, it could contain a button labeled "Open source", "Open destination", "Open other end", or a list of the other ends of the link if there are more than one. Updating frequency and direction A newly created synchronization link will be created with certain default properties. A new link will push data on demand from the user, and a single direction - from the source to the destination. It will not be editable in the destination. These settings were chosen because they are safe and understandable. Changes to the data flow only in the direction that the link was created - from where the link originated to the new location. Changes to the data will only happen when the user requests them to happen. The user must explicitly turn on the options to have changes to the data flow both directions, or update more frequently. Preferences for the link can change any of these settings at either end of the link. The preference panel can be accessed whenever the link anchor is visible. A preference panel for a selected link will contain the following information and commands: • History of the link: created in..., goes to..., last updated on... • Update when: (default: none selected) - on close - on open - on date & time - on frequency • Open Source /Destination /Other end document • Unlink • Update now • Allow editing in destination (two way link) Changes to the data can be "pushed" out to the other end of the link. If the document containing the other end of the link is open, it will receive notification that new information is available. If the receiving document is closed at the time, it will get the notification and the new information when it is opened. A link can also "pull" data from the other end of the link. This can happen regardless of whether the document containing the other end is open or closed. If nothing has changed in the other end, the data received may not visibly change. A preferred embodiment creates dynamic anchors, which can be analogized to a sticky selection or a synchronized linkage. Selections are used to select a range (contiguous or discontiguous) of text or spreadsheet cells or a particular graphic in a draw document. An example of a selection is presented in Figure 2 at 210. An anchor is a selection that is valid over time and enables the recall of the selection through some other means. Usually there is a marker 220 associated with the selection. A user can click on the marker to make the selection current again. A link in a preferred embodiment is a connection between two anchors. An example of a dynamic anchor operation occurs when two selections and two supported operations push data across a link and pull data on the link. A unique characteristic of a preferred embodiment is the ability to support a dynamic location rather then a fixed location for the link. For example, if a user has two word processing documents, A and B, and an anchor is attached to a paragraph in document A and a corresponding paragraph in document B has another anchor attached to it, then data can be passed back and forth between the two documents using push and pull commands. The interesting thing about dynamic anchors is that the destination is unbound until the time that the link is activated. Rather than binding to a specific selection in a document, a dynamic binding can transpire. For example, a spelling checker can be dynamically bound to a document to select the first misspelled word in the document. Alternatively, by binding a spreadsheet, the largest value in the spreadsheet could be selected. Basically, the dynamic anchor allows a run time computation to occur to determine the actual, specific physical data you are linked to. Given a prior art linkage model in which everything in the model has been selected, and a link attached to it, then when additions are made to the model, the linkage does not include the newly added data, it only includes what was selected initially. With the dynamic, whole model anchor of a preferred embodiment, all data of the model is included, no matter how much was added later. The anchor is computed at the moment data is requested. Then, if more data is added to the model, it computes a different range for the anchor then would have been active initially. A copy of the data in a model is retrieved when a copy operation is performed from the clipboard. Then, a publish link operation is performed to the dynamic anchor that represents all the data in that model, and whenever a paste of clipboard data is requested, a query of the link is performed to pull the data across the link. This architecture exploits the implementation of dynamic anchors and enhances the ability to pull information across anchors and links to implement a clipboard. No special code is necessary beyond what is used by normal pushing and pulling data across a link. Figure 3 is a flowchart presenting the processing that transpires in accordance with a preferred embodiment. Processing commences at terminal 300 and immediately passes to function block 310 where the first and second objects are opened. The obects could be text documents, graphic images, spreadsheets or other computer applications. Then, at function block 320, an anchor location is created in the two objects. The anchor merely marks a selection area and abstractly specifies an action. The action is resolved at follow or lookup time. Function block 330 illustrates the creation processing for the follow command on the start_side. This processing selects the location of the link and creates the follow command at the start_side of the document. While this example has both the start_side and dest_side in two different documents, one of ordinary skill in the art will recognize that the two anchors could reside in the same document. Then, at function block 340, the command is sent to the dest_side to the other document's anchor. The send operation entails querying the linkage as shown in function block 350, setting the selection equal to the anchor, and scrolling the position of the anchor into view as set forth in function block 360. Then, the command applied at the start_side is applied at the dest_side as shown in function block 370. Finally, processing is completed at terminal 380. Figure 4 is an illustration of a document display illustrating two documents with their corresponding anchors. The two anchors appear at 410 and 420 as dashed lines around the selected area. As described above, the anchor in the source document 410 allows a command executed on the source document to be applied to the anchored destination document. Figure 5 is an illustration of a document display when a first command has been executed on a first document in accordance with a preferred embodiment. The command in this case is an update of the sales numbers appearing in the anchored area 500. Figure 6 is an illustration of a document display when a first command has been executed on a second anchored document in accordance with a preferred embodiment. In Figure 6, the source document has had a command applied to the anchored area at 600. The anchored area reflects the same changes as were made on the source document. Alternatively, in Figure 6, the largest value in the spreadsheet could be selected from the dynamic anchor at 600. Basically, the dynamic anchor allows a run time computation to occur to determine the actual, specific physical data of interest to a user. ANCHOR Program Listing C++ language /MAbstractModelAnchor/ class MAbstractModelAnchor : public MCollectible { public: virtual ~MAbstractModelAnchor(); virtual TStream& operator»=(TStream& towhere) const; virtual TStream& opera tor «=(TStream& fromwhere); virtual long Hash() const; virtual Boolean IsEqual(const MCollectible*) const; virtual void PrintMe() const; VersionDeclarationsMacro(MAbstractModelAnchor); TGloballD GetUniqueID() const; virtual void SetUniqueID(const TGlobalID&); virtual TModelSurrogate* CopyModelSurrogate() const = 0; virtual const TModelSurrogate* GetModelSurrogate() const = 0; virtual void SetModel(const TAbstractModel&) = 0; protected: MAbstractModelAnchor(const MAbstractModelAnchor&); MAbstractModelAnchor(); MAbstractModelAnchor& operator=(const MAbstractModelAnchor&); private: TGloballD fUniquelD; static const Versionlnfo kOriginalVersion; }; I * — * I /TModelAnchorSurrogate*/ class TModelAnchorSurrogate : public MAbstractModelAnchor { public: TModelAnchorSurrogate(const TModelAnchorSurrogate&); TModelAnchorSurrogate(const MAbstractModelAnchor&); TModelAnchorSurrogate(); virtual ~TModelAnchorSurrogate(); TModelAnchorSurrogate& operator = (const TModelAnchorSurrogate&); TModelAnchorSurrogate& operator= (const MAbstractModelAnchor&); virtual TStream& operator»=(TStream& towhere) const- virtual TStream& operator«=(TStream& fromwhere); virtual void PrintMe() const; MCollectibleDeclarationsMacro(TModelAnchorSurrogate); virtual TModelSurrogate* CopyModelSurrogate() const; virtual const TModelSurrogate* GetModelSurrogate() const; virtual void SetModel(const TAbstractModel&); // Check if surrogate is for valid anchor. virtual Boolean IsValid() const; virtual TModelAnchor* GetAnchor() const; // Data exchange virtual void - CreatePreferredTypeList(TSequence& theTypes) const; virtual TTypeDescription* ChoosePreferredType(const TSequence& theChoices, ETypeAcceptKind&) const; virtual TModel* CopyDataAndAnchors(const TTypeDescription& theType) const; // Constants static const TModelAnchorSurrogate& klnvalidAnchor; private: TModelSurrogateStreamer fModel; static const Versionlnfo kOriginalVersion; }; /*-*/ TModelAnchor*/ class TModelAnchor : public MAbstractModelAnchor, public TModelSelection { public: TModelAnchor(const TAbstractModel&, const TTime& modifydate ); TModelAnchor(const TModelSelection&, const TTime& modifydate); TModelAnchor(const TModelAnchor&); TModelAnchor(); TModelAnchor& opera tor= (const TModelAnchor&); virtual ~TModelAnchor(); virtual Boolean IsEqual(const MCollectible*) const; virtual TStream& operator»=(TStream& towhere) const; virtual TStream& operator«=(TStream& fromwhere); virtual void PrintMe() const; MCollectibleDeclarationsMacro(TModelAnchor); virtual void Touch(); virtual void GetModifyDate(TTime& theDate) const; virtual void SetModifyDate(const TTime& theDate); virtual void SetSelection(const TModelSelection& theSelection); virtual void AdoptSelection(TModelSelection* theSelection); virtual const TModelSelection* GetSelection() const; virtual void Follow(const TModelLinkSurrogate& theLink); virtual void Execute(const TModelLinkSurrogate& theLink, TModelCommand& theCommand); // TModelSelection overrides virtual TModelAnchor* CreateAnchor() const; virtual Boolean IsAnchorableO const; virtual Boolean IsReadable() const; virtual Boolean IsWriteable() const; virtual Boolean IsClearable() const; virtual void SetModel(const TAbstractModel& theModel); virtual TModelSurrogate" CopyModelSurrogateQ const; virtual const TModelSurrogate* GetModelSurrogateQ const; virtual void SetPresentation(const TPresentation& thePresentation); virtual void SetPresentation(const TPresentationSurrogate& thePresentation); virtual void CreatePreferredTypeList(TSequence& theTypes) const; virtual TTypeDescription* ChoosePreferredType(const TSequence& theChoices, ETypeAcceptKind&) const; virtual TModel* CopyDataAndAnchors() const; virtual TModel* CopyDataAndAnchors(const TTypeDescription& theType) const; virtual TModel* AbsorbDataAndAnchors(TModel* theData, TModelSelection*& theNewSelectionlfDifferent); virtual TModel* AbsorbDataAndAnchorsForUndoRedo(TModel* theData); virtual TModel* EmbedDataAndAnchors(TModel* theData, TModelSelection*& theNewSelectionlfDifferent); virtual TModel* ClearDataAndAnchors(TModelSelection*& theNewSelectionlfDifferent); virtual TModel* ClearDataAndAnchorsForUndoRedoQ; virtual TModel* ImportDataAndAnchors(TModel*) const; virtual Boolean IsA(const TToken& theType) const; virtual Boolean IsValid() const; virtual void SetValid(Boolean is Valid = TRUE); virtual Boolean IsEmptyO const; virtual void AddAnchor(const MAbstractModelAnchor& anAnchor); virtual void RemoveAnchor(const MAbstractModelAnchor& anAnchor); virtual void RemoveAllAnchors(); virtual TIterator* CreateAnchorIterator() const- virtual void AddModel(const TAbstractModel& aModel); virtual void RemoveModel(const TAbstractModel& aModel); virtual void RemoveAllModelsQ; virtual TIterator* CreateModelIterator() const; virtual TIterator* CreateSelectionlteratorQ const; virtual TModelSelection* CopyAndExtendToStart() const; virtual TModelSelection* CopyAndExtendToEndQ const; // Anchor attributes virtual void AddAttribute(const TAttributefe theAttribute); virtual void DeleteAttribute(const TAttribute& theName); virtual const TAttribute* Lookup Attribute (const TAttribute& theName) const; virtual void DeleteAllAttributes(); virtual TIterator* CreateAttributelteratorQ const; // Links virtual void AdoptLink(TModelLink* aLink); virtual TModelLink* OrphanLink(const TAbstractModelLink& aLink); virtual TModelLink* LookupLink(const TModelLinkSurrogate& aLink); virtual void DeleteAllLinks(); virtual TIterator* CreateLinkIterator() const; virtual void SetVisibility(Boolean visible = TRUE); virtual Boolean GetVisibilityQ const; virtual Boolean IsDynamicQ const; private: TTime fModifyStamp; TModelSelection* fSelection; TSimple AttributeGroup * fAttributes; TDeque fLinks; Boolean fVisible; static const Versionlnfo kOriginalVersion; #ifndef NOJNTERNAL public: virtual void Finalize AfterLookupO; #endif }; / *TDynamic Anchor* / class TDynamicAnchor : public TModelAnchor { public: virtual -TDynamicAnchorQ; virtual TStream& operator»=(TStream& towhere) const; virtual TStream& operator «=(TStream& fromwhere); virtual void PrintMe() const; VersionDeclarationsMacro(TDynamicAnchor); // TModelAnchor overrides virtual void SetVisibility(Boolean); virtual Boolean GetVisibility() const; virtual Boolean IsDynamicQ const; virtual void Finalize AfterLookup (); protected: TDynamicAnchor(const TAbstractModel&, const TGlobalID&); TDynamicAnchor(const TDynamicAnchor&); TDynamicAnchor(); TDynamic Anchor & operator= (const TDynamicAnchor&); virtual TModelSelection* CreateDynamicSelection() const = 0; private: static const Versionlnfo kOriginalVersion; }; /*— */ / *TCurrentSelection Anchor*/ class TCurrentSelectionAnchor : public TDynamicAnchor { public: TCurrentSelectionAnchor(const TAbstractModel&); TCurrentSelectionAnchor(const TCurrentSelectionAnchor&); TCurrentSelectionAnchor& operator= (const TCurrentSelectionAnchor&); virtual ~TCurrentSelectionAnchor(); virtual TStream& operator»=(TStream& towhere) const; virtual TStream& operator«=(TStream& fromwhere); virtual void PrintMe() const; MCollectibleDeclarationsMacro(TCurrentSelectionAnchor); protected: TCurrentSelectionAnchor(); virtual TModelSelection* CreateDynamicSelection() const; private: static const Versionlnfo kOriginalVersion; }; I*—* I TWholeModel Anchor*/ class TWholeModelAnchor : public TDynamicAnchor { public: TWholeModelAnchor(const TAbstractModel&); TWholeModelAnchor(const TWholeModelAnchor&); TWholeModelAnchor& operator= (const TWholeModelAnchor&); virtual ~TWholeModelAnchor(); virtual TStream& operator»=(TStream& towhere) const; virtual TStream& _ operator«=(TStream& fromwhere); virtual void PrintMe() const; MCollectibleDeclarationsMacro(TWholeModelAnchor); protected: TWholeModelAnchor(); virtual TModelSelection* CreateDynamicSelection() const; private: static const Versionlnfo kOriginalVersion; }; /*-*/ TAbstractModelLink*/ class TAbstractModelLink : public MCollectible { public: virtual -TAbstractModelLinkO; TGloballD GetUniqueID() const; virtual void SetUniqueID(const TGlobalID&); const TModelAnchorSurrogate* GetHere() const; const TModelAnchorSurrogate* GetThereQ const; VersionDeclarationsMacro(TAbstractModelLink); virtual TStream& operator»=(TStream& towhere) const; virtual TStream& operator«=(TStream& fromwhere); virtual long Hash() const; virtual Boolean IsEqual(const MCollectible*) const; virtual void PrintMe() const; protected: TAbstractModelLinkO; TAbstractModelLink(cons± TAbstractModelLink&); TAbstractModelLink(const TModelAnchorSurrogate& here, const TModelAnchorSurrogate& there); TAbstractModelLink& operator= (const TAbstractModelLink&); private: TGloballD fUniquelD; TModelAnchorSurrogate fHere; TModelAnchorSurrogate fThere; static const Versionlnfo kOriginalVersion; }; /*-*/ / *TModelLinkSurrogate* / class TModelLinkSurrogate : public TAbstractModelLink { public: TModelLinkSurrogate(const TModelLinkSurrogate&); TModelLinkSurrogate(const TAbstractModelLink&); TModelLinkSurrogate(); virtual TModelLinkSurrogate(); TModelLinkSurrogate& operator=(const TModelLinkSurrogate&); TModelLinkSurrogate& operator=(const TAbstractModelLink&); virtual TStream& operator»=(TStream& towhere) const; virtual TStream& operator«=(TStream& fromwhere); MCollectibleDeclarationsMacro(TModelLinkSurrogate); // Check if surrogate is for valid link, virtual Boolean IsValidQ const; // Constants static const TModelLinkSurrogate& klnvalidLink; static const Versionlnfo kOriginalVersion; }; TModelLink*/ class TModelLink : public TAbstractModelLink { public: TModelLink(const TModelAnchorSurrogate& here, const TModelAnchorSurrogate& there); TModelLink(const TModelLink&); TModelLink(); virtual -TModelLinkQ; TModelLinkfe operator = (const TModelLink&); virtual TStream& operator»=(TStream& towhere) const; virtual TStream& operator«=(TStream& fromwhere); MCollectibleDeclarationsMacro(TModelLink); // Link attributes virtual void AddAttribute(const TAttribute& theAttribute); virtual void Delete Attribute (const TAttribute& theName); virtual const TAttribute* LookupAttribute(const TAttribute& theName) const; virtual void DeleteAllAttributes(); virtual TIterator* CreateAttributelteratorQ const; virtual Boolean IsBidirectional() const; virtual void SetBidirectional(Boolean = TRUE); private: TSimpleAttributeGroup* fAttributes; Boolean fBidirectional; static const Versionlnfo kOriginalVersion; l. /- —*/ /TModelAnchorCoUection*/ / / TModelAnchorCoUection provides the abstract protocol for a collection of model anchors. // This protocol is used by TModel to manage its list of anchors and links. This class is // abstract and may be subclassed to provide a specific implementation. TModelAnchorCollections // own their anchors and are responsible all associated memory management. class TModelAnchorCoUection : public MCollectible { public: /* /* Constructors and Destructors*/ TModelAnchorCollection(); TModelAnchorCollection( const TModelAnchorCollection& ); virtual ~TModelAnchorCollection(); TModelAnchorCollection& oρerator= (const TModelAnchorCollection&); /* V /* Overrides*/ virtual TStream& operator»= ( TStream& towhere ) const; virtual TStream& operator«= ( TStream& fromwhere ); VersionDeclarationsMacro(TModelAnchorCollection); /* */ /* Collection methods*/ virtual void Adoρt( TModelAnchor* anAnchor ) = 0; virtual TModelAnchor*Orphan( const MAbstractModelAnchor& ) = 0; virtual TModelAnchor*Member( const MAbstractModelAnchor& ) const = 0; virtual unsigned long Count() const = 0; virtual TIterator*CreateIterator(Boolean includelnvisibleAnchors, Boolean includeDynamicAnchors) const = 0; virtual void AnchorsFixedUp() = 0; private: static const Versionlnfo kOriginalVersion; }; /*— */ TModelAnchorSet*/ // TModelAnchorSet is a concrete subclass of TModelAnchorCoUection that implements the / / anchor collection using a TSet. class TModelAnchorSet : public TModelAnchorCoUection { public: /* .... */ /* Constructors and Destructors*/ TModelAnchorSet(); TModelAnchorSet( const TModelAnchorSet& ); virtual ~TModelAnchorSet(); TModelAnchorSet& operator= (const TModel AnchorSet&); /* : V /* Overrides*/ virtual TStream& operator»= ( TStream& towhere ) const; virtual TStream& operator«= ( TStream& fromwhere ); MCollectibleDeclarationsMacro(TModelAnchorSet); /* V /* Collection methods*/ virtual void Adopt( TModelAnchor* anAnchor ); virtual TModelAnchor* Orphan( const MAbstractModelAnchor& ); virtual TModelAnchor* Member( const MAbstractModelAnchor& ) const; virtual unsigned long Count() const; virtual TIterator* CreateIterator(Boolean includelnvisibleAnchors, Boolean includeDynamicAnchors) const; virtual void AnchorsFixedUpQ; private: TSet fAnchors; static const Versionlnfo kOriginalVersion; }; /*— */ / *T AnchorNotif ication* / class TAnchorNotification : public TNotification { public: TAnchorNotification(const TInterest& thelnterest, const MAbstractModelAnchor& theAnchor); TAnchorNotification(const TAnchorNotification&); virtual ~TAnchorNotification(); TAnchorNotification& operator= (const TAnchorNotification&); virtual TStream& operator»=(TStream& towhere) const; virtual TStream& operator «=(TStream& towhere); MCollectibleDeclarationsMacro(TAnchorNotification); virtual const TModelAnchorSurrogate& GetAnchorSurrogate() const; protected: TAnchorNotification(); private: TModelAnchorSurrogate fAnchor; static const Versionlnfo kOriginalVersion; }; I *TModelLinkNotif ication* / class TModelLinkNotification : public TNotification { public: TModelLinkNotification(const TInterest& thelnterest, const TAbstractModelLink& theAnchor); TModelLinkNotification(const TModelLinkNotification&); virtual TModelLinkNotification(); TModelLinkNotification& operator= (const TModelLinkNotification&); virtual TStream& oρerator»=(TStream& towhere) const; virtual TStream& operator «=(TStream«& towhere); MCollectibleDeclarationsMacro(TModelLinkNotification); virtual const TModelLinkSurrogate& GetModelLinkSurrogate() const; protected: TModelLinkNotification(); private: TModelLinkSurrogate fLink; static const Versionlnfo kOriginalVersion; }; /*-*/

Claims: CLAIMS Having thus described our invention, what we claim as new, and desire to secure by Letters Patent is: 1. An apparatus for document composition, comprising: (a) a processor; ( ) a storage attached to the processor; (c) a display under the control of the processor; (d) a document resident in the storage and presented on the display; (e) a selection object associated with a first selection; (f) a selection object associated with a second selection; (g) means for linking the two -selection objects; and (h) means for applying a command to the first selection object and automatically applying the command to the second selection object. 2. The apparatus as recited in claim 1, including means for representing a selection object with a geometric outline surrounding the selection object. 3. The apparatus as recited in claim 1, including means for pushing information to the second selection object. 4. The apparatus as recited in claim 1, including means for pulling information from the second selection object. 5. The apparatus as recited in claim 1, including means for applying a query to the second selection object. 6. The apparatus as recited in claim 5, wherein the query is a spell check operation. 7. The apparatus as recited in claim 1, wherein the query is a select largest value operation. 8. The apparatus as recited in claim 1, wherein the query is a select smallest value operation. 9. A method for document composition on a processor with an attached storage and display, comprising the steps of: (a) loading a document into the storage and presenting the document on the display; (b) creating a selection object associated with a first selection in the storage; (c) creating a selection object associated with a second selection in the storage; (d) linking the two selection objects; and (e) applying a command to the first selection object and automatically applying the command to the second selection object. 10. The method as recited in claim 9, including the step of representing the anchor with a geometric outline surrounding a selection object. 11. The method as recited in claim 9, including the step of pushing information to the second selection object. 12. The method as recited in claim 9, including the step of pulling information from the second selection object. 13. The method as recited in claim 9, including the step of applying a query to the second selection object. 14. The method as recited in claim 13, wherein the query is a spell check operation. 15. The method as recited in claim 9, wherein the query is a select largest value operation. 16. The method as recited in claim 9, wherein the query is a select smallest value operation. 17. An apparatus for document composition, comprising: (a) a processor; (b) a storage attached to the processor; (c) a display under the control of the processor; (d) a document resident in the storage and presented on the display; (e) a selection object associated with a first selection; and (f) means for initiating a command and automatically applying the command to the selection object. 18. The apparatus as recited in claim 17, including means for representing the selection object with a geometric outline surrounding the selection object. 19. The apparatus as recited in claim 17, including means for exchanging information with the selection object. 20. The apparatus as recited in claim 17, including means for applying a query to the selection object.

Inventors: ANDERSON DAVID R, PALEVITCH JACK H, ROSENSTEIN LARRY S, SCHAEFFER ARNOLD, ANDERSON, DAVID, R., PALEVITCH, JACK, H., ROSENSTEIN, LARRY, S., SCHAEFFER, ARNOLD
Applicants: TALIGENT INC, TALIGENT, INC.
Application year: 1994
Main classification: G06F9
IPC codes: G06F3, G06F9, G06F17