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

📄 hierarchy.n

📁 这是一个Linux下的集成开发环境
💻 N
📖 第 1 页 / 共 2 页
字号:
.nfName:	\fBtextFont\fRClass:	\fBFont\fRCommand-Line Switch:	\fB-textfont\fR.fi.IPSpecifies the font to be used in the text portion of the hierarchy..LP.nfName:	\fBtextMenuLoadCommand\fRClass:	\fBCommand\fRCommand-Line Switch:	\fB-textmenuloadcommand\fR.fi.IPSpecifies a command to be executed upon user selection via mouse button three,that will dynamically load the itemMenu for the widget..LP.nfName:	\fBvisibleitems\fRClass:	\fBVisibleItems\fRCommand-Line Switch:	\fB-visibleitems\fR.fi.IPSpecifies the widthxheight in characters and lines for the hierarchy.This option is only administered if the width and height optionsare both set to zero, otherwise they take precedence.  The default valueis 80x24.  With the visibleitems option engaged, geometry constraints are maintained only on the text portion of the hierarchy.  The size of the other components such as labels, margins, and scroll bars, are additive and independent, effecting the overall size of the hierarchy.  In contrast,should the width and height options have non zero values, theyare applied to the hierarchy as a whole.  The hierarchy is compressed or expanded to maintain the geometry constraints..LP.nfName:	\fBvscrollMode\fRClass:	\fBScrollMode\fRCommand-Line Switch:	\fB-vscrollmode\fR.fi.IPSpecifies the the display mode to be used for the verticalscrollbar: \fBstatic, dynamic,\fR or \fBnone\fR.  In static mode, the scroll bar is displayed at all times.  Dynamic mode displays the scroll bar as required, and none disables the scroll bar display.  The default is static..LP.nfName:	\fBwidth\fRClass:	\fBWidth\fRCommand-Line Switch:	\fB-width\fR.fi.IPSpecifies the width of the hierarchy as an entire unit.The value may be specified in any of the forms acceptable to \fBTk_GetPixels\fR.  Any additional space needed to display the othercomponents such as labels, margins, and scrollbars force the text portionof the hierarchyto be compressed.  A value of zero along with the same value for the height causes the value given for the visibleitems option to be applied which administers geometry constraints in a differentmanner.  The default width is zero..LP.BE.SH DESCRIPTION.PPThe \fBhierarchy\fR command creates a hierarchical data view widget.  It allows the graphical management of a a list of nodes that can beexpanded or collapsed.  Individual nodes can be highlighted.Clicking with the right mouse button on any item brings up aspecial item menu.  Clicking on the background area brings upa different popup menu.  Options exist to provide user control overthe loading of the nodes and actions associated with node selection.Since the hierarchy is based on the scrolledtext widget, it includesoptions to control the method in which the scrollbars are displayed, i.e. statically or  dynamically.  Options also exist for adding a label to the hierarchy and controlling its position..SH "METHODS".PPThe \fBhierarchy\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 hierarchy widgets:.SH "ASSOCIATED METHODS".LP.nf.ta 4c 8c 12c\fBbbox\fR	\fBcompare\fR	\fBdebug\fR	\fBdelete\fR	\fBdlineinfo\fR	\fBdump\fR	\fBget\fR	\fBindex\fR\fBinsert\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 "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 \fBhierarchy\fRcommand..TP\fIpathName \fBclear\fRRemoves all items from the hierarchy display including all tags and icons.  The display will remain empty until the -filter or -querycommand options are set..TP\fIpathName \fBcollapse\fR \fIuid\fRCollapses the hierarchy beneath the node with the specified unique id by one level.  Since this can take a moment for large hierarchies, the cursor will be changed to a watch during the collapse.  Also, if anyof the nodes beneath the node being collapsed are selected, theirstatus is changed to unselected..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 \fBhierarchy\fRcommand..TP\fIpathName \fBcurrent\fRReturns the tags for the node that was most recently selected by the right mouse button when the item menu was posted.  Usually used by the codein the item menu to figure out what item is being manipulated..TP\fIpathName \fBdraw\fR ?\fIwhen\fR?Performs a complete redraw of the entire hierarchy.  When may be either -nowor -eventually where the latter means the draw can be performed after idle..TP\fIpathName \fBexpand\fR \fIuid\fRExpands the hierarchy beneath the node with the specified unique id byone level.  Since this can take a moment for large hierarchies, the cursor will be changed to a watch during the expansion..TP\fIpathName \fBexpanded\fR \fIuid\fRReturns the current state of expansion for the node with the specified uniqueid..TP\fIpathName \fBexpState\fRReturns a list of all expanded nodes in the tree..TP\fIpathName \fBmark\fR \fIoption ?arg arg ...?\fRThis command is used to manipulate marks which is quite similar to selection, adding a secondary means of hilighting an item in the hierarchy.  The exact behavior of the command depends on the \fIoption\fR argument that follows the \fBmark\fR argument.  The following forms of the command are currently supported:.RS.TP\fIpathName \fBmark clear\fRClears all the currently marked nodes in the hierarchy..TP\fIpathName \fBmark add \fIuid \fR?\fIuid uid ...\fR?Marks the nodes with the specified uids in the hierarchy using the \fB-markbackground\fR and \fB-markforeground\fR options and withoutaffecting the mark state of any other nodes that were already marked..TP\fIpathName \fBmark remove \fIuid \fR?\fIuid uid ...\fR?Unmarks the nodes with the specified uids in the hierarchy withoutaffecting the mark state of any other nodes that were already marked..TP\fIpathName \fBmark get\fRReturns a list of the unique ids that are currently marked..RE.TP\fIpathName \fBrefresh\fR \fIuid\fRPerforms a redraw of a specific node that has the given uid.  If the nodeis not currently visible or in other words already drawn on the text,then no action is taken..TP\fIpathName \fBprune\fR \fIuid\fRRemoves the node specified by the given uid from the hierarchy.  Should the node have children, then all of its children will be removed as well..TP\fIpathName \fBselection\fR \fIoption \fR?\fIarg arg ...\fR?This command is used to manipulate the selection of nodes in thehierarchy.  The exact behavior of the command depends on the \fIoption\fR argument that follows the \fBselection\fR argument.  The following forms of the command are currently supported:.RS.TP\fIpathName \fBselection clear\fRClears all the currently selected nodes in the hierarchy..TP\fIpathName \fBselection add \fIuid \fR?\fIuid uid ...\fR?Selects the nodes with the specified uids in the hierarchy using the \fB-selectionbackground\fR and \fB-selectionforeground\fR options and withoutaffecting the selection state of any other nodes that were already selected..TP\fIpathName \fBselection remove \fIuid \fR?\fIuid uid ...\fR?Deselects the nodes with the specified uids in the hierarchy withoutaffecting the selection state of any other nodes that were already selected..TP\fIpathName \fBselection get\fRReturns a list of the unique ids that are currently selected..REA nodes selection status is also dependent on it being visible.  If a node is selected and its parent is then collapsed making the selectednode not visible, then its selection status is changed to unselected..TP\fIpathName \fBtoggle\fR \fIuid\fRToggles the hierarchy beneath the node with the specified unique id.  If the hierarchy is currently expanded, then it is collapsed, and vice-versa..SH "COMPONENTS".LP.nfName:	\fBlist\fRClass:	\fBText\fR.fi.IPThe list component is the text widget in which the hierarchy is displayed.See the "text" widget manual entry for details on the text component item..LP.nfName:	\fBbgMenu\fRClass:	\fBMenu\fR.fi.IPThe bgMenu component is the popup menu which is displayed upon pressingthe right mouse button in the background, i.e. not over a specific node.  Menuitems can be added along with their commands via the component command.  See the "menu" widget manual entry for details on the bgMenu component item..LP.nfName:	\fBhorizsb\fRClass:	\fBScrollbar\fR.fi.IPThe horizsb component is the horizontal scroll bar.  See the "scrollbar" widget manual entry for details on the horizsb component item..LP.nfName:	\fBitemMenu\fRClass:	\fBMenu\fR.fi.IPThe itemMenu component is the popup menu which is displayed upon selectionof a hierarchy node with the right mouse button.  Menu items can be added along with their commands via the component command.  See the "menu" widget manual entry for details on the itemMenu component item..LP.nfName:	\fBvertsb\fRClass:	\fBScrollbar\fR.fi.IPThe vertsb component is the vertical scroll bar.  See the "scrollbar" widget manual entry for details on the vertsb component item..fi.SH EXAMPLE.DSproc get_files {file} {    global env    if {$file == ""} {        set dir $env(HOME)    } else {        set dir $file    }    if {[catch {cd $dir}] != 0} {        return ""    }    set rlist ""    foreach file [lsort [glob -nocomplain *]] {        lappend rlist [list [file join $dir $file] $file]    }    return $rlist}hierarchy .h -querycommand "get_files %n" -visibleitems 30x15 \    -labeltext $env(HOME)pack .h -side left -expand yes -fill both.DE.SH AUTHORMark L. Ulferts.DEMichael J. McLennan.SH KEYWORDShierarchy, text, widget

⌨️ 快捷键说明

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