Changeset 2692 for branches/blt4


Ignore:
Timestamp:
Nov 17, 2011, 2:11:25 PM (13 years ago)
Author:
gah
Message:
 
Location:
branches/blt4
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/Makefile.in

    r2413 r2692  
    4545        done
    4646test:
    47         #$(MAKE) -C test all
     47        $(MAKE) -C test all
    4848
    4949install:
     
    5353
    5454clean:
    55         $(RM) config.status config.log  *~
    5655        for i in $(TARGETS) ; do \
    5756          $(MAKE) -C $$i clean || exit 1 ;\
  • branches/blt4/gui/scripts/molvisviewer.tcl

    r2690 r2692  
    110110        set _getimage $value
    111111    }
    112     private method WaitForImage {} {
     112    private method WaitForResponse {} {
    113113        tkwait variable [itcl::scope _getimage]
    114114        return $_getimage
     
    120120    protected method SendCmd { string }
    121121    protected method Unmap {}
    122     protected method Update { args }
    123122    protected method Vmouse  {option b m x y}
    124123    protected method Vmouse2 {option b m x y}
     
    137136        # do nothing
    138137    }
     138
     139    private method UpdateState { args }
     140
    139141    public method snap { w h }
    140142    private method Opacity {option}
     
    172174    $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list"
    173175
    174     # Update event
     176    # Update state event
    175177    $_dispatcher register !update
    176178    $_dispatcher dispatch $this !update "[itcl::code $this DoUpdate]; list"
     
    571573                set inner [$popup component inner]
    572574                label $inner.summary -text "" -anchor w
    573                 pack $inner.summary -side top
    574575                radiobutton $inner.pdb \
    575576                    -text "PDB Protein Data Bank Format File" \
     
    577578                    -font "Arial 10 " \
    578579                    -value pdb 
    579                 pack $inner.pdb -anchor w
    580580                Rappture::Tooltip::for $inner.pdb \
    581581                    "Save as PDB Protein Data Bank format file."
     
    586586                Rappture::Tooltip::for $inner.image \
    587587                    "Save as image."
    588                 pack $inner.image -anchor w
    589                 button $inner.go -text [Rappture::filexfer::label download] \
    590                     -command [lindex $args 0]
    591                 pack $inner.go -side bottom -pady 4
     588                set f [frame $inner.frame]
     589                button $f.ok -text "Save" \
     590                    -highlightthickness 0 -pady 3 -padx 3 \
     591                    -command [lindex $args 0] \
     592                    -compound left \
     593                    -image [Rappture::icon download]
     594                button $f.cancel -text "Cancel" \
     595                    -highlightthickness 0 -pady 3 -padx 3 \
     596                    -command [list $popup deactivate] \
     597                    -compound left \
     598                    -image [Rappture::icon cancel]
     599                blt::table $f \
     600                    0,0 $f.ok \
     601                    0,1 $f.cancel
     602                blt::table $inner \
     603                    0,0 $inner.pdb -anchor w \
     604                    1,0 $inner.image -anchor w \
     605                    2,0 $f -fill x -pady 4
    592606                $inner.pdb select
    593607            } else {
     
    619633                            [itcl::code $this SetWaitVariable 0]
    620634                        set inner [$popup component inner]
     635                        # Add image controls to the ballon popup
    621636                        AddImageControls $inner [lindex $args 0]
    622637                    } else {
     
    628643                    SetWaitVariable 0
    629644                    $popup activate $widget left
    630                     set bool [WaitForImage]
     645                    set bool [WaitForResponse]
    631646                    $popup deactivate
    632647                    if { $bool } {
     
    750765    set data [ReceiveBytes $size]
    751766    #debug "success: reading $size bytes from proxy\n"
    752     if { $cacheid == "print" } {
     767    if { [string match "print*" $cacheid] } {
    753768        # $frame is the token that we sent to the proxy.
    754         set _hardcopy($this-$frame) $data
     769        set _hardcopy($this-$cacheid) $data
     770        puts stderr "setting _hardcopy($this-$cacheid)"
    755771    } else {
    756772        set _imagecache($tag) $data
     
    781797        -font "Arial 9"
    782798
    783     label $inner.pict -image $_settings($this-modelimg)
    784 
    785     radiobutton $inner.bstick -text "balls and sticks" \
    786         -command [itcl::code $this Representation ballnstick] \
    787         -variable Rappture::MolvisViewer::_settings($this-model) \
    788         -value ballnstick -font "Arial 9" -pady 0
    789     Rappture::Tooltip::for $inner.bstick \
    790         "Display atoms (balls) and connections (sticks) "
    791 
    792     radiobutton $inner.spheres -text "spheres" \
    793         -command [itcl::code $this Representation spheres] \
    794         -variable Rappture::MolvisViewer::_settings($this-model) \
    795         -value spheres -font "Arial 9" -pady 0
    796     Rappture::Tooltip::for $inner.spheres \
    797         "Display atoms as spheres. Do not display bonds."
    798 
    799     radiobutton $inner.sticks -text "sticks" \
    800         -command [itcl::code $this Representation sticks] \
    801         -variable Rappture::MolvisViewer::_settings($this-model) \
    802         -value sticks -font "Arial 9" -pady 0
    803     Rappture::Tooltip::for $inner.sticks \
    804         "Display bonds as sticks. Do not display atoms."
    805 
    806     radiobutton $inner.lines -text "lines" \
    807         -command [itcl::code $this Representation lines] \
    808         -variable [itcl::scope _settings($this-model)] \
    809         -value lines -font "Arial 9" -pady 0
    810     Rappture::Tooltip::for $inner.lines \
    811         "Display bonds as lines. Do not display atoms."
    812 
    813     radiobutton $inner.cartoon -text "cartoon" \
    814         -command [itcl::code $this Representation cartoon] \
    815         -variable [itcl::scope _settings($this-model)] \
    816         -value cartoon -font "Arial 9" -pady 0
    817     Rappture::Tooltip::for $inner.cartoon \
    818         "Display cartoon representation of bonds (sticks)."
     799    itk_component add representation {
     800        Rappture::Combobox $inner.rep -width 20 -editable no
     801    }
     802    $inner.rep choices insert end \
     803        "ballnstick"  "ball and stick" \
     804        "spheres"     "spheres"         \
     805        "sticks"      "sticks"          \
     806        "lines"       "lines"           \
     807        "cartoon"     "cartoon"         
     808
     809    bind $inner.rep <<Value>> [itcl::code $this Representation]
     810    $inner.rep value "ball and stick"
    819811
    820812    scale $inner.spherescale -width 10 -font "Arial 9" \
     
    871863    label $inner.spacer
    872864    blt::table $inner \
    873         0,0 $inner.drawinglabel -anchor w -columnspan 4 \
    874         1,1 $inner.pict -anchor w -rowspan 5 \
    875         1,2 $inner.bstick -anchor w -columnspan 2 \
    876         2,2 $inner.spheres -anchor w -columnspan 2 \
    877         3,2 $inner.sticks -anchor w -columnspan 2 \
    878         4,2 $inner.lines -anchor w -columnspan 2 \
    879         5,2 $inner.cartoon -anchor w -columnspan 2 \
    880         6,0 $inner.labels -anchor w -columnspan 4 -pady {1 0} \
    881         7,0 $inner.rock -anchor w -columnspan 4 -pady {1 0} \
    882         8,0 $inner.ortho -anchor w -columnspan 4 -pady {1 0} \
    883         9,0 $inner.cartoontrace -anchor w -columnspan 4 -pady {1 0} \
    884         10,0 $inner.cell -anchor w -columnspan 4 -pady {1 0} \
    885         11,1 $inner.spherescale -fill x -columnspan 4 -pady {1 0} \
    886         12,1 $inner.stickradius -fill x -columnspan 4 -pady {1 0} \
    887 
    888     blt::table configure $inner c0 -resize expand -width 2
    889     blt::table configure $inner c1 c2 -resize none
    890     blt::table configure $inner c3 -resize expand
     865        0,0 $inner.labels -anchor w -pady {1 0} \
     866        1,0 $inner.rock -anchor w -pady {1 0} \
     867        2,0 $inner.ortho -anchor w -pady {1 0} \
     868        3,0 $inner.cartoontrace -anchor w -pady {1 0} \
     869        4,0 $inner.cell -anchor w  -pady {1 0} \
     870        5,0 $inner.rep_l -anchor w -pady { 2 0 } \
     871        6,0 $inner.rep -anchor w  \
     872        7,0 $inner.spherescale -fill x -pady {3 0} \
     873        8,0 $inner.stickradius -fill x -pady {1 0} \
     874
    891875    blt::table configure $inner r* -resize none
    892     blt::table configure $inner r13 -resize expand
     876    blt::table configure $inner r10 -resize expand
    893877}
    894878
     
    11161100    } else {
    11171101        set _state(client) $state
    1118         Update
     1102        UpdateState
    11191103        set flush 0
    11201104    }
     
    12161200itcl::body Rappture::MolvisViewer::DoRotate {} {
    12171201    SendCmd "rotate $_view(a) $_view(b) $_view(c)"
     1202    array unset _imagecache
    12181203    set _rotatePending 0
    12191204}
     
    12301215
    12311216itcl::body Rappture::MolvisViewer::DoUpdate { } {
    1232     set scale  $_settings($this-spherescale)
    1233     set radius $_settings($this-stickradius)
    1234     set overridescale [expr $scale * 0.8]
    1235     set overrideradius [expr $radius * 0.8]
    1236     SendCmd "spherescale -model all $overridescale"
    1237     SendCmd "stickradius -model all $overrideradius"
     1217    array unset _imagecache
    12381218    set models [array names _mlist]
    1239     foreach model $models {
    1240         if { [info exists _active($model)] } {
    1241             SendCmd "spherescale -model $model $scale"
    1242             SendCmd "stickradius -model $model $radius"
    1243         }
    1244     }
     1219    SphereScale $_settings($this-spherescale) $models
     1220    StickRadius $_settings($this-stickradius) $models
    12451221    set _updatePending 0
    12461222}
     
    12671243        set _view(x) [expr $_view(x) + $dx]
    12681244        set _view(y) [expr $_view(y) + $dy]
     1245        array unset _imagecache
    12691246        SendCmd "pan $dx $dy"
    12701247        return
     
    12811258        set _view(x) [expr $_view(x) + $dx]
    12821259        set _view(y) [expr $_view(y) + $dy]
     1260        array unset _imagecache
    12831261        SendCmd "pan $dx $dy"
    12841262    }
     
    13131291        }
    13141292    }
    1315 }
    1316 
    1317 itcl::body Rappture::MolvisViewer::Update { args } {
     1293    array unset _imagecache
     1294}
     1295
     1296itcl::body Rappture::MolvisViewer::UpdateState { args } {
    13181297    set tag "$_state(client),$_rocker(client)"
    13191298    if { $_image(id) != "$tag" } {
     
    13541333            SendCmd "rock $_rocker(client)"
    13551334        }
    1356         Update
     1335        UpdateState
    13571336    }
    13581337    if { $_rocker(on) && $option != "pause" } {
     
    15771556        set option $_settings($this-model)
    15781557    }
     1558    array unset _imagecache
    15791559    if { $option == "sticks" } {
    15801560        set _settings($this-modelimg) [Rappture::icon lines]
     
    15901570    set _settings($this-model) $option
    15911571    set _mrep $option
    1592 
    15931572
    15941573    foreach model [array names _mlist] {
     
    16161595# ----------------------------------------------------------------------
    16171596itcl::body Rappture::MolvisViewer::OrthoProjection {option} {
     1597    array unset _imagecache
    16181598    switch -- $option {
    16191599        "orthoscopic" {
     
    16771657        return
    16781658    }
     1659    array unset _imagecache
    16791660    if { $cell } {
    16801661        Rappture::Tooltip::for $itk_component(ortho) \
     
    17481729    set controls $_downloadPopup(image_controls)
    17491730    set combo $controls.size
    1750     puts stderr combo=$combo
    17511731    set size [$combo translate [$combo value]]
    17521732    switch -- $size {
     
    18161796    if { $_hardcopy($this-$token) != "" } {
    18171797        set combo $controls.format
    1818         set type [$combo translate [$combo value]]
    1819         switch -- $type {
     1798        set fmt [$combo translate [$combo value]]
     1799        switch -- $fmt {
    18201800            "jpg" {
    18211801                set img [image create picture -data $_hardcopy($this-$token)]
     
    19201900
    19211901itcl::body Rappture::MolvisViewer::Opacity { option } {
     1902    array unset _imagecache
    19221903    if { $option == "update" } {
    19231904        set opacity $_settings($this-opacity)
     
    19601941        error "bad option \"$option\""
    19611942    }
     1943    # Clear the image cache
     1944    array unset _imagecache
    19621945    set _settings($this-showlabels) $showlabels
    19631946    if { $models == "all" } {
     
    19831966# ----------------------------------------------------------------------
    19841967itcl::body Rappture::MolvisViewer::CartoonTrace {option {models "all"}} {
     1968    array unset _imagecache
    19851969    set trace $_settings($this-cartoontrace)
    19861970    if { $option == "update" } {
     
    20111995    set img $_image(plot)
    20121996    set res "[image width $img]x[image height $img]"
    2013     puts stderr combo=$inner.size
    20141997    Rappture::Combobox $inner.size -width 30 -editable no
    20151998    $inner.size choices insert end \
     
    20322015        "gif"  "GIF (GIF Graphics Interchange Format)"
    20332016
    2034     button $inner.go -text [Rappture::filexfer::label download] \
    2035         -command [itcl::code $this SetWaitVariable 1]
     2017    set f [frame $inner.frame]
     2018    button $f.ok -text "Save" \
     2019        -highlightthickness 0 -pady 3 -padx 3 \
     2020        -command [itcl::code $this SetWaitVariable 1] \
     2021        -compound left \
     2022        -image [Rappture::icon download
     2023]
     2024    button $f.cancel -text "Cancel" \
     2025        -highlightthickness 0 -pady 3 -padx 3 \
     2026        -command [itcl::code $this SetWaitVariable 0] \
     2027        -compound left \
     2028        -image [Rappture::icon cancel]
     2029    blt::table $f \
     2030        0,0 $f.ok  \
     2031        0,1 $f.cancel
    20362032
    20372033    blt::table $inner \
     
    20422038        2,0 $inner.bgcolor_l -anchor e \
    20432039        2,1 $inner.bgcolor -anchor w -fill x \
    2044         6,0 $inner.go -cspan 2 -pady 5
     2040        3,0 $f -cspan 2 -fill x
     2041    blt::table configure $inner r0 r1 r2 r3 -pady { 4 0 }
     2042    blt::table configure $inner r3 -pady { 4 4 }
    20452043    $inner.bgcolor value "Black"
    20462044    $inner.size value "Draft (400x400)"
  • branches/blt4/gui/scripts/xyprint.tcl

    r2315 r2692  
    8989    private method GetAxisType { axis }
    9090    private method restore { toolName plotName data }
     91
     92    # Same dialog may be used for different graphs
    9193    private common _settings
    9294    private common _fonts
     
    378380    set _settings($this-layout-width) [Pixels2Inches [$_clone cget -width]]
    379381    set _settings($this-layout-height) [Pixels2Inches [$_clone cget -height]]
    380     set _fonts(legend) [font create legend \
    381                             -family helvetica -size 10 -weight normal]
    382     update
     382
     383    set _settings($this-legend-fontfamily) helvetica
     384    set _settings($this-legend-fontsize)   10
     385    set _settings($this-legend-fontweight) normal
     386    set _settings($this-legend-fontslant)  roman
     387    set font "helvetica 10 normal roman"
    383388    $_clone legend configure \
    384389        -position right \
    385         -font $_fonts(legend) \
     390        -font $font \
    386391        -hide yes -borderwidth 0 -background white -relief solid \
    387392        -anchor nw -activeborderwidth 0
    388393    #
     394    set _settings($this-axis-ticks-fontfamily) helvetica
     395    set _settings($this-axis-ticks-fontsize)   10
     396    set _settings($this-axis-ticks-fontweight) normal
     397    set _settings($this-axis-ticks-fontslant)  roman
     398    set _settings($this-axis-title-fontfamily) helvetica
     399    set _settings($this-axis-title-fontsize)   10
     400    set _settings($this-axis-title-fontweight) normal
     401    set _settings($this-axis-title-fontslant)  roman
    389402    foreach axis [$_clone axis names] {
    390403        if { $axis == "z" } {
     
    394407            continue
    395408        }
    396         set _fonts($axis-ticks) [font create $axis-ticks \
    397                                      -family helvetica -size 10 \
    398                                      -weight normal -slant roman]
    399         set _fonts($axis-title) [font create $axis-title \
    400                                      -family helvetica -size 10 \
    401                                      -weight normal -slant roman]
    402         update
     409        set _settings($this-$axis-ticks-fontfamily) helvetica
     410        set _settings($this-$axis-ticks-fontsize)   10
     411        set _settings($this-$axis-ticks-fontweight) normal
     412        set _settings($this-$axis-ticks-fontslant)  roman
     413        set _settings($this-$axis-title-fontfamily) helvetica
     414        set _settings($this-$axis-title-fontsize)   10
     415        set _settings($this-$axis-title-fontweight) normal
     416        set _settings($this-$axis-title-fontslant)  roman
     417        set tickfont "helvetica 10 normal roman"
     418        set titlefont "helvetica 10 normal roman"
    403419        $_clone axis configure $axis -ticklength 5  \
    404420            -majorticks {} -minorticks {}
     
    432448
    433449itcl::body Rappture::XyPrint::SetOption { opt } {
    434     set new $_settings($this-graph$opt)
     450    set new $_settings($this$opt)
    435451    set old [$_clone cget $opt]
    436452    set code [catch [list $_clone configure $opt $new] err]
     
    439455        global errorInfo
    440456        puts stderr "$err: $errorInfo"
    441         set _settings($this-graph$opt) $old
     457        set _settings($this$opt) $old
    442458        $_clone configure $opt $old
    443459    }
     
    476492    set h [Inches2Pixels $_settings($this-layout-height) 3.4]
    477493    set pixelsPerInch [winfo pixels . 1i]
    478     set sx [expr 2.5*$pixelsPerInch/$w]
    479     set sy [expr 2.0*$pixelsPerInch/$h]
     494    set cw [winfo width $itk_component(preview)]
     495    set ch [winfo height $itk_component(preview)]
     496    set rw [expr 2.5*$pixelsPerInch]
     497    set rh [expr 2.5*$pixelsPerInch]
     498    set maxwidth $rw
     499    set maxheight $rh
     500    if { $maxwidth > $cw } {
     501        set maxwidth $cw
     502    }
     503    if { $maxheight > $ch } {
     504        set maxheight $ch
     505    }
     506    set sx [expr double($maxwidth)/$w]
     507    set sy [expr double($maxheight)/$h]
    480508    set s [expr min($sx,$sy)]
    481509    $_clone snap $img -width $w -height $h
    482510
    483     if 0 {
    484     if { ![winfo exists .labeltest] } {
    485         toplevel .labeltest -bg red
    486         label .labeltest.label -image $img
    487         pack .labeltest.label -fill both
    488     }
    489     }
    490511    set pw [expr int(round($s * $w))]
    491512    set ph [expr int(round($s * $h))]
  • branches/blt4/gui/scripts/xyresult.tcl

    r2315 r2692  
    110110    private variable _limits       ;# axis limits:  x-min, x-max, etc.
    111111    private variable _autoColorI 0 ;# index for next "-color auto"
    112 
    113112    private variable _hilite       ;# info for element currently highlighted
    114113    private variable _axis         ;# info for axis manipulations
     
    657656                set color $_dataobj2color($dataobj)
    658657            } else {
    659                 set color black
     658                set color [$dataobj hints color]
     659                if {"" == $color} {
     660                    set color black
     661                }
    660662            }
    661663            if {[info exists _dataobj2width($dataobj)]} {
     
    697699        foreach elem $label2elem($label) {
    698700            set dataobj $_elem2dataobj($elem)
    699             scan [$dataobj hints xmlobj] "::libraryObj%d" suffix
     701            regexp {^::curve(?:Value)?([0-9]+)$} $dataobj match suffix
    700702            incr suffix
    701703            set elabel [format "%s \#%d" $label $suffix]
     
    875877
    876878            # Some elements are generated dynamically and therefore will
    877             # not have a dataobj object associated with them.
     879            # not have a data object associated with them.
    878880            set mapx [$g element cget $elem -mapx]
    879881            set mapy [$g element cget $elem -mapy]
     
    14921494    # rebuild if needed, so we know about the axes
    14931495    if 0 {
    1494     if {[$_dispatcher ispending !rebuild]} {
    1495         $_dispatcher cancel !rebuild
    1496         $_dispatcher event -now !rebuild
    1497     }
     1496        # Don't do this. Given dataobj may be deleted in the rebuild
     1497
     1498        # rebuild if needed, so we know about the axes
     1499        if {[$_dispatcher ispending !rebuild]} {
     1500            $_dispatcher cancel !rebuild
     1501            $_dispatcher event -now !rebuild
     1502        }
    14981503    }
    14991504    # what is the x axis?  x? x2? x3? ...
  • branches/blt4/packages/vizservers/pymolproxy/pymolproxy2.c

    r2680 r2692  
    9494static FILE *frecord;
    9595static int recording = FALSE;
     96static int pymolIsAlive = TRUE;
    9697
    9798#define WANT_DEBUG      0
     
    723724{
    724725    PymolProxy *p = clientData;
    725     int i, push, defer, state, size;
     726    int i, push, defer, bool, size;
    726727    const char *model;
    727728
     
    729730    model = "all";
    730731    size = 14;
    731     state = TRUE;
     732    bool = TRUE;
    732733    push = defer = FALSE;
    733734    for(i = 1; i < argc; i++) {
     
    744745                size = atoi(argv[i]);
    745746            }
    746         } else if (Tcl_GetBoolean(interp, argv[i], &state) != TCL_OK) {
     747        } else if (Tcl_GetBoolean(interp, argv[i], &bool) != TCL_OK) {
    747748            return TCL_ERROR;
    748749        }
     
    757758    SendCmd(p, "set label_color,white,%s\nset label_size,%d,%s\n",
    758759            model, size, model);
    759     if (state) {
     760    if (bool) {
    760761        SendCmd(p, "label %s,\"%%s%%s\" %% (ID,name)\n", model);
    761762    } else {
     
    843844        p->flags |= FORCE_UPDATE;
    844845    }
     846    p->cacheId = state;
    845847
    846848    /* Does not invalidate cache? */
     
    984986    /* Force pymol to update the current scene. */
    985987    SendCmd(p, "refresh\n");
    986 #ifdef notdef
    987     SendCmd(p, "png \"- %d %d %d\"\n", p->frame, p->cacheId, p->rockOffset);
    988 #endif
    989     SendCmd(p, "png -\n");
     988    /* This is a hack. We're encoding the filename to pass extra information
     989     * to the MyPNGWrite routine inside of pymol. Ideally these would be
     990     * parameters of a new "molvispng" command that would be passed all the
     991     * way through to MyPNGWrite.
     992     *
     993     * The extra information is contained in the token we get from the
     994     * molvisviewer client, the frame number, and rock offset. */
     995    SendCmd(p, "png -:%d:%d:%d\n", p->cacheId, p->frame, p->rockOffset);
    990996    return p->status;
    991997}
     
    10011007    /* Force pymol to update the current scene. */
    10021008    SendCmd(p, "refresh\n");
    1003 #ifdef notdef
    1004     SendCmd(p, "png \"- %d %d %d\",format=1\n", p->frame, p->cacheId,
     1009    /* This is a hack. We're encoding the filename to pass extra information
     1010     * to the MyPNGWrite routine inside of pymol. Ideally these would be
     1011     * parameters of a new "molvispng" command that would be passed all the
     1012     * way through to MyPNGWrite.
     1013     *
     1014     * The extra information is contained in the token we get from the
     1015     * molvisviewer client, the frame number, and rock offset. */
     1016    SendCmd(p, "png -:%d:%d:%d,format=1\n", p->cacheId, p->frame,
    10051017            p->rockOffset);
    1006 #endif
    1007     SendCmd(p, "png -,format=1\n");
    10081018    p->flags &= ~(UPDATE_PENDING|FORCE_UPDATE);
    10091019    return p->status;
     
    10421052        SendCmd(p, "bg_color %s\nrefresh\n", bgcolor);
    10431053    }
    1044     SendCmd(p, "ray %d,%d\n", width, height);
    1045 #ifdef notdef
    1046     SendCmd(p, "png \"- print 0 0\",dpi=300\nbg_color black\n");
    1047 #endif
    1048     SendCmd(p, "png -,dpi=300\nbg_color black\n");
     1054    /* This is a hack. We're encoding the filename to pass extra information
     1055     * to the MyPNGWrite routine inside of pymol. Ideally these would be
     1056     * parameters of a new "molvispng" command that would be passed all the
     1057     * way through to MyPNGWrite. 
     1058     *
     1059     * The extra information is contained in the token we get from the
     1060     * molvisviewer client, the frame number, and rock offset.
     1061     */
     1062    SendCmd(p, "png -:%s:0:0,width=%d,height=%d,ray=1,dpi=300\n",
     1063            token, width, height);
     1064    SendCmd(p, "bg_color black\n");
    10491065    return p->status;
    10501066}
     
    18911907{
    18921908    ERROR("pymol (%d) died unexpectedly", stats.pid);
     1909    pymolIsAlive = FALSE;
    18931910    /*DoExit(1);*/
    18941911}
     
    19872004        exit(-1);
    19882005    } else {
     2006        pymolIsAlive = TRUE;
    19892007        signal(SIGCHLD, ChildHandler);
    19902008    }
     
    21042122#endif
    21052123    Tcl_DStringInit(&command);
    2106     for (;;) {
     2124    while (pymolIsAlive) {
    21072125        tvPtr = NULL;
    21082126#if READ_DEBUG
    21092127        DEBUG("Start I/O set");
    21102128#endif
    2111         while (WaitForNextLine(&p->client, tvPtr)) {
     2129        while ((pymolIsAlive) && (WaitForNextLine(&p->client, tvPtr))) {
    21122130            size_t numBytes;
    21132131            const char *line;
     
    21822200#endif
    21832201    list.headPtr = list.tailPtr = NULL;
    2184     for (;;) {
     2202    while (pymolIsAlive) {
    21852203        while (WaitForNextLine(bp, NULL)) {
    21862204            Image *imgPtr;
     
    22002218                return NULL;
    22012219            }
    2202             if (strncmp(line, "ppm image follows: ", 16) != 0) {
     2220#if WRITE_DEBUG
     2221            DEBUG("Writer: line found is %s\n", line);
     2222#endif
     2223            if (strncmp(line, "image follows: ", 15) != 0) {
    22032224                continue;
    22042225            }
    2205 #ifdef notdef
    22062226            if (sscanf(line, "image follows: %d %s %d %d\n", &numBytes, cacheId,
    22072227                       &frameNum, &rockOffset) != 4) {
     
    22102230                return NULL;
    22112231            }
    2212 #endif
    2213             if (sscanf(line, "ppm image follows: %d\n", &numBytes) != 1) {
    2214                 ERROR("can't get # bytes from \"%s\"", line);
    2215                 DEBUG("Leaving Writer thread");
    2216                 return NULL;
    2217             }
    22182232#if WRITE_DEBUG
    22192233            DEBUG("found image line \"%.*s\"", numBytes, line);
    22202234#endif
    2221             strcpy(cacheId, "0");
    2222             frameNum = 0;
    2223             rockOffset = 0;
    2224             sprintf(header, "nv>image %d %s %d %d\n", numBytes, cacheId, frameNum,
    2225                     rockOffset);
     2235            sprintf(header, "nv>image %d %s %d %d\n", numBytes, cacheId,
     2236                    frameNum, rockOffset);
    22262237            hdrLength = strlen(header);
    22272238#if WRITE_DEBUG
    2228             DEBUG("Queueing image numBytes=%d frameNum=%d, rockOffset=%d size=%d\n", numBytes, frameNum, rockOffset, numBytes + hdrLength);
     2239            DEBUG("Queueing image numBytes=%d cacheId=%s, frameNum=%d, rockOffset=%d size=%d\n", numBytes, cacheId, frameNum, rockOffset, numBytes + hdrLength);
    22292240#endif
    22302241            imgPtr = NewImage(&list, numBytes + hdrLength);
  • branches/blt4/tester/scripts/Makefile.in

    r2168 r2692  
    3737
    3838tclIndex: $(FILES)
    39         $(TCLSH) $(srcdir)/../../gui/tclconfig/mkindex.tcl --srcdir $(srcdir) \
     39        $(TCLSH) $(srcdir)/../../gui/cf/mkindex.tcl --srcdir $(srcdir) \
    4040                --outfile tclIndex
    4141
Note: See TracChangeset for help on using the changeset viewer.