term::ansi::send - Output of ANSI control sequences to terminals
This package provides commands to send ANSI terminal control sequences to a terminal. All commands come in two variants, one for sending to any channel, the other for sending to stdout.
The commands are defined using the control sequences provided by the package term::ansi::code::ctrl. They have the same arguments as the commands they are based on, with the exception of the variant for sending to any channel. Their first argument is always a channel handle, then followed by the original arguments. Below we will list only the variant sending to stdout.
Imports the commands of this package into the namespace ns. If not specified it defaults to send. Note that this default is a relative namespace name, i.e. the actual namespace will be created under the current namespace.
By default all commands will be imported, this can however be restricted to specific commands, by listing them after the namespace to import them into.
Erase (to) End Of Line.
Erase (to) Start Of Line.
Erase (current) Line.
Erase Down (to bottom).
Erase Up (to top).
Save Cursor. Note: Only one saved position can be handled. This is no unlimited stack. Saving before restoring will overwrite the saved data.
Restore Cursor (Unsave).
Save Cursor + Attributes.
Restore Cursor + Attributes.
Set Tab (@ current position).
Clear Tab (@ current position).
Clear All Tabs.
Query Device Code.
Query Device Status.
Query Cursor Position.
Enable Line Wrap.
Disable Line Wrap.
Enter Graphics Mode.
Exit Graphics Mode.
Select Character Set.
Choose which character set is used for default (scs0) and alternate font (scs1). This does not change whether default or alternate font are used, just their definitions.
The legal tags, and their meanings, are:
United Kingdom Set
Alternate Character ROM Standard Character Set
Alternate Character ROM Special Graphics
Set Display Attributes. The arguments are the code sequences for the possible attributes, as provided by the package term::ansi::code::attr. For convenience this package also provides additional commands each setting a single specific attribute.
Set text color to Black.
Set text color to Red.
Set text color to Green.
Set text color to Yellow.
Set text color to Blue.
Set text color to Magenta.
Set text color to Cyan.
Set text color to White.
Set default text color (Black).
Set background to Black.
Set background to Red.
Set background to Green.
Set background to Yellow.
Set background to Blue.
Set background to Magenta.
Set background to Cyan.
Set background to White.
Set default background (Transparent).
Reset all attributes to their default values.
Force Cursor Position (aka Go To).
Cursor Up. n defaults to 1.
Cursor Down. n defaults to 1.
Cursor Forward. n defaults to 1.
Cursor Backward. n defaults to 1.
Scroll Screen (entire display, or between rows start end, inclusive).
Set Key Definition.
Set the terminal title.
Switch to character/box graphics. I.e. switch to the alternate font.
Switch to regular characters. I.e. switch to the default font.
Character graphics, Top Left Corner.
Character graphics, Top Right Corner.
Character graphics, Bottom Right Corner.
Character graphics, Bottom Left Corner.
Character graphics, Left T Junction.
Character graphics, Top T Junction.
Character graphics, Right T Junction.
Character graphics, Bottom T Junction.
Character graphics, Four-Way Junction.
Character graphics, Horizontal Line.
Character graphics, Vertical Line.
Optimize character graphics. The generator commands above create way to many superfluous commands shifting into and out of the graphics mode. This command removes all shifts which are not needed. To this end it also knows which characters will look the same in both modes, to handle strings created outside of this package.
Clear screen. In essence a sequence of CursorHome + EraseDown.
Initialize default and alternate fonts to ASCII and box graphics.
Show the block of text at the specified location.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category term of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.