[previous] [up] [next]     [contents] [index]
Next: Flattened Text Up: File Format Previous: Global Data: Headers and

End of Line Ambiguity

Because the editor can force a line break even when there is no carriage return item, a position alone does not always specify a graphic location for the caret. Consider the last position of a line which is soft-broken (i.e., no carriage return is present): there is no item between the last item of the line and the first item of the next line, so two graphic locations (one end-of-line and one start-of-line) map to the same position.

For this reason, position-setting and position-getting methods often have an extra parameter. In the case of a position-setting method, this Boolean parameter specifies whether the caret should be draw at the left or right side of the page (in the event that the location is doubly defined); #t means that the caret should be drawn on the right side. Similarly, methods which calculate a position from a location will take an extra boxed boolean; this box is filled with #t if the position is ambiguous and it came from a right-side location, or #f otherwise.



PLT