home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
infoobject.tcl
< prev
next >
Wrap
Text File
|
1997-10-06
|
2KB
|
108 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1994
#
# File: @(#)infoobject.tcl /main/titanic/4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)infoobject.tcl /main/titanic/4 6 Oct 1997 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} {
if {! [[$this browsUiObj] hasChildren]} {
BrowserProcs::showInfo
return
}
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"
.main updateView
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
}