Changeset 2792


Ignore:
Timestamp:
Feb 28, 2012, 9:56:44 AM (13 years ago)
Author:
gah
Message:

move "package require vtk" into constructor so that applications do not have to load vtk to use Rappture widgets

Location:
trunk/gui/scripts
Files:
11 edited

Legend:

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

    r1929 r2792  
    1313# ======================================================================
    1414package require Itcl
    15 package require vtk
    1615
    1716namespace eval Rappture { # forward declaration }
     
    9291# ----------------------------------------------------------------------
    9392itcl::body Rappture::Cloud::constructor {xmlobj path} {
     93    package require vtk
    9494    if {![Rappture::library isvalid $xmlobj]} {
    9595        error "bad value \"$xmlobj\": should be Rappture::library"
  • trunk/gui/scripts/contourresult.tcl

    r1929 r2792  
    1414# ======================================================================
    1515package require Itk
    16 package require vtk
    17 package require vtkinteraction
    1816package require BLT
    1917package require Img
     
    7977# ----------------------------------------------------------------------
    8078itcl::body Rappture::ContourResult::constructor {args} {
     79    package require vtk
     80    package require vtkinteraction
    8181    option add hull.width hull.height
    8282    pack propagate $itk_component(hull) no
  • trunk/gui/scripts/drawing.tcl

    r2744 r2792  
    1111package require Itcl
    1212package require BLT
    13 package require vtk
    1413
    1514namespace eval Rappture {
     
    4948# ----------------------------------------------------------------------
    5049itcl::body Rappture::Drawing::constructor {xmlobj path} {
     50    package require vtk
    5151    if {![Rappture::library isvalid $xmlobj]} {
    5252        error "bad value \"$xmlobj\": should be Rappture::library"
  • trunk/gui/scripts/mesh.tcl

    r1929 r2792  
    1515# ======================================================================
    1616package require Itcl
    17 package require vtk
    1817
    1918namespace eval Rappture { # forward declaration }
     
    102101# ----------------------------------------------------------------------
    103102itcl::body Rappture::Mesh::constructor {xmlobj path} {
     103    package require vtk
    104104    if {![Rappture::library isvalid $xmlobj]} {
    105105        error "bad value \"$xmlobj\": should be Rappture::library"
  • trunk/gui/scripts/moleculeViewer.tcl

    r2743 r2792  
    1313# ======================================================================
    1414package require Itk
    15 package require vtk
    16 package require vtkinteraction
    1715package require BLT
    1816package require Img
     
    7270# ----------------------------------------------------------------------
    7371itcl::body Rappture::MoleculeViewer::constructor {tool args} {
     72    package require vtk
     73    package require vtkinteraction
    7474    set _tool $tool
    7575
  • trunk/gui/scripts/vtkcontourviewer.tcl

    r2786 r2792  
    145145# ----------------------------------------------------------------------
    146146itcl::body Rappture::VtkContourViewer::constructor {hostlist args} {
     147    package require vtk
    147148    set  _serverType "vtkvis"
    148     package require vtk
    149149
    150150    # Draw legend event
  • trunk/gui/scripts/vtkheightmapviewer.tcl

    r2786 r2792  
    1515package require BLT
    1616#package require Img
    17 package require vtk
    1817
    1918option add *VtkHeightmapViewer.width 4i widgetDefault
     
    167166# ----------------------------------------------------------------------
    168167itcl::body Rappture::VtkHeightmapViewer::constructor {hostlist args} {
     168    package require vtk
    169169    set _serverType "vtkvis"
    170170
  • trunk/gui/scripts/vtkstreamlinesviewer.tcl

    r2786 r2792  
    168168# ----------------------------------------------------------------------
    169169itcl::body Rappture::VtkStreamlinesViewer::constructor {hostlist args} {
     170    package require vtk
    170171    set _serverType "vtkvis"
    171     package require vtk
    172172
    173173    # Rebuild event
  • trunk/gui/scripts/vtkviewer-obsolete.tcl

    r2744 r2792  
    1515# ======================================================================
    1616package require Itk
    17 package require vtk
    18 package require vtkinteraction
    1917package require BLT
    2018#package require Img
     
    102100# ----------------------------------------------------------------------
    103101itcl::body Rappture::VtkViewerObsolete::constructor {args} {
     102    package require vtk
     103    package require vtkinteraction
    104104    option add hull.width hull.height
    105105    pack propagate $itk_component(hull) no
  • trunk/gui/scripts/vtkviewer.tcl

    r2767 r2792  
    153153# ----------------------------------------------------------------------
    154154itcl::body Rappture::VtkViewer::constructor {hostlist args} {
     155    package require vtk
    155156    set _serverType "vtkvis"
    156     package require vtk
    157157
    158158    # Rebuild event
  • trunk/gui/scripts/vtkvolumeviewer.tcl

    r2758 r2792  
    1515package require BLT
    1616#package require Img
    17 package require vtk
    1817
    1918option add *VtkVolumeViewer.width 4i widgetDefault
     
    168167# ----------------------------------------------------------------------
    169168itcl::body Rappture::VtkVolumeViewer::constructor {hostlist args} {
     169    package require vtk
    170170    set _serverType "vtkvis"
    171171
Note: See TracChangeset for help on using the changeset viewer.