1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
|
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin term::ansi::send n 0.2]
[keywords {character output}]
[keywords control]
[keywords terminal]
[copyright {2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc {Terminal control}]
[titledesc {Output of ANSI control sequences to terminals}]
[category {Terminal control}]
[require Tcl 8.4]
[require term::ansi::send [opt 0.2]]
[description]
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 [emph stdout].
[para]
The commands are defined using the control sequences provided by the package
[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 [emph stdout].
[list_begin definitions]
[call [cmd ::term::ansi::send::import] [opt [arg ns]] [arg ...]]
Imports the commands of this package into the namespace [arg ns]. If not specified
it defaults to [emph send]. Note that this default is a relative namespace name,
i.e. the actual namespace will be created under the current namespace.
[para]
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.
[call [cmd ::term::ansi::send::eeol]]
Erase (to) End Of Line.
[call [cmd ::term::ansi::send::esol]]
Erase (to) Start Of Line.
[call [cmd ::term::ansi::send::el]]
Erase (current) Line.
[call [cmd ::term::ansi::send::ed]]
Erase Down (to bottom).
[call [cmd ::term::ansi::send::eu]]
Erase Up (to top).
[call [cmd ::term::ansi::send::es]]
Erase Screen.
[call [cmd ::term::ansi::send::sd]]
Scroll Down.
[call [cmd ::term::ansi::send::su]]
Scroll Up.
[call [cmd ::term::ansi::send::ch]]
Cursor Home.
[call [cmd ::term::ansi::send::sc]]
Save Cursor. Note: Only one saved position can be handled.
This is no unlimited stack. Saving before restoring will
overwrite the saved data.
[call [cmd ::term::ansi::send::rc]]
Restore Cursor (Unsave).
[call [cmd ::term::ansi::send::sca]]
Save Cursor + Attributes.
[call [cmd ::term::ansi::send::rca]]
Restore Cursor + Attributes.
[call [cmd ::term::ansi::send::st]]
Set Tab (@ current position).
[call [cmd ::term::ansi::send::ct]]
Clear Tab (@ current position).
[call [cmd ::term::ansi::send::cat]]
Clear All Tabs.
[call [cmd ::term::ansi::send::qdc]]
Query Device Code.
[call [cmd ::term::ansi::send::qds]]
Query Device Status.
[call [cmd ::term::ansi::send::qcp]]
Query Cursor Position.
[call [cmd ::term::ansi::send::rd]]
Reset Device.
[call [cmd ::term::ansi::send::elw]]
Enable Line Wrap.
[call [cmd ::term::ansi::send::dlw]]
Disable Line Wrap.
[call [cmd ::term::ansi::send::eg]]
Enter Graphics Mode.
[call [cmd ::term::ansi::send::lg]]
Exit Graphics Mode.
[call [cmd ::term::ansi::send::scs0] [arg tag]]
[call [cmd ::term::ansi::send::scs1] [arg tag]]
Select Character Set.
[para]
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.
[para]
The legal tags, and their meanings, are:
[list_begin definitions]
[def A] United Kingdom Set
[def B] ASCII Set
[def 0] Special Graphics
[def 1] Alternate Character ROM Standard Character Set
[def 2] Alternate Character ROM Special Graphics
[list_end]
[call [cmd ::term::ansi::send::sda] [arg arg]...]
Set Display Attributes. The arguments are the code sequences for the possible
attributes, as provided by the package [package term::ansi::code::attr]. For
convenience this package also provides additional commands each setting a single
specific attribute.
[call [cmd ::term::ansi::send::sda_fgblack]] Set text color to [emph Black].
[call [cmd ::term::ansi::send::sda_fgred]] Set text color to [emph Red].
[call [cmd ::term::ansi::send::sda_fggreen]] Set text color to [emph Green].
[call [cmd ::term::ansi::send::sda_fgyellow]] Set text color to [emph Yellow].
[call [cmd ::term::ansi::send::sda_fgblue]] Set text color to [emph Blue].
[call [cmd ::term::ansi::send::sda_fgmagenta]] Set text color to [emph Magenta].
[call [cmd ::term::ansi::send::sda_fgcyan]] Set text color to [emph Cyan].
[call [cmd ::term::ansi::send::sda_fgwhite]] Set text color to [emph White].
[call [cmd ::term::ansi::send::sda_fgdefault]] Set default text color ([emph Black]).
[call [cmd ::term::ansi::send::sda_bgblack]] Set background to [emph Black].
[call [cmd ::term::ansi::send::sda_bgred]] Set background to [emph Red].
[call [cmd ::term::ansi::send::sda_bggreen]] Set background to [emph Green].
[call [cmd ::term::ansi::send::sda_bgyellow]] Set background to [emph Yellow].
[call [cmd ::term::ansi::send::sda_bgblue]] Set background to [emph Blue].
[call [cmd ::term::ansi::send::sda_bgmagenta]] Set background to [emph Magenta].
[call [cmd ::term::ansi::send::sda_bgcyan]] Set background to [emph Cyan].
[call [cmd ::term::ansi::send::sda_bgwhite]] Set background to [emph White].
[call [cmd ::term::ansi::send::sda_bgdefault]] Set default background (Transparent).
[call [cmd ::term::ansi::send::sda_bold]] Bold on.
[call [cmd ::term::ansi::send::sda_dim]] Dim on.
[call [cmd ::term::ansi::send::sda_italic]] Italics on.
[call [cmd ::term::ansi::send::sda_underline]] Underscore on.
[call [cmd ::term::ansi::send::sda_blink]] Blink on.
[call [cmd ::term::ansi::send::sda_revers]] Reverse on.
[call [cmd ::term::ansi::send::sda_hidden]] Hidden on.
[call [cmd ::term::ansi::send::sda_strike]] Strike-through on.
[call [cmd ::term::ansi::send::sda_nobold]] Bold off.
[call [cmd ::term::ansi::send::sda_noitalic]] Italics off.
[call [cmd ::term::ansi::send::sda_nounderline]] Underscore off.
[call [cmd ::term::ansi::send::sda_noblink]] Blink off.
[call [cmd ::term::ansi::send::sda_norevers]] Reverse off.
[call [cmd ::term::ansi::send::sda_nohidden]] Hidden off.
[call [cmd ::term::ansi::send::sda_nostrike]] Strike-through off.
[call [cmd ::term::ansi::send::sda_reset]] Reset all attributes to their default values.
[call [cmd ::term::ansi::send::fcp] [arg row] [arg col]]
Force Cursor Position (aka Go To).
[call [cmd ::term::ansi::send::cu] [opt [arg n]]] Cursor Up. [arg n] defaults to 1.
[call [cmd ::term::ansi::send::cd] [opt [arg n]]] Cursor Down. [arg n] defaults to 1.
[call [cmd ::term::ansi::send::cf] [opt [arg n]]] Cursor Forward. [arg n] defaults to 1.
[call [cmd ::term::ansi::send::cb] [opt [arg n]]] Cursor Backward. [arg n] defaults to 1.
[call [cmd ::term::ansi::send::ss] [opt "[arg s] [arg e]"]]
Scroll Screen (entire display, or between rows start end, inclusive).
[call [cmd ::term::ansi::send::skd] [arg code] [arg str]]
Set Key Definition.
[comment {-- list the possible codes --}]
[call [cmd ::term::ansi::send::title] [arg str]]
Set the terminal title.
[call [cmd ::term::ansi::send::gron]]
Switch to character/box graphics. I.e. switch to the alternate font.
[call [cmd ::term::ansi::send::groff]]
Switch to regular characters. I.e. switch to the default font.
[call [cmd ::term::ansi::send::tlc]] Character graphics, Top Left Corner.
[call [cmd ::term::ansi::send::trc]] Character graphics, Top Right Corner.
[call [cmd ::term::ansi::send::brc]] Character graphics, Bottom Right Corner.
[call [cmd ::term::ansi::send::blc]] Character graphics, Bottom Left Corner.
[call [cmd ::term::ansi::send::ltj]] Character graphics, Left T Junction.
[call [cmd ::term::ansi::send::ttj]] Character graphics, Top T Junction.
[call [cmd ::term::ansi::send::rtj]] Character graphics, Right T Junction.
[call [cmd ::term::ansi::send::btj]] Character graphics, Bottom T Junction.
[call [cmd ::term::ansi::send::fwj]] Character graphics, Four-Way Junction.
[call [cmd ::term::ansi::send::hl]] Character graphics, Horizontal Line.
[call [cmd ::term::ansi::send::vl]] Character graphics, Vertical Line.
[call [cmd ::term::ansi::send::groptim] [arg str]]
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.
[call [cmd ::term::ansi::send::clear]]
Clear screen. In essence a sequence of CursorHome + EraseDown.
[call [cmd ::term::ansi::send::init]]
Initialize default and alternate fonts to ASCII and box graphics.
[call [cmd ::term::ansi::send::showat] [arg row] [arg col] [arg text]]
Show the block of text at the specified location.
[list_end]
[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]
|