Changeset 2990


Ignore:
Timestamp:
May 2, 2012, 7:29:30 AM (12 years ago)
Author:
gah
Message:
 
Location:
branches/blt4/gui/scripts
Files:
3 edited

Legend:

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

    r2988 r2990  
    267267    set _name2info($name-enable) $enable
    268268
     269    set hidden [$_owner xml get $_name2info($name-path).hide]
     270    if { $hidden != "" } {
     271        set _name2info($name-enable) [expr !$hidden]
     272    }
    269273    $_owner widgetfor $path $w
    270274
  • branches/blt4/gui/scripts/drawingcontrols.tcl

    r2988 r2990  
    8989        set controls $_controls
    9090    }
    91     foreach name $_controls {
     91    foreach name $controls {
    9292        set w $_frame.v$name
    9393        destroy $w
     94        if { [info exists _name2info($name-label)] } {
     95            destroy $_frame.l$name
     96        }
    9497        set i [lsearch $_controls $name]
    9598        set _controls [lreplace $_controls $i $i]
  • branches/blt4/gui/scripts/drawingentry.tcl

    r2989 r2990  
    3838    private variable _yOffset 0
    3939    private variable _yScale 1.0
     40    private variable _cursor ""
    4041
    4142    constructor {owner path args} { # defined below }
     
    314315            set value [XmlGet $cpath.$attr]
    315316            lappend _cname2controls($cname) $value
     317            puts stderr "$_owner xml put $value.hide 1"
     318            $_owner xml put $value.hide 1
    316319        }
    317320    }
     
    323326    }
    324327    set c $itk_component(drawing)
    325     set img [image create picture -file ~/Resize-Handle.png]
     328    set img [image create picture -file ~/question_mark12.png]
    326329    foreach { x1 y1 } $coords break
    327330    set id [$itk_component(drawing) create image $x1 $y1]
     
    332335    set _cname2id($cname) $id
    333336    set _cname2image($cname) $img
    334     #$c bind $id <Enter> [itcl::code $this Activate $cname]
    335     #$c bind $id <Leave> [itcl::code $this Deactivate $cname]
     337    $c bind $id <Enter> [itcl::code $this Activate $cname]
     338    $c bind $id <Leave> [itcl::code $this Deactivate $cname]
    336339    #$c bind $id <ButtonPress-1> [itcl::code $this Depress $cname]
    337340    $c bind $id <ButtonRelease-1> [itcl::code $this Invoke $cname $x1 $y1]
     
    832835
    833836#
     837# Activate --
     838#
     839itcl::body Rappture::DrawingEntry::Activate { cname } {
     840    $itk_component(drawing) configure -cursor center_ptr
     841}
     842
     843#
     844# Deactivate --
     845#
     846itcl::body Rappture::DrawingEntry::Deactivate { cname } {
     847    $itk_component(drawing) configure -cursor left_ptr
     848}
     849
     850#
    834851# Invoke --
    835852#
Note: See TracChangeset for help on using the changeset viewer.