home *** CD-ROM | disk | FTP | other *** search
/ PC World 1998 October / PCWorld_1998-10_cd.bin / software / prehled / komix / DATA.Z / browsewmta.tcl < prev    next >
Text File  |  1996-09-12  |  3KB  |  135 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cadre Technologies Inc.    1996
  4. #
  5. #      File:           @(#)browsewmta.tcl    /main/titanic/1
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)browsewmta.tcl    /main/titanic/1   12 Sep 1996 Copyright 1996 Cadre Technologies Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14.  
  15. Class BrowseWmtArea : {WmtArea} {
  16.     constructor
  17.     method destructor
  18.     method updateContextInfo
  19.     method updateFilterIndicator
  20.     method updateViewInfo
  21.     attribute projectInfo
  22.     attribute configInfo
  23.     attribute phaseInfo
  24.     attribute systemInfo
  25.     attribute filterInfo
  26.     attribute viewInfo
  27.     attribute ccSubscriber
  28. }
  29.  
  30. constructor BrowseWmtArea {class this name} {
  31.     set this [WmtArea::constructor $class $this $name]
  32.     # Start constructor user section
  33.  
  34.     interface WaColumn $this.WC0 {
  35.         WaEntry projWE {
  36.             labelText "Project:"
  37.         }
  38.         WaEntry confWE {
  39.             labelText "Configuration Version:"
  40.         }
  41.         WaEntry viewWE {
  42.             labelText "View:"
  43.         }
  44.     }
  45.     interface WaColumn $this.WC1 {
  46.         WaEntry phasWE {
  47.             labelText "Phase:"
  48.         }
  49.         WaEntry systWE {
  50.             labelText "System:"
  51.         }
  52.         WaEntry filtWE {
  53.             labelText "Filter:"
  54.         }
  55.     }
  56.  
  57.     foreach column [$this columnSet] {
  58.         foreach entry [$column entrySet] {
  59.         $entry labelFont \
  60.             [m4_var get M4_contextarea_labelfont -context desk]
  61.         $entry valueFont \
  62.             [m4_var get M4_contextarea_valuefont -context desk]
  63.         }
  64.     }
  65.  
  66.     $this projectInfo $this.WC0.projWE
  67.     $this configInfo  $this.WC0.confWE
  68.     $this viewInfo    $this.WC0.viewWE
  69.     $this phaseInfo   $this.WC1.phasWE
  70.     $this systemInfo  $this.WC1.systWE
  71.     $this filterInfo  $this.WC1.filtWE
  72.  
  73.     set ccSub [ClContextSubscriber new -notify "$this updateContextInfo"]
  74.     [ClientContext::global] addSubscriber $ccSub
  75.     $this ccSubscriber $ccSub
  76.  
  77.     # End constructor user section
  78.     return $this
  79. }
  80.  
  81. method BrowseWmtArea::destructor {this} {
  82.     # Start destructor user section
  83.     [ClientContext::global] removeSubscriber [$this ccSubscriber]
  84.     [$this ccSubscriber] delete
  85.     # End destructor user section
  86. }
  87.  
  88. method BrowseWmtArea::updateContextInfo {this} {
  89.     [$this projectInfo] valueText ""
  90.     [$this configInfo] valueText ""
  91.     [$this phaseInfo] valueText ""
  92.     [$this systemInfo] valueText ""
  93.  
  94.     set cc [ClientContext::global]
  95.     set project [$cc currentProject]
  96.     if [$project isNil] {
  97.         return
  98.     }
  99.     [$this projectInfo] valueText [$project name]
  100.  
  101.     set configV [$cc currentConfig]
  102.     if [$configV isNil] {
  103.         return
  104.     }
  105.     set configName [[$configV ConfigVersion::config] name]
  106.     [$this configInfo] valueText "$configName (V[$configV versionNumber])"
  107.  
  108.     set phaseV [$cc currentPhase]
  109.     if [$phaseV isNil] {
  110.         return
  111.     }
  112.     [$this phaseInfo] valueText [[$phaseV phase] name]
  113.  
  114.     set systemV [$cc currentSystem]
  115.     if [$systemV isNil] {
  116.         return
  117.     }
  118.     [$this systemInfo] valueText [[$systemV system] name]
  119. }
  120.  
  121. method BrowseWmtArea::updateFilterIndicator {this} {
  122.     if [isCommand [FilterHandler::currentBox]] {
  123.         [$this filterInfo] valueText "On"
  124.     } else {
  125.         [$this filterInfo] valueText "Off"
  126.     }
  127. }
  128.  
  129. method BrowseWmtArea::updateViewInfo {this} {
  130.     [$this viewInfo] valueText [[$wmttoolObj infoView] currentViewName]
  131. }
  132.  
  133. # Do not delete this line -- regeneration end marker
  134.  
  135.