Changeset 1024
- Timestamp:
- Oct 12, 2010 4:40:02 PM (12 years ago)
- Location:
- branches/sandbox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/Geo_Viewer.tcl
r1022 r1024 38 38 39 39 proc Geo_Initialize {} { 40 # set ::geo_entryvar(phase) "1"41 40 set ::geo_entryvar(atomtype) "all" 42 41 catch {unset ::geo_enable} … … 53 52 54 53 if {[file exists $filename]} { 55 #puts "$filename from [pwd] is opened"56 54 set fh [open $filename r] 57 55 } else { 58 56 puts "$filename not found in directory [pwd]" 59 57 } 60 61 # read information from DISAGL File62 58 63 59 set bond_total -1 … … 106 102 set atom2 [lindex $temp 6] 107 103 set atom3 [lindex $temp 7] 108 # set atype1 [atominfo $phase [lindex $temp 5] type]109 # set atype2 [atominfo $phase [lindex $temp 6] type]110 # set atype3 [atominfo $phase [lindex $temp 7] type]111 # set atype1 [lindex [split $atype1 {+-}] 0]112 # set atype2 [lindex [split $atype2 {+-}] 0]113 # set atype3 [lindex [split $atype3 {+-}] 0]114 104 set alabel1 [atominfo $phase [lindex $temp 5] label] 115 105 set alabel2 [atominfo $phase [lindex $temp 6] label] … … 119 109 set key1 [string map {" " ""} [set t2 "${symmcode1}_[lindex $atom1]"]] 120 110 set key3 [string map {" " ""} [set t3 "${symmcode3}_[lindex $atom3]"]] 121 # set symm2 [lindex $temp 8]122 # set trans2 [lindex $temp 9]123 # set symm3 [lindex $temp 10]124 # set trans3 [lindex $temp 11]125 111 lappend t1 $phase $atom1 $atom2 $atom3 $alabel1 $alabel2 $alabel3 \ 126 112 $b_angle $b_esd $key1 $key3 127 113 lappend ::geo_phase_list $phase 128 114 set ::geo_angles($phase,$key1,$atom2,$key3) $t1 129 # lappend ::geo_angle_keys($phase,$atom2) $key1 $key3130 # set ::geo_angle_keys($phase,$atom2) [lsort -uniq [set ::geo_angle_keys($phase,$atom2)]]131 115 } 132 116 } … … 136 120 137 121 proc Geo_Viewer {args} { 138 #destroy .maincontrolbox139 # puts [trace vinfo ::geo_entryvar(phase)]140 # puts [trace vinfo ::geo_entryvar(atomtype)]141 # foreach item [trace vinfo ::geo_entryvar(phase)] {142 # eval trace vdelete ::geo_entryvar(phase) $item143 # }144 # foreach item [trace vinfo ::geo_entryvar(atomtype)] {145 # eval trace vdelete ::geo_entryvar(atomtype) $item146 # }147 122 148 123 # Run DISAGL … … 205 180 grid $sc.atom1 -column 0 -row 1 206 181 207 #grid $sc.engage -column 0 -row 2 -columnspan 2208 209 182 label $as.atom -text "Choose Atom(s)" 210 183 211 184 grid $as.atom -row 0 -column 1 212 213 # label $ad.label -text "Distance and Angle List"214 # grid $ad.label -row 0 -column 0215 216 185 217 186 foreach {top main side lbl} [MakeScrollTable $as] {} … … 232 201 $as.can config -width [lindex [$as.can cget -scrollregion] 2] 233 202 234 #bind $as <Configure> "catch {ResizeScrollTable $as}"235 #bind $ad <Configure> "catch {ResizeScrollTable $ad}"236 203 } 237 204 … … 356 323 label $::geo_main.$counter -text [lindex $::geo_angles($phase,$k,$atom,$key) 7] 357 324 grid $::geo_main.$counter -row $rownum -column $colnum -padx 5 325 358 326 incr colnum 359 327 incr counter … … 387 355 } 388 356 ResizeScrollTable [winfo parent [winfo parent $::geo_main]] 357 MouseWheelScrollTable [winfo parent [winfo parent $::geo_main]] 389 358 } 390 359 proc Geo_Print {} { -
branches/sandbox/distrest.tcl
r1021 r1024 103 103 104 104 foreach {top main side lbl} [MakeScrollTable $rightfr] {} 105 105 MouseWheelScrollTable $rightfr 106 106 set atom1_state 1 107 107 set atom2_state 1 … … 360 360 SR_Fill_Display $main 361 361 bind $sr_rb <Configure> "ResizeScrollTable $sr_rb" 362 MouseWheelScrollTable $sr_rb 362 363 # see if reset of grab fixes tk bug with tk_optionMenu 363 364 grab release .mainrestraintbox -
branches/sandbox/gsascmds.tcl
r1021 r1024 2350 2350 $box.can create window 0 0 -anchor nw -window [frame $box.can.f -bd 2] 2351 2351 $box.side create window 0 0 -anchor nw -window [frame $box.side.f -bd 2] 2352 2353 2352 grid columnconfig $box 1 -weight 1 2354 2353 grid rowconfig $box 1 -weight 1 … … 2383 2382 grid $box.yscroll -sticky ns -column 2 -row 1 2384 2383 } else { 2385 grid forget $box.yscroll 2384 grid forget $box.yscroll 2386 2385 } 2387 2386 if {[lindex $sizes 2] > [winfo width $box.can]} { 2388 2387 grid $box.scroll -sticky ew -column 1 -row 2 2389 2388 } else { 2390 grid forget $box.scroll 2391 } 2392 } 2389 grid forget $box.scroll 2390 } 2391 } 2392 2393 proc MouseWheelScrollTable {box} { 2394 # causes mouse wheel to operate scroll for main canvas in ScrollTable 2395 # mousewheel can be operated anywhere in parent window 2396 bind [winfo toplevel $box] <MouseWheel> "$box.can yview scroll \[expr {-abs(%D)/%D}\] unit" 2397 } 2398 2393 2399 2394 2400 # this is used in cifselect -- not sure why anymore
Note: See TracChangeset
for help on using the changeset viewer.