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

📄 text.n

📁 linux系统下的音频通信
💻 N
📖 第 1 页 / 共 5 页
字号:
'\"'\" Copyright (c) 1992 The Regents of the University of California.'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) text.n 1.68 97/10/31 12:58:41'\" .so man.macros.TH text n 4.0 Tk "Tk Built-In Commands".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEtext \- Create and manipulate text widgets.SH SYNOPSIS\fBtext\fR \fIpathName \fR?\fIoptions\fR?.SO\-background	\-highlightbackground	\-insertontime	\-selectborderwidth\-borderwidth	\-highlightcolor	\-insertwidth	\-selectforeground\-cursor	\-highlightthickness	\-padx	\-setgrid\-exportselection	\-insertbackground	\-pady	\-takefocus\-font	\-insertborderwidth	\-relief	\-xscrollcommand\-foreground	\-insertofftime	\-selectbackground	\-yscrollcommand.SE.SH "WIDGET-SPECIFIC OPTIONS".OP \-height height HeightSpecifies the desired height for the window, in units of charactersin the font given by the \fB\-font\fR option.Must be at least one..OP \-spacing1 spacing1 Spacing1Requests additional space above each text line in the widget,using any of the standard forms for screen distances.If a line wraps, this option only applies to the first lineon the display.This option may be overriden with \fB\-spacing1\fR options intags..OP \-spacing2 spacing2 Spacing2For lines that wrap (so that they cover more than one line on thedisplay) this option specifies additional space to provide betweenthe display lines that represent a single line of text.The value may have any of the standard forms for screen distances.This option may be overriden with \fB\-spacing2\fR options intags..OP \-spacing3 spacing3 Spacing3Requests additional space below each text line in the widget,using any of the standard forms for screen distances.If a line wraps, this option only applies to the last lineon the display.This option may be overriden with \fB\-spacing3\fR options intags..OP \-state state StateSpecifies one of two states for the text:  \fBnormal\fR or \fBdisabled\fR.If the text is disabled then characters may not be inserted or deletedand no insertion cursor will be displayed, even if the input focus isin the widget..OP \-tabs tabs TabsSpecifies a set of tab stops for the window.  The option's value consistsof a list of screen distances giving the positions of the tab stops.  Eachposition may optionally be followed in the next list elementby one of the keywords \fBleft\fR, \fBright\fR, \fBcenter\fR,or \fBnumeric\fR, which specifies how to justifytext relative to the tab stop.  \fBLeft\fR is the default; it causesthe text following the tab character to be positioned with its left edgeat the tab position.  \fBRight\fR means that the right edge of the textfollowing the tab character is positioned at the tab position, and\fBcenter\fR means that the text is centered at the tab position.\fBNumeric\fR means that the decimal point in the text is positionedat the tab position;  if there is no decimal point then the leastsignificant digit of the number is positioned just to the left of thetab position;  if there is no number in the text then the text isright-justified at the tab position.For example, \fB\-tabs {2c left 4c 6c center}\fR creates threetab stops at two-centimeter intervals;  the first two use leftjustification and the third uses center justification.If the list of tab stops does not have enough elements to cover allof the tabs in a text line, then Tk extrapolates new tab stops usingthe spacing and alignment from the last tab stop in the list.The value of the \fBtabs\fR option may be overridden by \fB\-tabs\fRoptions in tags.If no \fB\-tabs\fR option is specified, or if it is specified asan empty list, then Tk uses default tabs spaced every eight(average size) characters..OP \-width width WidthSpecifies the desired width for the window in units of charactersin the font given by the \fB\-font\fR option.If the font doesn't have a uniform width then the width of thecharacter ``0'' is used in translating from character units toscreen units..OP \-wrap wrap WrapSpecifies how to handle lines in the text that are too long to bedisplayed in a single line of the text's window.The value must be \fBnone\fR or \fBchar\fR or \fBword\fR.A wrap mode of \fBnone\fR means that each line of text appears asexactly one line on the screen;  extra characters that don't fiton the screen are not displayed.In the other modes each line of text will be broken up into severalscreen lines if necessary to keep all the characters visible.In \fBchar\fR mode a screen line break may occur after any character;in \fBword\fR mode a line break will only be made at word boundaries..BE.SH DESCRIPTION.PPThe \fBtext\fR command creates a new window (given by the\fIpathName\fR argument) and makes it into a text widget.Additionaloptions, described above, may be specified on the command lineor in the option databaseto configure aspects of the text such as its default background colorand relief.  The \fBtext\fR command returns thepath name of the new window..PPA text widget displays one or more lines of text and allows thattext to be edited..VSText widgets support four different kinds of annotations on thetext, called tags, marks, embedded windows or embedded images..VETags allow different portions of the textto be displayed with different fonts and colors.In addition, Tcl commands can be associated with tags sothat scripts are invoked when particular actions such as keystrokesand mouse button presses occur in particular ranges of the text.See TAGS below for more details..PPThe second form of annotation consists of marks, which are floatingmarkers in the text.Marks are used to keep track of various interesting positions in thetext as it is edited.See MARKS below for more details..PPThe third form of annotation allows arbitrary windows to beembedded in a text widget.See EMBEDDED WINDOWS below for more details..PP.VSThe fourth form of annotation allows Tk images to be embedded in a textwidget.See EMBEDDED IMAGES below for more details..VE.SH INDICES.PPMany of the widget commands for texts take one or more indicesas arguments.An index is a string used to indicate a particular place withina text, such as a place to insert characters or one endpoint of arange of characters to delete.Indices have the syntax.CS\fIbase modifier modifier modifier ...\fR.CEWhere \fIbase\fR gives a starting point and the \fImodifier\fRsadjust the index from the starting point (e.g. move forward orbackward one character).  Every index must contain a \fIbase\fR,but the \fImodifier\fRs are optional..PPThe \fIbase\fR for an index must have one of the following forms:.TP 12\fIline\fB.\fIchar\fRIndicates \fIchar\fR'th character on line \fIline\fR.Lines are numbered from 1 for consistency with other UNIX programsthat use this numbering scheme.Within a line, characters are numbered from 0.If \fIchar\fR is \fBend\fR then it refers to the newline characterthat ends the line..TP 12\fB@\fIx\fB,\fIy\fRIndicates the character that covers the pixel whose x and y coordinateswithin the text's window are \fIx\fR and \fIy\fR..TP 12\fBend\fRIndicates the end of the text (the character just after the lastnewline)..TP 12\fImark\fRIndicates the character just after the mark whose name is \fImark\fR..TP 12\fItag\fB.first\fRIndicates the first character in the text that has been tagged with\fItag\fR.This form generates an error if no characters are currently taggedwith \fItag\fR..TP 12\fItag\fB.last\fRIndicates the character just after the last one in the text that hasbeen tagged with \fItag\fR.This form generates an error if no characters are currently taggedwith \fItag\fR..TP 12\fIpathName\fRIndicates the position of the embedded window whose name is\fIpathName\fR.This form generates an error if there is no embedded windowby the given name..TP 12.VS\fIimageName\fRIndicates the position of the embedded image whose name is\fIimageName\fR.This form generates an error if there is no embedded imageby the given name..VE.PPIf the \fIbase\fP could match more than one of the above forms, suchas a \fImark\fP and \fIimageName\fP both having the same value, thenthe form earlier in the above list takes precedence.If modifiers follow the base index, each one of them must have oneof the forms listed below.  Keywords such as \fBchars\fR and \fBwordend\fRmay be abbreviated as long as the abbreviation is unambiguous..TP\fB+ \fIcount\fB chars\fRAdjust the index forward by \fIcount\fR characters, moving to laterlines in the text if necessary.  If there are fewer than \fIcount\fRcharacters in the text after the current index, then set the indexto the last character in the text.Spaces on either side of \fIcount\fR are optional..TP\fB\- \fIcount\fB chars\fRAdjust the index backward by \fIcount\fR characters, moving to earlierlines in the text if necessary.  If there are fewer than \fIcount\fRcharacters in the text before the current index, then set the indexto the first character in the text.Spaces on either side of \fIcount\fR are optional..TP\fB+ \fIcount\fB lines\fRAdjust the index forward by \fIcount\fR lines, retaining the samecharacter position within the line.  If there are fewer than \fIcount\fRlines after the line containing the current index, then set the indexto refer to the same character position on the last line of the text.Then, if the line is not long enough to contain a character at the indicatedcharacter position, adjust the character position to refer to the lastcharacter of the line (the newline).Spaces on either side of \fIcount\fR are optional..TP\fB\- \fIcount\fB lines\fRAdjust the index backward by \fIcount\fR lines, retaining the samecharacter position within the line.  If there are fewer than \fIcount\fRlines before the line containing the current index, then set the indexto refer to the same character position on the first line of the text.Then, if the line is not long enough to contain a character at the indicatedcharacter position, adjust the character position to refer to the lastcharacter of the line (the newline).Spaces on either side of \fIcount\fR are optional..TP\fBlinestart\fRAdjust the index to refer to the first character on the line..TP\fBlineend\fRAdjust the index to refer to the last character on the line (the newline)..TP\fBwordstart\fRAdjust the index to refer to the first character of the word containingthe current index.  A word consists of any number of adjacent charactersthat are letters, digits, or underscores, or a single character thatis not one of these..TP\fBwordend\fRAdjust the index to refer to the character just after the last one of theword containing the current index.  If the current index refers to the lastcharacter of the text then it is not modified..PPIf more than one modifier is present then they are applied inleft-to-right order.  For example, the index ``\fBend \- 1 chars\fR''refers to the next-to-last character in the text and``\fBinsert wordstart \- 1 c\fR'' refers to the character just beforethe first one in the word containing the insertion cursor..SH TAGS.PPThe first form of annotation in text widgets is a tag.A tag is a textual string that is associated with some of the charactersin a text.Tags may contain arbitrary characters, but it is probably best toavoid using the the characters `` '' (space), \fB+\fR, or \fB\-\fR:these characters have special meaning in indices, so tags containingthem can't be used as indices.There may be any number of tags associated with characters in atext.Each tag may refer to a single character, a range of characters, orseveral ranges of characters.An individual character may have any number of tags associated with it..PPA priority order is defined among tags, and this order is used inimplementing some of the tag-related functions described below.When a tag is defined (by associating it with characters or settingits display options or binding commands to it), it is givena priority higher than any existing tag.The priority order of tags may be redefined using the``\fIpathName \fBtag raise\fR'' and ``\fIpathName \fBtag lower\fR''widget commands..PPTags serve three purposes in text widgets.First, they control the way information is displayed on the screen.

⌨️ 快捷键说明

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