home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Westmount Technology 1994
- #
- # File: @(#)cbfeaturet.tcl 1.5
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)cbfeaturet.tcl 1.5 08 Mar 1996 Copyright 1994 Westmount Technology
-
- # Start user added include file section
- # End user added include file section
-
- require "cbclassinf.tcl"
-
- Class CBFeatureTextlist : {CBClassInfoTextList} {
- constructor
- method destructor
- method updateView
- method collectFeatures
- method collectInheritedFeatures
- method browser
- attribute _browser
- }
-
- constructor CBFeatureTextlist {class this name} {
- set this [CBClassInfoTextList::constructor $class $this $name]
- # Start constructor user section
- # End constructor user section
- return $this
- }
-
- method CBFeatureTextlist::destructor {this} {
- set ref [$this _browser]
- if {$ref != ""} {
- $ref _featureTL ""
- }
- # Start destructor user section
- # End destructor user section
- $this CBClassInfoTextList::destructor
- }
-
- method CBFeatureTextlist::updateView {this currentClass} {
- $this removeTextListEntries
- $this removeEntries
-
- if {[[$this browser] isInFlatViewMode]} {
- set inFlatViewList [List new]
- $inFlatViewList insert $currentClass
- $this collectInheritedFeatures $currentClass $inFlatViewList
- }
- $this collectFeatures $currentClass
-
- $this fillEntries
- $this deselectEntries
- }
-
- method CBFeatureTextlist::collectFeatures {this aClass} {
- [$aClass featureSet] foreach feat {
- if {[[$feat getFilter] letsPass $feat]} {
- $this addTextListEntry $feat
- }
- }
- }
-
- method CBFeatureTextlist::collectInheritedFeatures {this aClass inFlatViewList} {
- foreach superClass [$aClass getSuperClasses] {
- if {[lsearch [$inFlatViewList contents] $superClass] != -1} {
- continue
- }
- $inFlatViewList insert $superClass
- $this collectInheritedFeatures $superClass $inFlatViewList
- $this collectFeatures $superClass
- }
- }
-
- # Do not delete this line -- regeneration end marker
-
- method CBFeatureTextlist::browser {this args} {
- if {$args == ""} {
- return [$this _browser]
- }
- set ref [$this _browser]
- if {$ref != ""} {
- $ref _featureTL ""
- }
- set obj [lindex $args 0]
- if {$obj != ""} {
- $obj _featureTL $this
- }
- $this _browser $obj
- }
-
-