*background:			LightGrey
!*background:			LightSkyBlue
*foreground:			black

!*Form*defaultDistance:	0

*beNiceToColormap:		False

Siag.geometry:			600x400

! medium is better for Xaw95
! Use bold for Xaw3d
*font:				-*-helvetica-bold-r-*-12-*
!*font:				-*-helvetica-medium-r-*-12-*
*Text*font:			-*-helvetica-medium-r-*-12-*

!*Label*shadowWidth:		2
*Label*borderWidth:		0
*Label*justify:			Left
!*Label*background:		DarkGrey

*Text*background:		white

!*Scrollbar*background:		DarkGrey

*List*defaultColumns:		1
*List*forceColumns:		True

*Viewport*allowHoriz:		True
*Viewport*allowVert:		True
*Viewport*useBottom:		True
*Viewport*useRight:		True

!*MenuButton.cursor:		hand2
!*Command.cursor:			hand2

! The siag-highlight and siag-unhighlight are replacements for the
! standard highlight and unhighlight actions. They use standout colour
! for the background, rather than a black border around the widget.
*Toggle.translations:		#override			\n\
	<Enter>:		siag-highlight()		\n\
	<Leave>:		siag-unhighlight()

*MenuButton.translations:	#override			\n\
	<Enter>:		siag-highlight()		\n\
	<Leave>:		siag-unhighlight()

*Command.translations:		#override			\n\
	<Enter>:		siag-highlight()		\n\
	<Leave>:		siag-unhighlight()

*helplabel.background:	LightYellow
*helplabel.font:		-*-helvetica-medium-r-*-10-*
!*helplabel.font:		-*-times-medium-r-*-14-*

*MenuButton.shadowWidth:	0

*tbNew.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Start another instance of Siag)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*tbOpen.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Open a Siag document)		\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*tbSave.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Save the contents of the current buffer)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*tbView.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Preview the contents of the current buffer)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*tbPrint.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Print the contents of the current buffer)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*tbPlot.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Plot the contents of the block using lines)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*tbSum.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Add the contents of the block)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*tbHelp.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Display the Siag online documentation)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*tbCopy.translations:	#override				\n\
	<Enter>:	siag-highlight()\
			helptext(Display the Gnu general public license)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*btnFont.shadowWidth:	1
*btnFont.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Change the font family)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()
*btnSize.shadowWidth:	1
*btnSize.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Change the font size)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()
*btnStyle.shadowWidth:	1
*btnStyle.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Change the display style)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()
*btnColor.shadowWidth:	1
*btnColor.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Change the color)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdBold.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Bold text)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdItalic.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Italic text)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdHLeft.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Left adjusted text)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdHCenter.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Centered text)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdHRight.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Right adjusted text)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdGrid.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Draw grid lines in the block)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdBorders.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Draw borders around the block)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdUline.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Underline the block)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

*cmdNone.translations:	#override	\n\
	<Enter>:	siag-highlight()\
			helptext(Remove grid lines from the block)\n\
	<Leave>:	siag-unhighlight()\
			draw-input()

!*label1.left:			ChainLeft
!*label1.right:			ChainRight
!*label1.top:			ChainTop
!*label1.bottom:		ChainTop
!*label1.width:			480
!*label1.fromVert:		tbNew
*label1.label:
*label1.font:			-*-helvetica-medium-r-*-12-*
!*label1.borderWidth:		1

!*gridpane.width:		480
!*gridpane.height:		200
!*gridpane.left:		ChainLeft
!*gridpane.right:		ChainRight
!*gridpane.top:			ChainTop
!*gridpane.bottom:		ChainBottom
!*gridpane.fromVert:		label1
!*gridpane.allowResize:		True
!*gridpane.min:			40

*viewport.left:		ChainLeft
*viewport.right:		ChainRight
*viewport.top:			ChainTop
*viewport.bottom:		ChainBottom
*viewport.height:		200

*viewport.defaultDistance:	0

*selectall.left:		ChainLeft
*selectall.right:		ChainLeft
*selectall.top:		ChainTop
*selectall.bottom:		ChainTop
*selectall.width:		60
*selectall.height:		20
*selectall.borderWidth:	1

!*selectall.label:		Wanted
*selectall.label:
*selectall.translations:		#override			\n\
	<Enter>:		siag-highlight()\
				helptext(Select everything)	\n\
	<Leave>:		siag-unhighlight()\
				draw-input()

*colnum.left:			ChainLeft
*colnum.right:			ChainRight
*colnum.top:			ChainTop
*colnum.bottom:		ChainTop
*colnum.height:		20
*colnum.background:		DarkGrey
!*colnum.foreground:		white
*colnum.translations:\
	<Btn1Down>:		colnum-button(set)			\n\
	<Btn1Motion>:		colnum-button(adjust)			\n\
	<Btn3Down>:		colnum-button(select)

*rownum.left:			ChainLeft
*rownum.right:			ChainLeft
*rownum.top:			ChainTop
*rownum.bottom:		ChainBottom
*rownum.background:		DarkGrey
!*rownum.foreground:		black
*rownum.translations:\
	<Btn1Down>:		rownum-button(set)			\n\
	<Btn1Motion>:		rownum-button(adjust)			\n\
	<Btn3Down>:		rownum-button(select)

*grid.background:		white
!*grid.foreground:		black
*grid.tableForeground:		blue
*grid.left:			ChainLeft
*grid.right:			ChainRight
*grid.top:			ChainTop
*grid.bottom:			ChainBottom

! Trying to get the Keytable bindings to work...
*grid.translations:\
	Shift<Btn1Down>:	grid-button(select)			\n\
	:<Btn1Down>:		grid-button(point)			\n\
	:<Btn1Motion>:		grid-button(adjust)			\n\
	:<Btn2Down>:		grid-button(paste)			\n\
	:<Btn3Down>:		grid-button(select)			\n\
	:<Key>F1:		execute(help-contents)			\n\
	<Key>:			key-event()

!	:<Key>Home:		execute(beginning-of-line)		\n\
!	Ctrl<Key>a:		execute(beginning-of-line)		\n\
!	:<Key>End:		execute(end-of-line)			\n\
!	Ctrl<Key>e:		execute(end-of-line)			\n\
!	:<Key>Left:		execute(backward-cell)			\n\
!	Ctrl<Key>b:		execute(backward-cell)			\n\
!	:<Key>Delete:		execute(delete-cell)			\n\
!	Ctrl<Key>d:		execute(delete-cell)			\n\
!	:<Key>Right:		execute(forward-cell)			\n\
!	Ctrl<Key>f:		execute(forward-cell)			\n\
!	:<Key>g:		execute(go-to)				\n\
!	:<Key>Down:		execute(next-line)			\n\
!	Ctrl<Key>n:		execute(next-line)			\n\
!	:<Key>o:		execute(load-buffer)			\n\
!	Ctrl<Key>x,Ctrl<Key>f:	execute(load-buffer)			\n\
!	:<Key>Up:		execute(previous-line)			\n\
!	Ctrl<Key>p:		execute(previous-line)			\n\
!	:<Key>q:		execute(quit-siag)			\n\
!	Ctrl<Key>r:		execute(search-backward)		\n\
!	Ctrl<Key>s:		execute(search-forward)			\n\
!	Ctrl<Key>x,Ctrl<Key>c:	execute(quit-siag)			\n\
!	Ctrl<Key>x,Ctrl<Key>s:	execute(save-buffer)			\n\
!	Ctrl<Key>x,Ctrl<Key>w:	execute(save-buffer-as)			\n\
!	Ctrl<Key>x,Ctrl<Key>x:	execute(exchange-point-and-mark)	\n\
!	:<Key>parenleft:	execute(execute-extended-command)	\n\
!	Meta<Key>x:		execute(execute-extended-command)	\n\
!	:<Key>equal:		execute(edit-expression)		\n\
!!	:<Key>quotedbl:		execute(edit-label)			\n\
!	:<Key>dollar:		execute(edit-string)			\n\
!	:<Key>period:		execute(no-op)				\n\
!	:<Key>exclam:		execute(recalc-matrix)			\n\
!	:<Key>less:		execute(beginning-of-buffer)		\n\
!	:Meta<Key>less:		execute(beginning-of-buffer)		\n\
!	:<Key>greater:		execute(end-of-buffer)			\n\
!	:Meta<Key>greater:	execute(end-of-buffer)			\n\
!	:<Key>Page_Up:		execute(scroll-down)			\n\
!	Meta<Key>v:		execute(scroll-down)			\n\
!	:<Key>Page_Down:	execute(scroll-up)			\n\
!	Ctrl<Key>v:		execute(scroll-up)			\n\
!	:<Key>b:		execute(scroll-left)			\n\
!	:<Key>f:		execute(scroll-right)			\n\
!	:<Key>P:		execute(top-of-buffer)			\n\
!	:<Key>N:		execute(bottom-of-buffer)		\n\
!	:<Key>question:		execute(what-cursor-position)		\n\
!	Ctrl<Key>x,<Key>question: execute(what-cursor-position)		\n\
!	Ctrl<Key>space:		execute(set-mark-command)		\n\
!	Shift<Key>space:	execute(unset-block)			\n\
!	:<Key>space:		execute(set-block)			\n\
!	Ctrl<Key>x,<Key>k:	execute(kill-buffer)			\n\
!	Ctrl<Key>x,<Key>b:	execute(switch-to-buffer)		\n\
!	Ctrl<Key>x,<Key>2:	execute(split-window-vertically)	\n\
!	Ctrl<Key>x,<Key>1:	execute(delete-other-windows)		\n\
!	Ctrl<Key>x,<Key>0:	execute(delete-window)			\n\
!	Ctrl<Key>x,<Key>o:	execute(other-window)			\n\
!	Ctrl<Key>h,<Key>c:	execute(help-contents)			\n\
!	Ctrl<Key>c,<Key>b,<Key>space: execute(set-block)		\n\
!	Ctrl<Key>c,<Key>b,<Key>f: execute(fill-block)			\n\
!	Ctrl<Key>c,<Key>b,<Key>d: execute(delete-block)			\n\
!	Ctrl<Key>c,<Key>b,<Key>c: execute(copy-block)			\n\
!	Ctrl<Key>c,<Key>c,<Key>s:	execute(exec-siod)		\n\
!	Ctrl<Key>c,<Key>c,<Key>g:	execute(exec-guile)		\n\
!	Ctrl<Key>c,<Key>c,<Key>t:	execute(exec-tcl)		\n\
!	Ctrl<Key>c,<Key>x,<Key>c:	execute(edit-c)			\n\
!	Ctrl<Key>c,<Key>x,<Key>s:	execute(edit-siod)		\n\
!	Ctrl<Key>c,<Key>x,<Key>g:	execute(edit-guile)		\n\
!	Ctrl<Key>c,<Key>x,<Key>t:	execute(edit-tcl)		\n\
!	<Key>F1:		siaghelp(siag.html)			\n\
!	:<Key>Return:		execute(hyperlink)			\n\
!	:<Key>F4:		execute(more complicated test)		\n\
!	:<Key>e:		execute(data-entry)			\n\

! These don't work properly yet
!	:<Key>F5:		tcl(puts $foo)			\n\
!	:<Key>F6:		guile(write foo)

*hscroll.left:			ChainLeft
*hscroll.right:		ChainRight
*hscroll.top:			ChainBottom
*hscroll.bottom:		ChainBottom
*hscroll.orientation:		Horizontal

*vscroll.left:			ChainRight
*vscroll.right:		ChainRight
*vscroll.top:			ChainTop
*vscroll.bottom:		ChainBottom
*vscroll.orientation:		Vertical

!*label2.left:			ChainLeft
!*label2.right:			ChainRight
!*label2.top:			ChainBottom
!*label2.bottom:		ChainBottom
!*label2.height:		20
!*label2.width:			480
!*label2.fromVert:		gridpane
*label2.font:			-*-helvetica-medium-r-*-12-*
!*label2.borderWidth:		1

*pshell.title:			Dialog
*pshell.width:			400
*pshell.height:		80

*dialogLabel.label:
!*dialogLabel.height:		20
!*dialogLabel.width:		200
*dialogLabel.left:		ChainLeft
*dialogLabel.right:		ChainRight
*dialogLabel.top:		ChainTop
*dialogLabel.bottom:		ChainTop

*text1.translations:	#override\n\
	<Key>Return:		dialog-done()\n\
	<Key>Escape:		dialog-cancel()\n\
	Ctrl<Key>R:		no-op(RingBell)\n\
	Ctrl<Key>S:		no-op(RingBell)

!*dialogText.height:		20
*dialogText.width:		400
*dialogText.left:		ChainLeft
*dialogText.right:		ChainRight
*dialogText.top:		ChainTop
*dialogText.bottom:		ChainTop
*dialogText.fromVert:		dialogLabel
*dialogText.translations: #override\n\
	<Key>Return:		dialog-done()\n\
	<Key>Escape:		dialog-cancel()\n\
	Ctrl<Key>R:		no-op(RingBell)\n\
	Ctrl<Key>S:		no-op(RingBell)

*dialogDone.width:		80
*dialogDone.top:		ChainBottom
*dialogDone.fromVert:		dialogText
*dialogDone.label:		OK

*dialogCancel.width:		80
*dialogCancel.top:		ChainBottom
*dialogCancel.fromVert:	dialogText
*dialogCancel.fromHoriz:	dialogDone
*dialogCancel.label:		Cancel

*fsel_pshell.title:		Select File
*fsel_pshell.width:		500
*fsel_pshell.height:		300
*fsel_pshell.x:		80
*fsel_pshell.y:		80

*fsel_filelabel.label:		File Name:
*fsel_filelabel.top:		ChainTop
*fsel_filelabel.bottom:	ChainTop
*fsel_filelabel.left:		ChainLeft
*fsel_filelabel.right:		ChainLeft

*fsel_filetext.top:		ChainTop
*fsel_filetext.bottom:		ChainTop
*fsel_filetext.left:		ChainLeft
*fsel_filetext.right:		ChainLeft
*fsel_filetext.width:		200
*fsel_filetext.fromVert:	fsel_filelabel
*fsel_filetext.font:		-*-helvetica-medium-r-*-12-*
*fsel_filetext.translations: #override\n\
	<Key>Return:		fsel-done()\n\
	<Key>Escape:		fsel-cancel()\n\
	Ctrl<Key>R:		no-op(RingBell)\n\
	Ctrl<Key>S:		no-op(RingBell)

*fsel_fileviewport.width:	200
*fsel_fileviewport.top:	ChainTop
*fsel_fileviewport.bottom:	ChainBottom
*fsel_fileviewport.left:	ChainLeft
*fsel_fileviewport.right:	ChainLeft
*fsel_fileviewport.height:	200
*fsel_fileviewport.fromVert:	fsel_filetext

!*fsel_filelist.width:		200
!*fsel_filelist.fromVert:	fsel_filetext

*fsel_formatlabel.top:		ChainBottom
*fsel_formatlabel.bottom:	ChainBottom
*fsel_formatlabel.left:	ChainLeft
*fsel_formatlabel.right:	ChainLeft
*fsel_formatlabel.label:	Format:
*fsel_formatlabel.fromVert:	fsel_fileviewport

*fsel_formatbutton.top:	ChainBottom
*fsel_formatbutton.bottom:	ChainBottom
*fsel_formatbutton.left:	ChainLeft
*fsel_formatbutton.right:	ChainLeft
*fsel_formatbutton.fromVert:	fsel_formatlabel
*fsel_formatbutton.width:	200
*fsel_formatbutton.justify:	Left
*fsel_formatbutton.shadowWidth:	1

*fsel_dirlabel.top:		ChainTop
*fsel_dirlabel.bottom:		ChainTop
*fsel_dirlabel.left:		ChainLeft
*fsel_dirlabel.right:		ChainRight
!*fsel_dirlabel.width:		200
*fsel_dirlabel.label:		Directory:
*fsel_dirlabel.fromHoriz:	fsel_fileviewport

*fsel_dirtext.top:		ChainTop
*fsel_dirtext.bottom:		ChainTop
*fsel_dirtext.left:		ChainLeft
*fsel_dirtext.right:		ChainRight
*fsel_dirtext.width:		200
*fsel_dirtext.fromHoriz:	fsel_fileviewport
*fsel_dirtext.fromVert:	fsel_dirlabel
*fsel_dirtext.font:		-*-helvetica-medium-r-*-12-*
*fsel_dirtext.displayCaret:	False

*fsel_dirviewport.top:		ChainTop
*fsel_dirviewport.bottom:	ChainBottom
*fsel_dirviewport.left:	ChainLeft
*fsel_dirviewport.right:	ChainRight
*fsel_dirviewport.width:	200
*fsel_dirviewport.height:	200
*fsel_dirviewport.fromHoriz:	fsel_fileviewport
*fsel_dirviewport.fromVert:	fsel_dirtext

*fsel_okbutton.top:		ChainTop
*fsel_okbutton.bottom:		ChainTop
*fsel_okbutton.left:		ChainRight
*fsel_okbutton.right:		ChainRight
*fsel_okbutton.width:		80
*fsel_okbutton.label:		OK
*fsel_okbutton.fromVert:	fsel_dirlabel
*fsel_okbutton.fromHoriz:	fsel_dirviewport

*fsel_cancelbutton.top:	ChainTop
*fsel_cancelbutton.bottom:	ChainTop
*fsel_cancelbutton.left:	ChainRight
*fsel_cancelbutton.right:	ChainRight
*fsel_cancelbutton.width:	80
*fsel_cancelbutton.label:	Cancel
*fsel_cancelbutton.fromHoriz:	fsel_dirviewport
*fsel_cancelbutton.fromVert:	fsel_okbutton

*font_pshell.title:		Format
!*font_pshell.width:		280
!*font_pshell.height:		225
*font_pshell.x:		80
*font_pshell.y:		80

*font_namelabel.label:		Family Name
*font_sizelabel.label:		Size
*font_attrlabel.label:		Attributes
*font_borderlabel.label:	Borders
*font_adjlabel.label:		Adjustment
*font_nolabel.label:		Misc

*font_okbutton.width:		80
*font_okbutton.label:		OK

*font_cancelbutton.width:	80
*font_cancelbutton.label:	Cancel

*alert*title:			Alert
*alert*borderWidth:		0
*alert*topbox.orientation:	vertical
*alert*buttonbox.orientation:	horizontal

*listshell*title:		List Selection
*listshell*borderWidth:	0
*listshell*topbox.orientation:	horizontal
*listshell*listbox.orientation:	vertical
*listshell*viewport.borderWidth:	1
*listshell*buttonbox.orientation:	vertical
*listshell*okbutton.label:	OK
*listshell*cancelbutton.label:	Cancel

!*form_shell.width:			400
!*form_shell.height:		200
*form_shell*MenuButton.shadowWidth:	1
