- Timestamp:
- Oct 1, 2013, 6:57:24 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/transferfunctioneditor.tcl
r3941 r3970 41 41 private method GetScreenPosition { name } 42 42 private method LeaveTick { name } 43 private method NewMarker { x y }43 private method NewMarker { x y state } 44 44 private method SetRelativeValue { name x } 45 45 private method GetRelativeValue { name } … … 70 70 set _name $name 71 71 set _limits [list 0.0 1.0] 72 $c bind transfunc <ButtonRelease-1> [itcl::code $this NewMarker %x %y] 72 $c bind transfunc <ButtonRelease-1> \ 73 [itcl::code $this NewMarker %x %y normal] 73 74 eval configure $args 74 75 } … … 98 99 } 99 100 100 itcl::body Rappture::TransferFunctionEditor::NewMarker { x y } {101 itcl::body Rappture::TransferFunctionEditor::NewMarker { x y state } { 101 102 set name "tick[incr _nextId]" 102 103 set w [winfo width $_canvas] … … 105 106 set _ticks($name) [$_canvas create image 0 $h \ 106 107 -image $_normalIcon -anchor s \ 107 -tags "tick $_name $this" -state hidden]108 -tags "tick $_name $this" -state $state] 108 109 set _labels($name) [$_canvas create text 0 $h \ 109 110 -anchor n -fill white -font "Helvetica 8" \ 110 -tags "$this $_name" -state hidden]111 -tags "$this $_name" -state $state] 111 112 set _id2name($_ticks($name)) $name 112 113 $_canvas bind $_ticks($name) <Enter> [itcl::code $this EnterTick $name] … … 141 142 itcl::body Rappture::TransferFunctionEditor::Deactivate { name } { 142 143 if { $_activePress || $_activeMotion } { 143 puts stderr "do nothing for Deactivate"144 #puts stderr "do nothing for Deactivate" 144 145 } else { 145 146 $_canvas itemconfigure $_labels($name) -state hidden … … 304 305 itcl::body Rappture::TransferFunctionEditor::addMarkers { values } { 305 306 foreach value $values { 306 set name [NewMarker 0 0 ]307 set name [NewMarker 0 0 hidden] 307 308 SetRelativeValue $name $value 308 309 }
Note: See TracChangeset
for help on using the changeset viewer.