window:
	res:
		windowType	wstandard
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
title:
	res:
		leftLabel	'׷(xxxxxxxxxx)  '
		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: list_label
		res:
			itemType	bitmap
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*3
			label		' ϶'
			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		'   '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			job select
		endact:
	endditem:
	ditem: member_label
		res:
			itemType	bitmap
			fromHoriz	list
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*5
			label		''
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: member
		res:
			itemType	scrtext
			fromVert	member_label
			fromHoriz	list
			vertDistance	4
			horizDistance	#(fWidth)*3
			width		#(fWidth)+1*14
			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	member
			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	member
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		'   '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			put on $(ONRUN)
			put 101 $(menu_no)
			$(onrun) = sub $(commonPath)/onrun ++48++48
			$(pid) = bg $(etc)/Group/Sgroup_memb.sh chg $(GROUP_NAME) $(NEW_LIST)
			$(bgstat) = trap $(pid) cmd_end
		endact:
	endditem:
	ditem: reset
		res:
			itemType	button
			fromVert	set
			fromHoriz	member
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		'   '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			/bin/cp $(CUR_LIST) $(NEW_LIST)
			job member_init
		endact:
	endditem:
	ditem: clear
		res:
			itemType	button
			fromVert	reset
			fromHoriz	member
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		' Ŭ '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			echo -n > $(NEW_LIST)
			job member_init
		endact:
	endditem:
enddialog:
proc: pre
	$(TMP) = mktemp
	put /tmp/$(TMP) $(LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(CUR_LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(NEW_LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(TMP_LIST)
	$(bin)/Spw_check -lui -o $(CUR_LIST)
	sort -u $(CUR_LIST) > $(LIST)
	$(etc)/Group/Sgroup_memb.sh disp $(GROUP_NAME) > $(CUR_LIST)
	/bin/cp $(CUR_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 $(LIST) $(CUR_LIST) $(NEW_LIST) $(TMP_LIST)
endproc:
proc: open
	setval title leftLabel '׷($(GROUP_NAME))  '
	setval list file $(LIST)
	setval select sensitive false
	job member_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 member_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 member_init
endproc:
proc: member_init
	setval member file $(NEW_LIST)
	setval del sensitive false
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 on $(CHANGE_GROUP)
	put off $(ONRUN)
	put 0 $(menu_no)
	job close
endproc:
