# Options file for Device Manager.  

global tk_strictMotif tcl_platform
set tk_strictMotif 1

set bg [. cget -background]
set Dm_Pref(selectColor) yellow
option add *borderWidth 1

if {$tcl_platform(platform) == "windows"} {
	set Dm_Pref(normalFont) {"MS Sans Serif" 8 normal}
	set Dm_Pref(boldFont) {"Arial" 12 bold}
	set Dm_Pref(italicFont) {"Arial" 11 italic}
	set Dm_Pref(smallFont) {"Arial" 8 normal}
	set Dm_Pref(changeFont) {"MS Sans Serif" 8 underline}
	set Dm_Pref(telnet) telnet
	
	# Web browser: use explorer only if netscape 3.x or 4.x not installed.
	set Dm_Pref(netscape3) "/Program Files/Netscape/Navigator/Program/netscape.exe"
	set Dm_Pref(netscape4) "/Program Files/Netscape/Communicator/Program/netscape.exe"
	set Dm_Pref(explorerA) "/Program Files/Plus!/Microsoft Internet/iexplore.exe"
	set Dm_Pref(explorerB) "/Program Files/Internet Explorer/iexplore.exe"

	if [file executable $Dm_Pref(netscape3)] {
		set Dm_Pref(browser) $Dm_Pref(netscape3)
	} elseif [file executable $Dm_Pref(netscape4)] {
		set Dm_Pref(browser) $Dm_Pref(netscape4)
	} elseif [file executable $Dm_Pref(explorerA)] {
		set Dm_Pref(browser) $Dm_Pref(explorerA)
	} else {
		set Dm_Pref(browser) $Dm_Pref(explorerB)
	}
	set Dm_Pref(/tmp) /temp
	option add *font $Dm_Pref(normalFont)
	option add *Entry.borderWidth 2
	option add *Barchart.background $bg
	option add *Graph.background $bg
	option add *Menubar*padY 1
	option add *Toolbar.relief sunken

	set Dm_Pref(entryBackground) systemwindow
	option add *Entry.background systemwindow
	option add *Listbox.background systemwindow
	option add *Listbox.borderWidth 2
	option add *Entry.foreground systemwindowtext
	option add *Label.foreground systemwindowtext
	option add *Button.foreground systemwindowtext
	option add *Radiobutton.foreground systemwindowtext
	option add *Checkbutton.foreground systemwindowtext
	option add *Menubutton.foreground systemwindowtext
	option add *Menu.foreground systemwindowtext
	option add *Table.foreground systemwindowtext
	option add *Radiobutton.selectColor systembuttontext
	option add *Checkbutton.selectColor systembuttontext
	option add *Scrollbar.troughColor $bg
	#option add *toolTip.l.background white
} else {
	set Dm_Pref(normalFont) [option get . font Font]
	if ![string match {*application*} $Dm_Pref(normalFont)] {
		if [string match {*interface user*} $Dm_Pref(normalFont)] {
			# CDE fixed width font; substitute for application
			set Dm_Pref(normalFont) {-dt-application-medium-r-normal-sans-12-*-*-*-*-*-*-*}
		} else {
			set Dm_Pref(normalFont) {-b&h-lucida-medium-r-normal-sans-12-*-*-*-*-*-*-*}
		}
	}
	regsub medium $Dm_Pref(normalFont) bold Dm_Pref(boldFont)
	regsub -- -r- $Dm_Pref(boldFont) -i- Dm_Pref(italicFont)
	regsub 12 $Dm_Pref(normalFont) 8 Dm_Pref(smallFont)

	# Now test these fonts: some displays (NCD X-terms) don't have them.
	label .test
	foreach font {normalFont boldFont smallFont} {
		if [catch {.test config -font $Dm_Pref($font)}] {
			set Dm_Pref($font) fixed
		}
	}
	destroy .test
	set Dm_Pref(changeFont) $Dm_Pref(boldFont)

	option add *font $Dm_Pref(normalFont)
	option add *Menubutton.font $Dm_Pref(boldFont)
	option add *Menu.font $Dm_Pref(boldFont)
	option add *Button.font $Dm_Pref(boldFont)
	option add *highlightBackground $bg
	option add *selectBackground $Dm_Pref(selectColor)
	option add *Menubar.borderWidth 2
	option add *Menubar.relief raised
	option add *Toolbar.borderWidth 0
	option add *Scrollbar.troughColor $bg
	set Dm_Pref(entryBackground) white
	option add *Entry.background white
	option add *Entry.foreground black
	option add *Radiobutton.selectColor black
	option add *Checkbutton.selectColor black
	option add *toolTip.l.background yellow
	set Dm_Pref(telnet) "xterm -e telnet"
	set Dm_Pref(netscape) netscape
	set Dm_Pref(/tmp) /tmp
}

#bind Button <Return> {tkButtonInvoke %W; break}
bind Checkbutton <Enter> break
bind Radiobutton <Enter> break

option add *Button.highlightThickness 1
option add *Checkbutton.highlightThickness 1
option add *Radiobutton.highlightThickness 1
option add *Entry.highlightThickness 1
option add *Listbox.highlightThickness 1
option add *Scrollbar.highlightThickness 1
option add *Table.highlightThickness 1

option add *Scrollbar.width 12
option add *Menu.tearOff 0
option add *Table.background $bg

# Button frame
option add *FBtn.ok.text Apply
option add *FBtn.apply.text Apply
option add *FBtn.cancel.text Close
option add *FBtn.remove.text Delete
option add *FBtn.insert.text Insert...
option add *FBtn.refresh.text Refresh
option add *FBtn.help.text Help...

option add *FBtn.table.text Table...
option add *FBtn.print.text Print...
option add *FBtn.options.text Options...
option add *FBtn.highlightThickness 0

# Index frame
option add *FIndex.relief raised
option add *FIndex.borderwidth 1
option add *FIndex.highlightThickness 0

# Radiobutton, checkbutton frame
option add *FRadio.relief ridge
option add *FRadio.borderwidth 1
option add *FRadio.highlightThickness 0
option add *FBitSet.relief ridge
option add *FBitSet.borderwidth 1
option add *FBitSet.highlightThickness 0

set Dm_Pref(statusColor) {
	{up green} {down brown} {"no link" orange} {standby cyan} {testing blue}
}

set Dm_Pref(colors) {
	white red green blue yellow orange magenta purple violet
	bisque coral MistyRose LimeGreen PaleTurquoise
	gold LightGrey OliveDrab IndianRed pink wheat chocolate
	cyan orchid LemonChiffon PaleVioletRed1 PeachPuff linen lavender NavyBlue
	DodgerBlue azure LightSeaGreen ForestGreen
}

set Dm_Pref(readComm) public
set Dm_Pref(writeComm) private

set Dm_Pref(MAXPDUVARS) 120
