Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / Tk::Compound.3
.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "COMPOUND 1"
.TH COMPOUND 1 "2000-12-30" "perl v5.8.0" "User Contributed Perl Documentation"
.SH "NAME"
Tk::Compound \- Create multi\-line compound images.
.PP
\&\ use Tk::Compound;
\&\ \fI$image\fR = \fI$widget\fR\->\fBCompound\fR?(\fIname\fR??,\fIoptions\fR?)
\&\ \fI$image\fR\->\fBLine\fR?(\fIoptions\fR?)
\&\ \fI$image\fR\->\fBText\fR?(\fIoptions\fR?)
\&\ \fI$image\fR\->\fBBitmap\fR?(\fIoptions\fR?)
\&\ \fI$image\fR\->\fBImage\fR?(\fIoptions\fR?)
\&\ \fI$image\fR\->\fBSpace\fR?(\fIoptions\fR?)
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Compound image types can be used to create images that consists of
multiple horizontal lines; each line is composed of a series of items
(texts, bitmaps, images or spaces) arranged from left to
right. Compound images are mainly used to embed complex drawings into
widgets that support the \fB\-image\fR option. As shown in the \s-1EXAMPLE\s0
section below, a compound image can be used to display a bitmap and a
text string simutaneously in a Tk \fBButton\fR widget.
.PP
Compound images can only be used on windows on the same display as, and
with the same pixel depth and visual as the \fI$widget\fR used to create them.
.SH "CREATING COMPOUND IMAGES"
.IX Header "CREATING COMPOUND IMAGES"
Compounds are created using \fI$widget\fR\->\fBCompound\fR.
Compounds support the following \fIoptions\fR:
.IP "\fB\-background\fR => \fIcolor\fR" 4
.IX Item "-background => color"
Specifies the background color of the compound image. This color is
also used as the default background color for the bitmap items in the
compound image.
.IP "\fB\-borderwidth\fR => \fIpixels\fR" 4
.IX Item "-borderwidth => pixels"
Specifies a non-negative value indicating the width of the 3\-D border
drawn around the compound image.
.IP "\fB\-font\fR => \fIfont\fR" 4
.IX Item "-font => font"
Specifies the default font for the text items in the compound image.
.IP "\fB\-foreground\fR => \fIcolor\fR" 4
.IX Item "-foreground => color"
Specifies the default foreground color for the bitmap and text items
in the compound image.
.IP "\fB\-padx\fR => \fIvalue\fR" 4
.IX Item "-padx => value"
Specifies a non-negative value indicating how much extra space to
request for the compound image in the X\-direction. The \fIvalue\fR may
have any of the forms acceptable to \fB\f(BITk_GetPixels\fB\|(3)\fR.
.IP "\fB\-pady\fR => \fIvalue\fR" 4
.IX Item "-pady => value"
Specifies a non-negative value indicating how much extra space to
request for the compound image in the Y\-direction.
.IP "\fB\-relief\fR => \fIvalue\fR" 4
.IX Item "-relief => value"
Specifies the 3\-D effect desired for the background of the compound
image. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR,
\&\fBridge\fR, and \fBgroove\fR.
.IP "\fB\-showbackground\fR => \fIvalue\fR" 4
.IX Item "-showbackground => value"
Specifies whether the background and the 3D borders should be drawn.
Must be a valid boolean value. By default the background is not drawn
and the compound image appears to have a transparent background.
.SH "IMAGE COMMAND"
.IX Header "IMAGE COMMAND"
When a compound image is created, Tk also creates a new object.
This object supports the \fBconfigure\fR and \fBcget\fR methods
described in Tk::options which can be used to enquire and
modify the options described above.
.PP
The object also supports the following methods:
.IP "\fI$compound\fR\->\fBLine\fR?(\fIoption =\fR value ...>)?" 4
.IX Item "$compound->Line?(option = value ...>)?"
Creates a new line at the bottom of the compound image. Lines support
the following \fIoptions\fR:
.RS 4
.IP "\fB\-anchor\fR value" 4
.IX Item "-anchor value"
Specifies how the line should be aligned along the horizontal axis.
When the values are \fBw\fR, \fBsw\fR or \fBnw\fR, the line is aligned
to the left. When the values are \fBc\fR, \fBs\fR or \fBn\fR, the line
is aligned to the middle. When the values are \fBe\fR, \fBse\fR or
\&\fBne\fR, the line is aligned to the right.
.IP "\fB\-padx\fR => \fIvalue\fR" 4
.IX Item "-padx => value"
Specifies a non-negative value indicating how much extra space to
request for this line in the X\-direction.
.RE
.RS 4
.RE
.IP "\fI$compound\fR\->\fIItemtype\fR?(\fIoption =\fR value ...>)?" 4
.IX Item "$compound->Itemtype?(option = value ...>)?"
Creates a new item of the type \fIItemtype\fR at the end of the last
line of the compound image. All types of items support
these following common \fIoptions\fR:
.RS 4
.IP "\fB\-anchor\fR value" 4
.IX Item "-anchor value"
Specifies how the item should be aligned along the vertical axis. When
the values are \fBn\fR, \fBnw\fR or \fBne\fR, the item is aligned to
the top of the line. When the values are \fBc\fR, \fBw\fR or \fBe\fR,
the item is aligned to the middle of the line. When the values are
\&\fBs\fR, \fBse\fR or \fBsw\fR, the item is aligned to the bottom of
the line.
.IP "\fB\-padx\fR => \fIvalue\fR" 4
.IX Item "-padx => value"
Specifies a non-negative value indicating how much extra space to
request for this item in the X\-direction.
.IP "\fB\-pady\fR => \fIvalue\fR" 4
.IX Item "-pady => value"
Specifies a non-negative value indicating how much extra space to
request for this item in the Y\-direction.
.IP "\fIitem-type\fR can be any of the following:" 4
.IX Item "item-type can be any of the following:"
.RE
.RS 4
.RE
.PD 0
.IP "\fI$compound\fR\->\fBBitmap\fR?(\fIoption =\fR value ...>)?" 4
.IX Item "$compound->Bitmap?(option = value ...>)?"
.PD
Creates a new bitmap item of at the end of the last
line of the compound image. Additional \fIoptions\fR accepted by the
bitmap type are:
.RS 4
.IP "\fB\-background\fR => \fIcolor\fR" 4
.IX Item "-background => color"
Specifies the background color of the bitmap item.
.IP "\fB\-bitmap\fR => \fIname\fR" 4
.IX Item "-bitmap => name"
Specifies a bitmap to display in this item, in any of the forms
acceptable to \fB\f(BITk_GetBitmap\fB\|(3)\fR.
.IP "\fB\-foreground\fR => \fIcolor\fR" 4
.IX Item "-foreground => color"
Specifies the foreground color of the bitmap item.
.RE
.RS 4
.RE
.IP "\fI$compound\fR\->\fBImage\fR?(\fIoption =\fR value ...>)?" 4
.IX Item "$compound->Image?(option = value ...>)?"
Creates a new image item of at the end of the last
line of the compound image. Additional \fIoptions\fR accepted by the
image type are:
.RS 4
.IP "\fB\-image\fR => \fIname\fR" 4
.IX Item "-image => name"
Specifies an image to display in this item. \fIname\fR
must have been created with the \fBimage create\fR command.
.RE
.RS 4
.RE
.IP "\fI$compound\fR\->\fBSpace\fR?(\fIoption =\fR value ...>)?" 4
.IX Item "$compound->Space?(option = value ...>)?"
Creates a new space item of at the end of the last line of the
compound image. Space items do not display anything. They just acts as
space holders that add additional spaces between items inside a
compound image. Additional \fIoptions\fR accepted by the image type
are:
.RS 4
.IP "\fB\-width\fR => \fIvalue\fR" 4
.IX Item "-width => value"
Specifies the width of this space. The \fIvalue\fR may have any of the
forms acceptable to \fB\f(BITk_GetPixels\fB\|(3)\fR.
.IP "\fB\-height\fR => \fIvalue\fR" 4
.IX Item "-height => value"
Specifies the height of this space. The \fIvalue\fR may have any of
the forms acceptable to \fB\f(BITk_GetPixels\fB\|(3)\fR.
.RE
.RS 4
.RE
.IP "\fI$compound\fR\->\fBText\fR?(\fIoption =\fR value ...>)?" 4
.IX Item "$compound->Text?(option = value ...>)?"
Creates a new text item of at the end of the last line of the compound
image. Additional \fIoptions\fR accepted by the text type are:
.RS 4
.IP "\fB\-background\fR => \fIcolor\fR" 4
.IX Item "-background => color"
Specifies the background color of the text item.
.IP "\fB\-font\fR => \fIname\fR" 4
.IX Item "-font => name"
Specifies the font to be used for this text item.
.IP "\fB\-foreground\fR => \fIcolor\fR" 4
.IX Item "-foreground => color"
Specifies the foreground color of the text item.
.IP "\fB\-justify\fR \fIvalue\fR" 4
.IX Item "-justify value"
When there are multiple lines of text displayed in a text item, this
option determines how the lines line up with each other. \fIvalue\fR
must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR
means that the lines' left edges all line up, \fBcenter\fR means that
the lines' centers are aligned, and \fBright\fR means that the lines'
right edges line up.
.IP "\fB\-text\fR => \fIstring\fR" 4
.IX Item "-text => string"
Specifies a text string to display in this text item.
.IP "\fB\-underline\fR \fIvalue\fR" 4
.IX Item "-underline value"
Specifies the integer index of a character to underline in the text
item. 0 corresponds to the first character of the text displayed in
the text item, 1 to the next character, and so on.
.IP "\fB\-wraplength\fR \fIvalue\fR" 4
.IX Item "-wraplength value"
This option specifies the maximum line length of the label string on
this text item. If the line length of the label string exceeds this
length, it is wrapped onto the next line, so that no line is longer
than the specified length. The value may be specified in any of the
standard forms for screen distances. If this value is less than or
equal to 0 then no wrapping is done: lines will break only at newline
characters in the text.
.RE
.RS 4
.RE
.SH "EXAMPLE"
.IX Header "EXAMPLE"
The following example creates a compound image with a bitmap and a
text string and places this image into a \fBButton(n)\fR
widget. Notice that the image must be created using the widget
that it resides in.
.PP
.Vb 8
\& my $b = $parent->Button;
\& my $c = $b->Compound;
\& $b->configure(-image => $c);
\& $c->Line;
\& $c->Bitmap(-bitmap => 'warning');
\& $c->Space(-width => 8);
\& $c->Text(-text => "Warning", -underline => 0);
\& $b->pack;
.Ve
.SH "KEYWORDS"
.IX Header "KEYWORDS"
image(n), Tix(n)