home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)propdefeda.tcl /main/titanic/4
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)propdefeda.tcl /main/titanic/4 24 Apr 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- require "propdefobj.tcl"
- require "propdefdia.tcl"
- # End user added include file section
-
- require "custdefsar.tcl"
-
- Class PropDefEdArea : {CustDefsArea} {
- constructor
- method destructor
- method parseLines
- method deleteObjects
- method newObject
- method createObject
- method clearArea
- method getDefObject
- method setDefObject
- method removeDefObject
- attribute propDefiner
- attribute defObject
- }
-
- global PropDefEdArea::ifClasses
- set PropDefEdArea::ifClasses ""
-
-
- constructor PropDefEdArea {class this name} {
- set this [CustDefsArea::constructor $class $this $name]
- $this defObject [Dictionary new]
- # Start constructor user section
- $this rowCount 12
- $this columnCount 75
- $this font "[m4_var get M4_font -context uce]"
- $this destinationSet "PROPDEF dropEvent"
- $this mode DETAIL
- BrowsHeader new $this.name -label Name -width 17
- BrowsHeader new $this.name -label "Long Name" -width 25
- BrowsHeader new $this.type -label "Interface class" -width 15
- BrowsHeader new $this.level -label Level -width 25
-
- global PropDefEdArea::ifClasses
- set PropDefEdArea::ifClasses {
- CheckButton
- ComboBox
- DropDwnComboBox
- DropDwnList
- FloatField
- IntField
- MultiLineText
- OptionMenu
- RadioGroup
- SingleLineText
- TextList
- }
-
- # End constructor user section
- return $this
- }
-
- method PropDefEdArea::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this CustDefsArea::destructor
- }
-
- method PropDefEdArea::parseLines {this lines level} {
-
- global PropDefEdArea::ifClasses
- set ifClasses ${PropDefEdArea::ifClasses}
-
- foreach defLine $lines {
- lappend_unique ifClasses [lindex $defLine 2]
- regsub -all {(\\)([#!|\])} [lindex $defLine 3] {\2} ifOptions
- $this createObject [list shortName [lindex $defLine 0] \
- longName [lindex $defLine 1] \
- ifClass [lindex $defLine 2] \
- ifOptions $ifOptions \
- ifMembers [lindex $defLine 4]] \
- $level
- }
-
- set PropDefEdArea::ifClasses [lsort $ifClasses]
- }
-
- method PropDefEdArea::deleteObjects {this objs} {
- foreach obj $objs {
- $this removeDefObject [$obj shortName]
- }
- $this CustDefsArea::deleteObjects $objs
- }
-
- method PropDefEdArea::newObject {this shortName longName ifClass {edit 0}} {
- $this isChanged 1
-
- global PropDefEdArea::ifClasses
- set ifClasses ${PropDefEdArea::ifClasses}
- lappend_unique ifClasses "$ifClass"
- set PropDefEdArea::ifClasses [lsort $ifClasses]
-
- set obj [$this createObject [list shortName $shortName \
- longName $longName \
- ifClass $ifClass \
- specLevel [$this _level]] \
- [$this _level]]
-
- $this sortArea
-
- if $edit {
- $obj open
- }
- }
-
- method PropDefEdArea::createObject {this objSpec level} {
-
- global classCount
- set newIndex [llength [$this objectSet]]
- set object [PropDefObject new $this.Object$classCount $objSpec]
- $this setDefObject [$object shortName] $object
- $object index $newIndex
- incr classCount
-
- $this adjustCreatedObject $object $level
-
- # update the object-details in the view
- $object updateView
-
- return $object
- }
-
- method PropDefEdArea::clearArea {this} {
- $this CustDefsArea::clearArea
- }
-
- # Do not delete this line -- regeneration end marker
-
- method PropDefEdArea::getDefObject {this shortName} {
- return [[$this defObject] set $shortName]
- }
-
- method PropDefEdArea::setDefObject {this shortName newDefObject} {
- [$this defObject] set $shortName $newDefObject
- }
-
- method PropDefEdArea::removeDefObject {this shortName} {
- [$this defObject] unset $shortName
- }
-
-