Class text_image takes care of mapping a one-dimensional array of (character,font,colour,attribute) quadruples onto a two-dimensional text image as we normally like to see text displayed. This class is used both by class editor and class list_browser to manage the text-part.
Class text_image uses dedicated interface techniques to their associated editor or list_browser and cannot be used outside this context. This prohibits the use of text_image objects outside the context of editor or list_browser by the application programmer.
Most behaviour of class text_image is just for communication with the associated editor or list_browser. Of interesting to the user may be:
text_image <->tab_distanceDistance between (regular) tab-stops text_image <->tab_stopsVector of tab-stops text_image <->wrapHow long lines are handled
Bugs: We should realise boxed text-style and horizontal scrolling.
->compute
to determine the range of the text that should be updated and the area
of the text_image<-image that is to be
repainted.<-text
to perform the following low-level action:
-fetch Read next character with attributes -seek Set index for next -fetch operation -scan Scan for a syntactical category
->compute.
See also text_image->dump_map..i.
the first character after a newline character). It will be made the
text_image<-start
of the text_image. SkipLines is the number of screen lines to
omit and may be used to start the screen in the middle of a wrapped long
line. The default skip_lines is 0.
text_image<-start
returns the character index for the first character of the nth (1-based)
screenline. By default this is the first visible character.
<->tab_distance.
text_image <-_seek_functionget -seek function text_image <-_scan_functionget -scan function text_image <-_fetch_functionget -fetch function
Besides this, it should notify changes to the text_image object using:
text_image ->_changed_regionIndicate text in region has changed text_image ->_insertIndicate insert/delete
This functionality is currently reserved for the C-programmer.
line is
omitted, index will be placed around the center of the image.->compute.->wrap
for details.