/usr/lib/grass64/etc/dm/group.tcl is in grass-gui 6.4.3-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | namespace eval DmGroup {
variable array opt
variable count 1
}
proc DmGroup::create { tree parent } {
variable opt
variable count
set fon [font create -size 10]
set frm [ frame .groupicon$count ]
set check [checkbutton $frm.check -text "" -font $fon \
-variable DmGroup::opt($count,_check) \
-height 1]
set image [label $frm.image -image [Bitmap::get folder] ]
pack $check $image -side left
set node "group:$count"
$tree insert end $parent $node \
-text "group $count" \
-window $frm \
-drawcross auto \
-open 1
set opt($count,_check) 1
set opt($count,treeimagepath) $image
incr count
return $node
}
proc DmGroup::save { tree depth node } {
variable opt
if { $node != "root" } {
set id [Dm::node_id $node]
Dm::rc_write $depth _check $opt($id,_check)
}
foreach n [$tree nodes $node] {
Dm::save_node $depth $n
}
}
proc DmGroup::display { node } {
variable opt
set tree $Dm::tree
if { $node != "root" } {
set id [Dm::node_id $node]
if { ! ( $opt($id,_check) ) } { return }
}
foreach n [$tree nodes $node] {
Dm::display_node $n
}
}
proc DmGroup::print { file node } {
variable opt
global raster_printed
set tree $Dm::tree
if { $node != "root" } {
set id [Dm::node_id $node]
if { ! ( $opt($id,_check) ) } { return }
} else {
set raster_printed 0
}
set lst ""
foreach n [$tree nodes $node] {
set lst [ concat $n $lst ]
}
foreach n $lst {
Dm::print_node $file $n
}
}
proc DmGroup::set_option { node key value } {
variable opt
set id [Dm::node_id $node]
set opt($id,$key) $value
}
proc DmGroup::open { id } {
variable opt
$DmGroup::opt($id,treeimagepath) configure -image [Bitmap::get openfold]
}
proc DmGroup::close { id } {
variable opt
$DmGroup::opt($id,treeimagepath) configure -image [Bitmap::get folder]
}
proc DmGroup::duplicate { tree parent_node sel id } {
puts "Duplicate for Groups not yet implemented."
}
|