Changeset 2991 for branches/blt4


Ignore:
Timestamp:
May 2, 2012, 11:51:22 AM (12 years ago)
Author:
gah
Message:
 
Location:
branches/blt4
Files:
3 edited

Legend:

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

    r2990 r2991  
    5656    $_dispatcher dispatch $this !layout "[itcl::code $this Rebuild]; list"
    5757   
    58     set _frame $itk_interior
    5958    set _owner $owner
    6059    set _frame $itk_interior.frame
  • branches/blt4/gui/scripts/drawingentry.tcl

    r2990 r2991  
    9292    #
    9393    itk_component add drawing {
    94         canvas $itk_interior.canvas -background white -relief sunken -bd 1
     94        canvas $itk_interior.canvas -background white -relief sunken -bd 1 \
     95            -width 800 -height 600
    9596    } {
    9697        ignore -background
     
    315316            set value [XmlGet $cpath.$attr]
    316317            lappend _cname2controls($cname) $value
    317             puts stderr "$_owner xml put $value.hide 1"
    318318            $_owner xml put $value.hide 1
    319319        }
     
    437437        }
    438438    }
     439    set contents [XmlGet $cpath.contents]
     440    set img ""
     441    if { [string compare -length 5 $contents "file:"] == 0 } {
     442        set fileName [string range $contents 5 end]
     443        if { [file exists $fileName] } {
     444            set img [image create picture -file $fileName]
     445        }
     446    } elseif { [string compare -length 5 $contents "http:"] == 0 } {
     447        puts stderr  "don't know how to handle http"
     448        return
     449    } else {
     450        set img [image create picture -data $contents]
     451    }
     452    if { $img == "" } {
     453        return
     454    }
    439455    # Coordinates
    440     set coords {}
    441456    set coords [XmlGet $cpath.coords]
    442457    set coords [ScreenCoords $coords]
     
    491506        set y1 0
    492507    }
    493     set contents [$XmlGet $cpath.contents]
    494     if { [string compare -length 5 $contents "file:"] } {
    495         set fileName [string range $contents 5 end]
    496         set img [image create picture -file $fileName]
    497     } elseif { [string compare -length 5 $contents "http:"] } {
    498         puts stderr  "don't know how to handle http"
    499     } else {
    500         set img [image create picture -data $contents]
    501     }
    502508    set options(-tags) $cname
    503509    set options(-image) $img
    504     set id [eval $itk_component(drawing) create oval $coords]
     510    set id [$itk_component(drawing) create image $x1 $y1]
    505511    set _cname2image($cname) $img
    506512    set _cname2id($cname) $id
     
    522528    }
    523529    # Coords
    524     set coords [$XmlGet $cpath.coords]
     530    set coords [XmlGet $cpath.coords]
    525531    set coords [string trim $coords]
    526532    if { $coords == "" } {
     
    748754                ParseScreenCoordinates $value
    749755            }
     756            "width*" {
     757                set width [XmlGet $_path.background.$elem]
     758                $itk_component(drawing) configure -width $width
     759            }
     760            "height*" {
     761                set height [XmlGet $_path.background.$elem]
     762                $itk_component(drawing) configure -height $height
     763            }
    750764        }
    751765    }
     
    771785                "map*" {
    772786                    set from [XmlGet $varPath.$elem.from]
    773                     set to [Xmlget $varPath.$elem.to]
     787                    set to [XmlGet $varPath.$elem.to]
    774788                    if { $from == "" || $to == "" } {
    775789                        puts stderr "empty translation in map table \"$varPath\""
  • branches/blt4/packages/vizservers/start_nanoscale.sh.in

    r2936 r2991  
    11#! /bin/sh
    2 
    3 DISPLAY=:0
    4 export DISPLAY
    52
    63# Fail on errors
Note: See TracChangeset for help on using the changeset viewer.