📄 node.tk
字号:
proc nodeXscrollFrameGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(XscrollFrame)]} { return "" } return [set ${array}(XscrollFrame)]}proc nodeXscrollFramePut {nodeframe frame} { set array [string trimleft $nodeframe .] global $array set ${array}(XscrollFrame) $frame}proc nodeYscrollFrameGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(YscrollFrame)]} { return "" } return [set ${array}(YscrollFrame)]}proc nodeYscrollFramePut {nodeframe frame} { set array [string trimleft $nodeframe .] global $array set ${array}(YscrollFrame) $frame}proc nodeXscrollGet nodeframe { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(xscroll)]} { return "" } return [set ${array}(xscroll)]}proc nodeXscrollPut {nodeframe xscroll} { set array [string trimleft $nodeframe .] global $array set ${array}(xscroll) $xscroll}proc nodeYscrollGet nodeframe { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(yscroll)]} { return "" } return [set ${array}(yscroll)]}proc nodeYscrollPut {nodeframe yscroll} { set array [string trimleft $nodeframe .] global $array set ${array}(yscroll) $yscroll}proc nodeScrollRegionWidthGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(scrollRegionWidth)]} { return "" } return [set ${array}(scrollRegionWidth)]}proc nodeScrollRegionWidthPut {nodeframe width} { set array [string trimleft $nodeframe .] global $array set ${array}(scrollRegionWidth) $width}proc nodeScrollRegionHeightGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(scrollRegionHeight)]} { return "" } return [set ${array}(scrollRegionHeight)]}proc nodeScrollRegionHeightPut {nodeframe height} { set array [string trimleft $nodeframe .] global $array set ${array}(scrollRegionHeight) $height}proc nodeDisplayWidthGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(displayWidth)]} { return "" } return [set ${array}(displayWidth)]}proc nodeDisplayWidthPut {nodeframe width} { set array [string trimleft $nodeframe .] global $array set ${array}(displayWidth) $width}proc nodeDisplayHeightGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(displayHeight)]} { return "" } return [set ${array}(displayHeight)]}proc nodeDisplayHeightPut {nodeframe height} { set array [string trimleft $nodeframe .] global $array set ${array}(displayHeight) $height}proc nodeCanvasWidthGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(canvasWidth)]} { return "" } return [set ${array}(canvasWidth)]}proc nodeCanvasWidthPut {nodeframe width} { set array [string trimleft $nodeframe .] global $array set ${array}(canvasWidth) $width}proc nodeCanvasHeightGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(canvasHeight)]} { return "" } return [set ${array}(canvasHeight)]}proc nodeCanvasHeightPut {nodeframe height} { set array [string trimleft $nodeframe .] global $array set ${array}(canvasHeight) $height}proc nodeClusterFrameGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(clusterFrame)]} { return "" } return [set ${array}(clusterFrame)]}proc nodeClusterFramePut {nodeframe frame} { set array [string trimleft $nodeframe .] global $array set ${array}(clusterFrame) $frame}proc nodeXposGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(Xpos)]} { return "" } return [set ${array}(Xpos)]}proc nodeXposPut {nodeframe pt} { set array [string trimleft $nodeframe .] global $array set ${array}(Xpos) $pt}proc nodeYposGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(Ypos)]} { return "" } return [set ${array}(Ypos)]}proc nodeYposPut {nodeframe pt} { set array [string trimleft $nodeframe .] global $array set ${array}(Ypos) $pt}proc nodeOffsetWidthGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(offsetWidth)]} { return "" } return [set ${array}(offsetWidth)]}proc nodeOffsetWidthPut {nodeframe width} { set array [string trimleft $nodeframe .] global $array set ${array}(offsetWidth) $width}proc nodeNextGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(next)]} { return "" } return [set ${array}(next)]}proc nodeNextPut {nodeframe frame} { set array [string trimleft $nodeframe .] global $array set ${array}(next) $frame}proc nodeMainFrameGet {nodeframe} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(mainFrame)]} { return "" } return [set ${array}(mainFrame)]}proc nodeMainFramePut {nodeframe frame} { set array [string trimleft $nodeframe .] global $array set ${array}(mainFrame) $frame}proc nodeGroupXCGet {nodeframe group} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(groupXC,$group)]} { return "" } return [set ${array}(groupXC,$group)]}proc nodeGroupXCPut {nodeframe group xc} { set array [string trimleft $nodeframe .] global $array set ${array}(groupXC,$group) $xc}proc nodePrint {nodeframe} { if {[string compare $nodeframe ""] == 0} { return } puts "Node: $nodeframe=======================================>" puts "Refresh Flag: [nodeRefreshGet $nodeframe]" puts "Name: [nodeNameGet $nodeframe]" puts "LabelFrame: [nodeLabelFrameGet $nodeframe]" puts "Label: [nodeLabelGet $nodeframe]" puts "Type: [nodeTypeGet $nodeframe]" puts "ViewType: [nodeViewTypeGet $nodeframe]" puts "CanvasFrame: [nodeCanvasFrameGet $nodeframe]" puts "Canvas: [nodeCanvasGet $nodeframe]" puts "XscrollFrame: [nodeXscrollFrameGet $nodeframe]" puts "Xscroll: [nodeXscrollGet $nodeframe]" puts "YscrollFrame: [nodeYscrollFrameGet $nodeframe]" puts "Yscroll: [nodeYscrollGet $nodeframe]" puts "ScrollRegion's Width: [nodeScrollRegionWidthGet $nodeframe]" puts "ScrollRegion's Height: [nodeScrollRegionHeightGet $nodeframe]" puts "Display Width: [nodeDisplayWidthGet $nodeframe]" puts "Display Height: [nodeDisplayHeightGet $nodeframe]" puts "Canvas Width: [nodeCanvasWidthGet $nodeframe]" puts "Canvas Height: [nodeCanvasHeightGet $nodeframe]" puts "Cluster Frame: [nodeClusterFrameGet $nodeframe]" puts "Xpos: [nodeXposGet $nodeframe]" puts "Ypos: [nodeYposGet $nodeframe]" puts "OffsetWidth: [nodeOffsetWidthGet $nodeframe]" puts "NodeNext: [nodeNextGet $nodeframe]" puts "Main Frame: [nodeMainFrameGet $nodeframe]"}proc nodeDelete nodeframe { set array [string trimleft $nodeframe .] global $array catch {pack forget $nodeframe} set nname [nodeNameGet $nodeframe] set vtype [nodeViewTypeGet $nodeframe] set cframe [nodeClusterFrameGet $nodeframe] if {[string compare $cframe ""] != 0} { set sysframe [clusterSystemFrameGet $cframe] systemNodeFrameUnset $sysframe $nname $vtype } unset $array}proc nodeLineGet {nodeframe lineno group} { set array [string trimleft $nodeframe .] global $array if {![info exists ${array}(line,$lineno,$group)]} { return "" } return [set ${array}(line,$lineno,$group)]}proc nodeLinePut {nodeframe lineno group tagOrId} { set array [string trimleft $nodeframe .] global $array set ${array}(line,$lineno,$group) $tagOrId}proc nodeAddText { nodeframe lineno groupno text} { global canvas if {[string compare $nodeframe ""] == 0} { return } set vtype [nodeViewTypeGet $nodeframe] switch -exact -- $vtype { MIRROR { set text_font $canvas(bigTextFont) set text_width $canvas(bigTextFontWidth) set text_height $canvas(bigTextFontHeight) } default { set text_font $canvas(smallTextFont) set text_width $canvas(smallTextFontWidth) set text_height $canvas(smallTextFontHeight) } } set ncanv [nodeCanvasGet $nodeframe] if {$groupno == 0} { set xpos $text_width set ypos $text_height if {$lineno > 0} { set previd [nodeLineGet $nodeframe \ [expr $lineno - 1] 0] set pos [$ncanv bbox $previd]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -