Superblock structure in a multiple in a data editor4723210Abstract Improvements in an application composite editor for compound documents containing not only text but also graphics and tables facilitate the manipulation of object sets in the formatting algorithm. The editor works with a page layout philosophy wherein data objects reside on the page and data resides in the data objects. All pages reside within a document object, and some data objects may have additional objects within them. Objects are data-specific entities that the user can manipulate on the page. All objects exist within a specified boundary on the page, and this boundary is defined as an object set boundary. Object sets may be moved into positions on the page such that more than one object set is occupying a single displayable area on the page. Such an arrangement of objects creates a structure called a superblock. A superblock is any displayable area containing two or more object sets positioned so that the object sets overlap one another, reside side-by-side or extend above or below one another. A text object set may not be overlapped by any other object set. Although the superblock is itself a complex structure, the creation of this structure by the editor greatly simplifies integration of different data types on the page for the user and allows the user to manipulate a group of object sets within a single displayable area on the page with relative ease. Moreover, formatting of the document is facilitated by the editor since the superblock is treated as an object set without taking into consideration the complexity inside the superblock structure except when a page end decision must be made. Claims What is claimed is: Description CROSS REFERENCE TO RELATED APPLICATIONS
______________________________________
ON POINTER SELECTION
CALL QUERY LOCATION --POINTER
SELECT EDIT ACTION
IF EDIT ACTION = INSERT --DATA
THEN CALL GET --DOC --LOCATION
IF DOC --LOCATION = EXISTING OBJECT SET
THEN CALL CREATE --SUPERBLOCK
ELSE CALL CREATE --OBJECT --SET
CALL INSERT --OBJECT SET
ENDIF
ELSE CALL NORMAL --EDIT
ENDIF
CALL REDISPLAY --DATA
______________________________________
When the mouse button is pressed and a location within a window is defined, a routine is called to determine the location of the pointer (CALL QUERY.sub.-- LOCATION.sub.-- POINTER). If the action selected involves the insertion of data, a routine is called to determine if the defined window location is within the boundaries of an existing object set in the document (CALL GET.sub.-- DOC.sub.-- LOCATION). If the defined window location is already occupied by an object set, then a routine is called to create the super block structure and insert the super block object set at the defined window location (CALL CREATE.sub.-- SUPERBLOCK). The CREATE.sub.-- SUPERBLOCK routine creates an object set of type super block and links the existing object set to the first object.sub.-- id structure within the super block structure. A routine is called to create the new object set (CALL CREATE.sub.-- OBJECT.sub.-- SET). The new object set is linked to the first object set. Within the super block, the x,y offset of the new object set is determined. The left and right margins of the superblock are determined by the left margin of the object set closest to the left side of the page and by the right margin closest to the right side of the page. If the placement of the new object set in the superblock is such that the left margin is greater than or equal to the right margin offset or if any insert/overlap rules are violated, the superblock is adjusted according to the attributes defined for the object set to which the data belongs. After creation, a routine is called to insert the superblock object set into the document after the preceding object set (CALL INSERT.sub.-- OBJECT.sub.-- SET). If the defined window location is not occupied by an object set, then a routine is called to create an object set of a type different from the superblock type. Normal processing of the object set occurs and the INSERT.sub.-- OBJECT.sub.-- SET routine is called to insert the object set into the document after the preceding object set. If the edit action is not INSERT.sub.-- DATA, then a routine is called to process the normal editing action (CALL NORMAL.sub.-- EDIT). After creation and insertion, a routine is called to update the window display (CALL REDISPLAY.sub.-- DATA). The super block is displayed at the defined window location. The superblock icon is placed adjacent to the super block data indicating that the user has implicitly created a super block. FIG. 8 is a flow diagram illustrating the process of editing a superblock structure once it has been created. First, the operator fetches a pointer or cursor. The operator moves the pointer on the display screen by means of some locator device, such as a mouse, until the pointer is at the desired location, the operator presses a button or switch to select the object at the location or to select the location. Block 11 depicts the positioning and selection of an object location. Next, the operator selects a command to perform an edit action. The command may cause the superblock to be modified. Block 12 depicts the selection of a command which can be accomplished by selecting a command key, a command button from a command bar or entering a command on a command line. After selection, the command is processed as depicted by block 13 in FIG. 8. After the editor processes the command, the current document page is reformatted. If the reformatting cause a change in the page break position, the page needs to be paginated. The test for a change in the page break position is depicted by block 14. If no change occurred, there is no need to paginate. The edit action is complete and the current page is redisplayed. Block 21 indicates the no pagination path. If the test indicates a change is needed in the page break position, a second test as depicted in block 15, is performed to determine if the page break occurs within the boundaries of a superblock. Normal pagination occurs if the result of the test is false. After pagination, the edit action is complete and the current page is redisplayed. The normal pagination path is indicated by block 22 in FIG. 8. A page break occurring within a superblock means the editor must examine each object set within the superblock, as if the superblock were a separate document page, to determine where the superblock can be split. Block 16 depicts the split superblock test. If the super block can be split, the object sets within the super block are reformated and their positions readjusted. After reformatting, the edit action is complete and the document page is redisplayed. This path is indicated by block 19. If, after examining the superblock, the editor determines that the superblock cannot be split, the editor stores the reason for the failure in a message record. Block 17 depicts this step. Since no split can occur, the editor formats the page as if the superblock had the keep attribute on. The editor either maintains the superblock on tne current page if the super block is the only object on the page making a long page, or places the superblock at the top of the next page. Placing the superblock at the top of the next page may cause the following pages to become unformatted. An unformatted page is always formatted before being displayed on the screen. The paginate with superblock keep path is depicted in block 18 of FIG. 8. The edit action is complete, but before redisplaying the current page, the editor builds a message screen indicating the reasons the superblock could not be split. Block 2 depicts the building of the message screen. The message screen is displayed at the same time the document page is redisplayed. The operator now has the option of manually rearranging the object sets within the superblock, via the move command, so that the editor can split the superblock. The operator can select the object set by pointing at the object set or in the case where pointing is ambiguous, select the icon representing the superblock. The splitting of a superblock makes the data on a page appear more balanced and prevents long pages. FIGS. 9, 10, 11 and 12 illustrate several cases of superblock editing. In FIG. 9, the superblock is edited via a move edit action and the page ending is not affected. In FIG. 9A, the superblock is shown prior to the editing action. The superblock comprises text and a graphic object set. In FIG. 9B, the graphic object set has been selected by means of the pointer as indicated by the symbol ".uparw.". The "x" in the upper left corner of the text represents the location where the graphic object set is to be moved. FIG. 9C shows the result of the edit action. It will be noted that there is no change to the upper or lower superblock boundaries. FIG. 10 also shows the editing of a superblock via the move edit function but in this case the page ending is affected. In FIG. 10A, the superblock is shown as comprising a table object set and a graphic object set with the table object set occupying the upper left quadrant of the page and the graphic object set occupying the lower right quadrant of the page. FIG. 10B indicates the editing action which the operator has commanded. Specifically, the graphic oo3ect set is to be moved upwardly on the page to occupy a position in the upper right quadrant of the page in a side-by-side relation with the table object set. The result of the editing action is shown in FIG. 10C, and since the lower boundary of the super block has moved upwardly witn the movement of the graphic object set, text from the succeeding page flows into the current page. In FIG. 11, the super block is edited via an insert edit command and results in a page split in the middle of the superblock. The superblock shown in FIG. 11A comprises a text object set which flows around a graphic object set. In FIG. 11B, the pointer symbol ".uparw." indicates the location where additional text is to be inserted into the text object set. The result is shown in FIG. 11C where it will be observed that the lower boundary of the superblock is now on the next page. Because the super block exceeded the length of a page, it was necessary for the paginator to look into the super block structure to determine if the superblock could be split. This decision was affirmative since the text object set can be split between two pages. The next example shows the opposite result. FIG. 12 shows the editing of a superblock via a create object edit action, and in this case, the editing action causes tne superblock to overflow the page. In FIG. 12A, the superblock is depicted as comprising three graphic object sets partially overlapping one another arranged along a diagonal of the page with text flowing around the graphic object sets to fill in the white spaces on the page. In FIG. 12B, the symbol ".uparw." indicates the location chosen for the creation of a fourth graphic object set. The result of the editing action is shown in FIG. 12C where it will be noticed that the text has been readjusted to flow around the several graphic object sets. Also, the new boundaries of the superblock overflow the boundaries of the page. This is because there is an implied keep around a graphic object set to prevent it from being split across pages. In the case shown in FIG. 12C, this implied keep prevents the paginator from splitting the superblock. When this happens, the editor displays a message to the operator that the superblock cannot be split across pages because of the graphic objects. The pseudocode for the process of editing the superblock structure is set forth below:
__________________________________________________________________________
ON POINTER SELECTION
CALL QUERY --LOCATION --POINTER
CALL TRANSLATE --LOCATION
SELECT EDIT ACTION
CALL EXECUTE --COMMAND
IF EDIT ACTION = CHANGE PAGE BREAK
THEN CALL FIND --PAGE --BREAK
IF PAGE --BREAK IS WITHIN SUPERBLOCK BOUNDARY
THEN CALL SPLIT --SUPERBLOCK
IF SPLIT SUPERBLOCK IS TRUE
THEN CALL PAGINATE (PAGE,
SPLIT)
ELSE CALL CREATE --MESSAGE --
RECORD
CALL PAGINATE (PAGE,
KEEP)
CALL BUILD --MESSAGE --PANEL
ENDIF
ELSE CALL PAGINATE (PAGE, NORMAL)
ENDIF
ENDIF
CALL REDISPLAY --DATA
__________________________________________________________________________
When the mouse button is pressed and a location within a window is defined, a routine is called to determine the location of the pointer (CALL QUERY.sub.-- LOCATION.sub.-- POINTER). Next, a routine is called to translate the pointer location from screen coordinates into document coordinates so that the object selected can be determined (CALL TRANSLATE.sub.-- LOCATION). After the location is defined, the operator selects an edit action. A routine is then called to process the selected command (CALL EXECUTE.sub.-- COMMAND). If the execution of the command causes the bundaries of the selected object to change and as a result the current page to overflow, then a routine is called to determine the location of the new page break (CALL FIND.sub.-- PAGE.sub.-- BREAK). If the location of the new page break is within the boundaries of a superblock object set, then each of the object sets within the superblock must be examined to determine where or if the superblock can be split (CALL SPLIT.sub.-- SUPERBLOCK). If the editor determines that the superblock cannot be split, this information is returned to the calling routine so that a message panel can be built to relay tnis data to the user. If the superblock can be split, a routine is then called to paginate the current page and the succeeding pages as necessary. The input parameters for the paginate routine are a pointer to the current page and a paginate type variable. In the case of a superblock split, the paginate type is split (CALL PAGINATE (PAGE, SPLIT)). If the superblock cannot be split, then the paginate routine is called to paginate the current page (CALL PAGINATE (PAGE, KEEP)). The editor either maintains the superblock on the current page if the superblock is the only object set on the page making a long page or places the superblock at the top of the next page. Placing the superblock at the top of the next page may cause the following pages to become unformatted and as a result cause more pagination to occur. The reasons that the superblock cannot be split are placed in a message record to be displayed to the user (CALL CREATE.sub.-- MESSAGE.sub.-- RECORD). Next, a routine is called to build the message panel for display (CALL BUILD.sub.-- MESSAGE.sub.-- PANEL). If the location of the new page break is not within the boundaries of a superblock, then the paginator is called to paginate the current page with the paginate type equal to normal (CALL PAGINATE (PAGE, NORMAL)). After all editing is complete and if necessary, pagination has occurred, a routine is called to redisplay the data to the user. If a message panel was built during the edit process, this panel is displayed at the same time as the data is redisplayed. FIGS. 13A through 13F illustrate the various possibilities of text flow or non-flow around a non-text object set. More specifically, FIGS. 13A, 13C and 13E show examples of non-flow of text. In each of these figures, the "x" in a line of text represents the selected destination for the non-text object set, i.e. the starting or upper left hand corner location selected by the user for the non-text object set. FIGS. 13B, 13D and 13F show the result of the movement of the non-text object set with flow on. More specifically, this operation is accomplished by the user first selecting the graphic object set from within the superblock and then selecting MOVE from the command bar and the destination for the object set. It is the super block structure according to the present invention which facilitates this kind of editing. Each paragraph text object has an attribute called flow. The user can specify that flow for a paragraph is either on or off. If flow is on and another non-text object is inserted at either the left or right boundary, for example, of the original paragraph, the editor flows the text around the object. The editor determines which side to flow around by finding the orientation of the inserted object, i.e. which side, left or right, the inserted object is on. If the object is inserted in the middle of the page, the editor determines wnether there is sufficient room between the left and right boundaries and the left and right edges of the object, respectively, for text and if there is, the editor flows the text on either side of the object. Referring now to FIGS. 14A and 14B, the starting point for the flow chart of the flow attribute for text objects is after some edit action has been performed on a superblock, and the editor determines that reformatting should occur. Reformatting is only necessary if there are text objects sets in the superblock and if at least one text object set has its flow attribute turned on. To determine if there are any text object sets, the editor gets the object set type of the first object set in the superblock and tests the type. Block 24 in FIG. 14A represents the determination of the object set type, and block 25 represents the test. If the test is true, the editor sets the text exists flag to true and tests the flow attribute of the text. The setting of the flag is depicted by block 26, and the flow attribute test is depicted in block 27. If this test is true, the editor sets the flow.sub.-- on flag to true as indicated by block 28. Block 29 indicates the test of the conditions that will terminate the loop represented by the blocks 24 through 28. If there are no more object sets in the superblock to check or if the flow.sub.-- on flag is on, then the loop is terminated and the action continues with block 30. Block 30 is a test to see if a text object set is really in the superblock. If the loop terminated and no text object set has been found, then reformatting of the superblock is complete and no further action needs to occur. Next, a test is performed to determine if the flow.sub.-- on flag is turned on. This test is shown by block 31. If this test is true, then the number of flow areas is determined as depicted by block 32. The flow process loop begins with block 33 in FIG. 14B where the type of each object set in the superblock is determined. After the type is determined, a test is made to see if the type is text. If the type is not text, then control flows to the bottom of tne loop where a test is made to see if all the object sets in the superblock have been checked. Line test of the object set type is depicted by block 34 and the bottom of the loop test is depicted by block 4. If the object set type is text, then a test is made of the text object's flow attribute as shown in block 35. If the test is true, then the flow.sub.-- on flag is turned on in block 36. If the flow.sub.-- on flag is turned on and if the number of flow areas is greater than zero, another loop is entered to actually flow the text into each of the flow areas. Block 37 indicates the test of the flow.sub.-- on flag and the number of flow areas. If this test fails, the text object set is split as shown in block 38 and control flows to the bottom of the process loop. If the test is true, then the flow action loop begins with block 39 where the editor gets the first flow area. Block 40 indicates the flow text routine executing. This routine will return a succeed or fail return code. This return code is tested in block 41. If the return code is succeed, then a test is made in block 45 to see if there is still text that needs to be flowed. If this test is false, then the no more text flag is set to true and action continues at block 47. If the return code of block 41 is fail, then a routine is executed to determine if flow can be restarted. Block 42 indicates execution of the restart flow routine. This routine also returns a succeed or fail return code which is tested in block 43. If the result is succeed, action continues at the bottom of the flow action loop in block 47. If the result is fail, the remaining text is split as indicated by block 44 and action also continues at block 47. The text in block 47 is to see if there is still text that needs to be flowed or if the flow failed and cannot be restarted. If the test in block 47 is false, control flows to the top of the flow action loop at block 39 and the flow action continues. If the test is true, then the flow action loop is completed and control flows to block 48 where the test is made to see if the flow process is complete. The flow process is complete when all the object sets in the superblock have been processed. The pseudocode for the flow attribute for text objects is set forth below (assume that edit action has occurred on a superblock object set and reformating of the superblock is needed):
__________________________________________________________________________
TEXT --EXISTS = FALSE
{INIT TEXT EXISTS FLAG }
FLOW --ON = FALSE
{INIT FLOW FLAG}
REPEAT
CALL GET --OBJECT --SET --TYPE
IF OBJ --SET --TYPE = TEXT
THEN TEXT --EXISTS = TRUE
CALL TEST --FLOW --ATTRIBUTE(FLOW --ON)
ENDIF
UNTIL ALL OBJECT SETS IN SUPERBLOCK CHECKED OR FLOW --ON
IF TEXT --EXISTS
THEN IF FLOW --ON
THEN CALL DETERMINE --NUMBER --OF --FLOW --AREAS
ENDIF
REPEAT
CALL GET --OBJECT --SET --TYPE
IF OBJ --SET --TYPE = TEXT
THEN CALL TEST --FLOW --ATTRIBUTE(FLOW --ON)
IF FLOW --.0.N AND NO --OF --AREAS <> .0.
{INIT TEXT DATA FLAG}
THEN NO --MORE --TEXT = FALSE
REPEAT
CALL GET --FLOW --AREA
CALL FLOW --TEXT
IF FLOW --TEXT SUCCESSFUL
THEN CALL RESTART --
FLOW
IF RESTART --FLOW
FAILED
THEN SPLIT
REMAINING
TEXT
ENDIF
ELSE
IF ALL TEXT
DATA HAS
BEEN FLOWED
THEN N.0. --MORE
--TEXT = TRUE
ENDIF
ENDIF
UNTIL NO --MORE --TEXT OR
RESTART --FLOW HAS
FAILED
ELSE CALL SPLIT --OBJECT --SET
ENDIF
ENDIF
UNTIL ALL TEXT OBJECT SETS IN SUPERBLOCK PROCESSED
ENDIF
__________________________________________________________________________
When an edit action has occurred on a superblock object set and the editor determines that the superblock must be reformatted, the editor calls a routine to get the object set type of the first object set in the superblock (CALL GET.sub.-- OBJECT.sub.-- SET.sub.-- TYPE). If the object set type is text, then a flag is turned on indicating that text exists (TEXT.sub.-- EXISTS). Next, a routine is called to test if the text flow attribute is turned on for the text object set (CALL TEXT.sub.-- FLOW.sub.-- ATTRIBUTE(FLOW.sub.-- ON)). If the attribute is turned on, then a flag (FLOW.sub.-- ON) is set indicating this state. The calls to get the object set type and test the flow attribute are repeated until either all the object sets in the superblock have been checked or the FLOW.sub.-- ON flag is turned off. If the TEXT.sub.-- EXISTS flag is on, a repeat loop is entered and continues processing as long as there are still text object sets in the superblock that may need to have text flowed around non-text object sets. Before entering the repeat loop, if the FLOW.sub.-- ON flag is turned on, a routine is called to determine where the flow areas are located in the superblock (CALL DETERMINE.sub.-- FLOW.sub.-- AREAS). The minimum width allowed for a flow area is passed to this routine to be used in determining the number of flow areas in the superblock. Upon entering the repeat loop, a call is made to get the first object set type (CALL GET.sub.-- OBJECT.sub.-- SET.sub.-- TYPE). If the object set is text, then a routine is called to test if this text object set has its flow attribute on (CALL TEST.sub.-- FLOW.sub.-- ATTRIBUTE(FLOW.sub.-- ON)). If the flow attribute is on and if the number of flow areas is not zero, then the flow process is started or else a routine is called to split the text object set because flow cannot occur (CALL SPLIT.sub.-- OBJECT.sub.-- SET). The flow process is a repeat loop during which numerous calls are made to flow text into each of the flow areas. This repeat loop continues as long as there are still text object sets in the superblock to process. After entering the second repeat loop, a routine is called to get the first area to flow text into (CALL GET.sub.-- FLOW.sub.-- AREA). The flow area order is determined by the editor when the flow areas are determined. Next, a routine is called to actually flow the text (CALL FLOW.sub.-- TEXT). If the FLOW.sub.-- TEXT routine is successful, then the flow process can continue; otherwise, a routine is called to attempt to restart the flow process in another flow area (CALL.sub.-- RESTART.sub.-- FLOW). If the flow cannot be restarted, then the remaining text is split and placed after the non-text object sets. If the FLOW.sub.-- TEXT routine is successful, then a text is made to see if all the text data in the text object set has been flowed. If this case is true, then the NO.sub.-- MORE.sub.-- TEXT flag is turned on. If the NO.sub.-- MORE.sub.-- TEXT flag is on or flow cannot be restarted, then the inner repeat loop is terminated. The outer repeat loop is terminated when all the text object sets in the superblock have been processed. FIGS. 15A to 15D show other examples of flow to further illustrate the process. FIG. 15A shows text flowing between a graphic object set and a table object set in a superblock. FIG. 15B shows text flowing above, below and between two graphic object sets. FIG. 15C shows text flowing around a table object set and beteen several graphic object sets which overlap the table object sets. FIG. 15D shows text flowing on either side of two graphic object sets which overlap one another. In addition to providing paragraph objects with the flow attribute, list objects (which are really a special case of a paragraph text object) are also provided with the flow attribute which the user can specify as being either on or off. If the flow attribute is on and another object is created or inserted in the middle of the list, the list text will flow around the inserted object as illustrated by the following example:
______________________________________
LIST OBJECT BEFORE EDITING
1. Item 1. This is item 1 which has a set of
attributes of its own.
2. Item 2. This is item 2 having a different
set of attributes.
3. Item 3. . . .
4. Item 4. . . .
LIST OBJECT AFTER EDITING
1. Item 1. This is item 1 which has a set of
2. attributes of its own. Item 2. This item 2 having a different
set of
##STR1##
attributes.
3. Item 3. . . .
4. Item 4. . . .
______________________________________
In addition, a text paragraph object can be interrupted, and not broken by the insertion of a single-cell table or by an inserted list. When a text paragraph is interupted, it acts as a whole object that has a space in it. If a list interupts the paragraph, the paragraph resumes when the list ends. When a change is made to the part of the paragraph that is prior to the list such that it causes text to be formatted and pushed down to the text that is below the inserted list, it skips over the list and continues formatting the remainder of the paragraph as if the list were not there. To further illustrate the superblock structure, FIG. 16 shows an example of a superblock where non-text object sets overlay each other, and FIG. 17 shows an example where there is a text object set with non-text object sets illustrating again that whereas non-text object sets may overlay one another, they may not overlay a text object set. The superblock is implicitly created by the editor as the result of a user having specified the CREATE, MOVE, COPY, PASTE or GET action and as a result of that action, at least two object sets are occupying the same display space. The actions which are applicable to the super block are generic functions, e.g. if the user selects MOVE, COPY, GET or DELETE of the superblock, the selected action is applied against all the object sets within tne superblock as if they were one entity. If the destination for the MOVE, COPY or GET of tne superblock is another superblock or an object set, the original superblock structure is replaced by a new super block structure at the destination location. In other words, the superblock structure, once it is created, is treated by the editor as another ob3ect set thereby greatly simplifying the computations performed by the editor. If the user selects an object set within the super block, the command bar changes to reflect the actions which are valid for that type of object set. The location of the object set does not affect the result the action has on the object set. Inside the superblock, the object set can be moved, copied, deleted, described, etc. On creation of the superblock, the editor determines what the left and right margin offsets should be. The user can change these margin offsets by selecting the superblock icon and then selecting DESCRIBE from the command bar. This causes the pop-down panel snown in FIG. 18 of the drawings to be displayed. As can be seen in that figure, the user can also specify a name, change the space before and after the superblock, and set the protection attribute via this pop-down panel. The following are the rules the editor uses for object set placement when creating a super block structure: (1) The destination selected for placement of the object set is the starting point for the top left margin boundary of the object set. The right margin offset remains the same. (2) If the left margin defined is greater tnan or equal to the right margin offset, the editor will not place the object set within the super block. (3) If all the contents of the object set cannot be displayed, the object set is clipped by the editor to fit tne space. The data then becomes scrollable within the new boundaries. (4) Text object sets cannot be overlayed. (5) If there is enough space to the left or right of a non-text object set, text whose flow attribute is on will flow naturally to fill in the white space. If there is not enough space, the text object set will be placed after the non-text object set. A super block can cross page end boundaries as long as the data within the super block can be split across pages. The super block structure simplifies the bookkeeping required by the paginator. As long as the super block does not cross the end of a page, the paginator only needs to know the total height of the super block structure. If tne super block needs to be split across two pages, the paginator must examine each of the object sets within the super block to see if the data is such that the super block can be split. If the superblock can be split, the paginator must determine at what point the split can occur. With the creation of the superblock structure, the editor limits the handling of complex data within the structure to only those times when a page end decision must be made. Also, presentation on the display is less messy because there is one icon to represent the superblock instead of an icon next to each object set within the superblock structure. Thus, although the superblock is a complex structure, the creation of this structure by the editor greatly simplifies integration and manipulation of different data types on the page. The superblock allows the user to manipulate a group of object sets within a single displayable area on the page with relative ease. FIG. 19 shows the document object data structure linked into the document ring of the application composite editor. The document is accessed in the document ring by tne directory which points to the document header which, in turn, points to the document object and the next document header. The document object points to the undo ring, the redo ring and the formatting information, doc.sub.-- fcb, as in the POLITE editor. An object set is the basis of the application composite editor architecture, and the document object points to the first label and that, in turn, points to the first object set, obj.sub.-- setl. Each object set points to the previous and next object set; each object can have a name; each object set can be part of a user-defined block that is to be kept together on one page; and each object set has a unique identification used in paging data. As may be appreciated from the architecture shown in FIG. 19, all data in the editor resides on pages and all pages reside within the composite document. One or more of the object sets in the data structure shown in FIG. 19 may be a superblock structure. A representation of the super block structure is shown in FIG. 20. The Pascal implementation of the superblock structure is stated below:
______________________________________
PASCAL CODE FOR SUPERBLOCK DEFINITION
______________________________________
distance = integer; {some number of generic units}
{id for requesting editor objects from storage mgmt}
obj --id = word;
{pointer to object set formatting information}
fcb --ptr = obj --set --fcb;
{pointer to user defined label information}
label --ptr = n --label;
{pointer to Table specific object set information}
tbl --head --ptr = tbl --head;
{pointer to graphics specific part of obj --set}
g --head --ptr = g --head;
{pointer to text specific information in obj --set}
txt --head --ptr = txt --head;
{pointer to super block specific object set info}
sblk --head --ptr = sblk --head;
sblk --head = {super block information}
record
first --obj --set, {first object set in super block}
last --obj --set : obj --set --id --ptr; {last object set}
end;
o --types = (
{types of object sets}
{obj --set consisting of two or more obj --set types}
superblock,
text --obj, {a single line, a paragraph or list obj --set types}
graph obj, {draw or business graphics object --set}
table --obj);
{spreadsheet or one --cell table obj --set}
obj --set --ptr = {pointer to an object set}
object --set =
record
prev,
next : obj --set --ptr;
name : label --ptr;
height : distance; {how high is the object set}
formatted, {is the obj --set ready for display}
keep : boolean; {can the obj --set be split}
fcb : fcb --ptr; {pointer to format info}
id --tag : obj --id; {unique id for object set}
case obj --set --type
: o --types of
superblock : (s --head : sblk --head --ptr);
graph --obj : (g --head : g --head --ptr);
table --obj : (t --head : tbl --head --ptr);
text --obj : (text --head : txt --head --ptr);
end;
{An obj --set --id --ptr is a pointer to the structure containing
the information on each object set within a super block.}
obj --set --id --ptr = obj --set --id;
obj --set --id =
record
loc : offset; {location within the super block}
next --obj --set : obj --set --id --ptr; {next sblk obj --set}
{assumes left to right order}
{ptr to obj --set associated with this id ptr}
obj --set : obj --set --ptr;
end;
______________________________________
The following is an explanation of the fields of a super block object set: prev=pointer to the previous object set. next=pointer to the next object set. name=pointer to any user defined label info. height=height in generic units of the superblock. formatted=flag indicating if the superblock has been formatted. keep=flag indicating if the superblock can be split across two pages. fcb=pointer to the formatting information for tne superblock. id.sub.-- tag=unique identification number assigned to this superblock. s.sub.-- head=pointer to the superblock specific info: the first object set id structure and the last object set id structure. obj.sub.-- set.sub.-- type=scaler indicating that the object set is a superblock. All of the above fields except the s.sub.-- head are common to all object sets. For a text object set, the variant pointer field is a txt.sub.-- head, for a graphics object set, the variant pointer field is a g.sub.-- head, and for a table object set, the variant pointer field is a tbl.sub.-- head. The following is an explanation of the fields of an object set identification structure: loc=the x,y offset of the object set associated with this object set id. next.sub.-- obj.sub.-- set=pointer to the next object set id structure in this super block. obj.sub.-- set=pointer to the object set associated with this object set id. The height field of an object set is used by the paginator when formatting a page in a document. In the case of a superblock object set, as long as the height plus the current space used on the page is less than or equal to the total space available on the page, the contents of the first through the last object set within the super block do not have to be examined by the paginator. This greatly simplifies what could be a complex process if the super block structure did not exist. The formatted and keep flags are boolean fields used by the paginator to determine if further processing must be done on the super block in order for pagination to continue. If keep=true, the super block cannot be split across two pages. Thus, according to a preferred embodiment of the invention, a super block is implemented as an object set type within the application composite editor, there now being four object set types, namely text, graphic, table and superblock. When the superblock is created, an object set is defined and the editor allocates an internal structure or object set to represent the object within the document buffer. All object set structures are similar except for the bottom half which varies according to the type of object set. These structures are implemented in the programming language Pascal. Data types that vary are implemented with Pascal variant records. The variant part of the superblock is represented by a pointer (s.sub.-- head) to the super block specific structure information. The specific structure information (sblk.sub.-- head) consists of two pointers: a first object set pointer (first obj.sub.-- set) and a last object set pointer (last.sub.-- obj.sub.-- set). Eacn of these pointers is an object set identification (id) pointer type (obj.sub.-- set.sub.-- id.sub.-- ptr) which means a pointer to an object set id record structure (obj.sub.-- set.sub.-- id). An object id is a Pascal structure consisting of three fields: loc, which contains the x,y offset within the superblock; next.sub.-- obj.sub.-- set, which is a pointer to the next object set id in the super block; and obj.sub.-- set, which is a pointer to the object set associated with the object set id. The object sets which can be in one superblock are text, tables or graphics. The implementation does not preclude superblocks within superblocks.
|
Same subclass Same class Consider this |
||||||||||
