home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)copydefdia.tcl /main/titanic/2
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)copydefdia.tcl /main/titanic/2 23 Oct 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- # End user added include file section
-
-
- Class CopyDefDialog : {TemplateDialog} {
- constructor
- method destructor
- method load
- method clearInterface
- method fromInterface
- method toInterface
- method save
- method typeTextModified
- attribute currentObject
- }
-
- constructor CopyDefDialog {class this name} {
- set this [TemplateDialog::constructor $class $this $name]
- # Start constructor user section
- interface DlgColumn $this.col {
- Label typeLabel {
- text "Select gdr file:"
- }
- ComboBox gdrFiles {
- }
- HorSeparator line {
- }
- Label levelLabel {
- text "Level:"
- }
- SingleLineText level {
- sensitive 0
- }
- Label descLabel {
- text "Description:"
- }
- SingleLineText descText {
- columnCount 80
- sensitive 0
- }
- }
-
- PushButton new $this.applynow -label "Apply now" -activated "$this save 0"
- $this okPressed "$this save 1"
- $this helpPressed {.main helpOnName editCopyspecsProperties}
- $this.col.gdrFiles textModified "$this typeTextModified"
- # End constructor user section
- return $this
- }
-
- method CopyDefDialog::destructor {this} {
- # Start destructor user section
- # End destructor user section
- }
-
- method CopyDefDialog::load {this object} {
- $this clearInterface
- $this currentObject $object
- $this title "Copy Specification [$object type]"
-
- $this toInterface
- $this popUp
- }
-
- method CopyDefDialog::clearInterface {this} {
- $this.col.descText text ""
- }
-
- method CopyDefDialog::fromInterface {this} {
- set gdrName [$this.col.gdrFiles text]
- [$this currentObject] gdrName $gdrName
- [$this currentObject] level [[.main editorArea] getGdrLevel $gdrName]
- [$this currentObject] description [[.main editorArea] getGdrDescription $gdrName]
- }
-
- method CopyDefDialog::toInterface {this} {
- set editorArea [.main editorArea]
- set infoDict [[.main editorArea] gdrToInfo]
- regsub -all {\.gdr} [$infoDict names] "" gdrNames
- $this.col.gdrFiles entrySet $gdrNames
- set gdrName [[$this currentObject] gdrName]
- $this.col.gdrFiles text $gdrName
- $this typeTextModified
- }
-
- method CopyDefDialog::save {this popDown} {
- $this fromInterface
- [.main editorArea] isChanged 1
- if {$popDown == 1} {
- $this popDown
- }
-
- [$this currentObject] updateView
- return 1
- }
-
- method CopyDefDialog::typeTextModified {this} {
- set gdrName [$this.col.gdrFiles text]
- $this.col.descText text [[.main editorArea] getGdrDescription $gdrName]
- $this.col.level text [[.main editorArea] getGdrLevel $gdrName]
- }
-
- # Do not delete this line -- regeneration end marker
-
-