⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scrolledhtml.n

📁 linux 下的源代码分析阅读器 red hat公司新版
💻 N
字号:
'\"'\" Copyright (c) 1996 DSC Technologies Corporation'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\"'\" @(#) scrolledhtml.n 1.21 94/12/17 16:04:44'/" .so man.macros.HS scrolledhtml iwid.BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEscrolledhtml \- Create and manipulate a scrolled text widget with the capabilityof displaying HTML formatted documents..SH SYNOPSIS\fBscrolledhtml\fI \fIpathName \fR?\fIoptions\fR?.SH "INHERITANCE"itk::Widget <- Labeledwidget <- Scrolledtext <- Scrolledhtml.SH "STANDARD OPTIONS".LP.nf.ta 4c 8c 12c\fBactiveBackground\fR	\fBbackground\fR	\fBborderWidth\fR	\fBcursor\fR\fBexportSelection\fR	\fBforeground\fR	\fBhighlightColor\fR	\fBhighlightThickness\fR\fBinsertBackground\fR	\fBinsertBorderWidth\fR	\fBinsertOffTime\fR	\fBinsertOnTime\fR\fBinsertWidth\fR	\fBpadX\fR	\fBpadY\fR	\fBrelief\fR\fBrepeatDelay\fR	\fBrepeatInterval\fR	\fBselectBackground\fR	\fBselectBorderWidth\fR\fBselectForeground\fR	\fBsetGrid\fR .fi.LPSee the "options" manual entry for details on the standard options..SH "ASSOCIATED OPTIONS".LP.nf.ta 4c 8c 12c\fBactiveRelief\fR	\fBelementBorderWidth\fR	\fBjump\fR	\fBtroughColor\fR.fi.LPSee the "scrollbar" widget manual entry for details on the aboveassociated options..LP.nf.ta 4c 8c 12c\fBspacing1\fR	\fBspacing2\fR	\fBspacing3\fR	\fBstate\fR\fBwrap\fR.fi.LPSee the "text" widget manual entry for details on the aboveassociated options..SH "INHERITED OPTIONS".LP.nf.ta 4c 8c 12c\fBlabelBitmap\fR	\fBlabelFont\fR	\fBlabelImage\fR	\fBlabelMargin\fR\fBlabelPos\fR	\fBlabelText\fR	\fBlabelVariable\fR 		\fBheight\fR\fBhscrollMode\fR	\fBsbWidth\fR	\fBscrollMargin\fR	\fBvisibleitems\fR\fBvscrollMode\fR	\fBwidth\fR.fi.LPSee the "scrolledtext" class manual entry for details on the inherited options..SH "WIDGET-SPECIFIC OPTIONS".LP.nfName:	\fBfeedback\fRClass:	\fBFeedBack\fRCommand-Line Switch:	\fB-feedback\fR.fi.IPSpecifies the callback command to use to give feedback on currentstatus. The command is executed in the form \fIcommand\fR \fI<number of characters remaining>\fR.LP.nfName:	\fBfixedfont\fRClass:	\fBFixedFont\fRCommand-Line Switch:	\fB-fixedfont\fR.fi.IPSpecifies the name of the font to be used for fixed-width charactertext (such as <pre>...</pre> or <tt>...</tt>.) The size, style, and other font attributes are determined by the format tags in the document. The default is courier..LP.nfName:	\fBfontname\fRClass:	\fBFontName\fRCommand-Line Switch:	\fB-fontname\fR.fi.IPSpecifies the name of the font to be used for normal-width character spaced text. The size, style, and other font attributes are determined by the format tags in the document. The default is times..LP.nfName:	\fBfontsize\fRClass:	\fBFontSize\fRCommand-Line Switch:	\fB-fontsize\fR.fi.IPSpecifies the general size of the fonts used. One of small, medium,large, or huge. The default is medium..LP.nfName:	\fBforeground\fRClass:	\fBForeground\fRCommand-Line Switch:	\fB-foreground\fR.fi.IPSpecifies the color of text other than hypertext links, in any of the forms acceptable to \fBTk_GetColor\fR. This value maybe overridden in a particular document by the \fItext\fR attribute of the \fBBody\fR HTML tag..LP.nfName:	\fBlink\fRClass:	\fBLink\fRCommand-Line Switch:	\fB-link\fR.fi.IPSpecifies the default color of hypertext links in any of the formsacceptable to \fBTk_GetColor\fR. This value may be overridden in aparticular document by the \fIlink\fR attribute of the \fBBody\fR HTML tag. The default is blue..LP.nfName:	\fBlinkcommand\fRClass:	\fBLinkCommand\fRCommand-Line Switch:	\fB-linkcommand\fR.fi.IPSpecifies the command to execute when the user clicks on a hypertextlink. Execution is of the form \fBlinkcommand href\fR, where \fBhref\fR isthe value given in the \fIhref\fR attribute of the \fBA\fR HTML tag..LP.nfName:	\fBalink\fRClass:	\fBalink\fRCommand-Line Switch:	\fB-alink\fR.fi.IPSpecifies the color of hypertext links when the cursor is over the linkin any of the forms acceptable to \fBTk_GetColor\fR. The default is red..LP.nfName:	\fBtextBackground\fRClass:	\fBBackground\fRCommand-Line Switch:	\fB-textbackground\fR.fi.IPSpecifies the background color for the text area in any of the forms acceptable to \fBTk_GetColor\fR. This value may be overridden in a particular document by the \fIbgcolor\fR attribute of the \fBBody\fR HTML tag..LP.nfName:	\fBunknownimage\fRClass:	\fBUnknownImage\fRCommand-Line Switch:	\fB-unknownimage\fR.fi.IPSpecifies the name of the image file to display when an \fBimg\fRspecified in the html document cannot be loaded..LP.nfName:	\fBupdate\fRClass:	\fBUpdate\fRCommand-Line Switch:	\fB-alink\fR.fi.IPA boolean value indicating whether to call update during html rendering..LP.BE.SH DESCRIPTION.PPThe \fBscrolledhtml\fR command creates a scrolled text widget with the additional capability to displayhtml formatted documents.An import method is provided to read an html document file, anda render method is provided to display a html formatted text string..SH "METHODS".PPThe \fBscrolledhtml\fR command creates a new Tcl command whosename is \fIpathName\fR.  Thiscommand may be used to invoke variousoperations on the widget.  It has the following general form:.DS C\fIpathName option \fR?\fIarg arg ...\fR?.DE\fIOption\fR and the \fIarg\fRsdetermine the exact behavior of the command.  The followingcommands are possible for scrolledhtml widgets:.SH "ASSOCIATED METHODS".LP.nf.ta 4c 8c 12c\fBbbox\fR	\fBcompare\fR	\fBdebug\fR	\fBdelete\fR	\fBdlineinfo\fR	\fBget\fR	\fBindex\fR	\fBinsert\fR\fBmark\fR	\fBscan\fR	\fBsearch\fR	\fBsee\fR\fBtag\fR	\fBwindow\fR	\fBxview\fR	\fByview\fR.fi.LPSee the "text" manual entry for details on the standard methods..SH "INHERITED METHODS".LP.nf.ta 4c 8c 12c\fBexport\fR	\fBclear\fR.fi.LPSee the "scrolledhtml" manual entry for details on the inherited methods..SH "WIDGET-SPECIFIC METHODS".TP\fIpathName \fBcget\fR \fIoption\fRReturns the current value of the configuration option givenby \fIoption\fR.\fIOption\fR may have any of the values accepted by the \fBscrolledhtml\fRcommand..TP\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?Query or modify the configuration options of the widget.If no \fIoption\fR is specified, returns a list describing all ofthe available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list).  If \fIoption\fR is specifiedwith no \fIvalue\fR, then the command returns a list describing theone named option (this list will be identical to the correspondingsublist of the value returned if no \fIoption\fR is specified).  Ifone or more \fIoption\-value\fR pairs are specified, then the commandmodifies the given widget option(s) to have the given value(s);  inthis case the command returns an empty string.\fIOption\fR may have any of the values accepted by the \fBscrolledhtml\fRcommand..TP\fIpathName\fR \fBimport\fR ?\fIoption\fR? \fIhref\fRLoad html formatted text from a file.  \fIHref\fR must exist.If \fIoption\fR is -link, \fIhref\fR is assumed to be relativeto the application's current working directory. Otherwise, \fIhref\fR is assumed to be relative to the path of the lastpage loaded. \fIHref\fR is either a filename, or a referenceof the form \fIfilename\fR#\fIanchorname\fR. In the latter form,fIFilename\fR and/or \fIanchorname\fR may be empty. If \fIfilename\fR is empty, the current document is assumed. If \fIanchorname\fR is empty, the top of the document is assumed..TP\fIpathName\fR \fBpwd\fRPrint the current working directory of the widget, i.e. the directory of thelast page loaded..TP\fIpathName\fR \fBrender\fR \fIhtmltext\fR ?\fIwd\fR?Display HTML formatted text \fIhtmltext\fR. \fIWd\fR gives the basepath to use for all links and images in the document. \fIWd\fR defaultsto the application's current working directory..TP\fIpathName\fR \fBtitle\fRReturn the title of the current page, as given in the <title>...</title>field in the document..SH "HTML COMPLIANCE".LPThis widget is compliant with HTML 3.2 with the following exceptions:.LPNo features requiring a connection to an http server are supported..LPSome image alignments aren't supported, because they are not supported bythe text widget..LPThe <br> attributes dealing with image alignments aren't supported..LPAutomatic table sizing is not supported very well, due to limitations of thetext widget.RE.SH EXAMPLE.DS option add *textBackground white scrolledhtml .sh -fontname helvetica -linkcommand "this import -link" pack .sh -padx 10 -pady 10 -fill both -expand yes .sh import ~/public_html/index.html.DE.SH BUGS.IPCells in a table can be caused to overlap. ex:    <table border width="100%">    <tr><td>cell1</td><td align=right rowspan=2>cell2</td></tr>    <tr><td colspan=2>cell3 w/ overlap</td>    </table>It hasn't been fixed because 1) it's a pain to fix, 2) it will slowtables down by a significant amount, and 3) netscape has the samebug, as of V3.01..SH ACKNOWLEDGEMENTSSam Shen.IPThis code is based largely on his tkhtml.tcl code from tk inspect. Tkhtmlis copyright 1995 Lawrence Berkeley Laboratory..LP.SH AUTHORKris Raney.SH KEYWORDSscrolledhtml, html, text, widget

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -