/usr/share/doc/gcl-doc/gcl-tk/message.html is in gcl-doc 2.6.12-47.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GCL TK Manual: message</title>
<meta name="description" content="GCL TK Manual: message">
<meta name="keywords" content="GCL TK Manual: message">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="wm.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Widgets.html#Widgets" rel="up" title="Widgets">
<link href="frame.html#frame" rel="next" title="frame">
<link href="entry.html#entry" rel="prev" title="entry">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="message"></a>
<div class="header">
<p>
Next: <a href="frame.html#frame" accesskey="n" rel="next">frame</a>, Previous: <a href="entry.html#entry" accesskey="p" rel="prev">entry</a>, Up: <a href="Widgets.html#Widgets" accesskey="u" rel="up">Widgets</a> [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<hr>
<a name="message-1"></a>
<h3 class="section">2.11 message</h3>
<p>message \- Create and manipulate message widgets
</p><a name="Synopsis-10"></a>
<h4 class="unnumberedsubsec">Synopsis</h4>
<p><b>message</b><i> </i><i>pathName </i><span class="roman">?</span><i>options</i>?
</p><a name="Standard-Options-10"></a>
<h4 class="unnumberedsubsec">Standard Options</h4>
<div class="example">
<pre class="example">anchor cursor padX text
background font padY textVariable
borderWidth foreground relief width
</pre></div>
<p>See <a href="options.html#options">options</a>, for more information.
</p><a name="Arguments-for-Message"></a>
<h4 class="unnumberedsubsec">Arguments for Message</h4>
<dl compact="compact">
<dt><code><b>:aspect</b></code></dt>
<dd><p align="right">Name=<code>"<b>aspect</b><span class="roman">"</span> Class=<code>"</code><b>Aspect</b>"</code>
</p><br>
<p>Specifies a non-negative integer value indicating desired
aspect ratio for the text. The aspect ratio is specified as
100*width/height. 100 means the text should
be as wide as it is tall, 200 means the text should
be twice as wide as it is tall, 50 means the text should
be twice as tall as it is wide, and so on.
Used to choose line length for text if <b>width</b> option
isn’t specified.
Defaults to 150.
</p></dd>
</dl>
<dl compact="compact">
<dt><code><b>:justify</b></code></dt>
<dd><p align="right">Name=<code>"<b>justify</b><span class="roman">"</span> Class=<code>"</code><b>Justify</b>"</code>
</p><br>
<p>Specifies how to justify lines of text.
Must be one of <b>left</b><span class="roman">, </span><b>center</b><span class="roman">, or </span><b>right</b>. Defaults
to <b>left</b>.
This option works together with the <b>anchor</b><span class="roman">, </span><b>aspect</b>,
<b>padX</b><span class="roman">, </span><b>padY</b><span class="roman">, and </span><b>width</b> options to provide a variety
of arrangements of the text within the window.
The <b>aspect</b><span class="roman"> and </span><b>width</b> options determine the amount of
screen space needed to display the text.
The <b>anchor</b><span class="roman">, </span><b>padX</b><span class="roman">, and </span><b>padY</b> options determine where this
rectangular area is displayed within the widget’s window, and the
<b>justify</b> option determines how each line is displayed within that
rectangular region.
For example, suppose <b>anchor</b><span class="roman"> is </span><b>e</b><span class="roman"> and </span><b>justify</b> is
<b>left</b>, and that the message window is much larger than needed
for the text.
The the text will displayed so that the left edges of all the lines
line up and the right edge of the longest line is <b>padX</b> from
the right side of the window; the entire text block will be centered
in the vertical span of the window.
</p></dd>
</dl>
<dl compact="compact">
<dt><code><b>:width</b></code></dt>
<dd><p align="right">Name=<code>"<b>width</b><span class="roman">"</span> Class=<code>"</code><b>Width</b>"</code>
</p><br>
<p>Specifies the length of lines in the window.
The value may have any of the forms acceptable to <b>Tk_GetPixels</b>.
If this option has a value greater than zero then the <b>aspect</b>
option is ignored and the <b>width</b> option determines the line
length.
If this option has a value less than or equal to zero, then
the <b>aspect</b> option determines the line length.
</p></dd>
</dl>
<a name="Description-7"></a>
<h4 class="unnumberedsubsec">Description</h4>
<p>The <b>message</b> command creates a new window (given by the
<i>pathName</i> argument) and makes it into a message widget.
Additional
options, described above, may be specified on the command line
or in the option database
to configure aspects of the message such as its colors, font,
text, and initial relief. The <b>message</b> command returns its
<i>pathName</i> argument. At the time this command is invoked,
there must not exist a window named <i>pathName</i>, but
<i>pathName</i>’s parent must exist.
</p>
<p>A message is a widget that displays a textual string. A message
widget has three special features. First, it breaks up
its string into lines in order to produce a given aspect ratio
for the window. The line breaks are chosen at word boundaries
wherever possible (if not even a single word would fit on a
line, then the word will be split across lines). Newline characters
in the string will force line breaks; they can be used, for example,
to leave blank lines in the display.
</p>
<p>The second feature of a message widget is justification. The text
may be displayed left-justified (each line starts at the left side of
the window), centered on a line-by-line basis, or right-justified
(each line ends at the right side of the window).
</p>
<p>The third feature of a message widget is that it handles control
characters and non-printing characters specially. Tab characters
are replaced with enough blank space to line up on the next
8-character boundary. Newlines cause line breaks. Other control
characters (ASCII code less than 0x20) and characters not defined
in the font are displayed as a four-character sequence \fB\ex<i>hh</i> where
<i>hh</i> is the two-digit hexadecimal number corresponding to
the character. In the unusual case where the font doesn’t contain
all of the characters in “0123456789abcdef\ex” then control
characters and undefined characters are not displayed at all.
</p>
<a name="A-Message-Widget_0027s-Arguments"></a>
<h4 class="unnumberedsubsec">A Message Widget’s Arguments</h4>
<p>The <b>message</b> command creates a new Tcl command whose
name is <i>pathName</i>. This
command may be used to invoke various
operations on the widget. It has the following general form:
</p>
<div class="example">
<pre class="example"><i>pathName option </i><span class="roman">?</span><i>arg arg ...</i>?
</pre></div>
<p><i>Option</i><span class="roman"> and the </span><i>arg</i>s
determine the exact behavior of the command. The following
commands are possible for message widgets:
</p>
<dl compact="compact">
<dt><i>pathName </i><b>:configure</b><span class="roman"> ?</span><i>option</i><span class="roman">? ?</span><i>value option value ...</i>?</dt>
<dd><p>Query or modify the configuration options of the widget.
If no <i>option</i> is specified, returns a list describing all of
the available options for <i>pathName</i><span class="roman"> (see </span><b>Tk_ConfigureInfo</b> for
information on the format of this list). If <i>option</i> is specified
with no <i>value</i>, then the command returns a list describing the
one named option (this list will be identical to the corresponding
sublist of the value returned if no <i>option</i> is specified). If
one or more <i>option:value</i> pairs are specified, then the command
modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
<i>Option</i><span class="roman"> may have any of the values accepted by the </span><b>message</b>
command.
</p>
</dd>
</dl>
<a name="g_t_0022Default-Bindings_0022-4"></a>
<h4 class="unnumberedsubsec">"Default Bindings"</h4>
<p>When a new message is created, it has no default event bindings:
messages are intended for output purposes only.
</p>
<a name="Bugs-1"></a>
<h4 class="unnumberedsubsec">Bugs</h4>
<p>Tabs don’t work very well with text that is centered or right-justified.
The most common result is that the line is justified wrong.
</p>
<a name="Keywords-10"></a>
<h4 class="unnumberedsubsec">Keywords</h4>
<p>message, widget
</p><hr>
<div class="header">
<p>
Next: <a href="frame.html#frame" accesskey="n" rel="next">frame</a>, Previous: <a href="entry.html#entry" accesskey="p" rel="prev">entry</a>, Up: <a href="Widgets.html#Widgets" accesskey="u" rel="up">Widgets</a> [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
</body>
</html>
|