window:
	res:
		windowType	wstandard
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
title:
	res:
		leftLabel	¥ð
		leftKanjiFont	$(kanjiFont)
		leftFont	$(kanaFont)
		switch $(COLOR)
			case MONO:
				bitmapPath	$(bitmaps)
				backgroundFile	GRAY3
				transparent	false
				break
		endswitch
	endres:
endtitle:
dialog: dialogs
	res:
		defaultDistance		#(fWidth)
		dialogType		modeless
		defaultButton		set
	endres:
	ditem: date
		res:
			itemType	bitmap
			label		' ¥:'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
		endres:
	endditem:
	ditem: year
		res:
			itemType	numtext
			fromHoriz	date
			vertDistance	#(fWidth)
			horizDistance	4
			length		4
			width		#(fWidth)*4+4
			height		#(fHeight)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(year)
		endact:
	endditem:
	ditem: year_l
		res:
			itemType	bitmap
			fromHoriz	year
			vertDistance	#(fWidth)
			horizDistance	2
			label		.
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: month
		res:
			itemType	numtext
			fromHoriz	year_l
			vertDistance	#(fWidth)
			horizDistance	2
			length		2
			width		#(fWidth)*2+4
			height		#(fHeight)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(month)
		endact:
	endditem:
	ditem: month_l
		res:
			itemType	bitmap
			fromHoriz	month
			vertDistance	#(fWidth)
			horizDistance	2
			label		.
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: day
		res:
			itemType	numtext
			fromHoriz	month_l
			vertDistance	#(fWidth)
			horizDistance	2
			length		2
			width		#(fWidth)*2+4
			height		#(fHeight)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(day)
		endact:
	endditem:
	ditem: time
		res:
			itemType	bitmap
			fromVert	date
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			label		' :'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: hour
		res:
			itemType	numtext
			fromVert	date
			fromHoriz	time
			vertDistance	#(fWidth)
			horizDistance	2
			length		2
			width		#(fWidth)*2+4
			height		#(fHeight)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(hour)
		endact:
	endditem:
	ditem: hour_l
		res:
			itemType	bitmap
			fromVert	date
			fromHoriz	hour
			vertDistance	#(fWidth)
			horizDistance	2
			label		.
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: min
		res:
			itemType	numtext
			fromVert	date
			fromHoriz	hour_l
			vertDistance	#(fWidth)
			horizDistance	2
			length		2
			width		#(fWidth)*2+4
			height		#(fHeight)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(min)
		endact:
	endditem:
	ditem: min_l
		res:
			itemType	bitmap
			fromVert	date
			fromHoriz	min
			vertDistance	#(fWidth)
			horizDistance	2
			label		.
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: sec
		res:
			itemType	numtext
			fromVert	date
			fromHoriz	min_l
			vertDistance	#(fWidth)
			horizDistance	2
			length		2
			width		#(fWidth)*2+4
			height		#(fHeight)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(sec)
		endact:
	endditem:
	ditem: ampm
		res:
			itemType	button
			fromVert	date
			fromHoriz	sec
			vertDistance	#(fWidth)
			horizDistance	4
			label		'AM'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			switch $(ampm)
				case PM:
					put AM $(ampm)
					break
				case AM:
					put PM $(ampm)
					break
			endswitch
			setval ampm label $(ampm)
		endact:
	endditem:
	ditem: set
		res:
			itemType	button
			fromHoriz	ampm
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			label		'   '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			switch $(ampm)
				case AM:
					put 0 $(ampm_v)
					break
				case PM:
					put 1 $(ampm_v)
					break
			endswitch
			$(bin)/Snet_time -s $(year) $(month) $(day) $(ampm_v) $(hour) $(min) $(sec)
			switch #(status)
				case 0:
					put on $(TIME_SET)
					close
					break
				default:
					put 10 $(menu_no)
					put 'Invalid date or time is specified.' $(confirm_msg1)
					$(err) = sub $(commonPath)/error1 ++48++48
					trap $(err) err
					break
			endswitch
		endact:
	endditem:
	ditem: ok
		res:
			itemType	button
			fromVert	set
			fromHoriz	ampm
			label		' ϡ '
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			put ok $(TIME_SET)
			close
		endact:
	endditem:
enddialog:
proc: close
	put off $(TIME_SET)
	close
endproc:
proc: open
	put off $(TIME_SET)
	$(bin)/Snet_time -g -e
	setval year string $(stdout)@0
	setval month string $(stdout)@1
	setval day string $(stdout)@2
	setval hour string $(stdout)@5
	setval min string $(stdout)@6
	setval sec string $(stdout)@7
	switch $(stdout)@4
		case AM:
			put AM $(ampm)
			break
		case PM:
			put PM $(ampm)
			break
	endswitch
	setval ampm label $(ampm)
	put 0 $(menu_no)
endproc:
proc: err
	put 0 $(menu_no)
endproc:
proc: unmap
	switch #(menu_no)
		case 10:
			unmap $(err)
			break
	endswitch
endproc:
proc: map
	switch #(menu_no)
		case 10:
			move $(err)
			raise $(err)
			map $(err)
			break
	endswitch
endproc:
proc: title
	job move
	job up
endproc:
proc: raise
	job up
endproc:
proc: move
	switch #(menu_no)
		case 10:
			move $(err)
			break
	endswitch
endproc:
proc: up
	switch #(menu_no)
		case 10:
			raise $(err)
			break
	endswitch
endproc:
