Changeset 1670


Ignore:
Timestamp:
Mar 24, 2010 5:32:13 PM (14 years ago)
Author:
gah
Message:
 
Location:
branches/blt4/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/gui/scripts/pushbutton.tcl

    r1650 r1670  
    2727    itk_option define -offvalue offValue OffValue "normal"
    2828
    29     constructor {args} { # defined below }
    30     destructor { # defined below }
     29    constructor {args} {
     30        # defined below
     31    }
     32    destructor {
     33        # defined below
     34    }
    3135
    3236    public method invoke {}
     
    6872}
    6973
     74# ----------------------------------------------------------------------
     75# CONSTRUCTOR
     76# ----------------------------------------------------------------------
     77itcl::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
    7084itcl::body Rappture::PushButton::invoke {} {
    7185    toggle
     
    103117        $itk_component(button) configure -relief sunken \
    104118            -image $onimage -bg white
    105     } elseif { $var == $offvalue } {
     119    } else {
    106120        set _state 0
    107121        $itk_component(button) configure -relief raise \
    108122            -image $offimage -bg grey85
    109     } else {
    110         puts stderr "unknown value \"$var\": should be \"$offvalue\" or \"$onvalue\""
    111123    }
    112124}
  • branches/blt4/gui/scripts/xyprint.tcl

    r1666 r1670  
    201201        image delete $img
    202202        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]
    203209    }
    204210   
     
    618624        "eps" "EPS Encapsulated PostScript"  \
    619625        "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"
    621628
    622629    bind $page.format <<Value>> [itcl::code $this ApplyGeneralSettings]
Note: See TracChangeset for help on using the changeset viewer.