cmdr
Check-in [c82025d2d2]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:color - Updated the documentation.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c82025d2d2c3bdf945837bd07dc8e3336140b196
User & Date: aku 2015-07-03 05:26:14.451
Context
2015-07-03
05:30
VT time::minute - Fixed documentation (2external, name of argument implied different type than actuually expected). check-in: 66bd654074 user: aku tags: trunk
05:26
color - Updated the documentation. check-in: c82025d2d2 user: aku tags: trunk
05:21
color - Modified "Apply" to distinguish calls with explicit empty string (EES) from those with no argument (NA). EES returns the string as is, whereas NA returns the requested low-level colorization instructions. Extended tests. Version bumped to 1.0.2. check-in: af5f3c47d7 user: aku tags: trunk
Changes
Unified Diff Show Whitespace Changes Patch
Changes to doc/cmdr_color.man.
1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*- doctools manpage}]
[include parts/definitions.inc]
[vset VERSION 1]
[manpage_begin [vset LABEL_COLOR] [vset MAN_SECTION] [vset VERSION]]
[include parts/module.inc]
[require cmdr::tty]
[require cmdr::color]
[titledesc [vset TITLE_COLOR]]
[description]
[include parts/welcome.inc]


|







1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*- doctools manpage}]
[include parts/definitions.inc]
[vset VERSION 1.0.2]
[manpage_begin [vset LABEL_COLOR] [vset MAN_SECTION] [vset VERSION]]
[include parts/module.inc]
[require cmdr::tty]
[require cmdr::color]
[titledesc [vset TITLE_COLOR]]
[description]
[include parts/welcome.inc]
101
102
103
104
105
106
107
108
109
110
111
112
113








114
115
116
117
118
119
120

When invoked this command deletes the symbolic color [arg name].
An error is thrown if [arg name] is not a known symbol.

The command returns the empty string as its result.

[comment {- - -- --- ----- -------- -------------}]
[call [cmd ::cmdr::color] [method ...] [arg text]]

When [cmd ::cmdr::color] is invoked with an unknown method name
then this name is expected to be and treated as a list of known
symbolic color names. These colors are applied to the [arg text]
and the modified text is returned as the result of the command.









[para] An error is thrown if any of the specified color symbols
are not known.

[list_end]

[section {Predefined colors}]







|

|
|
|
|
>
>
>
>
>
>
>
>







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

When invoked this command deletes the symbolic color [arg name].
An error is thrown if [arg name] is not a known symbol.

The command returns the empty string as its result.

[comment {- - -- --- ----- -------- -------------}]
[call [cmd ::cmdr::color] [method ...] [opt [arg text]]]

When [cmd ::cmdr::color] is invoked with an unknown method name then
this name is expected to be and treated as a list of known symbolic
color names. These colors are applied to the [arg text], with a return
to base after, and the modified text is returned as the result of the
command.

[para] Note however, if the [arg text] is the empty string, then that
string is returned, as the colorization would a [const no-op],
i.e. superfluous.

[para] If the [arg text] is not specified at all then the method
returns just the application of the colors (without return to base).

[para] An error is thrown if any of the specified color symbols
are not known.

[list_end]

[section {Predefined colors}]
Changes to embedded/man/files/cmdr_color.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'cmdr_color\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2013-2015 Andreas Kupries
'\" Copyright (c) 2013-2015 Documentation, Andreas Kupries
'\"
.TH "cmdr::color" n 1 doc "Cmdr, a framework for command line parsing and dispatch"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,





|







1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'cmdr_color\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2013-2015 Andreas Kupries
'\" Copyright (c) 2013-2015 Documentation, Andreas Kupries
'\"
.TH "cmdr::color" n 1\&.0\&.2 doc "Cmdr, a framework for command line parsing and dispatch"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
.sp
\fB::cmdr::color\fR \fBdefine\fR \fIname\fR \fIspec\fR
.sp
\fB::cmdr::color\fR \fBexists\fR \fIname\fR
.sp
\fB::cmdr::color\fR \fBunset\fR \fIname\fR
.sp
\fB::cmdr::color\fR \fB\&.\&.\&.\fR \fItext\fR
.sp
.BE
.SH DESCRIPTION
.PP
Welcome to the Cmdr project, written by Andreas Kupries\&.
.PP
For availability please read \fICmdr - How To Get The Sources\fR\&.







|







291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
.sp
\fB::cmdr::color\fR \fBdefine\fR \fIname\fR \fIspec\fR
.sp
\fB::cmdr::color\fR \fBexists\fR \fIname\fR
.sp
\fB::cmdr::color\fR \fBunset\fR \fIname\fR
.sp
\fB::cmdr::color\fR \fB\&.\&.\&.\fR ?\fItext\fR?
.sp
.BE
.SH DESCRIPTION
.PP
Welcome to the Cmdr project, written by Andreas Kupries\&.
.PP
For availability please read \fICmdr - How To Get The Sources\fR\&.
375
376
377
378
379
380
381
382
383
384
385
386








387
388
389
390
391
392
393
\fBfalse\fR else\&.
.TP
\fB::cmdr::color\fR \fBunset\fR \fIname\fR
When invoked this command deletes the symbolic color \fIname\fR\&.
An error is thrown if \fIname\fR is not a known symbol\&.
The command returns the empty string as its result\&.
.TP
\fB::cmdr::color\fR \fB\&.\&.\&.\fR \fItext\fR
When \fB::cmdr::color\fR is invoked with an unknown method name
then this name is expected to be and treated as a list of known
symbolic color names\&. These colors are applied to the \fItext\fR
and the modified text is returned as the result of the command\&.








.sp
An error is thrown if any of the specified color symbols
are not known\&.
.PP
.SH "PREDEFINED COLORS"
The following colors are defined by the package itself:
.TP







|
|
|
|
|
>
>
>
>
>
>
>
>







375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
\fBfalse\fR else\&.
.TP
\fB::cmdr::color\fR \fBunset\fR \fIname\fR
When invoked this command deletes the symbolic color \fIname\fR\&.
An error is thrown if \fIname\fR is not a known symbol\&.
The command returns the empty string as its result\&.
.TP
\fB::cmdr::color\fR \fB\&.\&.\&.\fR ?\fItext\fR?
When \fB::cmdr::color\fR is invoked with an unknown method name then
this name is expected to be and treated as a list of known symbolic
color names\&. These colors are applied to the \fItext\fR, with a return
to base after, and the modified text is returned as the result of the
command\&.
.sp
Note however, if the \fItext\fR is the empty string, then that
string is returned, as the colorization would a \fBno-op\fR,
i\&.e\&. superfluous\&.
.sp
If the \fItext\fR is not specified at all then the method
returns just the application of the colors (without return to base)\&.
.sp
An error is thrown if any of the specified color symbols
are not known\&.
.PP
.SH "PREDEFINED COLORS"
The following colors are defined by the package itself:
.TP
Changes to embedded/www/doc/files/cmdr_color.html.
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<body><div class="doctools">
<hr> [
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::color(n) 1 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::color - Cmdr - Terminal colors</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<body><div class="doctools">
<hr> [
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::color(n) 1.0.2 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::color - Cmdr - Terminal colors</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<li><a href="#2"><b class="cmd">::cmdr::color</b> <b class="method">active</b></a></li>
<li><a href="#3"><b class="cmd">::cmdr::color</b> <b class="method">names</b></a></li>
<li><a href="#4"><b class="cmd">::cmdr::color</b> <b class="method">get</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::cmdr::color</b> <b class="method">get-def</b> <i class="arg">name</i></a></li>
<li><a href="#6"><b class="cmd">::cmdr::color</b> <b class="method">define</b> <i class="arg">name</i> <i class="arg">spec</i></a></li>
<li><a href="#7"><b class="cmd">::cmdr::color</b> <b class="method">exists</b> <i class="arg">name</i></a></li>
<li><a href="#8"><b class="cmd">::cmdr::color</b> <b class="method">unset</b> <i class="arg">name</i></a></li>
<li><a href="#9"><b class="cmd">::cmdr::color</b> <b class="method">...</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>Welcome to the Cmdr project, written by Andreas Kupries.</p>
<p>For availability please read <i class="term"><a href="cmdr_howto_get_sources.html">Cmdr - How To Get The Sources</a></i>.</p>
<p>This package provides a few utility commands implementing







|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<li><a href="#2"><b class="cmd">::cmdr::color</b> <b class="method">active</b></a></li>
<li><a href="#3"><b class="cmd">::cmdr::color</b> <b class="method">names</b></a></li>
<li><a href="#4"><b class="cmd">::cmdr::color</b> <b class="method">get</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::cmdr::color</b> <b class="method">get-def</b> <i class="arg">name</i></a></li>
<li><a href="#6"><b class="cmd">::cmdr::color</b> <b class="method">define</b> <i class="arg">name</i> <i class="arg">spec</i></a></li>
<li><a href="#7"><b class="cmd">::cmdr::color</b> <b class="method">exists</b> <i class="arg">name</i></a></li>
<li><a href="#8"><b class="cmd">::cmdr::color</b> <b class="method">unset</b> <i class="arg">name</i></a></li>
<li><a href="#9"><b class="cmd">::cmdr::color</b> <b class="method">...</b> <span class="opt">?<i class="arg">text</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>Welcome to the Cmdr project, written by Andreas Kupries.</p>
<p>For availability please read <i class="term"><a href="cmdr_howto_get_sources.html">Cmdr - How To Get The Sources</a></i>.</p>
<p>This package provides a few utility commands implementing
199
200
201
202
203
204
205
206
207
208
209
210






211
212
213
214
215
216
217
<dd><p>When invoked this command tests if the symbolic color <i class="arg">name</i>
is known, returns the boolean value <b class="const">true</b> if so, and
<b class="const">false</b> else.</p></dd>
<dt><a name="8"><b class="cmd">::cmdr::color</b> <b class="method">unset</b> <i class="arg">name</i></a></dt>
<dd><p>When invoked this command deletes the symbolic color <i class="arg">name</i>.
An error is thrown if <i class="arg">name</i> is not a known symbol.
The command returns the empty string as its result.</p></dd>
<dt><a name="9"><b class="cmd">::cmdr::color</b> <b class="method">...</b> <i class="arg">text</i></a></dt>
<dd><p>When <b class="cmd">::cmdr::color</b> is invoked with an unknown method name
then this name is expected to be and treated as a list of known
symbolic color names. These colors are applied to the <i class="arg">text</i>
and the modified text is returned as the result of the command.</p>






<p>An error is thrown if any of the specified color symbols
are not known.</p></dd>
</dl>
</div>
<div id="section3" class="section"><h2><a name="section3">Predefined colors</a></h2>
<p>The following colors are defined by the package itself:</p>
<dl class="definitions">







|
|
|
|
|
>
>
>
>
>
>







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
<dd><p>When invoked this command tests if the symbolic color <i class="arg">name</i>
is known, returns the boolean value <b class="const">true</b> if so, and
<b class="const">false</b> else.</p></dd>
<dt><a name="8"><b class="cmd">::cmdr::color</b> <b class="method">unset</b> <i class="arg">name</i></a></dt>
<dd><p>When invoked this command deletes the symbolic color <i class="arg">name</i>.
An error is thrown if <i class="arg">name</i> is not a known symbol.
The command returns the empty string as its result.</p></dd>
<dt><a name="9"><b class="cmd">::cmdr::color</b> <b class="method">...</b> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>When <b class="cmd">::cmdr::color</b> is invoked with an unknown method name then
this name is expected to be and treated as a list of known symbolic
color names. These colors are applied to the <i class="arg">text</i>, with a return
to base after, and the modified text is returned as the result of the
command.</p>
<p>Note however, if the <i class="arg">text</i> is the empty string, then that
string is returned, as the colorization would a <b class="const">no-op</b>,
i.e. superfluous.</p>
<p>If the <i class="arg">text</i> is not specified at all then the method
returns just the application of the colors (without return to base).</p>
<p>An error is thrown if any of the specified color symbols
are not known.</p></dd>
</dl>
</div>
<div id="section3" class="section"><h2><a name="section3">Predefined colors</a></h2>
<p>The following colors are defined by the package itself:</p>
<dl class="definitions">