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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [scrolledhtml.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1996 DSC Technologies Corporation
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
'\" @(#) scrolledhtml.n 1.21 94/12/17 16:04:44
8
'/"
9
.so man.macros
10
.HS scrolledhtml iwid
11
.BS
12
'\" Note:  do not modify the .SH NAME line immediately below!
13
.SH NAME
14
scrolledhtml \- Create and manipulate a scrolled text widget with the capability
15
of displaying HTML formatted documents.
16
.SH SYNOPSIS
17
\fBscrolledhtml\fI \fIpathName \fR?\fIoptions\fR?
18
.SH "INHERITANCE"
19
itk::Widget <- Labeledwidget <- Scrolledtext <- Scrolledhtml
20
.SH "STANDARD OPTIONS"
21
.LP
22
.nf
23
.ta 4c 8c 12c
24
\fBactiveBackground\fR  \fBbackground\fR        \fBborderWidth\fR       \fBcursor\fR
25
\fBexportSelection\fR   \fBforeground\fR        \fBhighlightColor\fR    \fBhighlightThickness\fR
26
\fBinsertBackground\fR  \fBinsertBorderWidth\fR \fBinsertOffTime\fR     \fBinsertOnTime\fR
27
\fBinsertWidth\fR       \fBpadX\fR      \fBpadY\fR      \fBrelief\fR
28
\fBrepeatDelay\fR       \fBrepeatInterval\fR    \fBselectBackground\fR  \fBselectBorderWidth\fR
29
\fBselectForeground\fR  \fBsetGrid\fR
30
.fi
31
.LP
32
See the "options" manual entry for details on the standard options.
33
.SH "ASSOCIATED OPTIONS"
34
.LP
35
.nf
36
.ta 4c 8c 12c
37
\fBactiveRelief\fR      \fBelementBorderWidth\fR        \fBjump\fR      \fBtroughColor\fR
38
.fi
39
.LP
40
See the "scrollbar" widget manual entry for details on the above
41
associated options.
42
.LP
43
.nf
44
.ta 4c 8c 12c
45
\fBspacing1\fR  \fBspacing2\fR  \fBspacing3\fR  \fBstate\fR
46
\fBwrap\fR
47
.fi
48
.LP
49
See the "text" widget manual entry for details on the above
50
associated options.
51
.SH "INHERITED OPTIONS"
52
.LP
53
.nf
54
.ta 4c 8c 12c
55
\fBlabelBitmap\fR       \fBlabelFont\fR \fBlabelImage\fR        \fBlabelMargin\fR
56
\fBlabelPos\fR  \fBlabelText\fR \fBlabelVariable\fR             \fBheight\fR
57
\fBhscrollMode\fR       \fBsbWidth\fR   \fBscrollMargin\fR      \fBvisibleitems\fR
58
\fBvscrollMode\fR       \fBwidth\fR
59
.fi
60
.LP
61
See the "scrolledtext" class manual entry for details on the inherited options.
62
.SH "WIDGET-SPECIFIC OPTIONS"
63
.LP
64
.nf
65
Name:   \fBfeedback\fR
66
Class:  \fBFeedBack\fR
67
Command-Line Switch:    \fB-feedback\fR
68
.fi
69
.IP
70
Specifies the callback command to use to give feedback on current
71
status. The command is executed in the form \fIcommand\fR \fI
72
characters remaining>\fR
73
.LP
74
.nf
75
Name:   \fBfixedfont\fR
76
Class:  \fBFixedFont\fR
77
Command-Line Switch:    \fB-fixedfont\fR
78
.fi
79
.IP
80
Specifies the name of the font to be used for fixed-width character
81
text (such as 
...
or ....) The size, style, and
82
other font attributes are determined by the format tags in the
83
document. The default is courier.
84
.LP
85
.nf
86
Name:   \fBfontname\fR
87
Class:  \fBFontName\fR
88
Command-Line Switch:    \fB-fontname\fR
89
.fi
90
.IP
91
Specifies the name of the font to be used for normal-width character
92
spaced text. The size, style, and other font attributes are
93
determined by the format tags in the document. The default is times.
94
.LP
95
.nf
96
Name:   \fBfontsize\fR
97
Class:  \fBFontSize\fR
98
Command-Line Switch:    \fB-fontsize\fR
99
.fi
100
.IP
101
Specifies the general size of the fonts used. One of small, medium,
102
large, or huge. The default is medium.
103
.LP
104
.nf
105
Name:   \fBforeground\fR
106
Class:  \fBForeground\fR
107
Command-Line Switch:    \fB-foreground\fR
108
.fi
109
.IP
110
Specifies the color of text other than hypertext links, in any
111
of the forms acceptable to \fBTk_GetColor\fR. This value may
112
be overridden in a particular document by the \fItext\fR attribute
113
of the \fBBody\fR HTML tag.
114
.LP
115
.nf
116
Name:   \fBlink\fR
117
Class:  \fBLink\fR
118
Command-Line Switch:    \fB-link\fR
119
.fi
120
.IP
121
Specifies the default color of hypertext links in any of the forms
122
acceptable to \fBTk_GetColor\fR. This value may be overridden in a
123
particular document by the \fIlink\fR attribute of the \fBBody\fR
124
HTML tag. The default is blue.
125
.LP
126
.nf
127
Name:   \fBlinkcommand\fR
128
Class:  \fBLinkCommand\fR
129
Command-Line Switch:    \fB-linkcommand\fR
130
.fi
131
.IP
132
Specifies the command to execute when the user clicks on a hypertext
133
link. Execution is of the form \fBlinkcommand href\fR, where \fBhref\fR is
134
the value given in the \fIhref\fR attribute of the \fBA\fR HTML tag.
135
.LP
136
.nf
137
Name:   \fBalink\fR
138
Class:  \fBalink\fR
139
Command-Line Switch:    \fB-alink\fR
140
.fi
141
.IP
142
Specifies the color of hypertext links when the cursor is over the link
143
in any of the forms acceptable to \fBTk_GetColor\fR. The default is red.
144
.LP
145
.nf
146
Name:   \fBtextBackground\fR
147
Class:  \fBBackground\fR
148
Command-Line Switch:    \fB-textbackground\fR
149
.fi
150
.IP
151
Specifies the background color for the text area in any of
152
the forms acceptable to \fBTk_GetColor\fR. This value may be
153
overridden in a particular document by the \fIbgcolor\fR attribute
154
of the \fBBody\fR HTML tag.
155
.LP
156
.nf
157
Name:   \fBunknownimage\fR
158
Class:  \fBUnknownImage\fR
159
Command-Line Switch:    \fB-unknownimage\fR
160
.fi
161
.IP
162
Specifies the name of the image file to display when an \fBimg\fR
163
specified in the html document cannot be loaded.
164
.LP
165
.nf
166
Name:   \fBupdate\fR
167
Class:  \fBUpdate\fR
168
Command-Line Switch:    \fB-alink\fR
169
.fi
170
.IP
171
A boolean value indicating whether to call update during html rendering.
172
.LP
173
.BE
174
 
175
.SH DESCRIPTION
176
.PP
177
The \fBscrolledhtml\fR command creates
178
a scrolled text widget with the additional capability to display
179
html formatted documents.
180
An import method is provided to read an html document file, and
181
a render method is provided to display a html formatted text string.
182
 
183
.SH "METHODS"
184
.PP
185
The \fBscrolledhtml\fR command creates a new Tcl command whose
186
name is \fIpathName\fR.  This
187
command may be used to invoke various
188
operations on the widget.  It has the following general form:
189
.DS C
190
\fIpathName option \fR?\fIarg arg ...\fR?
191
.DE
192
\fIOption\fR and the \fIarg\fRs
193
determine the exact behavior of the command.  The following
194
commands are possible for scrolledhtml widgets:
195
.SH "ASSOCIATED METHODS"
196
.LP
197
.nf
198
.ta 4c 8c 12c
199
\fBbbox\fR      \fBcompare\fR   \fBdebug\fR     \fBdelete\fR
200
\fBdlineinfo\fR \fBget\fR       \fBindex\fR     \fBinsert\fR
201
\fBmark\fR      \fBscan\fR      \fBsearch\fR    \fBsee\fR
202
\fBtag\fR       \fBwindow\fR    \fBxview\fR     \fByview\fR
203
.fi
204
.LP
205
See the "text" manual entry for details on the standard methods.
206
.SH "INHERITED METHODS"
207
.LP
208
.nf
209
.ta 4c 8c 12c
210
\fBexport\fR    \fBclear\fR
211
.fi
212
.LP
213
See the "scrolledhtml" manual entry for details on the inherited methods.
214
 
215
.SH "WIDGET-SPECIFIC METHODS"
216
.TP
217
\fIpathName \fBcget\fR \fIoption\fR
218
Returns the current value of the configuration option given
219
by \fIoption\fR.
220
\fIOption\fR may have any of the values accepted by the \fBscrolledhtml\fR
221
command.
222
.TP
223
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
224
Query or modify the configuration options of the widget.
225
If no \fIoption\fR is specified, returns a list describing all of
226
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
227
information on the format of this list).  If \fIoption\fR is specified
228
with no \fIvalue\fR, then the command returns a list describing the
229
one named option (this list will be identical to the corresponding
230
sublist of the value returned if no \fIoption\fR is specified).  If
231
one or more \fIoption\-value\fR pairs are specified, then the command
232
modifies the given widget option(s) to have the given value(s);  in
233
this case the command returns an empty string.
234
\fIOption\fR may have any of the values accepted by the \fBscrolledhtml\fR
235
command.
236
.TP
237
\fIpathName\fR \fBimport\fR ?\fIoption\fR? \fIhref\fR
238
Load html formatted text from a file.  \fIHref\fR must exist.
239
If \fIoption\fR is -link, \fIhref\fR is assumed to be relative
240
to the application's current working directory. Otherwise,
241
\fIhref\fR is assumed to be relative to the path of the last
242
page loaded. \fIHref\fR is either a filename, or a reference
243
of the form \fIfilename\fR#\fIanchorname\fR. In the latter form,
244
fIFilename\fR and/or \fIanchorname\fR may be empty.
245
If \fIfilename\fR is empty, the current document is assumed.
246
If \fIanchorname\fR is empty, the top of the document is assumed.
247
.TP
248
\fIpathName\fR \fBpwd\fR
249
Print the current working directory of the widget, i.e. the directory of the
250
last page loaded.
251
.TP
252
\fIpathName\fR \fBrender\fR \fIhtmltext\fR ?\fIwd\fR?
253
Display HTML formatted text \fIhtmltext\fR. \fIWd\fR gives the base
254
path to use for all links and images in the document. \fIWd\fR defaults
255
to the application's current working directory.
256
.TP
257
\fIpathName\fR \fBtitle\fR
258
Return the title of the current page, as given in the ...
259
field in the document.
260
 
261
.SH "HTML COMPLIANCE"
262
.LP
263
This widget is compliant with HTML 3.2 with the following exceptions:
264
.LP
265
No features requiring a connection to an http server are supported.
266
.LP
267
Some image alignments aren't supported, because they are not supported by
268
the text widget.
269
.LP
270
The 
attributes dealing with image alignments aren't supported.
271
.LP
272
Automatic table sizing is not supported very well, due to limitations of the
273
text widget
274
.RE
275
.SH EXAMPLE
276
.DS
277
 option add *textBackground white
278
 
279
 scrolledhtml .sh -fontname helvetica -linkcommand "this import -link"
280
 
281
 pack .sh -padx 10 -pady 10 -fill both -expand yes
282
 
283
 .sh import ~/public_html/index.html
284
.DE
285
.SH BUGS
286
.IP
287
Cells in a table can be caused to overlap. ex:
288
    
289
    
cell1cell2
290
    
cell3 w/ overlap
291
    
292
It hasn't been fixed because 1) it's a pain to fix, 2) it will slow
293
tables down by a significant amount, and 3) netscape has the same
294
bug, as of V3.01.
295
.SH ACKNOWLEDGEMENTS
296
Sam Shen
297
.IP
298
This code is based largely on his tkhtml.tcl code from tk inspect. Tkhtml
299
is copyright 1995 Lawrence Berkeley Laboratory.
300
.LP
301
.SH AUTHOR
302
Kris Raney
303
.SH KEYWORDS
304
scrolledhtml, html, text, widget

powered by: WebSVN 2.1.0

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