home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
vboptionme.tcl
< prev
next >
Wrap
Text File
|
1997-10-13
|
7KB
|
244 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)vboptionme.tcl /main/titanic/6
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)vboptionme.tcl /main/titanic/6 13 Oct 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
Class VBOptionMenuProcs : {Object} {
constructor
method destructor
}
constructor VBOptionMenuProcs {class this name} {
set this [Object::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method VBOptionMenuProcs::destructor {this} {
# Start destructor user section
# End destructor user section
}
proc VBOptionMenuProcs::redraw {} {
[.main infoView] redraw
}
proc VBOptionMenuProcs::zoomIn {} {
VBProcs::zoom 1.333333333333
set scale [[.main infoView] scale]
if {[m4_var get M4_zoom -context vb] != $scale} {
catch {m4_var set M4_zoom $scale -context vb}
}
}
proc VBOptionMenuProcs::zoomOut {} {
VBProcs::zoom 0.75
set scale [[.main infoView] scale]
if {[m4_var get M4_zoom -context vb] != $scale} {
catch {m4_var set M4_zoom $scale -context vb}
}
}
proc VBOptionMenuProcs::selectFontA {} {
busy {
uplevel #0 require udefontcho.tcl
set scale [[.main infoView] scale]
set scaledFont [VBProcs::scaleFont [m4_var get M4_font_bold -context vb] $scale]
UdeFontChooser new .main.fonta \
-options .main \
-title "Font" \
-orgFont "$scaledFont" \
-value "$scaledFont" \
-cancelPressed {%this delete} \
-okPressed {
set scale [expr 1 / [[.main infoView] scale]]
set scaledFont [VBProcs::scaleFont [%this value] $scale]
if {[%this orgFont] != "$scaledFont"} {
[.main infoView] fontASpec "$scaledFont"
catch {m4_var set M4_font_bold "$scaledFont" -context vb}
}
%this delete
}
}
.main.fonta popUp
}
proc VBOptionMenuProcs::selectFontB {} {
busy {
uplevel #0 require udefontcho.tcl
set scale [[.main infoView] scale]
set scaledFont [VBProcs::scaleFont [m4_var get M4_font -context vb] $scale]
UdeFontChooser new .main.fontb \
-options .main \
-title "Font" \
-orgFont "$scaledFont" \
-value "$scaledFont" \
-cancelPressed {%this delete} \
-okPressed {
set scale [expr 1 / [[.main infoView] scale]]
set scaledFont [VBProcs::scaleFont [%this value] $scale]
if {[%this orgFont] != "$scaledFont"} {
[.main infoView] fontBSpec "$scaledFont"
catch {m4_var set M4_font "$scaledFont" -context vb}
}
%this delete
}
}
.main.fontb popUp
}
proc VBOptionMenuProcs::selectForegroundColor {} {
uplevel #0 require udecolorch.tcl
UdeColorChooser new .main.fg \
-options .main \
-title "Foreground Color" \
-value [m4_var get M4_fg -context vb] \
-cancelPressed {%this delete} \
-okPressed {
if {[m4_var get M4_fg -context vb] != [%this value]} {
[.main infoView] areaForeground [%this value]
catch {m4_var set M4_fg [%this value] -context vb}
}
%this delete
}
.main.fg popUp
}
proc VBOptionMenuProcs::selectBackgroundColor {} {
uplevel #0 require udecolorch.tcl
UdeColorChooser new .main.bg \
-options .main \
-title "Background Color" \
-value [m4_var get M4_bg -context vb] \
-cancelPressed {%this delete} \
-okPressed {
if {[m4_var get M4_bg -context vb] != [%this value]} {
[.main infoView] areaBackground [%this value]
catch {m4_var set M4_bg [%this value] -context vb}
}
%this delete
}
.main.bg popUp
}
proc VBOptionMenuProcs::selectNodeColor {} {
uplevel #0 require udecolorch.tcl
UdeColorChooser new .main.nc \
-options .main \
-title "Node Color" \
-value [m4_var get "M4_node_color" -context vb] \
-cancelPressed {%this delete} \
-okPressed {
if {[m4_var get "M4_node_color" -context vb] != [%this value]} {
[.main infoView] nodeColor [%this value]
catch {m4_var set "M4_node_color" [%this value] -context vb}
}
%this delete
}
.main.nc popUp
}
proc VBOptionMenuProcs::selectPrimarySelectionColor {} {
uplevel #0 require udecolorch.tcl
UdeColorChooser new .main.selColor \
-options .main \
-title "Primary Selection Color" \
-value [m4_var get "M4_sel_color" -context vb] \
-cancelPressed {%this delete} \
-okPressed {
if {[m4_var get "M4_sel_color" -context vb] != [%this value]} {
[.main infoView] selAColor [%this value]
catch {m4_var set "M4_sel_color" [%this value] -context vb}
}
%this delete
}
.main.selColor popUp
}
proc VBOptionMenuProcs::selectSecundairySelectionColor {} {
uplevel #0 require udecolorch.tcl
UdeColorChooser new .main.selBColor \
-options .main \
-title "Secondairy Selection Color" \
-value [m4_var get "M4_selsecond_color" -context vb] \
-cancelPressed {%this delete} \
-okPressed {
if {[m4_var get "M4_selsecond_color" -context vb] != [%this value]} {
[.main infoView] selBColor [%this value]
catch {m4_var set "M4_selsecond_color" [%this value] -context vb}
}
%this delete
}
.main.selBColor popUp
}
proc VBOptionMenuProcs::selectMergeArrowColor {} {
uplevel #0 require udecolorch.tcl
UdeColorChooser new .main.mergeColor \
-options .main \
-title "Merge Arrow Color" \
-value [m4_var get "M4_merge_color" -context vb] \
-cancelPressed {%this delete} \
-okPressed {
if {[m4_var get "M4_merge_color" -context vb] != [%this value]} {
[.main infoView] mergeColor [%this value]
catch {m4_var set "M4_merge_color" [%this value] -context vb}
}
%this delete
}
.main.mergeColor popUp
}
proc VBOptionMenuProcs::printerSetup {} {
# better: make psPrinterSetup in ToolOptions static
if ![isCommand .main.toolOptions] {
require "tooloption.tcl"
ToolOptions new .main.toolOptions
}
.main.toolOptions psPrinterSetup
}
proc VBOptionMenuProcs::printOptions {} {
if ![isCommand .main.optionBox] {
require "vbprintopt.tcl"
VBPrintOptionsDialog new .main.optionBox
}
.main.optionBox popUp
}
proc VBOptionMenuProcs::compareCmd {} {
# retrieve M4 variables
set M4_diff [m4_var get M4_diff]
# create dialog box
EntryDialog new .main.compareCommand \
-modal yes \
-title "Compare Command" \
-message "Compare Command:" \
-entry $M4_diff \
-helpPressed {.main helpOnName compareCommand} \
-cancelPressed {%this delete} \
-okPressed {
if {"[m4_var get M4_diff]" != "[%this entry]"} {
catch {m4_var set M4_diff [%this entry]}
}
%this delete
}
.main.compareCommand popUp
}
# Do not delete this line -- regeneration end marker