Ignore:
Timestamp:
May 30, 2005, 9:33:49 PM (19 years ago)
Author:
mmc
Message:

Major reorganization of the entire package. The config.xml file
is now irrelevant. All the action is in the tool.xml file. The
main program now organizes all input into 1) side-by-side pages,
2) input/result (wizard-style) pages, or 3) a series of wizard-
style pages. The <input> can have <phase> parts representing
the various pages.

Added a new ContourResult? widget based on Swaroop's vtk plotting
code.

Also, added easymesh and showmesh to the "tools" directory.
We need these for Eric Polizzi's code.

File:
1 edited

Legend:

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

    r1 r11  
    99# ======================================================================
    1010#  AUTHOR:  Michael McLennan, Purdue University
    11 #  Copyright (c) 2004  Purdue Research Foundation, West Lafayette, IN
     11#  Copyright (c) 2004-2005
     12#  Purdue Research Foundation, West Lafayette, IN
    1213# ======================================================================
    1314package require Itk
     
    3233    protected method _widget2sbar {which args}
    3334    protected method _fixsbar {which {state ""}}
    34     protected method _fixframe {}
     35    protected method _fixframe {which}
    3536    protected method _lock {option}
    3637
     
    100101    if {$widget == "frame"} {
    101102        if {$_frame == ""} {
    102             set _frame [canvas $itk_component(hull).ifr]
    103             bind $_frame <Configure> [itcl::code $this _resizeframe]
     103            set _frame [canvas $itk_component(hull).ifr -highlightthickness 0]
     104            frame $_frame.f
     105            $_frame create window 0 0 -anchor nw -window $_frame.f -tags frame
     106            bind $_frame.f <Configure> [itcl::code $this _fixframe inner]
     107            bind $_frame <Configure> [itcl::code $this _fixframe outer]
    104108        }
    105109        set widget $_frame
     
    119123    set _contents $widget
    120124
     125    if {$widget == $_frame} {
     126        return $_frame.f
     127    }
    121128    return $widget
    122129}
     
    149156itcl::body Rappture::Scroller::_fixsbar {which {state ""}} {
    150157    if {$state == ""} {
    151         switch -- $itk_option(-${which}scrollmode) {
     158        switch -- [string tolower $itk_option(-${which}scrollmode)] {
    152159            on - 1 - true - yes  { set state 1 }
    153160            off - 0 - false - no { set state 0 }
     
    161168                }
    162169            }
     170            default {
     171                set state 0
     172            }
    163173        }
    164174    }
     
    187197
    188198# ----------------------------------------------------------------------
    189 # USAGE: _fixframe
     199# USAGE: _fixframe <which>
    190200#
    191201# Invoked automatically whenever the canvas representing the "frame"
     
    193203# to the new size.
    194204# ----------------------------------------------------------------------
    195 itcl::body Rappture::Scroller::_fixframe {} {
    196     $_frame configure -scrollregion [$_frame bbox all]
     205itcl::body Rappture::Scroller::_fixframe {which} {
     206    switch -- $which {
     207        inner {
     208            $_frame configure -scrollregion [$_frame bbox all]
     209        }
     210        outer {
     211            $_frame itemconfigure frame -width [winfo width $_frame]
     212        }
     213    }
    197214}
    198215
     
    248265itcl::configbody Rappture::Scroller::width {
    249266    if {$itk_option(-width) == "0"} {
     267        if {$itk_option(-height) == "0"} {
     268            grid propagate $itk_component(hull) yes
     269        } else {
     270            component hull configure -width 1i
     271        }
     272    } else {
     273        grid propagate $itk_component(hull) no
     274        component hull configure -width $itk_option(-width)
     275    }
     276}
     277
     278# ----------------------------------------------------------------------
     279# OPTION: -height
     280# ----------------------------------------------------------------------
     281itcl::configbody Rappture::Scroller::height {
     282    if {$itk_option(-height) == "0"} {
    250283        if {$itk_option(-width) == "0"} {
    251284            grid propagate $itk_component(hull) yes
    252285        } else {
    253             component hull configure -width 1i
    254         }
    255     } else {
    256         grid propagate $itk_component(hull) no
    257         component hull configure -width $itk_option(-width)
    258     }
    259 }
    260 
    261 # ----------------------------------------------------------------------
    262 # OPTION: -height
    263 # ----------------------------------------------------------------------
    264 itcl::configbody Rappture::Scroller::height {
    265     if {$itk_option(-height) == "0"} {
    266         if {$itk_option(-height) == "0"} {
    267             grid propagate $itk_component(hull) yes
    268         } else {
    269286            component hull configure -height 1i
    270287        }
Note: See TracChangeset for help on using the changeset viewer.