window:
	res:
		windowType	wstandard
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
title:
	res:
		leftLabel	fBXvCݒ
		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: msg_xhosts
		res:
			itemType	bitmap
			label		|g̎gp\ȃzXg
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
		endres:
	endditem:
	ditem: info_xhosts
		res:
			itemType	viewtext
			fromVert	msg_xhosts
			width		#(fWidth)+1*26
			height		#(lHeight)*7+8
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*3
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			file		/dev/null
		endres:
	endditem:
	ditem: chg_xhosts
		res:
			itemType	button
			label		' ρ@X '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			fromVert	msg_xhosts
			fromHoriz	info_xhosts
			vertDistance	#(fHeight)*5
			horizDistance	#(fWidth)
		endres:
		act:
			put off $(CHANGE_XHOSTS)
			put 1 $(cmd)
			put 1 $(menu_no)
			$(sub) = sub $(menu)/x0_hosts ++48++48
			trap $(sub) sub_end
		endact:
	endditem:
enddialog:
proc: pre
	put $(menuPath)/Display $(menu)
	put $(icons) $(okPath)
	put Display $(okFile)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(X0.HOSTS)
	global $(CHANGE_XHOSTS)
	put 0 $(menu_no)
	put 0 $(cmd)
endproc:
proc: close
	switch $(ONRUN)
		case on:
			quit
	endswitch
	job off
	close
endproc:
proc: off
	switch #(menu_no)
		case 1:
			close $(sub)
			break
	endswitch
	rm -f $(X0.HOSTS)
endproc:
proc: open
	job xhost_init
	job btn_init
endproc:
proc: btn_init
	switch #(uid)
		case 0:
			break
		default:
			setval chg_xhosts sensitive false
			break
	endswitch
endproc:
proc: xhost_init
	sed 's/^/  /' /etc/X0.hosts > $(X0.HOSTS)
	setval info_xhosts file $(X0.HOSTS)
endproc:
proc: sub_end
	put 0 $(menu_no)
	job btn_init
	switch #(cmd)
		case 1:
			switch $(CHANGE_XHOSTS)
				case on:
					job xhost_init
					break
			endswitch
			break
	endswitch
endproc:
proc:unmap
	switch #(menu_no)
		case 1:
			unmap $(sub)
			break
	endswitch
endproc:
proc: map
	switch #(menu_no)
		case 1:
			move $(sub)
			raise $(sub)
			map $(sub)
			break
	endswitch
endproc:
