! SpinBox Style

*fontList: -adobe-helvetica-medium-r-normal--*-180-*=R,\
	   -adobe-helvetica-bold-r-normal--*-240-*=title
*XmText.fontList: *courier-medium-r-normal-*-*-180-*

*Background: gray75

! SpinBox template: %0 = field width, %1 = editable
!
_Styles_.SpinBoxFlatBeginning: \
	.layout: 		Row { field Fixed down Fixed up }
_Styles_.SpinBoxFlatEnd: \
	.layout: 		Row { Fixed down Fixed up field }
_Styles_.SpinBoxBeginning: \
	.layout: 		Row { field Fixed Col { up down } }
_Styles_.SpinBoxEnd: \
	.layout: 		Row { Fixed Col { up down } field }
_Styles_.SpinBoxSplit: \
	.layout: 		Row { down field up }

_Templates_.SpinBox: \
	.xmtType:		XmtLayout\n\
	.xmtChildren:		XmText field; XmArrowButton up, down; \n\
	.field.columns:		%0 \n\
	.field.editable:	%1 \n\
	.field.cursorPositionVisible: True \n\
	.XmArrowButton.layoutMarginHeight: 0 \n\
	.XmArrowButton.layoutMarginWdith:  2 \n\
	.XmArrowButton.traversalOn: False \n\
	.down.arrowDirection: XmARROW_DOWN 

Spin.xmtChildren: XmtLayout l;

*l.xmtChildren: XmLabel title; \
		SpinBoxFlatBeginning SpinBox(8,False) numeric; \
		SpinBoxFlatEnd       SpinBox(8,True) symbolic; \
		SpinBoxSplit         SpinBox(8,False) timer; \
		SpinBoxBeginning      SpinBox(8,False) float; \
		SpinBoxEnd           SpinBox(8,False) int;

*l.layout:	title \
"Hit and hold the arrow buttons to select choices.\n\
You can also use up and down arrow keys instead.\n\
A spin box is editable if the cursor is visible." = \
		FlushRight Caption "Select A World Cup Year:" numeric = \
		FlushRight Caption "Select A Color(editable):" symbolic = \
		FlushRight Caption "This is a FAST timer:" timer = \
		FlushRight Caption "SunMicrosystems Stock Price: " float \
		FlushRight Caption "Number of shares:" int

!*numeric.field.Translations: #override \
!	<KeyPress>k: scm("numeric-turn 'previous") \n\
!	<KeyPress>j: scm("numeric-turn 'next") \n\
!	<FocusIn>: scm("numeric-focus")

*l.title.labelString: @f[title]\
    Spin Box Demonstraction\n\
@fR    by Thomas Kwong
*l.title.foreground: navy
