window:
	res:
		windowType	wstandard
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
title:
	res:
		leftLabel	T|o|ݒύX
		leftKanjiFont	$(kanjiFont)
		leftFont	$(kanaFont)
		rightLabel	/etc/exports
		rightKanjiFont	$(kanjiFont)
		rightFont	$(kanaFont)
		switch $(COLOR)
			case MONO:
				bitmapPath	$(bitmaps)
				backgroundFile	GRAY3
				transparent	false
				break
		endswitch
	endres:
endtitle:
dialog: dialogs
	res:
		defaultDistance		#(fWidth)
		dialogType		modeless
	endres:
	ditem: dir
		res:
			itemType	bitmap
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			leftLabel	'LfBNgF 12345678901234567890123456789012'
			leftKanjiFont	$(kanjiFont)
			leftFont	$(kanaFont)
		endres:
	endditem:
	ditem: list_label
		res:
			itemType	bitmap
			fromVert	dir
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			label		'zXgꗗ'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: list
		res:
			itemType	scrtext
			fromVert	list_label
			vertDistance	4
			horizDistance	#(fWidth)
			width		#(fWidth)+1*20
			height		#(lHeight)*10+8
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			bind1		select1
			bind2		select2
			file		/dev/null
		endres:
		act:
			put $(line)
			put $(line)@0 $(NEW_NAME)
		endact:
	endditem:
	ditem: select
		res:
			itemType	button
			fromVert	list
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			label		' I@ '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			job select
		endact:
	endditem:
	ditem: belong_label
		res:
			itemType	bitmap
			fromVert	dir
			fromHoriz	list
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*3
			label		'zXg'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: belong
		res:
			itemType	scrtext
			fromVert	belong_label
			fromHoriz	list
			vertDistance	4
			horizDistance	#(fWidth)*3
			width		#(fWidth)+1*20
			height		#(lHeight)*10+8
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			bind1		delete1
			bind2		delete2
			file		/dev/null
		endres:
		act:
			put $(line)
			put $(line)@0 $(DEL_NAME)
		endact:
	endditem:
	ditem: del
		res:
			itemType	button
			fromVert	belong
			fromHoriz	list
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*3
			label		' @ '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			job delete2
		endact:
	endditem:
	ditem: set
		res:
			itemType	button
			fromVert	list_label
			fromHoriz	belong
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		' ρ@X '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			put on $(ONRUN)
			put 101 $(menu_no)
			$(onrun) = sub $(commonPath)/onrun ++48++48
			switch $(SERVER_HOSTS)
				case '':
					$(pid) = bg $(etc)/Nfs/Sexports_3.sh chg $(NEW_LIST) $(SERVER_DIR)
					break
				default:
					$(pid) = bg $(etc)/Nfs/Sexports_3.sh chg $(NEW_LIST) $(SERVER_DIR) $(SERVER_HOSTS)
					break
			endswitch
			$(bgstat) = trap $(pid) cmd_end
		endact:
	endditem:
	ditem: reset
		res:
			itemType	button
			fromVert	set
			fromHoriz	belong
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		' @A '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			cp $(OLD_LIST) $(NEW_LIST)
			job belong_init
		endact:
	endditem:
	ditem: clear
		res:
			itemType	button
			fromVert	reset
			fromHoriz	belong
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		' NA '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			echo -n > $(NEW_LIST)
			job belong_init
		endact:
	endditem:
enddialog:
proc: pre
	$(TMP) = mktemp
	put /tmp/$(TMP) $(NEW_LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(OLD_LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(TMP_LIST)
	$(etc)/Nfs/Sexports_3.sh mklist $(SERVER_HOSTS) $(OLD_LIST)
	cp $(OLD_LIST) $(NEW_LIST)
	put 0 $(menu_no)
	put on $(mapped)
	put off $(opened)
endproc:
proc: close
	switch $(ONRUN)
		case on:
			quit
	endswitch
	job off
	close
endproc:
proc: off
	rm -f $(NEW_LIST) $(OLD_LIST) $(TMP_LIST)
endproc:
proc: open
	setval dir leftLabel 'LfBNgF $(SERVER_DIR)'
	setval list file $(STATION_LIST)
	setval select sensitive false
	job belong_init
endproc:
proc: select1
	switch $(NEW_NAME)
		case '':
			quit
	endswitch
	setval select sensitive true
endproc:
proc: select2
	switch $(NEW_NAME)
		case '':
			quit
	endswitch
	setval select selected true
	job select
	setval select selected false
endproc:
proc: select
	put '  $(NEW_NAME)\L10' > $(TMP_LIST)
	$(bin)/Sfile_op -a -i $(TMP_LIST) -o $(NEW_LIST)
	job belong_init
endproc:
proc: delete1
	switch $(DEL_NAME)
		case '':
			quit
	endswitch
	setval del sensitive true
endproc:
proc: delete2
	switch $(DEL_NAME)
		case '':
			quit
	endswitch
	setval del selected true
	job delete
	setval del selected false
endproc:
proc: delete
	put $(DEL_NAME) > $(TMP_LIST)
	$(bin)/Sfile_op -d -i $(TMP_LIST) -o $(NEW_LIST)
	job belong_init
endproc:
proc: belong_init
	setval belong file $(NEW_LIST)
	setval del sensitive false
endproc:
proc: cmd_end
	close $(onrun)
	buzzer $(main)
	switch $(mapped)
		case on:
			job bgdone
			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:
					job bgdone
					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: bgdone
	switch #(bgstat)
		case 0:
			$(n_end) = sub $(commonPath)/normalEnd ++48++48
			trap $(n_end) n_end
			break
	endswitch
endproc:
proc: n_end
	put off $(ONRUN)
	put 0 $(menu_no)
	put on $(CHANGE_SERVER)
	job close
endproc:
