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
	endres:
	ditem: msg1
		res:
			itemType	bitmap
			leftLabel	ѡݥƥȤ߹碌ꤷƲ
			leftKanjiFont	$(kanjiFont)
			leftFont	$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
		endres:
	endditem:
	ditem: msg2
		res:
			itemType	bitmap
			leftLabel	ѡݥƥ̾(MBytes)
			fromHoriz	msg1
			leftKanjiFont	$(kanjiFont)
			leftFont	$(kanaFont)
			vertDistance	#(fWidth)*2-4
			horizDistance	#(fWidth)*4
		endres:
	endditem:
	ditem: 1c
		res:
			itemType	button
			fromVert	msg2
			label		c(199)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			borderWidth	1
			width		#(fWidth)*41+16
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
		endres:
		act:
			put 1 $(kind)
			job change
		endact:
	endditem:
	ditem: 2a
		res:
			itemType	button
			fromVert	1c
			label		a(7)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			borderWidth	1
			width		#(fWidth)*4+6
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
			highlightMode	0
			selectMode	0
		endres:
		act:
			put 2 $(kind)
			job change
		endact:
	endditem:
	ditem: 2b
		res:
			itemType	button
			label		b(16)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			fromVert	1c
			fromHoriz	2a
			vertDistance	#(fWidth)
			horizDistance	-1
			borderWidth	1
			width		#(fWidth)*6
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
			highlightMode	0
			selectMode	0
		endres:
		act:
			put 2 $(kind)
			job change
		endact:
	endditem:
	ditem: 2d
		res:
			itemType	button
			label		d(7)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			fromVert	1c
			fromHoriz	2b
			vertDistance	#(fWidth)
			horizDistance	-1
			borderWidth	1
			width		#(fWidth)*4+6
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
			highlightMode	0
			selectMode	0
		endres:
		act:
			put 2 $(kind)
			job change
		endact:
	endditem:
	ditem: 2e
		res:
			itemType	button
			label		e(27)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			fromVert	1c
			fromHoriz	2d
			vertDistance	#(fWidth)
			horizDistance	-1
			borderWidth	1
			width		#(fWidth)*9
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
			highlightMode	0
			selectMode	0
		endres:
		act:
			put 2 $(kind)
			job change
		endact:
	endditem:
	ditem: 2f
		res:
			itemType	button
			label		f(140)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			fromVert	1c
			fromHoriz	2e
			vertDistance	#(fWidth)
			horizDistance	-1
			borderWidth	1
			width		#(fWidth)*18
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
			highlightMode	0
			selectMode	0
		endres:
		act:
			put 2 $(kind)
			job change
		endact:
	endditem:
	ditem: 3a
		res:
			itemType	button
			fromVert	2a
			label		a(7)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			borderWidth	1
			width		#(fWidth)*4+6
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
			highlightMode	0
			selectMode	0
		endres:
		act:
			put 3 $(kind)
			job change
		endact:
	endditem:
	ditem: 3b
		res:
			itemType	button
			label		b(16)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			fromVert	2a
			fromHoriz	3a
			vertDistance	#(fWidth)
			horizDistance	-1
			borderWidth	1
			width		#(fWidth)*6
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
			highlightMode	0
			selectMode	0
		endres:
		act:
			put 3 $(kind)
			job change
		endact:
	endditem:
	ditem: 3g
		res:
			itemType	button
			label		g(175)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			fromVert	2a
			fromHoriz	3b
			vertDistance	#(fWidth)
			horizDistance	-1
			borderWidth	1
			width		#(fWidth)*31+8
			translations	'<Btn1Down>: set() notify() unset()'
			bitmapPath	$(bitmaps)
			highlightMode	0
			selectMode	0
		endres:
		act:
			put 3 $(kind)
			job change
		endact:
	endditem:
	ditem: select
		res:
			itemType	button
			fromVert	msg2
			fromHoriz	1c
			label		'  '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
		endres:
		act:
			switch #(kind)
				case 1:
				case 2:
				case 3:
					put hd199 $(DRIVE_TYPE)
					break
			endswitch
			job off
			close
		endact:
	endditem:
	ditem: note1
		res:
			itemType	bitmap
			fromVert	3a
			label		'ʸ[xxx]'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			foreground	brown
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			bitmapPath	$(bitmaps)
		endres:
	endditem:
	ditem: note2
		res:
			itemType	bitmap
			fromVert	3a
			fromHoriz	note1
			label		'ϴ˻ѤƤѡݥƥǤ뤳Ȥ򼨤Ƥޤ'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	0
		endres:
	endditem:
enddialog:
proc: pre
	put 0 $(menu_no)
	put on $(mapped)
	put off $(opened)
	put 0 $(kind)
	put 0 $(cur_kind)
	put off $(a)
	put off $(c)
	put off $(d)
	put off $(e)
	put off $(f)
	put off $(g)
endproc:
proc: close
	switch $(ONRUN)
		case on:
			quit
	endswitch
	job off
	put '' $(DRIVE_TYPE)
	close
endproc:
proc: off
	job unselect
	switch $(c)
		case on:
			setval 1c label c(199)
			setval 1c foreground black
			setval 1c selected false
			setval 1c selectedBack #aebddb
			setval 1c selectedFore black
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 1c backgroundFile close_box_16::CBM
					break
			endswitch
			quit
	endswitch
	switch $(a)
		case on:
			setval 2a label a(7)
			setval 3a label a(7)
			setval 2a foreground black
			setval 3a foreground black
			setval 2a selected false
			setval 3a selected false
			setval 2a selectedBack #aebddb
			setval 3a selectedBack #aebddb
			setval 2a selectedFore black
			setval 3a selectedFore black
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 2a backgroundFile close_box_16::CBM
					setval 3a backgroundFile close_box_16::CBM
					break
			endswitch
			break
	endswitch
	switch $(g)
		case on:
			setval 3g label g(175)
			setval 3g foreground black
			setval 3g selected false
			setval 3g selectedBack #aebddb
			setval 3g selectedFore black
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 3g backgroundFile close_box_16::CBM
					break
			endswitch
			quit
	endswitch
	switch $(f)
		case on:
			setval 2f label f(140)
			setval 2f foreground black
			setval 2f selected false
			setval 2f selectedBack #aebddb
			setval 2f selectedFore black
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 2f backgroundFile close_box_16::CBM
					break
			endswitch
	endswitch
	switch $(e)
		case on:
			setval 2e label e(27)
			setval 2e foreground black
			setval 2e selected false
			setval 2e selectedBack #aebddb
			setval 2e selectedFore black
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 2e backgroundFile close_box_16::CBM
					break
			endswitch
	endswitch
	switch $(d)
		case on:
			setval 2d label d(7)
			setval 2d foreground black
			setval 2d selected false
			setval 2d selectedBack #aebddb
			setval 2d selectedFore black
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 2d backgroundFile close_box_16::CBM
					break
			endswitch
	endswitch
endproc:
proc: unselect
	switch #(cur_kind)
		case 1:
			setval 1c selected false
			break
		case 2:
			setval 2a borderColor black
			setval 2b borderColor black
			setval 2d borderColor black
			setval 2e borderColor black
			setval 2f borderColor black
			setval 2a selected false
			setval 2b selected false
			setval 2d selected false
			setval 2e selected false
			setval 2f selected false
			break
		case 3:
			setval 3a borderColor black
			setval 3b borderColor black
			setval 3g borderColor black
			setval 3a selected false
			setval 3b selected false
			setval 3g selected false
			break
	endswitch
endproc:
proc: open
	setval select sensitive false
	put /dev/r$(DRIVE_NO) $(dev)
	$(bin)/Sgetdinfo $(DRIVE_NO) 2> /dev/null
	switch #(status)
		case 0x100:
			job noinfo
			break
		case 0x200:
		case 0x300:
			quit
		case 0:
			put $(stdout) $(DISK_TYPE)
			switch $(DISK_TYPE)
				case hd199:
				case HD199:
					job hd199
						break
			endswitch
			break
	endswitch
	switch $(COLOR)
		case MONO:
		case GRAY:
			setval note1 backgroundFile GRAY3
			break
	endswitch
endproc:
proc: noinfo
	put hd199 $(DISK_TYPE)
	job hd199
endproc:
proc: hd199
	$(bin)/Smnt_check $(dev)c $(DISK_TYPE) 2 1 2> /dev/null
	switch #(status)
		case 0:
			put on $(c)
	endswitch
	$(bin)/Smnt_check $(dev)a $(DISK_TYPE) 0 1 2> /dev/null
	switch #(status)
		case 0:
			put on $(a)
			put off $(c)
	endswitch
	$(bin)/Smnt_check $(dev)g $(DISK_TYPE) 6 1 2> /dev/null
	switch #(status)
		case 0:
			put on $(g)
			put off $(c)
	endswitch
	$(bin)/Smnt_check $(dev)f $(DISK_TYPE) 5 1 2> /dev/null
	switch #(status)
		case 0:
			put on $(f)
			put off $(g)
			put off $(c)
	endswitch
	$(bin)/Smnt_check $(dev)e $(DISK_TYPE) 4 1 2> /dev/null
	switch #(status)
		case 0:
			put on $(e)
			put off $(g)
			put off $(c)
	endswitch
	$(bin)/Smnt_check $(dev)d $(DISK_TYPE) 3 1 2> /dev/null
	switch #(status)
		case 0:
			put on $(d)
			put off $(g)
			put off $(c)
	endswitch
	switch $(c)
		case on:
			setval 1c label C[199]
			setval 1c foreground brown
			setval 1c selectedBack brown
			setval 1c selectedFore #e6e6e1
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 1c backgroundFile GRAY3
					break
			endswitch
	endswitch
	switch $(a)
		case on:
			setval 2a label A[7]
			setval 3a label A[7]
			setval 2a foreground brown
			setval 3a foreground brown
			setval 2a selectedBack brown
			setval 3a selectedBack brown
			setval 2a selectedFore #e6e6e1
			setval 3a selectedFore #e6e6e1
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 2a backgroundFile GRAY3
					setval 3a backgroundFile GRAY3
					break
			endswitch
	endswitch
	switch $(g)
		case on:
			setval 3g label G[175]
			setval 3g foreground brown
			setval 3g selectedBack brown
			setval 3g selectedFore #e6e6e1
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 3g backgroundFile GRAY3
					break
			endswitch
	endswitch
	switch $(f)
		case on:
			setval 2f label F[140]
			setval 2f foreground brown
			setval 2f selectedBack brown
			setval 2f selectedFore #e6e6e1
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 2f backgroundFile GRAY3
					break
			endswitch
	endswitch
	switch $(e)
		case on:
			setval 2e label E[27]
			setval 2e foreground brown
			setval 2e selectedBack brown
			setval 2e selectedFore #e6e6e1
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 2e backgroundFile GRAY3
					break
			endswitch
	endswitch
	switch $(d)
		case on:
			setval 2d label D[7]
			setval 2d foreground brown
			setval 2d selectedBack brown
			setval 2d selectedFore #e6e6e1
			switch $(COLOR)
				case MONO:
				case GRAY:
					setval 2d backgroundFile GRAY3
					break
			endswitch
	endswitch
endproc:
proc: change
	switch #(cur_kind)
		case 0:
			setval select sensitive true
	endswitch
	switch #(kind)
		case #(cur_kind):
			quit
	endswitch
	job unselect
	put $(kind) $(cur_kind)
	switch #(cur_kind)
		case 1:
			put c $(PARTITIONS)
			setval 1c selected true
			break
		case 2:
			put abdef $(PARTITIONS)
			setval 2a borderColor white
			setval 2b borderColor white
			setval 2d borderColor white
			setval 2e borderColor white
			setval 2f borderColor white
			setval 2a selected true
			setval 2b selected true
			setval 2d selected true
			setval 2e selected true
			setval 2f selected true
			break
		case 3:
			put abg $(PARTITIONS)
			setval 3a borderColor white
			setval 3b borderColor white
			setval 3g borderColor white
			setval 3a selected true
			setval 3b selected true
			setval 3g selected true
			break
	endswitch
endproc:
proc: cmd_end
	buzzer $(main)
	close $(onrun)
	switch $(mapped)
		case on:
			$(n_end) = sub $(commonPath)/normalEnd ++48++48
			trap $(n_end) n_end
			break
		case off:
			put on $(opened)
			break
	endswitch
	put 102 $(menu_no)
endproc:
proc: unmap
	switch #(menu_no)
		case 101:
			unmap $(onrun)
			break
		case 102:
			unmap $(n_end)
			break
	endswitch
	put off $(mapped)
endproc:
proc: map
	switch #(menu_no)
		case 101:
			move $(onrun)
			raise $(onrun)
			map $(onrun)
			break
		case 102:
			switch $(opened)
				case on:
					$(n_end) = sub $(commonPath)/normalEnd ++48++48
					trap $(n_end) n_end
					break
				case off:
					move $(n_end)
					raise $(n_end)
					map $(n_end)
					break
			endswitch
	endswitch
	put on $(mapped)
	put off $(opened)
endproc:
proc: title
	job move
	job up
endproc:
proc: raise
	job up
endproc:
proc: move
	switch #(menu_no)
		case 101:
			move $(onrun)
			break
		case 102:
			move $(n_end)
			break
	endswitch
endproc:
proc: up
	switch #(menu_no)
		case 101:
			raise $(onrun)
			break
		case 102:
			raise $(n_end)
			break
	endswitch
endproc:
proc: n_end
	put off $(ONRUN)
	put 0 $(menu_no)
endproc:
proc: confirm
	switch $(answer)
		case cancel:
			put 0 $(menu_no)
			quit
	endswitch
	put on $(ONRUN)
	put 101 $(menu_no)
	$(onrun) = sub $(commonPath)/onrun ++48++48
endproc:
proc: sub_end
	put 0 $(menu_no)
endproc:
