Changeset 1670 for branches/blt4
- Timestamp:
- Mar 24, 2010, 5:32:13 PM (15 years ago)
- Location:
- branches/blt4/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/gui/scripts/pushbutton.tcl
r1650 r1670 27 27 itk_option define -offvalue offValue OffValue "normal" 28 28 29 constructor {args} { # defined below } 30 destructor { # defined below } 29 constructor {args} { 30 # defined below 31 } 32 destructor { 33 # defined below 34 } 31 35 32 36 public method invoke {} … … 68 72 } 69 73 74 # ---------------------------------------------------------------------- 75 # CONSTRUCTOR 76 # ---------------------------------------------------------------------- 77 itcl::body Rappture::PushButton::destructor {} { 78 if {"" != $_variable} { 79 upvar #0 $_variable var 80 trace remove variable var write [itcl::code $this _fixValue] 81 } 82 } 83 70 84 itcl::body Rappture::PushButton::invoke {} { 71 85 toggle … … 103 117 $itk_component(button) configure -relief sunken \ 104 118 -image $onimage -bg white 105 } else if { $var == $offvalue }{119 } else { 106 120 set _state 0 107 121 $itk_component(button) configure -relief raise \ 108 122 -image $offimage -bg grey85 109 } else {110 puts stderr "unknown value \"$var\": should be \"$offvalue\" or \"$onvalue\""111 123 } 112 124 } -
branches/blt4/gui/scripts/xyprint.tcl
r1666 r1670 201 201 image delete $img 202 202 return [list .png $bytes] 203 } elseif { $format == "gif" } { 204 set img [image create picture] 205 $_clone snap $img 206 $img export gif -data bytes 207 image delete $img 208 return [list .gif $bytes] 203 209 } 204 210 … … 618 624 "eps" "EPS Encapsulated PostScript" \ 619 625 "jpg" "JPEG Joint Photographic Experts Group Format" \ 620 "png" "PNG Portable Network Graphics Format" 626 "png" "PNG Portable Network Graphics Format" \ 627 "gif" "GIF Graphics Interchange Format" 621 628 622 629 bind $page.format <<Value>> [itcl::code $this ApplyGeneralSettings]
Note: See TracChangeset
for help on using the changeset viewer.