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

Subversion Repositories or1k_old

[/] [or1k_old/] [tags/] [start/] [insight/] [itcl/] [iwidgets3.0.0/] [demos/] [html/] [scrolledhtml.n.html] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
<HTML>
2
<HEAD>
3
<TITLE>iwidgets2.2.0 User Commands - scrolledhtml</TITLE>
4
</HEAD>
5
<BODY BGCOLOR="#FFFFFF">
6
<H1>iwidgets2.2.0 User Commands - scrolledhtml</H1>
7
<HR>
8
<PRE>
9
 
10
</PRE>
11
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
12
 
13
 
14
</PRE>
15
<H2>NAME</H2><PRE>
16
     scrolledhtml - Create and manipulate a scrolled text  widget
17
     with the capability of displaying HTML formatted documents.
18
 
19
 
20
</PRE>
21
<H2>SYNOPSIS</H2><PRE>
22
     <STRONG>scrolledhtml</STRONG> <EM>pathName</EM> ?<EM>options</EM>?
23
 
24
 
25
</PRE>
26
<H2>INHERITANCE</H2><PRE>
27
     itk::Widget &lt;- Labeledwidget &lt;- Scrolledtext &lt;- Scrolledhtml
28
 
29
 
30
</PRE>
31
<H2>STANDARD OPTIONS</H2><PRE>
32
     <STRONG>activeBackground</STRONG>               <STRONG>background</STRONG>      <STRONG>borderWidthcursor</STRONG>
33
     <STRONG>exportSelection</STRONG> <STRONG>foreground</STRONG>     <STRONG>highlightColor</STRONG>  <STRONG>highlightThickness</STRONG>
34
     <STRONG>insertBackground</STRONG>               <STRONG>insertBorderWidthinsertOffTimeinsertOnTime</STRONG>
35
     <STRONG>insertWidth</STRONG>     <STRONG>padX</STRONG>           <STRONG>padY</STRONG>            <STRONG>relief</STRONG>
36
     <STRONG>repeatDelay</STRONG>     <STRONG>repeatInterval</STRONG> <STRONG>selectBackgroundselectBorderWidth</STRONG>
37
     <STRONG>selectForeground</STRONG>               <STRONG>setGrid</STRONG>
38
 
39
     See the "options" manual entry for details on  the  standard
40
     options.
41
 
42
 
43
</PRE>
44
<H2>ASSOCIATED OPTIONS</H2><PRE>
45
     <STRONG>activeRelief</STRONG>    <STRONG>elementBorderWidth</STRONG>             <STRONG>jumptroughColor</STRONG>
46
 
47
     See the "scrollbar" widget manual entry for details  on  the
48
     above associated options.
49
 
50
     <STRONG>spacing1</STRONG>        <STRONG>spacing2</STRONG>       <STRONG>spacing3</STRONG>        <STRONG>state</STRONG>
51
     <STRONG>wrap</STRONG>
52
 
53
     See the "text" widget manual entry for details on the  above
54
     associated options.
55
 
56
 
57
</PRE>
58
<H2>INHERITED OPTIONS</H2><PRE>
59
     <STRONG>labelBitmap</STRONG>     <STRONG>labelFont</STRONG>      <STRONG>labelImage</STRONG>      <STRONG>labelMargin</STRONG>
60
     <STRONG>labelPos</STRONG>        <STRONG>labelText</STRONG>      <STRONG>labelVariable</STRONG>   <STRONG>height</STRONG>
61
     <STRONG>hscrollMode</STRONG>     <STRONG>sbWidth</STRONG>        <STRONG>scrollMargin</STRONG>    <STRONG>visibleitems</STRONG>
62
     <STRONG>vscrollMode</STRONG>     <STRONG>width</STRONG>
63
 
64
     See the "scrolledtext" class manual entry for details on the
65
     inherited options.
66
 
67
 
68
</PRE>
69
<H2>WIDGET-SPECIFIC OPTIONS</H2><PRE>
70
     Name:           <STRONG>feedback</STRONG>
71
     Class:          <STRONG>FeedBack</STRONG>
72
     Command-Line Switch:           <STRONG>-feedback</STRONG>
73
 
74
          Specifies the callback command to use to give  feedback
75
          on current status.  Two integers are appended onto this
76
          command.  They  represent  the  current  point  in  the
77
          rendering  process, and the maximum point.  The maximum
78
          depends on the length of the text being rendered.
79
 
80
     Name:           <STRONG>fixedfont</STRONG>
81
     Class:          <STRONG>FixedFont</STRONG>
82
     Command-Line Switch:           <STRONG>-fixedfont</STRONG>
83
 
84
          Specifies the name of the font to be  used  for  fixed-
85
          width   character   text  (such  as  &lt;pre&gt;...&lt;/pre&gt;  or
86
          &lt;tt&gt;...&lt;/tt&gt;.) The size, style, and other  font  attri-
87
          butes  are  determined  by the format tags in the docu-
88
          ment. The default is courier.
89
 
90
     Name:           <STRONG>fontname</STRONG>
91
     Class:          <STRONG>FontName</STRONG>
92
     Command-Line Switch:           <STRONG>-fontname</STRONG>
93
 
94
          Specifies the name of the font to be used  for  normal-
95
          width character spaced text. The size, style, and other
96
          font attributes are determined by the  format  tags  in
97
          the document. The default is times.
98
 
99
     Name:           <STRONG>fontsize</STRONG>
100
     Class:          <STRONG>FontSize</STRONG>
101
     Command-Line Switch:           <STRONG>-fontsize</STRONG>
102
 
103
          Specifies the general size of the fonts  used.  One  of
104
          small, medium, large, or huge. The default is medium.
105
 
106
     Name:           <STRONG>foreground</STRONG>
107
     Class:          <STRONG>Foreground</STRONG>
108
     Command-Line Switch:           <STRONG>-foreground</STRONG>
109
 
110
          Specifies the color of text other than hypertext links,
111
          in  any  of  the  forms acceptable to <STRONG>Tk_GetColor</STRONG>. This
112
          value may be overridden in a particular document by the
113
          <EM>text</EM> attribute of the <STRONG>Body</STRONG> HTML tag.
114
 
115
     Name:           <STRONG>link</STRONG>
116
     Class:          <STRONG>Link</STRONG>
117
     Command-Line Switch:           <STRONG>-link</STRONG>
118
 
119
          Specifies the default color of hypertext links  in  any
120
          of  the forms acceptable to <STRONG>Tk_GetColor</STRONG>. This value may
121
          be overridden in a  particular  document  by  the  <EM>link</EM>
122
          attribute of the <STRONG>Body</STRONG> HTML tag. The default is blue.
123
 
124
     Name:           <STRONG>linkcommand</STRONG>
125
     Class:          <STRONG>LinkCommand</STRONG>
126
     Command-Line Switch:           <STRONG>-linkcommand</STRONG>
127
 
128
          Specifies the command to execute when the  user  clicks
129
          on  a hypertext link. Execution is of the form <STRONG>linkcom-</STRONG>
130
          <STRONG>mand</STRONG> <STRONG>href</STRONG>, where <STRONG>href</STRONG> is the value given  in  the  <EM>href</EM>
131
          attribute of the <STRONG>A</STRONG> HTML tag.
132
 
133
     Name:           <STRONG>linkhighlight</STRONG>
134
     Class:          <STRONG>LinkHighlight</STRONG>
135
     Command-Line Switch:           <STRONG>-linkhighlight</STRONG>
136
 
137
          Specifies the color of hypertext links when the  cursor
138
          is  over  the  link  in  any of the forms acceptable to
139
          <STRONG>Tk_GetColor</STRONG>. The default is red.
140
 
141
     Name:           <STRONG>textBackground</STRONG>
142
     Class:          <STRONG>Background</STRONG>
143
     Command-Line Switch:           <STRONG>-textbackground</STRONG>
144
 
145
          Specifies the background color for the text area in any
146
          of  the forms acceptable to <STRONG>Tk_GetColor</STRONG>. This value may
147
          be overridden in a particular document by  the  <EM>bgcolor</EM>
148
          attribute of the <STRONG>Body</STRONG> HTML tag.
149
 
150
     Name:           <STRONG>unknownimage</STRONG>
151
     Class:          <STRONG>UnknownImage</STRONG>
152
     Command-Line Switch:           <STRONG>-unknownimage</STRONG>
153
 
154
          Specifies the name of the image file to display when an
155
          <STRONG>img</STRONG> specified in the html document cannot be loaded.
156
 
157
 
158
</PRE>
159
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
160
 
161
 
162
 
163
</PRE>
164
<H2>DESCRIPTION</H2><PRE>
165
     The <STRONG>scrolledhtml</STRONG> command creates a scrolled text widget with
166
     the  additional  capability  to display html formatted docu-
167
     ments.  An import method is provided to read an  html  docu-
168
     ment file, and a render method is provided to display a html
169
     formatted text string.
170
 
171
 
172
 
173
</PRE>
174
<H2>METHODS</H2><PRE>
175
     The <STRONG>scrolledhtml</STRONG> command creates a  new  Tcl  command  whose
176
     name  is <EM>pathName</EM>.  This command may be used to invoke vari-
177
     ous operations on the widget.  It has the following  general
178
     form:
179
 
180
          <EM>pathName</EM> <EM>option</EM> ?<EM>arg</EM> <EM>arg</EM> ...?
181
 
182
     <EM>Option</EM> and the <EM>arg</EM>s determine the exact behavior of the com-
183
     mand.   The following commands are possible for scrolledhtml
184
     widgets:
185
 
186
 
187
 
188
</PRE>
189
<H2>ASSOCIATED METHODS</H2><PRE>
190
     <STRONG>bbox</STRONG>            <STRONG>compare</STRONG>        <STRONG>debug</STRONG>           <STRONG>delete</STRONG>
191
     <STRONG>dlineinfo</STRONG>       <STRONG>get</STRONG>            <STRONG>index</STRONG>           <STRONG>insert</STRONG>
192
     <STRONG>mark</STRONG>            <STRONG>scan</STRONG>           <STRONG>search</STRONG>          <STRONG>see</STRONG>
193
     <STRONG>tag</STRONG>             <STRONG>window</STRONG>         <STRONG>xview</STRONG>           <STRONG>yview</STRONG>
194
 
195
     See the "text" manual entry  for  details  on  the  standard
196
     methods.
197
 
198
 
199
</PRE>
200
<H2>INHERITED METHODS</H2><PRE>
201
     <STRONG>export</STRONG>          <STRONG>clear</STRONG>
202
 
203
     See the "scrolledhtml"  manual  entry  for  details  on  the
204
     inherited methods.
205
 
206
 
207
 
208
</PRE>
209
<H2>WIDGET-SPECIFIC METHODS</H2><PRE>
210
     <EM>pathName</EM> <STRONG>cget</STRONG> <EM>option</EM>
211
          Returns the current value of the  configuration  option
212
          given  by  <EM>option</EM>.   <EM>Option</EM>  may have any of the values
213
          accepted by the <STRONG>scrolledhtml</STRONG> command.
214
 
215
     <EM>pathName</EM> <STRONG>configure</STRONG> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
216
          Query  or  modify  the  configuration  options  of  the
217
          widget.   If  no  <EM>option</EM>  is  specified, returns a list
218
          describing all of the available  options  for  <EM>pathName</EM>
219
          (see  <STRONG>Tk_ConfigureInfo</STRONG> for information on the format of
220
          this list).  If <EM>option</EM> is specified with no <EM>value</EM>, then
221
          the  command  returns  a  list describing the one named
222
          option (this list will be identical to the  correspond-
223
          ing  sublist  of  the  value  returned  if no <EM>option</EM> is
224
          specified).  If one or more  <EM>option</EM> - <EM>value</EM>  pairs  are
225
          specified,  then  the command modifies the given widget
226
          option(s) to have the given value(s);  in this case the
227
          command  returns  an empty string.  <EM>Option</EM> may have any
228
          of the values accepted by the <STRONG>scrolledhtml</STRONG> command.
229
 
230
     <EM>pathName</EM> <STRONG>import</STRONG> ?<EM>option</EM>? <EM>href</EM>
231
          Load html formatted text from a file.  <EM>Href</EM> must exist.
232
          If  <EM>option</EM>  is -link, <EM>href</EM> is assumed to be relative to
233
          the application's current working directory. Otherwise,
234
          <EM>href</EM>  is assumed to be relative to the path of the last
235
          page loaded. <EM>Href</EM> is either a filename, or a  reference
236
          of  the  form  <EM>filename</EM>#<EM>anchorname</EM>. In the latter form,
237
          fIFilename and/or <EM>anchorname</EM> may be empty. If  <EM>filename</EM>
238
          is  empty,  the current document is assumed. If <EM>anchor-</EM>
239
          <EM>name</EM> is empty, the top of the document is assumed.
240
 
241
     <EM>pathName</EM> <STRONG>pwd</STRONG>
242
          Print the current working directory of the widget, i.e.
243
          the directory of the last page loaded.
244
 
245
     <EM>pathName</EM> <STRONG>render</STRONG> <EM>htmltext</EM> ?<EM>wd</EM>?
246
          Display HTML formatted text <EM>htmltext</EM>. <EM>Wd</EM> gives the base
247
          path  to  use for all links and images in the document.
248
          <EM>Wd</EM> defaults to the application's current working direc-
249
          tory.
250
 
251
     <EM>pathName</EM> <STRONG>title</STRONG>
252
          Return the title of the current page, as given  in  the
253
          &lt;title&gt;...&lt;/title&gt; field in the document.
254
 
255
 
256
 
257
</PRE>
258
<H2>SUPPORTED HTML TAGS</H2><PRE>
259
     <STRONG>a</STRONG>               <STRONG>/code</STRONG>          <STRONG>h5</STRONG>              <STRONG>/samp</STRONG>
260
     <STRONG>/a</STRONG>              <STRONG>dir</STRONG>            <STRONG>/h5</STRONG>             <STRONG>small</STRONG>
261
     <STRONG>address</STRONG>         <STRONG>/dir</STRONG>           <STRONG>h6</STRONG>              <STRONG>/small</STRONG>
262
     <STRONG>/address</STRONG>        <STRONG>dl</STRONG>             <STRONG>/h6</STRONG>             <STRONG>sub</STRONG>
263
     <STRONG>b</STRONG>               <STRONG>/dl</STRONG>            <STRONG>i</STRONG>               <STRONG>/sub</STRONG>
264
     <STRONG>/b</STRONG>              <STRONG>dt</STRONG>             <STRONG>/i</STRONG>              <STRONG>sup</STRONG>
265
     <STRONG>base</STRONG>            <STRONG>dd</STRONG>             <STRONG>img</STRONG>             <STRONG>/sup</STRONG>
266
     <STRONG>big</STRONG>             <STRONG>dfn</STRONG>            <STRONG>kbd</STRONG>             <STRONG>strong</STRONG>
267
     <STRONG>/big</STRONG>            <STRONG>/dfn</STRONG>           <STRONG>li</STRONG>              <STRONG>/strong</STRONG>
268
     <STRONG>blockquote</STRONG>      <STRONG>em</STRONG>             <STRONG>listing</STRONG>         <STRONG>title</STRONG>
269
     <STRONG>/blockquote</STRONG>     <STRONG>/em</STRONG>            <STRONG>/listing</STRONG>        <STRONG>/title</STRONG>
270
     <STRONG>body</STRONG>            <STRONG>h1</STRONG>             <STRONG>menu</STRONG>            <STRONG>tt</STRONG>
271
     <STRONG>/body</STRONG>           <STRONG>/h1</STRONG>            <STRONG>/menu</STRONG>           <STRONG>/tt</STRONG>
272
     <STRONG>br</STRONG>              <STRONG>h2</STRONG>             <STRONG>ol</STRONG>              <STRONG>u</STRONG>
273
     <STRONG>center</STRONG>          <STRONG>/h2</STRONG>            <STRONG>/ol</STRONG>             <STRONG>/u</STRONG>
274
     <STRONG>/center</STRONG>         <STRONG>h3</STRONG>             <STRONG>p</STRONG>               <STRONG>ul</STRONG>
275
     <STRONG>cite</STRONG>            <STRONG>/h3</STRONG>            <STRONG>pre</STRONG>             <STRONG>/ul</STRONG>
276
     <STRONG>/cite</STRONG>           <STRONG>h4</STRONG>             <STRONG>/pre</STRONG>            <STRONG>var</STRONG>
277
     <STRONG>code</STRONG>            <STRONG>/h4</STRONG>            <STRONG>samp</STRONG>            <STRONG>/var</STRONG>
278
 
279
 
280
</PRE>
281
<H2>TAGS WITH ATTRIBUTES</H2><PRE>
282
     <STRONG>a</STRONG>
283
 
284
          <EM>href</EM> reference  to   html   document,   of   the   form
285
               filename#anchorname
286
 
287
          <EM>name</EM> name of this anchor, to be used in an href
288
 
289
          <EM>id</EM>   same as name
290
 
291
     <STRONG>body</STRONG>
292
 
293
          <EM>bgcolor</EM>
294
               background color
295
 
296
          <EM>link</EM> color of hypertext links
297
 
298
          <EM>text</EM> color of text
299
 
300
     <STRONG>h</STRONG><EM>n</EM>
301
          <EM>align</EM>
302
               text alignment, one of <STRONG>left</STRONG>, <STRONG>right</STRONG>, or <STRONG>center</STRONG>
303
 
304
          <EM>src</EM>  path to image to precede text
305
 
306
     <STRONG>hr</STRONG>
307
 
308
          <EM>noshade</EM>
309
               if present, indicates the rule should be  a  plain
310
               black line
311
 
312
          <EM>size</EM> height of the rule, in pixels
313
 
314
     <STRONG>img</STRONG>
315
 
316
          <EM>alt</EM>  text to display in place of image if image is  not
317
               found
318
 
319
          <EM>height</EM>
320
               height of area to reserve if image is not found
321
 
322
          <EM>src</EM>  filename of image
323
 
324
          <EM>width</EM>
325
               width of area to reserve if image is not found
326
 
327
     <STRONG>p</STRONG>
328
 
329
          <EM>align</EM>
330
               alignment of following  paragraph,  one  of  <STRONG>left</STRONG>,
331
               <STRONG>right</STRONG>,  or <STRONG>center</STRONG>. Defaults to alignment of previ-
332
               ous paragraph, or <STRONG>left</STRONG> for first paragraph
333
 
334
          <EM>id</EM>   ID for use as anchorname in a link to  this  docu-
335
               ment
336
 
337
     <STRONG>ul</STRONG>
338
 
339
          <EM>plain</EM>
340
               if present list will not use bullets
341
 
342
          <EM>src</EM>  image to use as bullet
343
 
344
          <EM>dingbat</EM>
345
               same as src
346
 
347
 
348
</PRE>
349
<H2>EXAMPLE</H2><PRE>
350
           option add *textBackground white
351
 
352
           scrolledhtml .sh -fontname helvetica -linkcommand "this import -link"
353
 
354
           pack .sh -padx 10 -pady 10 -fill both -expand yes
355
           .sh import ~/public_html/index.html
356
 
357
 
358
 
359
</PRE>
360
<H2>ACKNOWLEDGEMENTS</H2><PRE>
361
     Sam Shen
362
 
363
          This code is based largely on his tkhtml.tcl code  from
364
          tk  inspect. Tkhtml is copyright 1995 Lawrence Berkeley
365
          Laboratory.
366
 
367
 
368
</PRE>
369
<H2>AUTHOR</H2><PRE>
370
     Kris Raney
371
 
372
 
373
</PRE>
374
<H2>KEYWORDS</H2><PRE>
375
     scrolledhtml, html, text, widget
376
 
377
 
378
 
379
 
380
 
381
 
382
 
383
 
384
 
385
 
386
 
387
 
388
 
389
 
390
 
391
 
392
 
393
 
394
 
395
 
396
 
397
 
398
 
399
 
400
 
401
 
402
 
403
 
404
 
405
 
406
 
407
 
408
 
409
 
410
 
411
 
412
 
413
</PRE>
414
</BODY>
415
</HTML>

powered by: WebSVN 2.1.0

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