home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
helpdialog.tcl
< prev
next >
Wrap
Text File
|
1996-06-14
|
3KB
|
124 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)helpdialog.tcl /main/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)helpdialog.tcl /main/2 14 Jun 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
require helptoc.tcl
require helpindex.tcl
# End user added include file section
Class HelpDialog : {NoteBkDialog} {
constructor
method destructor
method loadToc
method loadIndex
method showToc
method showIndex
method tool
method handleApplyOk
method _tool
attribute __tool
attribute toc
attribute current
attribute index
}
constructor HelpDialog {class this name} {
set this [NoteBkDialog::constructor $class $this $name]
# Start constructor user section
interface NoteBkPage $this.toc {
label Contents
HelpToc toc {}
}
set toc $this.toc.toc
$this config -toc $toc -current $toc -okPressed {%this handleApplyOk} \
-applyNowPressed {%this handleApplyOk} \
-helpPressed {showHelp GEN/db_hlp.html}
$this.toc raised "$this current $toc"
interface NoteBkPage $this.index {
label Index
HelpIndex index {}
}
$this index $this.index.index
$this.index raised "$this current $this.index.index"
# End constructor user section
return $this
}
method HelpDialog::destructor {this} {
set ref [$this __tool]
if {$ref != ""} {
$ref _dialog ""
}
# Start destructor user section
# End destructor user section
}
method HelpDialog::loadToc {this file} {
[$this toc] load $file
}
method HelpDialog::loadIndex {this file} {
[$this index] load $file
}
method HelpDialog::showToc {this} {
$this currentPage $this.toc
$this popUp
}
method HelpDialog::showIndex {this} {
$this popUp
$this currentPage $this.index
}
method HelpDialog::tool {this {newTool -}} {
if {$newTool == "-"} {
return [$this _tool]
}
$this _tool $newTool
[$this toc] tool $newTool
[$this index] tool $newTool
}
method HelpDialog::handleApplyOk {this} {
if {[$this current] == [$this toc]} {
set selected [[$this toc] selected]
if {$selected != ""} {
$selected gotoReference
}
} else {
[$this index] gotoSelected
}
}
# Do not delete this line -- regeneration end marker
method HelpDialog::_tool {this args} {
if {$args == ""} {
return [$this __tool]
}
set ref [$this __tool]
if {$ref != ""} {
$ref _dialog ""
}
set obj [lindex $args 0]
if {$obj != ""} {
$obj _dialog $this
}
$this __tool $obj
}