File: tile.mann

package info (click to toggle)
blt 2.5.3%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,980 kB
  • sloc: ansic: 133,725; tcl: 17,680; sh: 2,722; makefile: 813; cpp: 370
file content (141 lines) | stat: -rw-r--r-- 5,552 bytes parent folder | download | duplicates (5)
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
'\"
'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
'\"
'\" Permission to use, copy, modify, and distribute this software and its
'\" documentation for any purpose and without fee is hereby granted, provided
'\" that the above copyright notice appear in all copies and that both that the
'\" copyright notice and warranty disclaimer appear in supporting documentation,
'\" and that the names of Lucent Technologies any of their entities not be used
'\" in advertising or publicity pertaining to distribution of the software
'\" without specific, written prior permission.
'\"
'\" Lucent Technologies disclaims all warranties with regard to this software,
'\" including all implied warranties of merchantability and fitness.  In no event
'\" shall Lucent Technologies be liable for any special, indirect or
'\" consequential damages or any damages whatsoever resulting from loss of use,
'\" data or profits, whether in an action of contract, negligence or other
'\" tortuous action, arising out of or in connection with the use or performance
'\" of this software.  
'\"
'\" Tile command created by George Howlett.
'\"
.so man.macros
.TH tile n BLT_VERSION BLT "BLT Built-In Commands"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
tile \-  Tiling versions of Tk widgets
.SH SYNOPSIS
.sp
\fBtile::button \fIpathName\fR \fIoption value\fR...
.sp
\fBtile::checkbutton \fIpathName\fR \fIoption value\fR...
.sp
\fBtile::frame \fIpathName\fR \fIoption value\fR...
.sp
\fBtile::label \fIpathName\fR \fIoption value\fR...
.sp
\fBtile::radiobutton \fIpathName\fR \fIoption value\fR...
.sp
\fBtile::scrollbar \fIpathName\fR \fIoption value\fR...
.sp
\fBtile::toplevel \fIpathName\fR \fIoption value\fR...
.sp
.BE
.SH DESCRIPTION
The tile widgets let you create textured backgrounds.  The texture is
a Tk image which is tiled over the entire background of the widget.
The offset of the tile usually aligns with the toplevel window
so that all sub-tiles line up.  However,
image names containing an exlamation "!" (ususally
as the last char) are tiled absolutely.
.SH INTRODUCTION
With the advent of Tk 4.0, images are now easy to create and use in
applications.  Images add interest to applications and they convey
more information.  But one area where Tk hasn't taken advantage of
images is using images as textures for widgets.  Since tiling is a
standard feature of windowing systems, it's very easy to use images 
as textures.
.PP
Note: 
Wize now adds a -tile option to Tk widgets natively.
However, these are retained to provide the -shadow option.
.PP
Tiled widgets take the standard Tk 4.0 widgets and add tiling
configuration options to them.  Textures are specified by the name 
of the image you wish to be tiled across the background of the widget.  
.SH EXAMPLE
To add tiling to a widget, you simply create an image using 
Tk's \fBimage\fR command and use the image name as the value for
the \fB\-tile\fR configuration option of the widget.
.CS
image create photo my_texture -file tan_paper.gif
blt::tile::frame .f -tile my_texture
.CE
The image \fBmy_texture\fR is added to the frame.  
If \fBmy_texture\fR is updated, so will the widget background.
.CS
image create photo my_texture -file rain.gif
.CE
The tile widget commands reside in the "blt::tile" namespace, so
as not to collide with the normal Tk widgets.
An easy way to add tiling to existing programs is to import
the tile widget commands into the global namespace.
.CS
image create photo my_texture -file tan_paper.gif
namespace import -force blt::tile::*
frame .f -tile my_texture
.CE
To use one image for all texturing, you can use the "Tile" option
class name to specify the same image for all tile widgets.
.CS
image create photo my_texture -file tan_paper.gif
option add *Tile my_texture
.CE
.SH OPTIONS
The following configurations options are added to the widgets. If
a \fB\-tile\fB or \fB\-activetile\fR option is specified, it overrides
the background color of the widget.
.TP
\fB\-activetile \fIimage\fR 
Specifies a textured background to display when the widget is active.
This option is available for the \fBtilebutton\fR,
\fBtilecheckbutton\fR, \fBtileradiobutton\fR, and \fBtilescrollbar\fR
widgets.  \fIImage\fR is the name an image created using Tk's
\fBimage\fR command.  The background of the widget is tiled with
\fIimage\fR.  If \fIimage\fR is \fB""\fR, then the active background
color is displayed.  The default is \fB""\fR.
.TP
\fB\-tile \fIimage\fR 
Specifies a textured background to display for the widget.
\fIImage\fR is the name an image created using Tk's \fBimage\fR
command.  The background of the widget is tiled with \fIimage\fR.  If
\fIimage\fR is \fB""\fR, then the normal background color is
displayed.  The default is \fB""\fR.
.TP
\fB\-shadow \fIshadow\fR 
Set shadow for text.
.TP
\fB\-rotate \fIdegrees\fR
Support for rotating text in degrees, eg. 90, 180.
.TP
\fB\-checksize \fInum\fR
Specify the size of check/radio button indicator.
.TP
\fB\-icons \fIimages\fR
Give a list of 0, or 2-9 images to use for the indicators.
The first three are for normal,selected,tristate.
The next three repeat but for the active state.
The next three repeat but for the disabled state.
.TP
\fB\-bdimage \fIimage\fR
.TP
\fB\-activebdimage \fIimage\fR
.TP
\fB\-disabledbdimage \fIimage\fR
A border image that resizes to fit the widget.
.TP
\fB\-bdflags \fIint\fR
Set to -1 to perform inner rather than outer mirror.
.SH KEYWORDS
tile, texture, button, label, radiobutton, checkbutton, scrollbar, frame, toplevel