home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Westmount Technology 1994
- #
- # File: @(#)groupvstrs.tcl /main/hindenburg/2
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)groupvstrs.tcl /main/hindenburg/2 1 Nov 1996 Copyright 1994 Westmount Technology
-
- # Start user added include file section
- # End user added include file section
-
- require "browsviewd.tcl"
-
- Class GroupVStrSubDlg : {BrowsViewDialog} {
- constructor
- method destructor
- method handleCancel
- method handleOk
- method handleSelectionChanged
- method popUp
- attribute okCmd
- attribute scCmd
- attribute changed
- attribute _repObjList
- attribute dialog
- }
-
- constructor GroupVStrSubDlg {class this name dialog} {
- set this [BrowsViewDialog::constructor $class $this $name]
- $this dialog $dialog
- # Start constructor user section
-
- $this config \
- -title "Group Version Structure List" \
- -changed 0 \
- -_repObjList [$dialog currentRepObjList] \
- -headerSpecList {
- {Name 25 ascii {increasing 2}}
- {Type 18 ascii {increasing 1}}
- } \
- -helpPressed "[getParent $this] helpOnName groupVStrSubDialog" \
- -cancelPressed "$this handleCancel" \
- -okPressed "$this handleOk"
- [$this view] rowCount 10
-
- # End constructor user section
- return $this
- }
-
- method GroupVStrSubDlg::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this BrowsViewDialog::destructor
- }
-
- method GroupVStrSubDlg::handleCancel {this} {
- if [$this changed] {
- [$this dialog] showObjectsOk [[$this dialog] currentRepObjList] 0
- }
- $this delete
- }
-
- method GroupVStrSubDlg::handleOk {this} {
- if {"[$this okCmd]" != ""} {
- foreach object [[$this view] selectedSet] {
- set obj [$object object]
- if [$obj isA GroupVersion] {
- set obj [$obj group]
- }
- [[$this dialog] groupV] [$this okCmd] $obj
- }
- [$this dialog] modeChanged
- } elseif [$this changed] {
- [$this dialog] showObjectsOk [$this _repObjList] 1
- }
- $this delete
- }
-
- method GroupVStrSubDlg::handleSelectionChanged {this} {
- if {"[$this scCmd]" == ""} {
- $this BrowsViewDialog::handleSelectionChanged
- return
- }
-
- set repObjList ""
- set groupV [[$this dialog] groupV]
- set sysV [$groupV getParent SystemVersion]
- foreach object [[$this view] selectedSet] {
- set obj [$object object]
- if [$obj isA GroupFilter] {
- foreach repObj [$groupV [$this scCmd] $obj] {
- if {[lsearch -exact "$repObjList" $repObj] == -1} {
- lappend repObjList $repObj
- }
- }
- } else {
- foreach repObj [$obj [$this scCmd] $sysV] {
- if {[lsearch -exact "$repObjList" $repObj] == -1} {
- lappend repObjList $repObj
- }
- }
- }
- }
- $this _repObjList $repObjList
- $this changed 1
- [$this dialog] showObjectsOk $repObjList 0
- }
-
- method GroupVStrSubDlg::popUp {this} {
- set objectSpecList ""
- foreach obj [$this objectList] {
- if [$obj isA File] {
- set type [$obj type]
- case "$type" in {
- {cad ccd dfd etd mgd std ucd} {
- set repType Graph
- }
- {cdm dsm} {
- set repType Matrix
- }
- {default} {
- set repType ExternalFileVersion
- }
- }
- set typeSpec [getObjectSpec [$wmttoolObj objectHdlr] \
- $repType $type \
- ]
- if {"$typeSpec" == ""} {
- set icon ""
- } else {
- set icon [$typeSpec smallIcon]
- }
- lappend objectSpecList [list $icon \
- [$obj qualifiedName :] $type \
- ]
- } elseif [$obj isA GroupVersion] {
- set typeSpec [getObjectSpec [$wmttoolObj objectHdlr] \
- GroupVersion "" \
- ]
- if {"$typeSpec" == ""} {
- set icon ""
- } else {
- set icon [$typeSpec smallIcon]
- }
- lappend objectSpecList [list $icon \
- [[$obj group] name] GroupVersion \
- ]
- } elseif [$obj isA GroupFilter] {
- set name "\
- '[$obj namePattern]' \
- '[$obj typePattern]' \
- '[$obj propName]' \
- '[$obj propPattern]'"
- lappend objectSpecList [list "" \
- $name [$obj filterType] \
- ]
- } elseif [$obj isA GroupFileSelector] {
- regsub -all "decomp" "[$obj decompFlags]" "" decompFlags
- set name "\
- '[$obj itemType]' \
- '$decompFlags' \
- '[$obj fileTypes]'"
- lappend objectSpecList [list "" \
- $name FileSelector \
- ]
- } elseif [$obj isA GroupItemSelector] {
- set name "\
- '[$obj fileType]' \
- '[$obj itemType]' \
- '[$obj qualified]'"
- lappend objectSpecList [list "" \
- $name ItemSelector \
- ]
- }
- }
-
- $this objectSpecList $objectSpecList
- $this BrowsViewDialog::popUp
-
- if {"[$this scCmd]" != ""} {
- $this okSensitive 1
- $this okDefault 1
- $this cancelDefault 0
- $this handleSelectionChanged
- }
- }
-
- # Do not delete this line -- regeneration end marker
-
-