home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
uce.tcl
< prev
next >
Wrap
Text File
|
1996-09-02
|
4KB
|
206 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1995
#
# File: @(#)uce.tcl /main/hindenburg/4
# Description: Instantiation of a customization file editor
#---------------------------------------------------------------------------
# SccsId = @(#)uce.tcl /main/hindenburg/4 2 Sep 1996 Copyright 1994 Westmount Technology
OtkRegister::extGui
source [m4_path_name tcl libocl.tcl]
require platform.tcl
require procs.tcl
require messagehdl.tcl
global classCount
set classCount 0
proc usage {} {
error "Usage: otk uce.tcl -- \
\[-c caller\] \
\[-r\] \
\[-fi level file editorType\] \
\[-id customFileVersionId\]"
}
set argc 0
set status INITIAL
set type ""
set readOnly 0
set caller ""
foreach arg $argv {
case $arg in {
{-c} {
if {$status != "INITIAL"} {
usage
}
set status CALLER
}
{-r} {
if {$status != "INITIAL"} {
usage
}
set readOnly 1
}
{-fi} {
if {$status != "INITIAL"} {
usage
}
set type "fi"
set status FILE
}
{-id} {
if {$status != "INITIAL"} {
usage
}
set type "id"
set status ID
}
{default} {
case $status in {
{CALLER} {
set caller $arg
set status INITIAL
}
{FILE} {
set level $arg
set status FILE_1
}
{FILE_1} {
set fileName $arg
set status FILE_2
}
{FILE_2} {
set fileType $arg
set editorType $fileType
set fv $fileName.$fileType
set status END
}
{ID} {
if [catch {set fv [CustomFileVersion new $arg]}] {
usage
}
set editorType [[$fv customFile] type]
set fileName [[$fv customFile] name]
set level ""
set status END
}
{default} {
usage
}
}
}
}
incr argc 1
}
if {$status != "END"} {
usage
}
set iconTitle $fileName.$editorType
case $editorType in {
{mnu} {
require "menueditor.tcl"
MenuEditor new .main \
-permanentReadOnly $readOnly \
-title "$fileName - Menu Customization Editor" \
-icon ctool_64 \
-iconTitle $iconTitle
case $fileName in {
{cad ccd dfd etd mgd std ucd} {
[.main editorArea] genericCurName diagram
}
{default} {
[.main editorArea] genericCurName ""
}
}
case $fileName in {
{cad ccd dfd etd mgd std ucd diagram} {
[.main editorArea] toolType editor
}
{class} {
[.main editorArea] toolType class
}
}
}
{vie} {
require "vieweditor.tcl"
ViewEditor new .main \
-permanentReadOnly $readOnly \
-title "View Customization Editor" \
-icon ctool_64 \
-iconTitle $iconTitle
}
{objtype} {
require "objtypeedi.tcl"
ObjTypeEditor new .main \
-permanentReadOnly $readOnly \
-title "Object Type Customization Editor" \
-icon ctool_64 \
-iconTitle $iconTitle
}
{opendefs} {
require "opendefedi.tcl"
OpenDefEditor new .main \
-permanentReadOnly $readOnly \
-title "Open Strategy Definition Editor" \
-icon ctool_64 \
-iconTitle $iconTitle
}
{openlocs} {
require "openlocedi.tcl"
OpenLocEditor new .main \
-permanentReadOnly $readOnly \
-title "Open Strategy Availability Editor" \
-icon ctool_64 \
-iconTitle $iconTitle
}
{propdefs} {
require "propdefedi.tcl"
PropDefEditor new .main \
-permanentReadOnly $readOnly \
-title "Property Definition Editor" \
-icon ctool_64 \
-iconTitle $iconTitle
}
{proplocs} {
require "proplocedi.tcl"
PropLocEditor new .main \
-permanentReadOnly $readOnly \
-title "Property Availability Editor" \
-icon ctool_64 \
-iconTitle $iconTitle
}
{default} {
wmtkfatal "Unknown customization file type specified"
}
}
sourceOptional u_uce
global icaseLevelInt
set icaseLevelInt(corporate) 0
set icaseLevelInt(project) 1
set icaseLevelInt(configuration) 2
set icaseLevelInt(phase) 3
set icaseLevelInt(system) 4
global icaseLevel
set icaseLevel(0) corporate
set icaseLevel(1) project
set icaseLevel(2) configuration
set icaseLevel(3) phase
set icaseLevel(4) system
.main setContext
[.main menuHdlr] levelChanged
if {"$level" != ""} {
[.main editorArea] _level $level
}
.main config -caller "$caller" -firstExposed ".main edit $fv"
.main popUp
.main ready