Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / Tk::Compound.3
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "COMPOUND 1"
132.TH COMPOUND 1 "2000-12-30" "perl v5.8.0" "User Contributed Perl Documentation"
133.SH "NAME"
134Tk::Compound \- Create multi\-line compound images.
135.PP
136\&\ use Tk::Compound;
137\&\ \fI$image\fR = \fI$widget\fR\->\fBCompound\fR?(\fIname\fR??,\fIoptions\fR?)
138\&\ \fI$image\fR\->\fBLine\fR?(\fIoptions\fR?)
139\&\ \fI$image\fR\->\fBText\fR?(\fIoptions\fR?)
140\&\ \fI$image\fR\->\fBBitmap\fR?(\fIoptions\fR?)
141\&\ \fI$image\fR\->\fBImage\fR?(\fIoptions\fR?)
142\&\ \fI$image\fR\->\fBSpace\fR?(\fIoptions\fR?)
143.SH "DESCRIPTION"
144.IX Header "DESCRIPTION"
145Compound image types can be used to create images that consists of
146multiple horizontal lines; each line is composed of a series of items
147(texts, bitmaps, images or spaces) arranged from left to
148right. Compound images are mainly used to embed complex drawings into
149widgets that support the \fB\-image\fR option. As shown in the \s-1EXAMPLE\s0
150section below, a compound image can be used to display a bitmap and a
151text string simutaneously in a Tk \fBButton\fR widget.
152.PP
153Compound images can only be used on windows on the same display as, and
154with the same pixel depth and visual as the \fI$widget\fR used to create them.
155.SH "CREATING COMPOUND IMAGES"
156.IX Header "CREATING COMPOUND IMAGES"
157Compounds are created using \fI$widget\fR\->\fBCompound\fR.
158Compounds support the following \fIoptions\fR:
159.IP "\fB\-background\fR => \fIcolor\fR" 4
160.IX Item "-background => color"
161Specifies the background color of the compound image. This color is
162also used as the default background color for the bitmap items in the
163compound image.
164.IP "\fB\-borderwidth\fR => \fIpixels\fR" 4
165.IX Item "-borderwidth => pixels"
166Specifies a non-negative value indicating the width of the 3\-D border
167drawn around the compound image.
168.IP "\fB\-font\fR => \fIfont\fR" 4
169.IX Item "-font => font"
170Specifies the default font for the text items in the compound image.
171.IP "\fB\-foreground\fR => \fIcolor\fR" 4
172.IX Item "-foreground => color"
173Specifies the default foreground color for the bitmap and text items
174in the compound image.
175.IP "\fB\-padx\fR => \fIvalue\fR" 4
176.IX Item "-padx => value"
177Specifies a non-negative value indicating how much extra space to
178request for the compound image in the X\-direction. The \fIvalue\fR may
179have any of the forms acceptable to \fB\f(BITk_GetPixels\fB\|(3)\fR.
180.IP "\fB\-pady\fR => \fIvalue\fR" 4
181.IX Item "-pady => value"
182Specifies a non-negative value indicating how much extra space to
183request for the compound image in the Y\-direction.
184.IP "\fB\-relief\fR => \fIvalue\fR" 4
185.IX Item "-relief => value"
186Specifies the 3\-D effect desired for the background of the compound
187image. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR,
188\&\fBridge\fR, and \fBgroove\fR.
189.IP "\fB\-showbackground\fR => \fIvalue\fR" 4
190.IX Item "-showbackground => value"
191Specifies whether the background and the 3D borders should be drawn.
192Must be a valid boolean value. By default the background is not drawn
193and the compound image appears to have a transparent background.
194.SH "IMAGE COMMAND"
195.IX Header "IMAGE COMMAND"
196When a compound image is created, Tk also creates a new object.
197This object supports the \fBconfigure\fR and \fBcget\fR methods
198described in Tk::options which can be used to enquire and
199modify the options described above.
200.PP
201The object also supports the following methods:
202.IP "\fI$compound\fR\->\fBLine\fR?(\fIoption =\fR value ...>)?" 4
203.IX Item "$compound->Line?(option = value ...>)?"
204Creates a new line at the bottom of the compound image. Lines support
205the following \fIoptions\fR:
206.RS 4
207.IP "\fB\-anchor\fR value" 4
208.IX Item "-anchor value"
209Specifies how the line should be aligned along the horizontal axis.
210When the values are \fBw\fR, \fBsw\fR or \fBnw\fR, the line is aligned
211to the left. When the values are \fBc\fR, \fBs\fR or \fBn\fR, the line
212is aligned to the middle. When the values are \fBe\fR, \fBse\fR or
213\&\fBne\fR, the line is aligned to the right.
214.IP "\fB\-padx\fR => \fIvalue\fR" 4
215.IX Item "-padx => value"
216Specifies a non-negative value indicating how much extra space to
217request for this line in the X\-direction.
218.RE
219.RS 4
220.RE
221.IP "\fI$compound\fR\->\fIItemtype\fR?(\fIoption =\fR value ...>)?" 4
222.IX Item "$compound->Itemtype?(option = value ...>)?"
223Creates a new item of the type \fIItemtype\fR at the end of the last
224line of the compound image. All types of items support
225these following common \fIoptions\fR:
226.RS 4
227.IP "\fB\-anchor\fR value" 4
228.IX Item "-anchor value"
229Specifies how the item should be aligned along the vertical axis. When
230the values are \fBn\fR, \fBnw\fR or \fBne\fR, the item is aligned to
231the top of the line. When the values are \fBc\fR, \fBw\fR or \fBe\fR,
232the item is aligned to the middle of the line. When the values are
233\&\fBs\fR, \fBse\fR or \fBsw\fR, the item is aligned to the bottom of
234the line.
235.IP "\fB\-padx\fR => \fIvalue\fR" 4
236.IX Item "-padx => value"
237Specifies a non-negative value indicating how much extra space to
238request for this item in the X\-direction.
239.IP "\fB\-pady\fR => \fIvalue\fR" 4
240.IX Item "-pady => value"
241Specifies a non-negative value indicating how much extra space to
242request for this item in the Y\-direction.
243.IP "\fIitem-type\fR can be any of the following:" 4
244.IX Item "item-type can be any of the following:"
245.RE
246.RS 4
247.RE
248.PD 0
249.IP "\fI$compound\fR\->\fBBitmap\fR?(\fIoption =\fR value ...>)?" 4
250.IX Item "$compound->Bitmap?(option = value ...>)?"
251.PD
252Creates a new bitmap item of at the end of the last
253line of the compound image. Additional \fIoptions\fR accepted by the
254bitmap type are:
255.RS 4
256.IP "\fB\-background\fR => \fIcolor\fR" 4
257.IX Item "-background => color"
258Specifies the background color of the bitmap item.
259.IP "\fB\-bitmap\fR => \fIname\fR" 4
260.IX Item "-bitmap => name"
261Specifies a bitmap to display in this item, in any of the forms
262acceptable to \fB\f(BITk_GetBitmap\fB\|(3)\fR.
263.IP "\fB\-foreground\fR => \fIcolor\fR" 4
264.IX Item "-foreground => color"
265Specifies the foreground color of the bitmap item.
266.RE
267.RS 4
268.RE
269.IP "\fI$compound\fR\->\fBImage\fR?(\fIoption =\fR value ...>)?" 4
270.IX Item "$compound->Image?(option = value ...>)?"
271Creates a new image item of at the end of the last
272line of the compound image. Additional \fIoptions\fR accepted by the
273image type are:
274.RS 4
275.IP "\fB\-image\fR => \fIname\fR" 4
276.IX Item "-image => name"
277Specifies an image to display in this item. \fIname\fR
278must have been created with the \fBimage create\fR command.
279.RE
280.RS 4
281.RE
282.IP "\fI$compound\fR\->\fBSpace\fR?(\fIoption =\fR value ...>)?" 4
283.IX Item "$compound->Space?(option = value ...>)?"
284Creates a new space item of at the end of the last line of the
285compound image. Space items do not display anything. They just acts as
286space holders that add additional spaces between items inside a
287compound image. Additional \fIoptions\fR accepted by the image type
288are:
289.RS 4
290.IP "\fB\-width\fR => \fIvalue\fR" 4
291.IX Item "-width => value"
292Specifies the width of this space. The \fIvalue\fR may have any of the
293forms acceptable to \fB\f(BITk_GetPixels\fB\|(3)\fR.
294.IP "\fB\-height\fR => \fIvalue\fR" 4
295.IX Item "-height => value"
296Specifies the height of this space. The \fIvalue\fR may have any of
297the forms acceptable to \fB\f(BITk_GetPixels\fB\|(3)\fR.
298.RE
299.RS 4
300.RE
301.IP "\fI$compound\fR\->\fBText\fR?(\fIoption =\fR value ...>)?" 4
302.IX Item "$compound->Text?(option = value ...>)?"
303Creates a new text item of at the end of the last line of the compound
304image. Additional \fIoptions\fR accepted by the text type are:
305.RS 4
306.IP "\fB\-background\fR => \fIcolor\fR" 4
307.IX Item "-background => color"
308Specifies the background color of the text item.
309.IP "\fB\-font\fR => \fIname\fR" 4
310.IX Item "-font => name"
311Specifies the font to be used for this text item.
312.IP "\fB\-foreground\fR => \fIcolor\fR" 4
313.IX Item "-foreground => color"
314Specifies the foreground color of the text item.
315.IP "\fB\-justify\fR \fIvalue\fR" 4
316.IX Item "-justify value"
317When there are multiple lines of text displayed in a text item, this
318option determines how the lines line up with each other. \fIvalue\fR
319must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR
320means that the lines' left edges all line up, \fBcenter\fR means that
321the lines' centers are aligned, and \fBright\fR means that the lines'
322right edges line up.
323.IP "\fB\-text\fR => \fIstring\fR" 4
324.IX Item "-text => string"
325Specifies a text string to display in this text item.
326.IP "\fB\-underline\fR \fIvalue\fR" 4
327.IX Item "-underline value"
328Specifies the integer index of a character to underline in the text
329item. 0 corresponds to the first character of the text displayed in
330the text item, 1 to the next character, and so on.
331.IP "\fB\-wraplength\fR \fIvalue\fR" 4
332.IX Item "-wraplength value"
333This option specifies the maximum line length of the label string on
334this text item. If the line length of the label string exceeds this
335length, it is wrapped onto the next line, so that no line is longer
336than the specified length. The value may be specified in any of the
337standard forms for screen distances. If this value is less than or
338equal to 0 then no wrapping is done: lines will break only at newline
339characters in the text.
340.RE
341.RS 4
342.RE
343.SH "EXAMPLE"
344.IX Header "EXAMPLE"
345The following example creates a compound image with a bitmap and a
346text string and places this image into a \fBButton(n)\fR
347widget. Notice that the image must be created using the widget
348that it resides in.
349.PP
350.Vb 8
351\& my $b = $parent->Button;
352\& my $c = $b->Compound;
353\& $b->configure(-image => $c);
354\& $c->Line;
355\& $c->Bitmap(-bitmap => 'warning');
356\& $c->Space(-width => 8);
357\& $c->Text(-text => "Warning", -underline => 0);
358\& $b->pack;
359.Ve
360.SH "KEYWORDS"
361.IX Header "KEYWORDS"
362image(n), Tix(n)