| 1 |
'\" |
| 2 |
'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies. |
| 3 |
'\" |
| 4 |
'\" Permission to use, copy, modify, and distribute this software and its |
| 5 |
'\" documentation for any purpose and without fee is hereby granted, provided |
| 6 |
'\" that the above copyright notice appear in all copies and that both that the |
| 7 |
'\" copyright notice and warranty disclaimer appear in supporting documentation, |
| 8 |
'\" and that the names of Lucent Technologies any of their entities not be used |
| 9 |
'\" in advertising or publicity pertaining to distribution of the software |
| 10 |
'\" without specific, written prior permission. |
| 11 |
'\" |
| 12 |
'\" Lucent Technologies disclaims all warranties with regard to this software, |
| 13 |
'\" including all implied warranties of merchantability and fitness. In no event |
| 14 |
'\" shall Lucent Technologies be liable for any special, indirect or |
| 15 |
'\" consequential damages or any damages whatsoever resulting from loss of use, |
| 16 |
'\" data or profits, whether in an action of contract, negligence or other |
| 17 |
'\" tortuous action, arising out of or in connection with the use or performance |
| 18 |
'\" of this software. |
| 19 |
'\" |
| 20 |
'\" Tile command created by George Howlett. |
| 21 |
'\" |
| 22 |
.so man.macros |
| 23 |
.TH tile n BLT_VERSION BLT "BLT Built-In Commands" |
| 24 |
.BS |
| 25 |
'\" Note: do not modify the .SH NAME line immediately below! |
| 26 |
.SH NAME |
| 27 |
tile \- Tiling versions of Tk widgets |
| 28 |
.SH SYNOPSIS |
| 29 |
.sp |
| 30 |
\fBtile::button \fIpathName\fR \fIoption value\fR... |
| 31 |
.sp |
| 32 |
\fBtile::checkbutton \fIpathName\fR \fIoption value\fR... |
| 33 |
.sp |
| 34 |
\fBtile::frame \fIpathName\fR \fIoption value\fR... |
| 35 |
.sp |
| 36 |
\fBtile::label \fIpathName\fR \fIoption value\fR... |
| 37 |
.sp |
| 38 |
\fBtile::radiobutton \fIpathName\fR \fIoption value\fR... |
| 39 |
.sp |
| 40 |
\fBtile::scrollbar \fIpathName\fR \fIoption value\fR... |
| 41 |
.sp |
| 42 |
\fBtile::toplevel \fIpathName\fR \fIoption value\fR... |
| 43 |
.sp |
| 44 |
.BE |
| 45 |
.SH DESCRIPTION |
| 46 |
The tile widgets let you create textured backgrounds. The texture is |
| 47 |
a Tk image which is tiled over the entire background of the widget. |
| 48 |
The offset of the tile usually aligns with the toplevel window |
| 49 |
so that all sub-tiles line up. However, |
| 50 |
image names containing an exlamation "!" (ususally |
| 51 |
as the last char) are tiled absolutely. |
| 52 |
.SH INTRODUCTION |
| 53 |
With the advent of Tk 4.0, images are now easy to create and use in |
| 54 |
applications. Images add interest to applications and they convey |
| 55 |
more information. But one area where Tk hasn't taken advantage of |
| 56 |
images is using images as textures for widgets. Since tiling is a |
| 57 |
standard feature of windowing systems, it's very easy to use images |
| 58 |
as textures. |
| 59 |
.PP |
| 60 |
Note: |
| 61 |
Wize now adds a -tile option to Tk widgets natively. |
| 62 |
However, these are retained to provide the -shadow option. |
| 63 |
.PP |
| 64 |
Tiled widgets take the standard Tk 4.0 widgets and add tiling |
| 65 |
configuration options to them. Textures are specified by the name |
| 66 |
of the image you wish to be tiled across the background of the widget. |
| 67 |
.SH EXAMPLE |
| 68 |
To add tiling to a widget, you simply create an image using |
| 69 |
Tk's \fBimage\fR command and use the image name as the value for |
| 70 |
the \fB\-tile\fR configuration option of the widget. |
| 71 |
.CS |
| 72 |
image create photo my_texture -file tan_paper.gif |
| 73 |
blt::tile::frame .f -tile my_texture |
| 74 |
.CE |
| 75 |
The image \fBmy_texture\fR is added to the frame. |
| 76 |
If \fBmy_texture\fR is updated, so will the widget background. |
| 77 |
.CS |
| 78 |
image create photo my_texture -file rain.gif |
| 79 |
.CE |
| 80 |
The tile widget commands reside in the "blt::tile" namespace, so |
| 81 |
as not to collide with the normal Tk widgets. |
| 82 |
An easy way to add tiling to existing programs is to import |
| 83 |
the tile widget commands into the global namespace. |
| 84 |
.CS |
| 85 |
image create photo my_texture -file tan_paper.gif |
| 86 |
namespace import -force blt::tile::* |
| 87 |
frame .f -tile my_texture |
| 88 |
.CE |
| 89 |
To use one image for all texturing, you can use the "Tile" option |
| 90 |
class name to specify the same image for all tile widgets. |
| 91 |
.CS |
| 92 |
image create photo my_texture -file tan_paper.gif |
| 93 |
option add *Tile my_texture |
| 94 |
.CE |
| 95 |
.SH OPTIONS |
| 96 |
The following configurations options are added to the widgets. If |
| 97 |
a \fB\-tile\fB or \fB\-activetile\fR option is specified, it overrides |
| 98 |
the background color of the widget. |
| 99 |
.TP |
| 100 |
\fB\-activetile \fIimage\fR |
| 101 |
Specifies a textured background to display when the widget is active. |
| 102 |
This option is available for the \fBtilebutton\fR, |
| 103 |
\fBtilecheckbutton\fR, \fBtileradiobutton\fR, and \fBtilescrollbar\fR |
| 104 |
widgets. \fIImage\fR is the name an image created using Tk's |
| 105 |
\fBimage\fR command. The background of the widget is tiled with |
| 106 |
\fIimage\fR. If \fIimage\fR is \fB""\fR, then the active background |
| 107 |
color is displayed. The default is \fB""\fR. |
| 108 |
.TP |
| 109 |
\fB\-tile \fIimage\fR |
| 110 |
Specifies a textured background to display for the widget. |
| 111 |
\fIImage\fR is the name an image created using Tk's \fBimage\fR |
| 112 |
command. The background of the widget is tiled with \fIimage\fR. If |
| 113 |
\fIimage\fR is \fB""\fR, then the normal background color is |
| 114 |
displayed. The default is \fB""\fR. |
| 115 |
.TP |
| 116 |
\fB\-shadow \fIshadow\fR |
| 117 |
Set shadow for text. |
| 118 |
.TP |
| 119 |
\fB\-rotate \fIdegrees\fR |
| 120 |
Support for rotating text in degrees, eg. 90, 180. |
| 121 |
.TP |
| 122 |
\fB\-checksize \fInum\fR |
| 123 |
Specify the size of check/radio button indicator. |
| 124 |
.TP |
| 125 |
\fB\-icons \fIimages\fR |
| 126 |
Give a list of 0, or 2-9 images to use for the indicators. |
| 127 |
The first three are for normal,selected,tristate. |
| 128 |
The next three repeat but for the active state. |
| 129 |
The next three repeat but for the disabled state. |
| 130 |
.TP |
| 131 |
\fB\-bdimage \fIimage\fR |
| 132 |
.TP |
| 133 |
\fB\-activebdimage \fIimage\fR |
| 134 |
.TP |
| 135 |
\fB\-disabledbdimage \fIimage\fR |
| 136 |
A border image that resizes to fit the widget. |
| 137 |
.TP |
| 138 |
\fB\-bdflags \fIint\fR |
| 139 |
Set to -1 to perform inner rather than outer mirror. |
| 140 |
.SH KEYWORDS |
| 141 |
tile, texture, button, label, radiobutton, checkbutton, scrollbar, frame, toplevel |