home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
navigation.tcl
< prev
next >
Wrap
Text File
|
1996-11-27
|
3KB
|
116 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)navigation.tcl /main/hindenburg/10
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)navigation.tcl /main/hindenburg/10 27 Nov 1996 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
Class NavigationView : {BrowsTree} {
constructor
method destructor
method dropCopyEvent
method dropCutEvent
method dropEvent
method rebuild
method updateSelected
}
constructor NavigationView {class this name} {
set this [BrowsTree::constructor $class $this $name]
# Start constructor user section
$this destinationSet \
"CUT_BROWSUIOBJ dropCutEvent BROWSUIOBJ dropCopyEvent"
# End constructor user section
return $this
}
method NavigationView::destructor {this} {
# Start destructor user section
# End destructor user section
}
method NavigationView::dropCopyEvent {this contextList srcIsDst droppedAfterObj droppedBeforeObj} {
$this dropEvent \
$contextList $srcIsDst $droppedAfterObj $droppedBeforeObj copy
}
method NavigationView::dropCutEvent {this contextList srcIsDst droppedAfterObj droppedBeforeObj} {
$this dropEvent \
$contextList $srcIsDst $droppedAfterObj $droppedBeforeObj cut
}
method NavigationView::dropEvent {this contextList srcIsDst droppedAfterObj droppedBeforeObj operation} {
if [.main undoCommandBusy EditPasteCmd] {
[.main undoCommand] operation $operation
}
if [isCommand $droppedAfterObj] {
set node $droppedAfterObj
} else {
set node [.main currentObj]
if {! [isCommand $node]} {
set node [lindex [$this rootSet] 0]
}
}
set browsUiObj [$node browsUiObj]
foreach context $contextList {
set uiClass [lindex $context [expr [llength $context] - 1]]
if {! [$browsUiObj allowsDrop $uiClass]} {
wmtkmessage "Can not import '$uiClass' \
into this '[$browsUiObj getInfo Type]'"
if [isCommand [.main undoCommand]] {
[.main undoCommand] delete
}
return
}
$browsUiObj importObject $context $node
}
# Update tree-node
if {(! [$node foldState]) && (! [$node activeState])} {
$node appendChildren
}
if [.main undoCommandBusy] {
[.main undoCommand] busy 0
}
}
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
BrowserProcs::initializeInfo [$treeNode browsUiObj] $treeNode
# Open tree-node
if [$treeNode activeState] {
.main selectionChanged
} else {
$treeNode open
}
}
# Do not delete this line -- regeneration end marker