亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tree.tk

?? linux程序設計(第2版)
?? TK
字號:
#!/usr/bin/wish -f#       Sample tree mega-widget.Can be used to display hierachies. The clients#       who use this package need to specify parent and tail procedures for any#       element of the tree hierarchy. All the nodes that get stored inside the#       tree are complete path names separated by '/'. The toplevel node is#       always /#package provide tree 1.0namespace eval tree {   variable tree   #     # default font setup   #    switch $tcl_platform(platform) {      unix {    set tree(font) \        -adobe-helvetica-medium-r-normal-*-11-80-100-100-p-56-iso8859-1      }      windows {    set tree(font) \        -adobe-helvetica-medium-r-normal-*-14-100-100-100-p-76-iso8859-1      }   }      #   # Bitmaps used to show which parts of the tree can be opened/closed   #   set maskdata "#define solid_width 9\n#define solid_height 9"   append maskdata {      static unsigned char solid_bits[] = {    0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01,    0xff, 0x01, 0xff, 0x01, 0xff, 0x01      };   }   set data "#define open_width 9\n#define open_height 9"   append data {      static unsigned char open_bits[] = {    0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7d, 0x01, 0x01, 0x01,    0x01, 0x01, 0x01, 0x01, 0xff, 0x01      };   }   set tree(openbm) [image create bitmap openbm -data $data \          -maskdata $maskdata \          -foreground black -background white]   set data "#define closed_width 9\n#define closed_height 9"   append data {      static unsigned char closed_bits[] = {    0xff, 0x01, 0x01, 0x01, 0x11, 0x01, 0x11, 0x01, 0x7d, 0x01, 0x11, 0x01,    0x11, 0x01, 0x01, 0x01, 0xff, 0x01      };   }   set tree(closedbm) [image create bitmap closedbm -data $data \            -maskdata $maskdata \            -foreground black -background white]    namespace export create additem delitem config setselection getselection     namespace export openbranch closebranch labelat}# tree::create -- ##   Create a new tree widget. Canvas is used to emulate a tree#   widget. Initialized all the tree specific data structures. $args become#   the configuration arguments to the canvas widget from which the tree is#   constructed.  ## Arguments:#    -paren   proc##      sets the parent procedure provided by the application. tree#      widget will use this procedure to determine the parent of an#      element. This procedure will be called with the node as an #      argument  ##   -tail    proc  [Given a complete path this proc will give the end-element#                        name]## Results:   A tree widget with the path $w is created.#proc tree::create {w args} {   variable tree   set newArgs {}      for {set i 0} {$i < [llength $args]} {incr i} {      set arg [lindex $args $i]      switch -glob -- $arg {    -paren* {set tree($w:parenproc) [lindex $args [expr $i +1]]; incr i}    -tail* {set tree($w:tailproc) [lindex $args [expr $i +1]]; incr i}    default {lappend newArgs $arg}    }      }   if ![info exists tree($w:parenproc)] {      set tree($w:parenproc) parent   }   if ![info exists tree($w:tailproc)] {      set tree($w:tailproc) tail   }  eval canvas $w -bg white $newArgs  bind $w <Destroy> "tree::delitem $w /"  tree::DfltConfig $w /  tree::BuildWhenIdle $w  set tree($w:selection) {}  set tree($w:selidx) {}}# tree::DfltConfig  --#   #   Internal fuction used to initial the attributes associated with an item/node. Usually called when an item is added into the tree##  Arguments:#   wid   tree widget#   node  complete path of the new node##  Results:#   Initializes the attributes associated with a node.proc tree::DfltConfig {wid node} {  variable tree  set tree($wid:$node:children) {}  set tree($wid:$node:open) 0  set tree($wid:$node:icon) {}  set tree($wid:$node:tags) {}}# tree::config --#   #   Fuction to set tree widget configuration options. ##  Arguments:#   args  any valid configuration option a canvas widget takes#   #  Results:#   Configures the underlying canvas widget with the options#proc tree::config {wid args} {variable tree    set newArgs {}    for {set i 0} {$i < [llength $args]} {incr i} {      set arg [lindex $args $i]      switch -glob -- $arg {    -paren* {set tree($w:parenproc) [lindex $args [expr $i +1]]; incr i}    -tail* {set tree($w:tailproc) [lindex $args [expr $i +1]]; incr i}    default {lappend newArgs $arg}    }      }  eval $wid config $newArgs}#  tree::additem --## Called to add a new node to the tree.##  Arguments:#       wid   tree widget#       node  complete path name of the node (path is separated by /)#       args  can be -image val, -tags {taglist} to identify the item##  Results:#       Adds the new item and configures the new item#proc tree::additem {wid node args} {  variable tree   set parent [$tree($wid:parenproc) $node]   set n [eval $tree($wid:tailproc) $node]  if {![info exists tree($wid:$parent:open)]} {    error "parent item \"$parent\" is missing"  }  set i [lsearch -exact $tree($wid:$parent:children) $n]  if {$i>=0} {      return  }  lappend tree($wid:$parent:children) $n  set tree($wid:$parent:children) [lsort $tree($wid:$parent:children)]  tree::DfltConfig $wid $node  foreach {op arg} $args {    switch -exact -- $op {      -image {set tree($wid:$node:icon) $arg}      -tags {set tree($wid:$node:tags) $arg}    }  }  tree::BuildWhenIdle $wid}#  tree::delitem  --#   #   Deletes the specified item from the widget##  Arguments:#   wid   tree widget#   node  complete path of the node##  Results:#   If the node exists, it will be deleted.#proc tree::delitem {wid node} {  variable tree  if {![info exists tree($wid:$node:open)]} return  if {[string compare $node /]==0} {    # delete the whole widget    catch {destroy $wid}    foreach t [array names tree $wid:*] {      unset tree($t)    }  }  foreach c $tree($wid:$node:children) {    catch {tree::delitem $wid $node/$c}  }  unset tree($wid:$node:open)  unset tree($wid:$node:children)  unset tree($wid:$node:icon)  set parent [$tree($wid:parenproc) $node]   set n [eval $tree($wid:tailproc) $node]  set i [lsearch -exact $tree($wid:$parent:children) $n]  if {$i>=0} {    set tree($wid:$parent:children) [lreplace $tree($wid:$parent:children) $i $i]  }  tree::BuildWhenIdle $wid}# The user has control over which node in the item can be assigned as a selection.# setselection and getselection routines are used to accomplish the job.# The selection object is drawn with a highlighted background.# tree::setselection  --#   #   Makes the given node as the currently selected node.##  Arguments:#   wid - tree widget#   node - complete path of the one of nodes##  Results:#   The given node will be selected#proc tree::setselection {wid node} {  variable tree  set tree($wid:selection) $node  tree::DrawSelection $wid}#  tree::getselection  --#   #   Get the currently selected tree node##  Arguments:#   wid - tree widget#   #  Results:#   If a node is currently selected it will be returned otherwise NULL#proc tree::getselection wid {  variable tree  return $tree($wid:selection)}#  tree::Build --#   #   Internal function to rebuild the tree##  Arguments:#   wid -  tree widgets#   #  Results:##     This routine has no complex logic in it. Deletes all the current items#    on the canvas associated with the tree and re-builds the tree.  ###       proc tree::Build wid {  variable tree  $wid delete all  catch {unset tree($wid:buildpending)}  set tree($wid:y) 30  tree::BuildNode $wid / 10  $wid config -scrollregion [$wid bbox all]  tree::DrawSelection $wid}#  tree::BuildNode --#   #   Function called by tree::build to incrementally build each node##  Arguments:#   wid - tree widget#       node - complete path of the node#   in - the starting x-cordinate##  Results:#   The node gets drawn#proc tree::BuildNode {wid node in} {  variable tree  if {$node=="/"} {    set vx {}  } else {    set vx $node  }  set start [expr $tree($wid:y)-10]  foreach c $tree($wid:$node:children) {    set y $tree($wid:y)    incr tree($wid:y) 17    $wid create line $in $y [expr $in+10] $y -fill gray50      set icon $tree($wid:$vx/$c:icon)    set taglist x    foreach tag $tree($wid:$vx/$c:tags) {      lappend taglist $tag    }    set x [expr $in+12]    if {[string length $icon]>0} {      set k [$wid create image $x $y -image $icon -anchor w -tags $taglist]      incr x 20      set tree($wid:tag:$k) $vx/$c    }    set j [$wid create text $x $y -text $c -font $tree(font) \                                -anchor w -tags $taglist]    set tree($wid:tag:$j) $vx/$c    set tree($wid:$vx/$c:tag) $j    if {[string length $tree($wid:$vx/$c:children)]} {      if {$tree($wid:$vx/$c:open)} {         set j [$wid create image $in $y -image $tree(openbm)]         $wid bind $j <1> "set tree::tree($wid:$vx/$c:open) 0; tree::Build $wid"         tree::BuildLayer $wid $vx/$c [expr $in+18]      } else {         set j [$wid create image $in $y -image $tree(closedbm)]         $wid bind $j <1> "set tree::tree($wid:$vx/$c:open) 1; tree::Build $wid"      }    }  }  set j [$wid create line $in $start $in [expr $y+1] -fill gray50 ]  $wid lower $j}# Now, after the tree gets displayed, if the user chooses to open any of the# branches by clicking the '+' image next to a node then the following# openbranch routine will arrange to redraw the tree by displaying the node's children.#  tree::openbranch --## A callback that gets called to open a node to show its children##  Arguments:#       wid - tree widget#       node - the node whose children should be shown##  Results:#      The children of the node will be drawn#proc tree::openbranch {wid node} {  variable tree  if {[info exists tree($wid:$node:open)] && $tree($wid:$node:open)==0      && [info exists tree($wid:$node:children)]       && [string length $tree($wid:$node:children)]>0} {    set tree($wid:$node:open) 1    tree::Build $wid  }}# Similarly, when the user clicks on the '-' image next to a node, the# closebranch routine will arrange the tree to be redrawn by closing# the branch and undisplaying the children.# tree::closebranch   --## The opposite of open branch, see above##  Arguments:###  Results:#proc tree::closebranch {wid node} {  variable tree  if {[info exists tree($wid:$node:open)] && $tree($wid:$node:open)==1} {    set tree($wid:$node:open) 0    tree::Build $wid  }}# The DrawSelection routine will highlight the currently selected node.#  tree::DrawSelection --## Highlights the current selection##  Arguments:#      wid - tree widget##  Results:#      The current selection will be high-lighted with skyblue#proc tree::DrawSelection wid {  variable tree  if {[string length $tree($wid:selidx)]} {    $wid delete $tree($wid:selidx)  }  set node $tree($wid:selection)  if {[string length $node]==0} return  if {![info exists tree($wid:$node:tag)]} return  set bbox [$wid bbox $tree($wid:$node:tag)]  if {[llength $bbox]==4} {    set i [eval $wid create rectangle $bbox -fill skyblue -outline {{}}]    set tree($wid:selidx) $i    $wid lower $i  } else {    set tree($wid:selidx) {}  }}#  tree::BuildWhenIdle --#	#	Function to reduce the number redraws of the tree. When a redraw is not#	immediately warranted this function gets called##  Arguments:#	wid  - tree wiget#	#  Results:#	Set the tree widget to be redrawn in future.#proc tree::BuildWhenIdle wid {  variable tree  if {![info exists tree($wid:buildpending)]} {    set tree($wid:buildpending) 1    after idle "tree::Build $wid"  }}#  tree::labelat --#	#	Returns the tree node closest to  x,y co-ordinates##  Arguments:#	wid      tree widget#	x,y      co-ordinates##  Results:#	The node closest to x,y will be returned.proc tree::labelat {wid x y} {  set x [$wid canvasx $x]  set y [$wid canvasy $y]  variable tree  foreach m [$wid find overlapping $x $y $x $y] {    if {[info exists tree($wid:tag:$m)]} {      return $tree($wid:tag:$m)    }  }  return ""}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费观看不卡av| 亚洲人成网站影音先锋播放| 另类小说视频一区二区| 欧美精品一二三四| 欧美96一区二区免费视频| 欧美一区二区视频观看视频 | 欧美三区免费完整视频在线观看| 日韩一区在线播放| 91女厕偷拍女厕偷拍高清| 亚洲精品乱码久久久久| 欧美午夜电影在线播放| 日本中文字幕一区二区视频| 欧美xingq一区二区| 国产高清精品久久久久| 亚洲色图视频免费播放| 欧美无砖专区一中文字| 日本不卡一区二区三区高清视频| 精品欧美一区二区在线观看| 国产成人免费av在线| 亚洲精品视频一区二区| 欧美精品久久天天躁| 中文字幕巨乱亚洲| 久久99精品国产麻豆婷婷| 久久夜色精品一区| 色综合久久综合中文综合网| 日韩av不卡一区二区| 久久精品人人爽人人爽| 色成人在线视频| 久久丁香综合五月国产三级网站| 欧美韩国一区二区| 91.com视频| 国产+成+人+亚洲欧洲自线| 亚洲综合色婷婷| 久久久久国色av免费看影院| 欧美亚洲图片小说| 国产福利不卡视频| 亚洲大尺度视频在线观看| 久久青草国产手机看片福利盒子| 色丁香久综合在线久综合在线观看| 久久精品国产久精国产爱| 亚洲欧美精品午睡沙发| 精品国产乱码久久久久久蜜臀| av午夜精品一区二区三区| 午夜精品福利一区二区蜜股av| 国产日韩v精品一区二区| 欧美日韩亚洲综合一区| 国产精品77777| 日本欧美在线看| 中文字幕亚洲综合久久菠萝蜜| 日韩视频在线你懂得| 一区二区成人在线视频| 国产三级精品视频| 欧美精品乱人伦久久久久久| 国产精品一区二区黑丝| 美国十次了思思久久精品导航| 亚洲mv在线观看| 国模无码大尺度一区二区三区| 国产制服丝袜一区| 日本女人一区二区三区| 欧美电影在线免费观看| 一级特黄大欧美久久久| 欧美日韩高清一区| 成人高清视频在线| 日韩午夜精品电影| 麻豆精品视频在线观看免费| 亚洲日本va午夜在线影院| 欧美大片拔萝卜| 91伊人久久大香线蕉| 国产在线观看一区二区 | 亚洲最新视频在线观看| 日本一区二区不卡视频| 亚洲精品五月天| 国内一区二区视频| 蜜臀va亚洲va欧美va天堂| 国产女主播一区| 久久久精品影视| 亚洲尤物在线视频观看| 国产亚洲精品精华液| 久久er99热精品一区二区| 亚洲自拍偷拍图区| 亚洲人成影院在线观看| 亚洲欧美综合色| 国产精品你懂的在线欣赏| 国产亚洲精品中文字幕| 国产调教视频一区| 国产性做久久久久久| 久久久久久久久蜜桃| 久久亚洲精品小早川怜子| 精品久久久久久久久久久院品网 | 国产精品大尺度| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 精品久久国产97色综合| 日韩亚洲欧美高清| 久久人人爽人人爽| 中文字幕第一区综合| 亚洲色图在线看| 亚洲成人中文在线| 亚洲成人手机在线| 国产精品视频线看| 国产蜜臀97一区二区三区| 国产精品亲子伦对白| 亚洲免费在线看| 婷婷综合在线观看| 久久av中文字幕片| 成人一级片在线观看| 色婷婷av一区二区三区之一色屋| 欧美日韩在线电影| 日韩一区二区三区免费看| 337p粉嫩大胆噜噜噜噜噜91av| 欧美激情综合五月色丁香| 最好看的中文字幕久久| 午夜视频在线观看一区二区三区| 奇米888四色在线精品| 国产成人亚洲精品青草天美| 91麻豆福利精品推荐| 制服视频三区第一页精品| av一区二区三区黑人| 欧美精品一区二区三区在线播放| 国产精品毛片无遮挡高清| 欧美不卡在线视频| 国产精品成人在线观看| 亚洲va欧美va国产va天堂影院| 麻豆成人在线观看| 91亚洲精品久久久蜜桃| 欧美一区二区免费视频| 1区2区3区欧美| 麻豆精品一区二区三区| 色哟哟亚洲精品| 精品电影一区二区| 亚洲国产精品一区二区尤物区| 国产永久精品大片wwwapp| 在线观看不卡一区| 国产日韩欧美精品电影三级在线 | 欧美日韩国产综合一区二区| 久久你懂得1024| 日日骚欧美日韩| 91色婷婷久久久久合中文| 欧美tickling挠脚心丨vk| 亚洲男同性恋视频| 国产成人8x视频一区二区| 欧美一区在线视频| 亚洲欧洲精品天堂一级| 精品综合免费视频观看| 欧美日产在线观看| 玉米视频成人免费看| 粉嫩绯色av一区二区在线观看| 欧美一区二区三区白人| 亚洲一区在线观看网站| 99久久久精品免费观看国产蜜| 国产亚洲精品资源在线26u| 蜜臀久久99精品久久久久久9 | 亚洲综合视频网| 高清国产午夜精品久久久久久| 91麻豆精品国产自产在线 | 欧美一区二区在线视频| 亚洲女人****多毛耸耸8| 国产91露脸合集magnet| 日韩欧美国产一区二区三区| 午夜伦欧美伦电影理论片| 91国产丝袜在线播放| 中文字幕亚洲不卡| 成人免费高清视频| 日本一区二区三区免费乱视频| 国产一区二区主播在线| 欧美成人一级视频| 美国av一区二区| 欧美成人精品福利| 日本不卡中文字幕| 日韩精品一区二区三区四区 | 在线观看欧美精品| 一区二区在线电影| 91高清在线观看| 亚洲人成人一区二区在线观看| 91小视频免费观看| 亚洲图片激情小说| 日本久久一区二区三区| 亚洲网友自拍偷拍| 666欧美在线视频| 蜜桃av一区二区三区电影| 精品国产一二三| 国产一区二区三区免费在线观看| 国产亚洲成年网址在线观看| 粉嫩av一区二区三区| 综合网在线视频| 欧美三级蜜桃2在线观看| 日韩精品一级中文字幕精品视频免费观看 | 精品美女一区二区| 国产制服丝袜一区| 国产精品成人免费在线| 91九色02白丝porn| 三级亚洲高清视频| 欧美精品一区二区蜜臀亚洲| 国产成人免费9x9x人网站视频| 中文字幕一区二区三区视频| 色爱区综合激月婷婷| 国产午夜一区二区三区| 97se亚洲国产综合在线| 亚洲成人自拍一区| 精品嫩草影院久久| 99久久er热在这里只有精品15|