home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
revengdlg.tcl
< prev
next >
Wrap
Text File
|
1997-11-17
|
6KB
|
233 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)revengdlg.tcl /main/titanic/6
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)revengdlg.tcl /main/titanic/6 17 Nov 1997 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
Class RevEngDlg : {TemplateDialog} {
method destructor
constructor
method checkDialogStatus
method getOptions
method ok
attribute headerFiles
attribute language
attribute revEngTool
attribute dbObj
}
method RevEngDlg::destructor {this} {
# Start destructor user section
# End destructor user section
}
constructor RevEngDlg {class this name language revEngTool} {
set this [TemplateDialog::constructor $class $this $name]
$this config \
-language $language \
-revEngTool $revEngTool \
-title "Reverse Engineer $language" \
-modal yes \
-okPressed {
%this ok
}
interface DlgColumn $this.top {
spaceType EVEN
DlgRow diag {
verStretchFactor 0
verShrinkFactor 0
Label lab {
text "Diagram prefix"
}
SingleLineText name {}
}
DlgRow gen {
verStretchFactor 0
verShrinkFactor 0
Label lab {
text Generate
}
OptionMenu types {
entrySet {
"CDs and CDMs"
"Only CDs"
"Only CDMs"
}
selected "CDs and CDMs"
}
}
CheckButton overwrite {
label "Overwrite Existing Diagrams"
}
CheckButton reference {
label "Create Reference Diagrams"
}
NamedGroup dims {
verStretchFactor 0
verShrinkFactor 0
label "Maximum Size (Width x Height)"
DlgColumn mtx {
DlgRow class {
Label lab {
text Class
}
DlgRow dim {
horStretchFactor 0
horShrinkFactor 0
spaceType NONE
IntField width {
columnCount 8
intValue 512
}
IntField height {
columnCount 8
intValue 512
}
}
}
DlgRow tree {
Label lab {
text Tree
}
DlgRow dim {
horStretchFactor 0
horShrinkFactor 0
spaceType NONE
IntField width {
columnCount 8
intValue 2048
}
IntField height {
columnCount 8
intValue 2048
}
}
}
DlgRow screen {
Label lab {
text Screen
}
DlgRow dim {
horStretchFactor 0
horShrinkFactor 0
spaceType NONE
IntField width {
columnCount 8
intValue 2048
}
IntField height {
columnCount 8
intValue 2048
}
}
}
}
}
DlgRow alg {
verStretchFactor 0
verShrinkFactor 0
Label lab {
text "Placement algorithm"
}
OptionMenu types {
entrySet {
"Simple placement"
"Grid placement"
}
selected "Simple placement"
}
}
DlgRow cnum {
verStretchFactor 0
verShrinkFactor 0
Label lab {
text "Number of classes per CD"
}
IntField num {
editable no
columnCount 8
intValue 7
}
}
}
$this config -okSensitive 1 -okDefault 1 -cancelDefault 1
$this.top.diag.name textModified "$this checkDialogStatus"
$this.top.gen.types selectionChanged "$this checkDialogStatus"
$this.top.alg.types selectionChanged "$this checkDialogStatus"
return $this
}
method RevEngDlg::checkDialogStatus {this} {
if {[$this.top.alg.types selected] != "Simple placement"} {
$this.top.cnum.num editable yes
} else {
$this.top.cnum.num editable no
}
set enableOk 1
$this okSensitive $enableOk
$this okDefault $enableOk
$this cancelDefault [expr 1 - $enableOk]
}
method RevEngDlg::getOptions {this} {
case "[$this.top.gen.types selected]" in {
{"Only CDMs"} { append script " -f" }
{"Only CDs"} { append script " -i" }
}
if [$this.top.overwrite state] {
append script " -o"
}
if [$this.top.reference state] {
append script " -r"
}
set dim $this.top.dims.mtx.class.dim
append script " -c[$dim.width intValue]x[$dim.height intValue]"
set dim $this.top.dims.mtx.screen.dim
append script " -s[$dim.width intValue]x[$dim.height intValue]"
set dim $this.top.dims.mtx.tree.dim
append script " -t[$dim.width intValue]x[$dim.height intValue]"
append script " -P[[[$this dbObj] getParent Project] name]"
append script " -C[[[$this dbObj] getParent ConfigVersion] name]"
append script " -A[[[$this dbObj] getParent PhaseVersion] name]"
append script " -T[[[$this dbObj] getParent PhaseVersion] browserType]"
append script " -S[[$this dbObj] name]"
append script " -V[[[$this dbObj] getParent ConfigVersion] versionName]"
if {[$this.top.diag.name text] != ""} {
append script " -D\"[$this.top.diag.name text]\""
}
case "[$this.top.alg.types selected]" in {
{"Simple placement"} { append script " -X \"Simple\"" }
{"Grid placement"} { append script " -X \"Grid\"" }
}
append script " -N [$this.top.cnum.num intValue]"
return $script
}
method RevEngDlg::ok {this} {
set script [quoteIf [m4_path_name bin [$this revEngTool]$EXE_EXT]]
append script [$this getOptions]
set argsFile [args_file {}]
set fid [open $argsFile w]
foreach file [$this headerFiles] {
puts $fid $file
}
close $fid
append script " -F$argsFile"
set msg "Starting 'Reverse Engineer [$this language]'"
$wmttoolObj startCommand mtool "$script" "" "$msg" {1 0} 0
}
# Do not delete this line -- regeneration end marker