Changeset 5353 for branches/1.3


Ignore:
Timestamp:
Apr 29, 2015, 12:20:16 AM (10 years ago)
Author:
ldelgass
Message:

merge r5350:5351 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/gui/scripts/molvisviewer.tcl

    r5220 r5353  
    4141    itk_option define -device device Device ""
    4242
    43     private variable _icon 0
    44     private variable _getimage 0
    45     private variable _mevent;           # info used for mouse event operations
    46     private variable _rocker;           # info used for rock operations
    47     private variable _dlist "";         # list of dataobj objects
    48     private variable _dataobjs;         # data objects on server
    49     private variable _dobj2transparency;# maps dataobj => transparency
    50     private variable _dobj2raise;       # maps dataobj => raise flag 0/1
    51 
    52     private variable _active;           # array of active models.
    53     private variable _obj2models;       # array containing list of models
    54                                         # for each data object.
    55     private variable _view
    56     private variable _click
    57 
    58     private variable _model
    59     private variable _mlist
    60     private variable _mrep "ballnstick"
    61 
    62     private variable _imagecache
    63     private variable _state
    64     private variable _labels "default"
    65     private variable _cacheid ""
    66     private variable _cacheimage ""
    67     private variable _first ""
    68 
    69     private common _settings  ;         # Array of settings for all known
    70                                         # widgets
    71     private variable _initialized
    72 
    73     private common _downloadPopup;      # Download options from popup
    74     private variable _pdbdata;          # PDB data from run file sent to pymol
    75     private common _hardcopy
    76     private variable _nextToken 0
    77     private variable _resizePending 0;
    78     private variable _updatePending 0;
    79     private variable _rotatePending 0;
    80     private variable _width
    81     private variable _height
    82     private variable _reset 1;          # Restore camera settings
    83     private variable _cell 0;           # Restore camera settings
    84 
    8543    constructor { servers args } {
    8644        Rappture::VisViewer::constructor $servers
     
    9452        Rappture::VisViewer::SetServerList "pymol" $namelist
    9553    }
    96     private method BuildSettingsTab {}
    97     private method DoResize {}
    98     private method DoRotate {}
    99     private method DoUpdate {}
    100     private method EventuallyResize { w h }
    101     private method EventuallyRotate { a b c }
    102     private method EventuallyChangeSettings { args }
    103     private method GetImage { widget }
    104     private method ReceiveImage { size cacheid frame rock }
    105     private method WaitIcon { option widget }
    106     private method AddImageControls { frame widget }
    107     private method SetWaitVariable { value } {
    108         set _getimage $value
    109     }
    110     private method WaitForResponse {} {
    111         tkwait variable [itcl::scope _getimage]
    112         return $_getimage
    113     }
    114     protected method Map {}
    115     protected method Pan {option x y}
    116     protected method Rebuild { }
    117     protected method Rotate {option x y}
    118     protected method SendCmd { string }
    119     protected method Unmap {}
    120     protected method Vmouse  {option b m x y}
    121     protected method Vmouse2 {option b m x y}
    122     protected method Zoom {option {factor 10}}
    123 
    12454    public method Connect {}
    12555    public method Disconnect {}
     
    13464        # do nothing
    13565    }
    136 
    137     private method UpdateState { args }
    138 
    13966    public method snap { w h }
     67
     68    protected method Map {}
     69    protected method Pan {option x y}
     70    protected method Rebuild {}
     71    protected method Rotate {option x y}
     72    protected method SendCmd { string }
     73    protected method Unmap {}
     74    protected method Vmouse  {option b m x y}
     75    protected method Vmouse2 {option b m x y}
     76    protected method Zoom {option {factor 10}}
     77
     78    private method AddImageControls { frame widget }
     79    private method BuildSettingsTab {}
     80    private method CartoonTrace {option {model "all"}}
     81    private method Cell {option}
     82    private method ComputeParallelepipedVertices { dataobj }
     83    private method DoResize {}
     84    private method DoRotate {}
     85    private method DoUpdate {}
     86    private method EventuallyChangeSettings { args }
     87    private method EventuallyResize { w h }
     88    private method EventuallyRotate { a b c }
     89    private method GetImage { widget }
    14090    private method Opacity {option}
     91    private method OrthoProjection {option}
     92    private method ReceiveImage { size cacheid frame rock }
     93    private method Representation { {option ""} }
     94    private method Rock {option}
     95    private method SetWaitVariable { value } {
     96        set _getimage $value
     97    }
    14198    private method SphereScale {option {models "all"} }
    14299    private method StickRadius {option {models "all"} }
    143     private method OrthoProjection {option}
    144     private method Representation { {option ""} }
    145     private method CartoonTrace {option {model "all"}}
    146     private method ComputeParallelepipedVertices { dataobj }
    147     private method Cell {option}
    148     private method Rock {option}
     100    private method UpdateState { args }
     101    private method WaitForResponse {} {
     102        tkwait variable [itcl::scope _getimage]
     103        return $_getimage
     104    }
     105    private method WaitIcon { option widget }
     106
     107    private variable _icon 0
     108    private variable _getimage 0
     109    private variable _mevent;           # info used for mouse event operations
     110    private variable _rocker;           # info used for rock operations
     111    private variable _dlist "";         # list of dataobj objects
     112    private variable _dataobjs;         # data objects on server
     113    private variable _dobj2transparency;# maps dataobj => transparency
     114    private variable _dobj2raise;       # maps dataobj => raise flag 0/1
     115
     116    private variable _active;           # array of active models.
     117    private variable _obj2models;       # array containing list of models
     118                                        # for each data object.
     119    private variable _view
     120    private variable _click
     121
     122    private variable _model
     123    private variable _mlist
     124    private variable _mrep "ballnstick"
     125
     126    private variable _imagecache
     127    private variable _state
     128    private variable _labels "default"
     129    private variable _cacheid ""
     130    private variable _cacheimage ""
     131    private variable _first ""
     132
     133    private variable _initialized
     134
     135    private variable _pdbdata;          # PDB data from run file sent to pymol
     136    private variable _nextToken 0
     137    private variable _resizePending 0;
     138    private variable _updatePending 0;
     139    private variable _rotatePending 0;
     140    private variable _width
     141    private variable _height
     142    private variable _reset 1;          # Restore camera settings
     143    private variable _cell 0;           # Restore camera settings
     144
     145    private common _settings;           # Array of settings for all known
     146                                        # widgets
     147    private common _downloadPopup;      # Download options from popup
     148    private common _hardcopy
    149149}
    150150
     
    181181    $_dispatcher register !rocker
    182182    $_dispatcher dispatch $this !rocker "[itcl::code $this Rock step]; list"
     183
    183184    # Mouse Event
    184185    $_dispatcher register !mevent
    185186    $_dispatcher dispatch $this !mevent "[itcl::code $this _mevent]; list"
     187
    186188    $_dispatcher register !pngtimeout
    187189    $_dispatcher register !waiticon
     
    472474        }
    473475        set _dobj2raise($dataobj) $params(-raise)
    474         debug "setting parameters for $dataobj\n"
     476        debug "setting parameters for $dataobj"
    475477
    476478        if { [isconnected] } {
     
    731733
    732734itcl::body Rappture::MolvisViewer::SendCmd { cmd } {
    733     debug "in SendCmd ($cmd)\n"
     735    debug "cmd: ($cmd)"
    734736
    735737    if { $_state(server) != $_state(client) } {
     
    763765    }
    764766    set data [ReceiveBytes $size]
    765     #debug "success: reading $size bytes from proxy\n"
     767    #debug "success: reading $size bytes from proxy"
    766768    if { [string match "print*" $cacheid] } {
    767769        # $frame is the token that we sent to the proxy.
     
    877879# ----------------------------------------------------------------------
    878880itcl::body Rappture::MolvisViewer::Rebuild {} {
    879     debug "in rebuild"
     881    debug "Enter"
    880882    set changed 0
    881883
     
    11241126        SendCmd "pan $_view(x) $_view(y)"
    11251127        SendCmd "zoom $_view(zoom)"
    1126         debug "rebuild: rotate $_view(mx) $_view(my) $_view(mz)"
     1128        debug "rotate $_view(mx) $_view(my) $_view(mz)"
    11271129
    11281130        SendCmd "raw -defer {zoom complete=1}"
     
    11561158    blt::busy release $itk_component(hull)
    11571159
    1158     debug "exiting rebuild"
     1160    debug "Exit"
    11591161}
    11601162
     
    14251427        #SendCmd "rotate $mx $my $mz"
    14261428        EventuallyRotate $mx $my $mz
    1427         debug "_vmmouse: rotate $_view(mx) $_view(my) $_view(mz)"
     1429        debug "rotate $_view(mx) $_view(my) $_view(mz)"
    14281430    }
    14291431    set _mevent(x) $x
     
    15221524                EventuallyRotate $a $b $c
    15231525                #SendCmd "rotate $a $b $c"
    1524                 debug "Rotate $x $y: rotate $_view(vx) $_view(vy) $_view(vz)"
     1526                debug "x,y: $x $y: rotate $_view(vx) $_view(vy) $_view(vz)"
    15251527                set _click(x) $x
    15261528                set _click(y) $y
     
    16921694    DoResize
    16931695    SendCmd "rotate $_view(mx) $_view(my) $_view(mz)"
    1694     debug "ResetView: rotate $_view(mx) $_view(my) $_view(mz)"
     1696    debug "rotate $_view(mx) $_view(my) $_view(mz)"
    16951697    SendCmd "pan $_view(x) $_view(y)"
    16961698    SendCmd "zoom $_view(zoom)"
Note: See TracChangeset for help on using the changeset viewer.