Changeset 6316 for trunk


Ignore:
Timestamp:
May 4, 2016, 12:51:19 PM (8 years ago)
Author:
ldelgass
Message:

code style fixes

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/probdisteditor.tcl

    r6021 r6316  
    1919option add *ProbDistEditor*Entry.width 10 widgetDefault
    2020
    21     itcl::class Rappture::ProbDistEditor {
     21itcl::class Rappture::ProbDistEditor {
    2222    inherit itk::Widget
    2323
    2424    itk_option define -fillcolor fillColor FillColor ""
    2525
    26     constructor {args} { # defined below }
     26    constructor {args} {
     27        # defined below
     28    }
    2729    public method value {{newval ""}}
    2830    public method mode {{newval ""}}
     
    3335    protected method _apply {op {widget ""}}
    3436
    35     protected variable _dispatcher ""   ;# dispatcher for !events
    36     protected variable _mode ""         ;# type of distribution function
    37     protected variable _value           ;# data values for mode-detail
    38     protected variable _uvalue          ;# data values for mode-detail with units
    39     protected variable _umin             ;# minimum allowed value for tool with units
    40     protected variable _umax             ;# maximum allowed value for tool with units
    41     protected variable _units           ;# units for min and max
     37    protected variable _dispatcher ""# dispatcher for !events
     38    protected variable _mode "";        # type of distribution function
     39    protected variable _value;          # data values for mode-detail
     40    protected variable _uvalue;         # data values for mode-detail with units
     41    protected variable _umin;           # minimum allowed value for tool with units
     42    protected variable _umax;           # maximum allowed value for tool with units
     43    protected variable _units;          # units for min and max
    4244}
    4345
  • trunk/gui/scripts/visviewer.tcl

    r6301 r6316  
    2020    itk_option define -receivecommand receiveCommand ReceiveCommand ""
    2121
    22     private common _servers;            # array of visualization server lists
    23     set _servers(geovis)  "localhost:2015"
    24     set _servers(nanovis) "localhost:2000"
    25     set _servers(pymol)   "localhost:2020"
    26     set _servers(vmdmds)  "localhost:2018"
    27     set _servers(vtkvis)  "localhost:2010"
    28 
    29     private common _done;               # Used to indicate status of send.
    30     private variable _buffer;           # buffer for incoming/outgoing commands
    31     private variable _outbuf;           # buffer for outgoing commands
    32     private variable _blockOnWrite 0;   # Should writes to socket block?
    33     private variable _initialized
    34     private variable _isOpen 0
    35     private variable _afterId -1
    36     private variable _icon 0
    37     private variable _trace 0;          # Protocol tracing for console
    38     private variable _logging 0;        # Command logging to file
    39     # Number of milliseconds to wait before idle timeout.  If greater than 0,
    40     # automatically disconnect from the visualization server when idle timeout
    41     # is reached.
    42     private variable _idleTimeout 43200000; # 12 hours
    43     #private variable _idleTimeout 5000;# 5 seconds
    44     #private variable _idleTimeout 0;   # No timeout
    45 
    46     protected variable _debug 0
    47     protected variable _serverType "???";# Type of server.
    48     protected variable _sid "";         # socket connection to server
    49     protected variable _maxConnects 100
    50     protected variable _buffering 0
    51     protected variable _cmdSeq 0;       # Command sequence number
    52     protected variable _dispatcher "";  # dispatcher for !events
    53     protected variable _hosts "";       # list of hosts for server
    54     protected variable _parser "";      # interpreter for incoming commands
    55     protected variable _image
    56     protected variable _hostname
    57     protected variable _numConnectTries 0
    58     protected variable _debugConsole 0
    59     protected variable _reportClientInfo 1
    60     # Number of milliscends to wait for server reply before displaying wait
    61     # dialog.  If set to 0, dialog is never displayed.
    62     protected variable _waitTimeout 0
    63 
    6422    constructor { args } {
    6523        # defined below
     
    6826        # defined below
    6927    }
    70     # Used internally only.
    71     private method BuildConsole {}
    72     private method DebugConsole {}
    73     private method HideConsole {}
    74     private method ReceiveHelper {}
    75     private method SendDebugCommand {}
    76     private method SendHelper {}
    77     private method ServerDown {}
    78     private method Shuffle { servers }
    79     private method TraceComm { channel {data {}} }
    80     private method WaitDialog { state }
    81     private method Waiting { option widget }
     28    public proc GetServerList { type } {
     29        return $_servers($type)
     30    }
     31    public proc SetServerList { type namelist } {
     32        # Convert the comma separated list into a Tcl list.  OGRE also adds
     33        # a trailing comma that we want to ignore.
     34        regsub -all "," $namelist " " namelist
     35        CheckNameList $namelist
     36        set _servers($type) $namelist
     37    }
     38    public proc RemoveServerFromList { type server } {
     39        if { ![info exists _servers($type)] } {
     40            error "unknown server type \"$type\""
     41        }
     42        set i [lsearch $_servers($type) $server]
     43        if { $i < 0 } {
     44            return
     45        }
     46        set _servers($type) [lreplace $_servers($type) $i $i]
     47    }
     48    public proc SetPymolServerList { namelist } {
     49        SetServerList "pymol" $namelist
     50    }
     51    public proc SetNanovisServerList { namelist } {
     52        SetServerList "nanovis" $namelist
     53    }
     54    public proc SetVtkServerList { namelist } {
     55        SetServerList "vtk" $namelist
     56    }
    8257
    8358    protected method CheckConnection {}
     
    11792    protected method ToggleConsole {}
    11893
     94    protected variable _debug 0
     95    protected variable _serverType "???";# Type of server.
     96    protected variable _sid "";         # socket connection to server
     97    protected variable _maxConnects 100
     98    protected variable _buffering 0
     99    protected variable _cmdSeq 0;       # Command sequence number
     100    protected variable _dispatcher "";  # dispatcher for !events
     101    protected variable _hosts "";       # list of hosts for server
     102    protected variable _parser "";      # interpreter for incoming commands
     103    protected variable _image
     104    protected variable _hostname
     105    protected variable _numConnectTries 0
     106    protected variable _debugConsole 0
     107    protected variable _reportClientInfo 1
     108    # Number of milliscends to wait for server reply before displaying wait
     109    # dialog.  If set to 0, dialog is never displayed.
     110    protected variable _waitTimeout 0
     111
     112    private method BuildConsole {}
     113    private method DebugConsole {}
     114    private method HideConsole {}
     115    private method ReceiveHelper {}
     116    private method SendDebugCommand {}
     117    private method SendHelper {}
     118    private method ServerDown {}
     119    private method Shuffle { servers }
     120    private method TraceComm { channel {data {}} }
     121    private method WaitDialog { state }
     122    private method Waiting { option widget }
     123
    119124    private proc CheckNameList { namelist }  {
    120125        foreach host $namelist {
     
    125130        }
    126131    }
    127     public proc GetServerList { type } {
    128         return $_servers($type)
    129     }
    130     public proc SetServerList { type namelist } {
    131         # Convert the comma separated list into a Tcl list.  OGRE also adds
    132         # a trailing comma that we want to ignore.
    133         regsub -all "," $namelist " " namelist
    134         CheckNameList $namelist
    135         set _servers($type) $namelist
    136     }
    137     public proc RemoveServerFromList { type server } {
    138         if { ![info exists _servers($type)] } {
    139             error "unknown server type \"$type\""
    140         }
    141         set i [lsearch $_servers($type) $server]
    142         if { $i < 0 } {
    143             return
    144         }
    145         set _servers($type) [lreplace $_servers($type) $i $i]
    146     }
    147     public proc SetPymolServerList { namelist } {
    148         SetServerList "pymol" $namelist
    149     }
    150     public proc SetNanovisServerList { namelist } {
    151         SetServerList "nanovis" $namelist
    152     }
    153     public proc SetVtkServerList { namelist } {
    154         SetServerList "vtk" $namelist
    155     }
     132
     133    private variable _buffer;           # buffer for incoming/outgoing commands
     134    private variable _outbuf;           # buffer for outgoing commands
     135    private variable _blockOnWrite 0;   # Should writes to socket block?
     136    private variable _initialized
     137    private variable _isOpen 0
     138    private variable _afterId -1
     139    private variable _icon 0
     140    private variable _trace 0;          # Protocol tracing for console
     141    private variable _logging 0;        # Command logging to file
     142    # Number of milliseconds to wait before idle timeout.  If greater than 0,
     143    # automatically disconnect from the visualization server when idle timeout
     144    # is reached.
     145    private variable _idleTimeout 43200000; # 12 hours
     146    #private variable _idleTimeout 5000;# 5 seconds
     147    #private variable _idleTimeout 0;   # No timeout
     148
     149    private common _servers;            # array of visualization server lists
     150    set _servers(geovis)  "localhost:2015"
     151    set _servers(nanovis) "localhost:2000"
     152    set _servers(pymol)   "localhost:2020"
     153    set _servers(vmdmds)  "localhost:2018"
     154    set _servers(vtkvis)  "localhost:2010"
     155    private common _done;               # Used to indicate status of send.
    156156}
    157157
Note: See TracChangeset for help on using the changeset viewer.