updating oE display_text_image


include std/console.e 
public procedure display_text_image(text_point xy, sequence text) 

displays a text image in any text mode.

  1. xy : a pair of 1-based coordinates representing the point at which to start writing.
  2. text : a list of sequences of alternated character and attribute.

This routine displays to the active text page, and only works in text modes.

You might use save_text_image and display_text_image in a text-mode graphical user interface, to allow "pop-up" dialog boxes, and drop-down menus to appear and disappear without losing what was previously on the screen.

Example 1:
include std/console.e 
display_text_image({1,1}, {{'A', WHITE, 'B', GREEN}, 
                           {'C', RED+16*WHITE}, 
                           {'D', BLUE}}) 
-- displays: 
--     AB 
--     C 
--     D 
-- at the top left corner of the screen. 
-- 'A' will be white with black (0) background color, 
-- 'B' will be green on black, 
-- 'C' will be red on white, and 
-- 'D' will be blue on black. 
-- FIXME! 
-- On linux with gnome terminal, items starting on line 1 do not show up at all 
-- items on following lines have wrong colors: BLUE = red, YELLOW = cyan, RED = black 
-- needs explanation or fixing! 
See Also:

save_text_image, put_screen_char

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu