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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [canvasprintbox.n] - Blame information for rev 1782

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

Line No. Rev Author Line
1 578 markom
'\"
2
'\" canvasprintbox (c) 1995 Tako Schotanus
3
'\"
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
'\"
7
'/"
8
.so man.macros
9
.HS canvasprintbox iwid
10
.BS
11
'\" Note:  do not modify the .SH NAME line immediately below!
12
.SH NAME
13
canvasprintbox \- Create and manipulate a canvas print box widget
14
.SH SYNOPSIS
15
\fBcanvasprintbox\fI \fIpathName \fR?\fIoptions\fR?
16
.SH "INHERITANCE"
17
itk::Widget <- Canvasprintbox
18
.SH "STANDARD OPTIONS"
19
.LP
20
.nf
21
.ta 4c 8c 12c
22
\fBactiveBackground\fR  \fBbackground\fR        \fBborderWidth\fR       \fBcursor\fR
23
\fBforeground\fR        \fBhighlightBackground\fR       \fBhighlightColor\fR    \fBhighlightThickness\fR
24
\fBinsertBackground\fR  \fBinsertBorderWidth\fR \fBinsertOffTime\fR     \fBinsertOnTime\fR
25
\fBinsertWidth\fR       \fBrelief\fR    \fBrepeatDelay\fR       \fBrepeatInterval\fR
26
\fBselectBackground\fR  \fBselectBorderWidth\fR \fBselectForeground\fR
27
.fi
28
.LP
29
See the "options" manual entry for details on the standard options.
30
.SH "ASSOCIATED OPTIONS"
31
.IP
32
.LP
33
.SH "WIDGET-SPECIFIC OPTIONS"
34
.LP
35
.nf
36
Name:   \fBfilename\fR
37
Class:  \fBFileName\fR
38
Command-Line Switch:    \fB-filename\fR
39
.fi
40
.IP
41
The file to write the postscript output to (Only when output
42
is set to "file"). If posterizing is turned on and \fBhpagecnt\fR
43
and/or \fBvpagecnt\fR is more than 1, x.y is appended to the filename
44
where x is the horizontal page number and y the vertical page number.
45
.LP
46
.nf
47
Name:   \fBhpagecnt\fR
48
Class:  \fBPageCnt\fR
49
Command-Line Switch:    \fB-hpagecnt\fR
50
.fi
51
.IP
52
Is used in combination with \fBposterize\fR to determine over
53
how many pages the output should be distributed. This
54
attribute specifies how many pages should be used horizontaly.
55
Any change to this attribute will automatically update the "stamp".
56
Defaults to 1.
57
.LP
58
.nf
59
Name:   \fBorient\fR
60
Class:  \fBOrient\fR
61
Command-Line Switch:    \fB-orient\fR
62
.fi
63
.IP
64
Determines the orientation of the output to the printer (or file).
65
It can take the value "portrait" or "landscape" (default). Changes
66
to this attribute will be reflected immediately in the "stamp".
67
Defaults to "landscape" but will be changed automaticaly to the value
68
deemed appropiate for the current canvas. Setting this attribute
69
when the canvasprintbox is first constructed (instead of using the
70
"configure" method) will turn off the auto adjustment of this attribute.
71
.LP
72
.nf
73
Name:   \fBoutput\fR
74
Class:  \fBOutput\fR
75
Command-Line Switch:    \fB-output\fR
76
.fi
77
.IP
78
Specifies where the postscript output should go: to the printer
79
or to a file. Can take on the values "printer" or "file".
80
The corresponding entry-widget will reflect the contents of
81
either the \fBprintcmd\fR attribute or the \fBfilename\fR attribute.
82
Defaults to "printer".
83
.LP
84
.nf
85
Name:   \fBpageSize\fR
86
Class:  \fBPageSize\fR
87
Command-Line Switch:    \fB-pagesize\fR
88
.fi
89
.IP
90
The pagesize the printer supports. Changes to this attribute
91
will be reflected immediately in the "stamp".
92
Defaults to "a4".
93
.LP
94
.nf
95
Name:   \fBposterize\fR
96
Class:  \fBPosterize\fR
97
Command-Line Switch:    \fB-posterize\fR
98
.fi
99
.IP
100
Indicates if posterizing is turned on or not. Posterizing
101
the output means that it is possible to distribute the
102
output over more than one page. This way it is possible to
103
print a canvas/region which is larger than the specified
104
pagesize without stretching. If used in combination with
105
stretching it can be used to "blow up" the contents of a
106
canvas to as large as size as you want (See attributes:
107
hpagecnt and vpagecnt). Any change to this attribute will
108
automatically update the "stamp".
109
Defaults to 0.
110
.LP
111
.nf
112
Name:   \fBprintCmd\fR
113
Class:  \fBPrintCmd\fR
114
Command-Line Switch:    \fB-printcmd\fR
115
.fi
116
.IP
117
The command to execute when printing the postscript output.
118
The command will get the postscript directed to its standard
119
input (Only when output is set to "printer").
120
Defaults to "lpr".
121
.LP
122
.nf
123
Name:   \fBprintRegion\fR
124
Class:  \fBPrintRegion\fR
125
Command-Line Switch:    \fB-printregion\fR
126
.fi
127
.IP
128
A list of four coordinates specifying which part of the canvas to print.
129
An empty list means that the canvas' entire \fBscrollregion\fR should be
130
printed. Any change to this attribute will automatically update the "stamp".
131
Defaults to an empty list.
132
.LP
133
.nf
134
Name:   \fBstretch\fR
135
Class:  \fBStretch\fR
136
Command-Line Switch:    \fB-stretch\fR
137
.fi
138
.IP
139
Determines if the output should be stretched to fill the
140
page (as defined by the attribute pagesize) as large as
141
possible. The aspect-ratio of the output will be retained
142
and the output will never fall outside of the boundaries
143
of the page.
144
Defaults to 0 but will be changed automaticaly to the value
145
deemed appropiate for the current canvas. Setting this attribute
146
when the canvasprintbox is first constructed (instead of using the
147
"configure" method) will turn off the auto adjustment of this attribute.
148
.LP
149
.nf
150
Name:   \fBvPageCnt\fR
151
Class:  \fBPageCnt\fR
152
Command-Line Switch:    \fB-vpagecnt\fR
153
.fi
154
.IP
155
Is used in combination with "posterize" to determine over
156
how many pages the output should be distributed. This
157
attribute specifies how many pages should be used verticaly.
158
Any change to this attribute will automatically update the "stamp".
159
Defaults to 1.
160
.LP
161
.BE
162
 
163
.SH DESCRIPTION
164
.PP
165
Implements a print box for printing the contents of a canvas widget
166
to a printer or a file. It is possible to specify page orientation, the
167
number of pages to print the image on and if the output should be
168
stretched to fit the page. Options exist to control the appearance and
169
actions of the widget.
170
 
171
.SH "METHODS"
172
.PP
173
The \fBcanvasprintbox\fR command creates a new Tcl command whose
174
name is \fIpathName\fR.  This
175
command may be used to invoke various
176
operations on the widget.  It has the following general form:
177
.DS C
178
\fIpathName option \fR?\fIarg arg ...\fR?
179
.DE
180
\fIOption\fR and the \fIarg\fRs
181
determine the exact behavior of the command.  The following
182
commands are possible for canvasprintbox widgets:
183
 
184
.SH "WIDGET-SPECIFIC METHODS"
185
.TP
186
\fIpathName \fBcget\fR \fIoption\fR
187
Returns the current value of the configuration option given
188
by \fIoption\fR.
189
\fIOption\fR may have any of the values accepted by the \fBcanvasprintbox\fR
190
command.
191
.TP
192
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
193
Query or modify the configuration options of the widget.
194
If no \fIoption\fR is specified, returns a list describing all of
195
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
196
information on the format of this list).  If \fIoption\fR is specified
197
with no \fIvalue\fR, then the command returns a list describing the
198
one named option (this list will be identical to the corresponding
199
sublist of the value returned if no \fIoption\fR is specified).  If
200
one or more \fIoption\-value\fR pairs are specified, then the command
201
modifies the given widget option(s) to have the given value(s);  in
202
this case the command returns an empty string.
203
\fIOption\fR may have any of the values accepted by the \fBcanvasprintbox\fR
204
command.
205
.TP
206
\fIpathName\fR \fBgetoutput\fR
207
Returns the value of the \fBprintercmd\fR or \fBfilename\fR option
208
depending on the current setting of \fBoutput\fR.
209
.TP
210
\fIpathName\fR \fBprint\fR
211
Perfrom the actual printing of the canvas using the current settings of
212
all the attributes. Returns a boolean indicating wether the printing was
213
successful or not.
214
.TP
215
\fIpathName\fR \fBrefresh\fR
216
Retrieves the current value for all edit fields and updates
217
the stamp accordingly. Is useful for Apply-buttons.
218
.TP
219
\fIpathName\fR \fBsetcanvas\fR \fIcanvas\fR
220
This is used to set the \fIcanvas\fR that has to be printed.
221
A stamp-sized copy will automatically be drawn to show how the
222
output would look with the current settings.
223
.TP
224
\fIpathName \fBstop\fR
225
Stops the drawing of the "stamp". I'm currently unable to detect
226
when a Canvasprintbox gets destroyed or withdrawn. It's therefore
227
advised that you perform a stop before you do something like that.
228
.SH "COMPONENTS"
229
.LP
230
.nf
231
Name:   \fBprtflentry\fR
232
Class:  \fBEntry\fR
233
.fi
234
.IP
235
The prtflentry component is the entry field for user input of the
236
\fBfilename\fR or \fBprinter\fR command (depending on the value of
237
\fBoutput\fR).
238
.LP
239
.nf
240
Name:   \fBhpcnt\fR
241
Class:  \fBEntry\fR
242
.fi
243
.IP
244
The hpcnt component is the entry field for user input of the number of
245
pages to use horizontaly when \fBposterize\fR is turned on.
246
.fi
247
.nf
248
Name:   \fBvpcnt\fR
249
Class:  \fBEntry\fR
250
.fi
251
.IP
252
The vpcnt component is the entry field for user input of the number of
253
pages to use verticaly when \fBposterize\fR is turned on.
254
.fi
255
 
256
.SH EXAMPLE
257
.DS
258
canvasprintbox .fsb -orient landscape -stretch 1
259
pack .fsb -padx 10 -pady 10 -fill both -expand yes
260
.DE
261
.SH AUTHOR
262
Tako Schotanus
263
.LP
264
Tako.Schotanus@bouw.tno.nl
265
.SH KEYWORDS
266
canvasprintbox, widget

powered by: WebSVN 2.1.0

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