Changeset 5657 for trunk


Ignore:
Timestamp:
Jun 5, 2015 8:37:19 AM (9 years ago)
Author:
ldelgass
Message:

style/whitespace

File:
1 edited

Legend:

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

    r5337 r5657  
    1 # -*- mode: tcl; indent-tabs-mode: nil -*- 
     1# -*- mode: tcl; indent-tabs-mode: nil -*-
    22# ----------------------------------------------------------------------
    33#  COMPONENT: drawing - 3D drawing of data
     
    1212package require BLT
    1313
    14 namespace eval Rappture { 
    15     # forward declaration 
     14namespace eval Rappture {
     15    # forward declaration
    1616}
    1717
    1818itcl::class Rappture::Drawing {
    1919    private variable _drawing
    20     private variable _xmlobj 
    21     private variable _styles 
    22     private variable _shapes 
    23     private variable _labels 
    24     private variable _types 
    25     private variable _data 
     20    private variable _xmlobj
     21    private variable _styles
     22    private variable _shapes
     23    private variable _labels
     24    private variable _types
     25    private variable _data
    2626    private variable _hints
    2727    private variable _units
    2828
    29     constructor {xmlobj path} { 
    30         # defined below 
    31     }
    32     destructor { 
    33         # defined below 
     29    constructor {xmlobj path} {
     30        # defined below
     31    }
     32    destructor {
     33        # defined below
    3434    }
    3535
     
    4040    public method values { elem }
    4141    public method data { elem }
    42     public method hints {{keyword ""}} 
    43     public method components { args } 
     42    public method hints {{keyword ""}}
     43    public method components { args }
    4444}
    4545
     
    7272            glyphs* {
    7373                set _data($elem) [$_xmlobj get $path.$elem.vtk]
    74                 set _data($elem) [string trim $_data($elem)]
     74                set _data($elem) [string trim $_data($elem)]
    7575                set _styles($elem) [$_xmlobj get $path.$elem.about.style]
    7676                set _labels($elem) [$_xmlobj get $path.$elem.about.label]
     
    8585                    set contents [$_xmlobj get $path.$elem.vtk]
    8686                }
    87                 set _data($elem) [string trim $contents]
     87                set _data($elem) [string trim $contents]
    8888                set _styles($elem) [$_xmlobj get $path.$elem.about.style]
    8989                set _labels($elem) [$_xmlobj get $path.$elem.about.label]
     
    143143}
    144144
    145 # 
    146 # label -- 
    147 # 
     145#
     146# label --
     147#
    148148#       Returns the label of the named drawing element.
    149149#
     
    151151    if { [info exists _labels($elem)] } {
    152152        return $_labels($elem)
    153     } 
    154     return ""
    155 }
    156 
    157 # 
    158 # type -- 
    159 # 
     153    }
     154    return ""
     155}
     156
     157#
     158# type --
     159#
    160160#       Returns the type of the named drawing element.
    161161#
     
    163163    if { [info exists _types($elem)] } {
    164164        return $_types($elem)
    165     } 
    166     return ""
    167 }
    168 
    169 # 
    170 # style -- 
    171 # 
     165    }
     166    return ""
     167}
     168
     169#
     170# style --
     171#
    172172#       Returns the style string of the named drawing element.
    173173#
     
    175175    if { [info exists _styles($elem)] } {
    176176        return $_styles($elem)
    177     } 
    178     return ""
    179 }
    180 
    181 # 
    182 # shape -- 
    183 # 
     177    }
     178    return ""
     179}
     180
     181#
     182# shape --
     183#
    184184#       Returns the shape of the glyphs in the drawing element.
    185185#
     
    188188    if { [info exists _shapes($elem)] } {
    189189        return $_shapes($elem)
    190     } 
    191     switch -- $shape { 
    192         arrow - cone - cube - cylinder - dodecahedron -
    193         icosahedron - line - octahedron - sphere - tetrahedron  {
    194             return $shape
    195         }
    196         default {
    197             puts stderr "unknown glyph shape \"$shape\""
    198         }
    199     }
    200     return ""
    201 }
    202 
    203 # 
    204 # data -- 
    205 # 
     190    }
     191    switch -- $shape {
     192        arrow - cone - cube - cylinder - dodecahedron -
     193        icosahedron - line - octahedron - sphere - tetrahedron  {
     194            return $shape
     195        }
     196        default {
     197            puts stderr "unknown glyph shape \"$shape\""
     198        }
     199    }
     200    return ""
     201}
     202
     203#
     204# data --
     205#
    206206#       Returns the data of the named drawing element.
    207207#
     
    209209    if { [info exists _data($elem)] } {
    210210        return $_data($elem)
    211     } 
    212     return ""
    213 }
    214 
    215 # ----------------------------------------------------------------------
    216 # method values 
     211    }
     212    return ""
     213}
     214
     215# ----------------------------------------------------------------------
     216# method values
    217217#       Returns a base64 encoded, gzipped Tcl list that represents the
    218 #       Tcl command and data to recreate the uniform rectangular grid 
     218#       Tcl command and data to recreate the uniform rectangular grid
    219219#       on the nanovis server.
    220220# ----------------------------------------------------------------------
     
    222222    if { [info exists _data($elem)] } {
    223223        return $_data($elem)
    224     } 
     224    }
    225225    return ""
    226226}
    227227
    228228itcl::body Rappture::Drawing::components { args } {
    229     return [array names _data] 
     229    return [array names _data]
    230230}
    231231
Note: See TracChangeset for help on using the changeset viewer.