home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
infoobject.tcl
< prev
next >
Wrap
Text File
|
1996-09-18
|
2KB
|
102 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1994
#
# File: @(#)infoobject.tcl /main/hindenburg/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)infoobject.tcl /main/hindenburg/2 18 Sep 1996 Copyright 1994 Westmount Technology
# Start user added include file section
# End user added include file section
Class InfoObject : {BrowsObject} {
constructor
method destructor
method open
method browsUiObj
attribute index
attribute _browsUiObj
}
constructor InfoObject {class this name browsUiObj} {
set this [BrowsObject::constructor $class $this $name]
$this _browsUiObj $browsUiObj
$browsUiObj _infoObject $this
# Start constructor user section
$this selectState 0
if [$browsUiObj canBeDragged] {
require "draginfoob.tcl"
DragInfoObj promote $this
}
# End constructor user section
return $this
}
method InfoObject::destructor {this} {
set ref [$this _browsUiObj]
if {$ref != ""} {
$ref _infoObject ""
}
# Start destructor user section
# End destructor user section
}
method InfoObject::open {this} {
set parentTreeNode [[[$this browsUiObj] parent] treeNode]
$parentTreeNode appendChildren
set parentTreeNodeChildSet [$parentTreeNode childSet]
$parentTreeNode foldState 0
set found 0
set browsUiObj [$this browsUiObj]
foreach treeNode $parentTreeNodeChildSet {
if {"[$treeNode browsUiObj]" == "$browsUiObj"} {
set found 1
break
}
}
if {! $found} {
wmtkerror "\
Object [$browsUiObj getInfo Type] '[$browsUiObj getInfo Name]' \
not found in tree"
return
}
$treeNode open
}
proc InfoObject::sort {obj1 obj2} {
set index1 [$obj1 index]
set index2 [$obj2 index]
if {$index1 > $index2} {
return 1
} elseif {$index1 < $index2} {
return -1
} else {
return 0
}
}
# Do not delete this line -- regeneration end marker
method InfoObject::browsUiObj {this args} {
if {$args == ""} {
return [$this _browsUiObj]
}
set ref [$this _browsUiObj]
if {$ref != ""} {
$ref _infoObject ""
}
set obj [lindex $args 0]
if {$obj != ""} {
$obj _infoObject $this
}
$this _browsUiObj $obj
}