nanogui: VT100 terminal emulation


Previous by date: 24 Apr 2007 09:16:52 +0100 Re: VT100 terminal emulation, Yan Seiner
Next by date: 24 Apr 2007 09:16:52 +0100 problems displaying some image formats, McCune, Michael
Previous in thread: 24 Apr 2007 09:16:52 +0100 Re: VT100 terminal emulation, Yan Seiner
Next in thread: 24 Apr 2007 09:16:52 +0100 Re: VT100 terminal emulation, Yan Seiner

Subject: Re: [nanogui] VT100 terminal emulation
From: "Dave Stuart" ####@####.####
Date: 24 Apr 2007 09:16:52 +0100
Message-Id: <001b01c78648$ebd153c0$0103a8c0@JUSTDAVE>

I'm not sure if this is relevant.

When I was working with nxterm there was a part that added a \r to an \n 
that I had to remove to get it working with some programs.

dave

----- Original Message ----- 
From: "Greg Haerr" ####@####.####
To: "Yan Seiner" ####@####.#### ####@####.####
Sent: Saturday, April 21, 2007 11:22 AM
Subject: Re: [nanogui] VT100 terminal emulation


>: The vt100 terminal can set various display attributes; I would
> : appreciate some help with nano-X code snippets for the following:
>
> Remember, that in order to not write all your code twice,
> you'll have to save both the attribute and color along with
> the character in save memory, so that the expose event
> "refresh" routine can redraw everything like it was drawn
> in the first place.  And it would be nice to have the same
> code do the drawing both initially and for the refresh, so
> you're not duplicating everything.  This can be tested
> by obscuring a portion of the window, and then uncovering
> it, forcing a redraw event.  32 bits per character
> (8 for the character, 8 bits for attribute and 16 bits
> for foreground and background color will allow
> all input chars and colors/attributes to refresh properly)
>
>
> : 1    Bright -> bold?
> : 2    Dim -> ?? italic???
>
> Bright, bold and dim are handled properly through
> bright, regular, and dim versions of each of the colors below.
>
>
> : 4    Underscore -> I have no clue how to do this
>
> Use GrLine underneath each character for the width
> of the character, after drawing the character.
>
>
> : 5    Blink -> ditto
>
> This requires a timer which draws the character, then
> the blank character each click.
>
>
> : 7    Reverse -> I have the code for this
>
> This just reverses the foreground and background color
> from the colors below.
>
>
> : 8    Hidden -> set fg = bg?
>
> Draw blank characters rather than the "hidden" character.
>
>
> :     Foreground Colours
> : 30    Black
> : 31    Red
> : 32    Green
> : 33    Yellow
> : 34    Blue
> : 35    Magenta
> : 36    Cyan
> : 37    White
> :
> :     Background Colours
> : 40    Black
> : 41    Red
> : 42    Green
> : 43    Yellow
> : 44    Blue
> : 45    Magenta
> : 46    Cyan
> : 47    White
>
> Each of these colors can be stored in an three arrays of
> RGB values.  Use the color according to whether you're drawing
> regular, bright, or dim.   When a color change request
> is parsed, just store the actual color requested, and use
> the current attribute bits to determine the final displayed
> color used to draw.
>
> Note that you'll need to pick a foreground and background color
> on startup/terminal initialization, and clear the screen to the
> background color.  When the terminal scrolls, the bottom
> line needs to scroll to the screen background color.
>
> Hope this helps.
>
> Regards,
>
> Greg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 


Previous by date: 24 Apr 2007 09:16:52 +0100 Re: VT100 terminal emulation, Yan Seiner
Next by date: 24 Apr 2007 09:16:52 +0100 problems displaying some image formats, McCune, Michael
Previous in thread: 24 Apr 2007 09:16:52 +0100 Re: VT100 terminal emulation, Yan Seiner
Next in thread: 24 Apr 2007 09:16:52 +0100 Re: VT100 terminal emulation, Yan Seiner


Powered by ezmlm-browse 0.20.