home *** CD-ROM | disk | FTP | other *** search
/ PC World 1998 October / PCWorld_1998-10_cd.bin / software / prehled / komix / DATA.Z / commonbrow.tcl < prev    next >
Text File  |  1997-11-17  |  20KB  |  736 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1997
  4. #
  5. #      File:           @(#)commonbrow.tcl    /main/titanic/41
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)commonbrow.tcl    /main/titanic/41   17 Nov 1997 Copyright 1997 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12.  
  13. require "browserobj.tcl"
  14. require "browserpro.tcl"
  15. require "browsewmta.tcl"
  16. require "filterhand.tcl"
  17. require "infoview.tcl"
  18. require "m4vardescr.tcl"
  19. require "navigation.tcl"
  20. require "treenode.tcl"
  21.  
  22. # End user added include file section
  23.  
  24. require "histwmttoo.tcl"
  25.  
  26. Class CommonBrowser : {HistWmtTool MainWindow} {
  27.     method destructor
  28.     constructor
  29.     method createInterface
  30.     method currentObj
  31.     method mkHistEntry
  32.     method historyActivated
  33.     method findTreeNode
  34.     method addContextArea
  35.     method updateToolBar
  36.     method updateWmtArea
  37.     method createPropContainers
  38.     method releasePropContainers
  39.     method setCurrentObj
  40.     method getSelectedSet
  41.     method flatView
  42.     method treeView
  43.     method selectionChanged
  44.     method open
  45.     method popUp
  46.     method stop
  47.     method updateTitle
  48.     method undoCommandBusy
  49.     method editCut
  50.     method editCopy
  51.     method editPaste
  52.     method editSelAll
  53.     method editDeselAll
  54.     method editSelInv
  55.     method editUndo
  56.     method addPropContainer
  57.     method removePropContainer
  58.     attribute _currentObj
  59.     attribute customLevelVersion
  60.     attribute cutObjects
  61.     attribute cutFileVersions
  62.     attribute corporateObj
  63.     attribute rootIdList
  64.     attribute viewSelector
  65.     attribute historyCount
  66.     attribute opened
  67.  
  68.     # Set of selected objects in this browser.
  69.     #
  70.     attribute selectedSet
  71.  
  72.     # The owner of the selected objects in the browser
  73.     # (the tree or the navigation view).
  74.     #
  75.     attribute selectionOwner
  76.     attribute moduleHdlr
  77.     attribute filterHdlr
  78.     attribute objectHdlr
  79.     attribute viewHdlr
  80.     attribute menuHdlr
  81.     attribute wmtArea
  82.     attribute navigationView
  83.     attribute infoView
  84.     attribute m4VarDes
  85.     attribute options
  86.     attribute propContainerSet
  87.     attribute undoCommand
  88. }
  89.  
  90. method CommonBrowser::destructor {this} {
  91.     # Start destructor user section
  92.     if [$this opened] {
  93.         $this saveHist desk
  94.         $this saveToolBarPresence desk
  95.         $this saveContextAreaPresence desk
  96.         $this saveMessageAreaPresence desk
  97.     }
  98.     catch {
  99.         if [isCommand [$this undoCommand]] {
  100.         [$this undoCommand] delete
  101.         }
  102.         [$this filterHdlr] delete
  103.         [$this menuHdlr] delete
  104.         [$this viewHdlr] delete
  105.         [$this objectHdlr] delete
  106.         [$this moduleHdlr] delete
  107.         [$this m4VarDes] delete
  108.         [$this options] delete
  109.     }
  110.     # End destructor user section
  111.     $this HistWmtTool::destructor
  112. }
  113.  
  114. constructor CommonBrowser {class this name toolId} {
  115.     set this [MainWindow::constructor $class $this $name]
  116.     set this [HistWmtTool::constructor $class $this $name]
  117.  
  118.     $this config -historyCount 0 -opened 0
  119.  
  120.     global classCount
  121.     set classCount 0
  122.  
  123.     global makeSelectionUpToDate
  124.     set makeSelectionUpToDate 1
  125.  
  126.     $this m4VarDes [M4VarDescription new $this.m4VarDes]
  127.  
  128.     $this options [BrowserOptions new $this.options]
  129.     [$this options] setContexts editor {""}
  130.     [$this options] setContexts previewer {""}
  131.     [$this options] setContexts viewer {""}
  132.  
  133.     $this moduleHdlr [ModuleHandler new \
  134.     -moduleSpecSetChanged {
  135.         set d_modules [%this deselectedModuleSpecSet]
  136.         foreach file [%this getFiles tcl d_desk.tcl $d_modules] {
  137.         source $file
  138.         }
  139.         set s_modules [%this selectedModuleSpecSet]
  140.         foreach file [%this getFiles tcl s_desk.tcl $s_modules] {
  141.         source $file
  142.         }
  143.         # clear dictionary, used in the proc module_promoter in proc.tcl
  144.         global modulePromoterSet
  145.         $modulePromoterSet contents ""
  146.     } \
  147.     ]
  148.     global globalModuleHandler
  149.     set globalModuleHandler [$this moduleHdlr]
  150.     MenuBar new $this.MB
  151.     $this menuHdlr [CustBrMenuHandler new $toolId [$this moduleHdlr]]
  152.     $this createInterface
  153.     eval [[$this moduleHdlr] moduleSpecSetChanged]
  154.     $this viewHdlr [CustViewHandler new $toolId [$this moduleHdlr]]
  155.     $this objectHdlr [CustObjHandler new [$this moduleHdlr]]
  156.     $this filterHdlr [FilterHandler new $this.filterHdlr]
  157.  
  158.     # Check if handlers are created without errors:
  159.     #     the corporate customization files exist
  160.     if [isCommand .main.error] {
  161.     return $this
  162.     }
  163.  
  164.     # Go back to corporate level and initialize the interface (toolbar)
  165.     set clientContext [ClientContext::global]
  166.     set levelIds [$clientContext currentLevelIdString]
  167.     while {! [[$clientContext currentProject] isNil]} {
  168.     $clientContext upLevel
  169.     }
  170.     [$this menuHdlr] setCurrentContext
  171.     if [catch {[$this objectHdlr] setCurrentContext} msg] {
  172.     wmtkerror $msg
  173.     }
  174.     if [catch {[$this viewHdlr] setCurrentContext} msg] {
  175.     wmtkerror $msg
  176.     }
  177.  
  178.     # Reset clientContext
  179.     $clientContext setLevelIds $levelIds
  180.     m4_var foreach m4var {
  181.     if [m4_var saveStatus $m4var] {
  182.         m4_var saveStatus $m4var 0
  183.     }
  184.     }
  185.  
  186.     ClassMaker::extend CustMenuPushButton HistMenuButton \
  187.                     {treeNode levelPath abbrev}
  188.     $this loadHist desk
  189.  
  190.     return $this
  191. }
  192.  
  193. method CommonBrowser::createInterface {this} {
  194.     DlgColumn new $this.DC
  195.     $this setContextAreaPresence desk
  196.     interface VerSplitter $this.DC.VS {
  197.     NavigationView navigBT {
  198.         rowCount 5
  199.         horStretchFactor 5
  200.         verStretchFactor 5
  201.         horShrinkFactor 5
  202.         verShrinkFactor 5
  203.     }
  204.     InfoView infoIV {}
  205.     }
  206.     $this setToolBarPresence desk
  207.     $this setMessageAreaPresence desk
  208.  
  209.     $this navigationView    $this.DC.VS.navigBT
  210.     $this infoView        $this.DC.VS.infoIV
  211. }
  212.  
  213. method CommonBrowser::currentObj {this {newObject ""}} {
  214.     if {"$newObject" != ""} {
  215.     $this _currentObj $newObject
  216.     return
  217.     }
  218.     set currentObj [$this _currentObj]
  219.     if {$makeSelectionUpToDate && "$currentObj" != ""} {
  220.     [$currentObj browsUiObj] makeUpToDate
  221.     }
  222.     return $currentObj
  223. }
  224.  
  225. method CommonBrowser::mkHistEntry {this levelPath mnem {treeNode ""}} {
  226.         set latest [$this historyCount]
  227.     incr latest
  228.     set abbrev [HistWmtTool::abbrevLevelPath $levelPath]
  229.     set button [$this menuBar].file.menu.his$latest
  230.         HistMenuButton new $button \
  231.         -label "$mnem $abbrev" -abbrev $abbrev \
  232.         -treeNode $treeNode -levelPath $levelPath \
  233.         -activated "$this historyActivated %this" \
  234.         -mnemonic $mnem -hintText "Opens $levelPath."
  235.         $this historyCount $latest
  236.     return $button
  237. }
  238.  
  239. method CommonBrowser::historyActivated {this entry} {
  240.     if {![isCommand [$entry treeNode]]} {
  241.     $entry treeNode [$this findTreeNode [$entry levelPath]]
  242.     }
  243.     if [isCommand [$entry treeNode]] {
  244.     [$entry treeNode] open
  245.     } else {
  246.     InfoDialog new .main.info -message \
  247.         "[$entry levelPath]:\n does not exist"
  248.     .main.info popUp
  249.     $this removeHistory $entry
  250.     $this renumberHist
  251.     $entry delete
  252.     }
  253. }
  254.  
  255. method CommonBrowser::findTreeNode {this levelPath} {
  256.     set treeNode ""
  257.     append levelPath "/"
  258.     for {set count 0; set slash [string first "/" $levelPath]} \
  259.     {$slash >= 0} \
  260.     {incr count; set slash [string first "/" $levelPath]} {
  261.     if {$slash != 0} {
  262.         set level [string range $levelPath 0 [expr $slash - 1]]
  263.         if {"$treeNode" == ""} {
  264.         set childSet [[$this treeView] rootSet]
  265.         } else {
  266.         $treeNode appendChildren
  267.         set childSet [$treeNode childSet]
  268.         }
  269.         set found 0
  270.         foreach childNode $childSet {
  271.         set childObj [$childNode browsUiObj]
  272.         if {!([$childObj isA CustomLevelVersion] ||
  273.               [$childObj isA FileVersion])} continue
  274.         set childLabel [$childObj getInfo Name]
  275.         case $count in {
  276.             3 {
  277.             # ConfigVersion
  278.             append childLabel ":[$childObj getInfo Version]"
  279.             }
  280.             {4 6} {
  281.             # PhaseVersion or FileVersion
  282.             append childLabel ".[$childObj getInfo Type]"
  283.             }
  284.             5 {
  285.             # SystemVersion
  286.             append childLabel ".[[$childObj system] type]"
  287.             }
  288.         }
  289.         if {"$level" == "$childLabel"} {
  290.             set found 1
  291.             break
  292.         }
  293.         }
  294.         if {!$found} break
  295.         set treeNode $childNode
  296.     }
  297.     set levelPath [string range $levelPath [expr $slash + 1] end]
  298.     }
  299.     if {"$levelPath" == ""} {
  300.     return $treeNode
  301.     }
  302.     return ""
  303. }
  304.  
  305. method CommonBrowser::addContextArea {this} {
  306.     $this wmtArea [BrowseWmtArea new $this.DC.WA]
  307. }
  308.  
  309. method CommonBrowser::updateToolBar {this} {
  310.     if [catch {[$this menuHdlr] setCurrentContext} errorMsg] {
  311.     if [info exists errorInfo] {
  312.         set errorInfoCopy $errorInfo
  313.     } else {
  314.         set errorInfoCopy ""
  315.     }
  316.     if [info exists errorCode] {
  317.         set errorCodeCopy $errorCode
  318.     } else {
  319.         set errorCodeCopy ""
  320.     }
  321.     resetErrorVars
  322.     } else {
  323.     set errorMsg ""
  324.     }
  325.     [$this infoView] updateToolBarEntries
  326.     if {"$errorMsg" != ""} {
  327.     global errorInfo errorCode
  328.     set errorInfo $errorInfoCopy
  329.     set errorCode $errorCodeCopy
  330.     wmtkerror $errorMsg
  331.     }
  332. }
  333.  
  334. method CommonBrowser::updateWmtArea {this} {
  335.     if {! [isCommand [$this wmtArea]]} {
  336.     return
  337.     }
  338.  
  339.     [$this wmtArea] updateContextInfo
  340.     [$this wmtArea] updateViewInfo
  341.     [$this wmtArea] updateFilterIndicator
  342. }
  343.  
  344. method CommonBrowser::createPropContainers {this edit} {
  345.     require "propstruct.tcl"
  346.     require "wbpropcont.tcl"
  347.  
  348.     set selectedObjSet [$this selectedObjSet]
  349.     if [lempty $selectedObjSet] {
  350.     return
  351.     }
  352.  
  353.     set maxNameLength 0
  354.     set propStructList [List new]
  355.     foreach obj $selectedObjSet {
  356.     set objType [$obj browserType]
  357.     set phaseType ""
  358.     set phaseV [$obj getParent PhaseVersion]
  359.     if {"$phaseV" != ""} {
  360.         set phaseType [[$phaseV phase] type]
  361.     }
  362.     PropLocation new .propLocation \
  363.         -containerKind [$obj uiClass] \
  364.         -containerType $objType \
  365.         -phaseType $phaseType
  366.     set compPropDefs [[$this propKnowledgeDB] definitions .propLocation]
  367.     if {[llength $compPropDefs] == 0} {
  368.         .propLocation delete
  369.         continue
  370.     }
  371.     set objName [$obj getInfo Name]
  372.     set objNameLength [string length $objName]
  373.     if {$objNameLength > $maxNameLength} {
  374.         set maxNameLength $objNameLength
  375.     }
  376.     $propStructList append [PropStruct new \
  377.         -name $objName \
  378.         -type $objType \
  379.         -component $obj \
  380.         -containerKey [.propLocation asString] \
  381.         -compPropDefs $compPropDefs]
  382.     .propLocation delete
  383.     }
  384.     set formatString "%-*.*s  %s"
  385.     set cntList [List new]
  386.     $propStructList foreach propStruct {
  387.     set pres [format $formatString $maxNameLength $maxNameLength \
  388.         [$propStruct name] [$propStruct type]]
  389.     set cnt [WbPropContainer new \
  390.         -editable $edit \
  391.         -propertyKey [$propStruct containerKey] \
  392.         -propertyPresentation $pres \
  393.         -propHolder [$propStruct component]]
  394.     foreach propDef [$propStruct compPropDefs] {
  395.         $cnt addPropDefinition $propDef
  396.     }
  397.     $cntList append $cnt
  398.     }
  399.     $this propContainerSet $cntList
  400. }
  401.  
  402. method CommonBrowser::releasePropContainers {this} {
  403.     # empty
  404. }
  405.  
  406. method CommonBrowser::setCurrentObj {this newObject} {
  407.     set errorStack ""
  408.  
  409.     if {! [isCommand $newObject]} {
  410.     set rootObject [lindex [[$this treeView] rootSet] 0]
  411.     if {! [isCommand $rootObject]} {
  412.         return $errorStack
  413.     }
  414.     set newObject $rootObject
  415.     }
  416.     set currentObj [$this currentObj]
  417.     if {$currentObj == $newObject} {
  418.     return $errorStack
  419.     }
  420.     if {[isCommand $currentObj] &&
  421.     [$currentObj browsUiObj] == [$newObject browsUiObj]} {
  422.     $this currentObj $newObject
  423.     $this updateView
  424.     return $errorStack
  425.     }
  426.  
  427.     $this currentObj $newObject
  428.     set customLevelVersion [$newObject browsUiObj]
  429.     if {! [$customLevelVersion isA CustomLevelVersion]} {
  430.     set customLevelVersion [$newObject getParent CustomLevelVersion]
  431.     }
  432.     $this customLevelVersion $customLevelVersion
  433.  
  434.     # adjust title
  435.     $this updateTitle
  436.  
  437.     # adjust parent and treeNode associations
  438.     for {set treeNode $newObject} \
  439.     {"$treeNode" != ""} \
  440.     {set treeNode [$treeNode parent]} {
  441.     [$treeNode browsUiObj] treeNode $treeNode
  442.     if [isCommand [$treeNode parent]] {
  443.         [$treeNode browsUiObj] parent [[$treeNode parent] browsUiObj]
  444.     }
  445.     }
  446.  
  447.     # adjust the current client context
  448.     set levelPath ""
  449.     set levelObj ""
  450.     for {set contextlvl [$newObject browsUiObj]} \
  451.     {"$contextlvl" != ""} \
  452.     {set contextlvl [$contextlvl parent]} {
  453.     if {! ([$contextlvl isA CustomLevelVersion] ||
  454.           ([$contextlvl isA FileVersion] &&
  455.            [$contextlvl getParent CorporateGroupVersion] == ""))} continue
  456.     if {"$levelObj" == ""} {
  457.         set levelObj $contextlvl
  458.     }
  459.     set levelPath "/[$contextlvl identity]$levelPath"
  460.     }
  461.     if {"$levelPath" == "" &&
  462.     [isCommand [$this corporateObj]] &&
  463.     (! [[$this corporateObj] isNil])} {
  464.     set levelPath "/[[$this corporateObj] identity]"
  465.     }
  466.     set clientContext [ClientContext::global]
  467.     if {"$levelPath" != "[$clientContext currentLevelIdString]"} {
  468.     $clientContext setLevelIds $levelPath
  469.     }
  470.  
  471.     # remove undoCommand if no longer valid
  472.     if {[isCommand [$this undoCommand]] &&
  473.     (! [[$this undoCommand] validAfterLevelChange])} {
  474.     [$this undoCommand] delete
  475.     }
  476.  
  477.     # adjust the list of selected modules
  478.     [$this moduleHdlr] setCurrentContext
  479.  
  480.     # read phases file
  481.     if [catch {getPhases} msg] {
  482.     append errorStack "$msg\n"
  483.     resetErrorVars
  484.     }
  485.  
  486.     # adjust the viewspec list
  487.     if [catch {[$this viewHdlr] setCurrentContext} msg] {
  488.     append errorStack "$msg\n"
  489.     resetErrorVars
  490.     }
  491.  
  492.     # adjust the objectspec list
  493.     if [catch {[$this objectHdlr] setCurrentContext} msg] {
  494.     append errorStack "$msg\n"
  495.     resetErrorVars
  496.     }
  497.  
  498.     # retrieve the possible file types
  499.     getFileTypes [$this objectHdlr]
  500.  
  501.     # change the view
  502.     [$this infoView] setCurrentObj $newObject
  503.  
  504.     # adjust the menu structure to the new situation,
  505.     if [catch {[$this menuHdlr] setCurrentContext} msg] {
  506.     append errorStack "$msg\n"
  507.     resetErrorVars
  508.     }
  509.     $this selectionChanged 1
  510.     if [isCommand [$this viewSelector]] {
  511.         [$this viewHdlr] adjustViewMenu \
  512.         "[[$newObject browsUiObj] uiClass]" \
  513.         "[[$newObject browsUiObj] browserType]"
  514.     }
  515.  
  516.     # adjust the toolBar
  517.     [$this infoView] updateToolBarEntries
  518.  
  519.     checkModuleWarnings
  520.  
  521.     return $errorStack
  522. }
  523.  
  524. method CommonBrowser::getSelectedSet {this} {
  525.     return [[[$this infoView] area] selectedSet]
  526. }
  527.  
  528. method CommonBrowser::flatView {this} {
  529.     return [[$this infoView] area]
  530. }
  531.  
  532. method CommonBrowser::treeView {this} {
  533.     return [$this navigationView]
  534. }
  535.  
  536. method CommonBrowser::selectionChanged {this} {
  537.     # determine selection owner
  538.     set treeSelection [[$this treeView] selected]
  539.     if [llength $treeSelection] {
  540.     $this selectionOwner [$this treeView]
  541.     } else {
  542.     $this selectionOwner [$this flatView]
  543.     }
  544.     $this selectedSet [concat $treeSelection \
  545.         [[.main flatView] selectedSet]]
  546.  
  547.     # walk throught the menu structure to determine
  548.     # if the menus must be enabled/disabled
  549.     global makeSelectionUpToDate
  550.     set makeSelectionUpToDate 0
  551.     [$this menuHdlr] selectionChanged
  552.     set makeSelectionUpToDate 1
  553. }
  554.  
  555. method CommonBrowser::open {this} {
  556.     if [$this opened] return
  557.     $this opened 1
  558.  
  559.     set id 0
  560.     foreach rootId [$this rootIdList] {
  561.     set rootObj [[lindex $rootId 0] new [lindex $rootId 1]]
  562.     set node [TreeNode new [$this navigationView].node$id $rootObj]
  563.     BrowserProcs::initializeInfo $rootObj $node
  564.     incr id 1
  565.     }
  566.  
  567.     # trigger the selectionChange of the menuHandler, to be sure
  568.     # that the menu entries are enabled/disabled correctly
  569.     if [isCommand [$this undoButton]] {
  570.     [$this undoButton] sensitive 0
  571.     }
  572.     $this selectionChanged
  573. }
  574.  
  575. method CommonBrowser::popUp {this} {
  576.     $this MainWindow::popUp
  577.     $this ready
  578.     $this cursor DEFAULT
  579. }
  580.  
  581. method CommonBrowser::stop {this} {
  582.  
  583.     [[$this infoView] fastViewHandler] checkView [$this infoView]
  584.     [[$this infoView] fastViewHandler] saveObjects
  585.  
  586.     if {! [$this watchdogBusy]} {
  587.     $this WmtTool::stop
  588.     }
  589. }
  590.  
  591. method CommonBrowser::updateTitle {this} {
  592.     set currentObj [$this currentObj]
  593.     set title [$this title]
  594.     set hyphen [string first "-" $title]
  595.     if {$hyphen < 0} {
  596.     append title " -"
  597.     } else {
  598.     set title [string range $title 0 $hyphen]
  599.     }
  600.     set iconTitle [[$currentObj browsUiObj] getInfo Name]
  601.     append title " $iconTitle"
  602.     $this config \
  603.     -title $title \
  604.     -iconTitle $iconTitle
  605. }
  606.  
  607. method CommonBrowser::undoCommandBusy {this {type UndoCommand}} {
  608.     set cmd [$this undoCommand]
  609.     if {[isCommand $cmd] && [$cmd isA $type] && [$cmd busy]} {
  610.     return 1
  611.     }
  612.     return 0
  613. }
  614.  
  615. method CommonBrowser::editCut {this} {
  616.     if [isCommand [$this undoCommand]] {
  617.     [$this undoCommand] delete
  618.     }
  619.     busy {
  620.     # reset previous cutState
  621.     foreach object [$this cutObjects] {
  622.         if [isCommand $object] {
  623.         $object cutState 0
  624.         }
  625.     }
  626.  
  627.     # save old conversion sets and changed BROWSUIOBJ to CUT_BROWSUIOBJ
  628.     # to force cut operation
  629.     set conversionSet(0) [[.main flatView] conversionSet]
  630.     [.main flatView] conversionSet "CUT_BROWSUIOBJ contextList"
  631.     foreach object [$this selectedSet] {
  632.         set conversionSet($object) [$object conversionSet]
  633.         $object conversionSet "CUT_BROWSUIOBJ contextList"
  634.     }
  635.  
  636.     # save cut objects so cut state can be reset later
  637.     $this cutObjects [$this selectedSet]
  638.     set cutFileVersions ""
  639.     foreach object [$this cutObjects] {
  640.         if [[$object browsUiObj] isA FileVersion] {
  641.         lappend cutFileVersions [$object browsUiObj]
  642.         }
  643.     }
  644.     $this cutFileVersions $cutFileVersions
  645.  
  646.     [$this selectionOwner] setClipboardValue
  647.  
  648.     [.main flatView] conversionSet $conversionSet(0)
  649.     foreach object [$this selectedSet] {
  650.         # set current cutState
  651.         $object conversionSet $conversionSet($object)
  652.         $object cutState 1
  653.     }
  654.     }
  655. }
  656.  
  657. method CommonBrowser::editCopy {this} {
  658.     if [isCommand [$this undoCommand]] {
  659.     [$this undoCommand] delete
  660.     }
  661.     busy {
  662.     [$this selectionOwner] setClipboardValue
  663.     }
  664. }
  665.  
  666. method CommonBrowser::editPaste {this} {
  667.     if [isCommand [$this undoCommand]] {
  668.     [$this undoCommand] delete
  669.     }
  670.     require "editpastec.tcl"
  671.     global classCount
  672.     $this undoCommand [EditPasteCmd new editPasteCmd$classCount]
  673.     incr classCount
  674.     [$this undoCommand] do
  675.  
  676.     # Cleanup when clipboard is empty
  677.     if {[isCommand [$this undoCommand]]} {
  678.     if  { [[$this undoCommand] currentObj] == ""} {
  679.         [$this undoCommand] delete
  680.     } else {
  681.             [[$this undoCommand] currentObj] cutState 0
  682.     }
  683.     }
  684. }
  685.  
  686. method CommonBrowser::editSelAll {this} {
  687.     if [isCommand [$this undoCommand]] {
  688.     [$this undoCommand] delete
  689.     }
  690.     require "editselall.tcl"
  691.     global classCount
  692.     $this undoCommand [EditSelAllCmd new editSelAllCmd$classCount]
  693.     incr classCount
  694.     [$this undoCommand] do
  695. }
  696.  
  697. method CommonBrowser::editDeselAll {this} {
  698.     if [isCommand [$this undoCommand]] {
  699.     [$this undoCommand] delete
  700.     }
  701.     require "editdesela.tcl"
  702.     global classCount
  703.     $this undoCommand [EditDeselAllCmd new editDeselAllCmd$classCount]
  704.     incr classCount
  705.     [$this undoCommand] do
  706. }
  707.  
  708. method CommonBrowser::editSelInv {this} {
  709.     if [isCommand [$this undoCommand]] {
  710.     [$this undoCommand] delete
  711.     }
  712.     require "editselinv.tcl"
  713.     global classCount
  714.     $this undoCommand [EditSelInvCmd new editSelInvCmd$classCount]
  715.     incr classCount
  716.     [$this undoCommand] do
  717. }
  718.  
  719. method CommonBrowser::editUndo {this} {
  720.     if [isCommand [$this undoCommand]] {
  721.     [$this undoCommand] toggleUndo
  722.     }
  723. }
  724.  
  725. # Do not delete this line -- regeneration end marker
  726.  
  727. method CommonBrowser::addPropContainer {this newPropContainer} {
  728.     [$this propContainerSet] append $newPropContainer
  729.  
  730. }
  731.  
  732. method CommonBrowser::removePropContainer {this oldPropContainer} {
  733.     [$this propContainerSet] removeValue $oldPropContainer
  734. }
  735.  
  736.