home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1996
- #
- # File: @(#)hcustfuiob.tcl /main/hindenburg/5
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)hcustfuiob.tcl /main/hindenburg/5 12 Dec 1996 Copyright 1996 Cayenne Software Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "browsuiobj.tcl"
-
- Class HCustFUiObj : {BrowsUiObj} {
- constructor
- method destructor
- method externalFiles
- method initializeInfo
- method printObjects
- method removeObjects
- }
-
- global HCustFUiObj::uiClass
- set HCustFUiObj::uiClass "CustomFiles"
-
-
- constructor HCustFUiObj {class this name} {
- set this [BrowsUiObj::constructor $class $this $name]
- # Start constructor user section
-
- $this uiName "<customization files>"
- $this uiText "customization files"
-
- # End constructor user section
- return $this
- }
-
- method HCustFUiObj::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this BrowsUiObj::destructor
- }
-
- proc HCustFUiObj::associations {} {
- return {externalFiles}
- }
-
- proc HCustFUiObj::childTypes {assoc} {
- if {[lsearch -exact "[HCustFUiObj::associations]" "$assoc"] == -1} {
- return ""
- }
- set childTypes [BrowserProcs::childTypes $assoc]
- case "$childTypes" in {
- {ExternalFile} {
- return {ExternalDirectory ExternalFile}
- }
- {default} {
- return "$childTypes"
- }
- }
- }
-
- proc HCustFUiObj::externalEtcFileNames {} {
- return {
- cad.mnu cad.pnl ccd.mnu ccd.pnl checkconfig class.mnu desk.mnu desk.vie
- dfd.mnu dfd.pnl diagram.mnu etd.mnu etd.pnl mgd.mnu mgd.pnl m4env
- objtype.objtype opendefs.opendefs openlocs.openlocs propdefs.propdefs
- proplocs.proplocs roundtrip.roundtrip std.mnu std.pnl ucd.mnu ucd.pnl
- }
- }
-
- proc HCustFUiObj::externalFileNames {} {
- set currentObj [[$wmttoolObj currentObj] browsUiObj]
- if {"$currentObj" == "" || (! [$currentObj isA ExtFUiObj])} {
- return ""
- }
- for {set parent [$currentObj parent]} \
- {"$parent" != ""} \
- {set parent [$parent parent]} {
- if {! [$parent isA ExtFUiObj]} break
- set currentObj $parent
- }
- if {"[$currentObj getInfo Name]" == "tcl"} {
- return [HCustFUiObj::externalTclFileNames]
- }
- return [HCustFUiObj::externalEtcFileNames]
- }
-
- proc HCustFUiObj::externalTclFileNames {} {
- return {
- u_clbrowse.tcl u_desk.tcl u_docbatch.tcl u_mtool.tcl u_uce.tcl
- u_ude.tcl
- }
- }
-
- method HCustFUiObj::externalFiles {this} {
- set externalFiles ""
- set directory [m4_var get M4_home]
- foreach tuple {{etc *} {tcl *}} {
- set file [lindex $tuple 0]
- set pattern [lindex $tuple 1]
- regsub -all " |\\." "$file" "_" fileId
- set externalFile $this.${ExtFUiObj::uiClass}:$fileId
- if {! [isCommand $externalFile]} {
- ExtFUiObj new $externalFile \
- -parent $this \
- -uiName "$file" \
- -directory $directory \
- -isDirectory 1 \
- -pattern $pattern
- }
- lappend externalFiles $externalFile
- }
- return "$externalFiles"
- }
-
- proc HCustFUiObj::infoProperties {} {
- return [BrowserProcs::infoProperties]
- }
-
- method HCustFUiObj::initializeInfo {this dummy} {
- $this BrowsUiObj::initializeInfo $dummy
- $this setInfo Text "[$this uiText] of [[$this parent] getInfo Text]"
- }
-
- method HCustFUiObj::printObjects {this} {
- set asciiFiles ""
- foreach obj [$wmttoolObj selectedObjSet] {
- lappend asciiFiles [path_name concat [$obj directory] [$obj uiName]]
- }
- BrowserProcs::printObjects $asciiFiles "" ""
- }
-
- method HCustFUiObj::removeObjects {this} {
- set box $wmttoolObj.removeWarning
- WarningDialog new $box \
- -title "Delete Warning" \
- -message [BrowserProcs::removeMessage] \
- -helpPressed {.main helpOnName removeWarning} \
- -cancelPressed {%this delete} \
- -okPressed {
- set script ""
- foreach obj [$wmttoolObj selectedObjSet] {
- if {"$script" != ""} {
- append script " ;"
- }
- append script [list BasicFS::removeFile \
- [path_name concat [$obj directory] [$obj uiName]]]
- }
- $wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
- %this delete
- }
- $box popUp
- }
-
- # Do not delete this line -- regeneration end marker
-
-