home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
navigation.tcl
< prev
next >
Wrap
Text File
|
1997-10-03
|
2KB
|
86 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)navigation.tcl /main/titanic/12
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)navigation.tcl /main/titanic/12 3 Oct 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "dropobject.tcl"
Class NavigationView : {BrowsTree DropObject} {
method destructor
constructor
method getDropTarget
method postDropUpdate
method rebuild
method updateSelected
}
method NavigationView::destructor {this} {
# Start destructor user section
# End destructor user section
$this DropObject::destructor
}
constructor NavigationView {class this name} {
set this [BrowsTree::constructor $class $this $name]
$this dropMode ON
$this setDestinationSet
return $this
}
method NavigationView::getDropTarget {this droppedAfterObj droppedBeforeObj treeNode} {
upvar $treeNode node
if [isCommand $droppedAfterObj] {
set node $droppedAfterObj
} else {
set node [.main currentObj]
if {! [isCommand $node]} {
set node [lindex [$this rootSet] 0]
}
}
return $node
}
method NavigationView::postDropUpdate {this target node} {
# Update tree-node
if {(! [$node foldState]) && (! [$node activeState])} {
$node appendChildren
}
}
method NavigationView::rebuild {this} {
foreach root [$this rootSet] {
$root rebuild
}
}
method NavigationView::updateSelected {this} {
set treeNode [$this selected]
if {"$treeNode" == ""} {
return
}
# Must update selected tree node because
# one browsUiObj can have two different parents
set browsUiObj [$treeNode browsUiObj]
$browsUiObj makeUpToDate
BrowserProcs::initializeInfo $browsUiObj $treeNode
# Open tree-node
if [$treeNode activeState] {
.main selectionChanged
} else {
$treeNode open
}
}
# Do not delete this line -- regeneration end marker