Positions

A “Position” is a packed-bit structure that provides information about how an internal frame must be positioned within the space of the frame that contains it (its parent frame). In a possible embodiment, FIG. 9 suggests a 64 bits data value. Further, the three most significant bits 930 indicate the kind of the position. The S bit 940 is another bit-field that is common to all kinds of positions, although it will be better explained in the context of an example (see below). FIG. 9 proposes three kinds of positions.

FIG. 9

The “Text position” 900 is intended for internal frames inserted in a concrete point of a text object, by means of indicating the paragraph and character position in the 16 bits bit-fields N_Par 980 and N_Char 990, respectively. Hence, the framer that is responsible for laying out a text object will also be responsible for placing any internal frame specifying a text position. The inserted frame must be treated as another character, so the line of text that contains that frame must be shifted to the bottom to provide enough space for the frame height, and the characters after that frame must be shifted to the right (or to the left, depending on the script direction) to provide enough space for the frame width.

The “Absolute position” 910 is intended for internal frames inserted in a graphical position of the parent frame, by means of indicating an “anchor reference” in the 4 bits NW bit-field 950 and the graphical X and Y offsets with respect to the anchor in 16 bits bit-fields Offset_X 980 and Offset_Y 990, respectively. The anchor references are the corners or the middle-edge points of the parent frame and the inserted frame, with a binary code starting from '0000' for the top-left corner, and continuing clockwise to '0111' for the middle point of the left edge, and a ninth code '1000' to indicate the center of the frames.

The “Relative position” 920 is intended for internal frames whose graphical position must be specified with respect to another internal frame of the same parent frame, i.e. a “sibling” frame, by means of indicating an “anchor reference” in the 7 bits NW bit-field 950, the index of the sibling frame in the 16 bits Obj_IND bit-field 970, and the graphical X and Y offsets with respect to the anchor in 16 bits bit-fields Offset_X 980 and Offset_Y 990, respectively. In this case, the anchor reference is composed of 7 bits because there are two reference points, one for the sibling frame and another for the frame to be positioned. The six right bits indicate the anchors of sibling and positioned frames using the same code introduced for the anchor references of an absolute position, and the left bit is used to express that both frames must remain centered.

In the three kinds of positions, the remaining bits of the position are labeled as Reserved (or Res.) 960, as a variable-length bit-field that is reserved for future uses.

FIG. 10

FIG. 10 shows different examples of absolute and relative positioning. The examples a to d correspond to four absolute positioning of an internal “Frame 0.1” with respect to a parent “Frame 0”. In example a, the anchor reference is the top-left corner ('000'), so the Offset_Y 1000 and the Offset_X 1005 indicate the displacement between the corners of both frames. In examples b and c, the anchor references are two middle-edge points, one for the top edge ('001') and the other of the right edge ('011'), hence the displacements are indicated by the Offset_Y 1010 and the Offset_X 1020, respectively, and the displacement for the other coordinate is computed automatically by the framer to align the corresponding middle-edge points. In example d, the origin of the internal frame is computed automatically by the framer to keep coincident both centers 1030.

Positive offsets always indicate inner displacements of the referred anchor point of the internal frame within the space of the parent frame. However, some area of the internal frame may fall outside of the parent frame bounds. Besides, it is also possible that the end user enters negative offsets, which surely will provoke this effect. In both cases, the framer must command the graphical environment to clip the outer area.

The examples e to h correspond to four relative positioning of an internal “Frame 0.2” with respect to a sibling “Frame 0.1”, both within a common parent “Frame 0”. In example e, the NW code indicates that the anchor reference for the sibling frame is the bottom-left corner ('110'), whereas the anchor reference for the positioned frame is the top-left corner ('000'), hence Offset_Y 1040 and Offset_X 1045 determine the displacement between these two corners. Example f is similar to e but with a displacement respect to the bottom-right corner of the sibling frame ('100') and with a positive Offset_Y 1050 and a negative Offset_X 1055, which shows that negative offsets for relative positions does not imply clippings of the internal frame area. Example g shows a displacement between two middle-edge points, the bottom one ('101') of the sibling frame and the top one ('001') of the positioned frame, and a positive Offset_Y 1060 that defines a constant distance between both frames, while the Offset_X will be ignored because the framer (corresponding to Frame 0) will keep both middle points horizontally aligned. Finally, example h renders the case that the positioned frame keeps centered 1070 with respect to the sibling frame.

The position mechanism proposed in this application will allow end users to set the layout of compound objects with relative easiness, because they only have to specify clear constraints, such as “this object has to be shifted that distance from the top edge of the parent object” (with a graphical interface, of course), and the framer will be responsible to the relocation of the frames when any implicated variable is changed, for example, the width of the parent frame. Obviously, the user will not be allowed to create transitive dependencies between the position of two or more sibling frames, for example, a first frame must be at the left of a second frame by some distance, and the second frame must be centered to the first frame.

FIG. 11

FIG. 11 is an example of a synchronization of the position and formatting attributes of the same inner object inside the same parent object, which is regulated by the bit S of the generic position layout (see FIG. 9). In the example, there is an image object with an essential “Frame 1” 1100 that contains a text object within an internal “Frame 1.1” 1110. The image object is inserted into two other objects with essential frames 1120 and 1140, what requires to define internal frames for the image object and its included text object, being named as “Frame 2.1” 1130 and “Frame 2.1.1” 1135 for “Frame 2”, and “Frame 3.1” 1150 and “Frame 3.1.1” 1155 for “Frame 3”. Suppose that the position of frame 1135 has the bit S = 0, and the position of frames 1110 and 1155 have the bit S = 1.In such situation, the inventive system will keep synchronized the position and formatting of the text object within the essential frame 1100 and within the internal frame 1150, so that any change made in one frame will get automatically reflected on the other frame and vice versa, whereas the formatting and position of frame 1135 will not be modified since it is not synchronized.

This inventive method for frame synchronization has the purpose of assuring that the appearance of one compound object keeps equal in all places where it appears, but also allows the opposite situation when the user needs to perform local changes on the layout of a compound object without modifying the rest of the occurrences.