OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [doc/] [message.n] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1990-1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: message.n,v 1.1.1.1 2002-01-16 10:25:49 markom Exp $
9
'\"
10
.so man.macros
11
.TH message n 4.0 Tk "Tk Built-In Commands"
12
.BS
13
'\" Note:  do not modify the .SH NAME line immediately below!
14
.SH NAME
15
message \- Create and manipulate message widgets
16
.SH SYNOPSIS
17
\fBmessage\fR \fIpathName \fR?\fIoptions\fR?
18
.SO
19
\-anchor        \-font  \-highlightthickness    \-takefocus
20
\-background    \-foreground    \-padx  \-text
21
\-borderwidth   \-highlightbackground   \-pady  \-textvariable
22
\-cursor        \-highlightcolor        \-relief        \-width
23
.SE
24
.SH "WIDGET-SPECIFIC OPTIONS"
25
.OP \-aspect aspect Aspect
26
Specifies a non-negative integer value indicating desired
27
aspect ratio for the text.  The aspect ratio is specified as
28
100*width/height.  100 means the text should
29
be as wide as it is tall, 200 means the text should
30
be twice as wide as it is tall, 50 means the text should
31
be twice as tall as it is wide, and so on.
32
Used to choose line length for text if \fBwidth\fR option
33
isn't specified.
34
Defaults to 150.
35
.OP \-justify justify Justify
36
Specifies how to justify lines of text.
37
Must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR.  Defaults
38
to \fBleft\fR.
39
This option works together with the \fBanchor\fR, \fBaspect\fR,
40
\fBpadX\fR, \fBpadY\fR, and \fBwidth\fR options to provide a variety
41
of arrangements of the text within the window.
42
The \fBaspect\fR and \fBwidth\fR options determine the amount of
43
screen space needed to display the text.
44
The \fBanchor\fR, \fBpadX\fR, and \fBpadY\fR options determine where this
45
rectangular area is displayed within the widget's window, and the
46
\fBjustify\fR option determines how each line is displayed within that
47
rectangular region.
48
For example, suppose \fBanchor\fR is \fBe\fR and \fBjustify\fR is
49
\fBleft\fR, and that the message window is much larger than needed
50
for the text.
51
The the text will displayed so that the left edges of all the lines
52
line up and the right edge of the longest line is \fBpadX\fR from
53
the right side of the window;  the entire text block will be centered
54
in the vertical span of the window.
55
.OP \-width width Width
56
Specifies the length of lines in the window.
57
The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
58
If this option has a value greater than zero then the \fBaspect\fR
59
option is ignored and the \fBwidth\fR option determines the line
60
length.
61
If this option has a value less than or equal to zero, then
62
the \fBaspect\fR option determines the line length.
63
.BE
64
 
65
.SH DESCRIPTION
66
.PP
67
The \fBmessage\fR command creates a new window (given by the
68
\fIpathName\fR argument) and makes it into a message widget.
69
Additional
70
options, described above, may be specified on the command line
71
or in the option database
72
to configure aspects of the message such as its colors, font,
73
text, and initial relief.  The \fBmessage\fR command returns its
74
\fIpathName\fR argument.  At the time this command is invoked,
75
there must not exist a window named \fIpathName\fR, but
76
\fIpathName\fR's parent must exist.
77
.PP
78
A message is a widget that displays a textual string.  A message
79
widget has three special features.  First, it breaks up
80
its string into lines in order to produce a given aspect ratio
81
for the window.  The line breaks are chosen at word boundaries
82
wherever possible (if not even a single word would fit on a
83
line, then the word will be split across lines).  Newline characters
84
in the string will force line breaks;  they can be used, for example,
85
to leave blank lines in the display.
86
.PP
87
The second feature of a message widget is justification.  The text
88
may be displayed left-justified (each line starts at the left side of
89
the window), centered on a line-by-line basis, or right-justified
90
(each line ends at the right side of the window).
91
.PP
92
The third feature of a message widget is that it handles control
93
characters and non-printing characters specially.  Tab characters
94
are replaced with enough blank space to line up on the next
95
8-character boundary.  Newlines cause line breaks.  Other control
96
characters (ASCII code less than 0x20) and characters not defined
97
in the font are displayed as a four-character sequence \fB\ex\fIhh\fR where
98
\fIhh\fR is the two-digit hexadecimal number corresponding to
99
the character.  In the unusual case where the font doesn't contain
100
all of the characters in ``0123456789abcdef\ex'' then control
101
characters and undefined characters are not displayed at all.
102
 
103
.SH "WIDGET COMMAND"
104
.PP
105
The \fBmessage\fR command creates a new Tcl command whose
106
name is \fIpathName\fR.  This
107
command may be used to invoke various
108
operations on the widget.  It has the following general form:
109
.CS
110
\fIpathName option \fR?\fIarg arg ...\fR?
111
.CE
112
\fIOption\fR and the \fIarg\fRs
113
determine the exact behavior of the command.  The following
114
commands are possible for message widgets:
115
.TP
116
\fIpathName \fBcget\fR \fIoption\fR
117
Returns the current value of the configuration option given
118
by \fIoption\fR.
119
\fIOption\fR may have any of the values accepted by the \fBmessage\fR
120
command.
121
.TP
122
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
123
Query or modify the configuration options of the widget.
124
If no \fIoption\fR is specified, returns a list describing all of
125
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
126
information on the format of this list).  If \fIoption\fR is specified
127
with no \fIvalue\fR, then the command returns a list describing the
128
one named option (this list will be identical to the corresponding
129
sublist of the value returned if no \fIoption\fR is specified).  If
130
one or more \fIoption\-value\fR pairs are specified, then the command
131
modifies the given widget option(s) to have the given value(s);  in
132
this case the command returns an empty string.
133
\fIOption\fR may have any of the values accepted by the \fBmessage\fR
134
command.
135
 
136
.SH "DEFAULT BINDINGS"
137
.PP
138
When a new message is created, it has no default event bindings:
139
messages are intended for output purposes only.
140
 
141
.SH BUGS
142
.PP
143
Tabs don't work very well with text that is centered or right-justified.
144
The most common result is that the line is justified wrong.
145
 
146
.SH KEYWORDS
147
message, widget

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.