window:
	res:
		windowType	wstandard
		iconBitmapFile	SystemControl
		iconBitmapPath  $(icons)
		iconify		true
		cursor		top_left_arrow
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
menu: main_menu
	mitem: file
		res:
			label		' '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		pmitem: m_exit
			res:
				label		' '
				kanjiFont	$(kanjiFont)
				font		$(kanaFont)
			endres:
			act:
				job close
			endact:
		endpmitem:
		pmitem: version
			res:
				label		' '
				kanjiFont	$(kanjiFont)
				font		$(kanaFont)
			endres:
			act:
				put on $(version_on)
				$(version) = sub $(menuPath)/version ++48++48
				trap $(version) version_off
			endact:
		endpmitem:
		pmitem: readme
			res:
				label		README
				kanjiFont	$(kanjiFont)
				font		$(kanaFont)
			endres:
			act:
				put on $(readme_on)
				$(readme) = sub $(menuPath)/readme ++48++48
				trap $(readme) readme_off
			endact:
		endpmitem:
	endmitem:
endmenu:
dialog: main_dialog
	res:
		defaultDistance	10
		dialogType	modeless
	endres:
	ditem: basic
		res:
			width		#(fWidth)*9
			itemType 	button
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	NWS-800
			insensitiveBitmapFile	NWS-800_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		⺻
		endres:
		act:
			put on $(cmd1)
			switch #(uid)
				case 0:
					$(basic) = open $(menuPath)/Basic/main ++48++48
					break
				default:
					$(basic) = open $(menuPath)/Basic/main_notroot ++48++48
					break
			endswitch
			trap $(basic) basic_off
			setval basic sensitive false
			job insense
		endact:
	endditem:
	ditem: network
		res:
			width		#(fWidth)*9
			itemType 	button
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*11
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	Network
			insensitiveBitmapFile	Network_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		Ʈũ
		endres:
		act:
			put on $(cmd2)
			$(network) = open $(menuPath)/Network/main ++48++48
			trap $(network) network_off
			setval network sensitive false
			job insense
		endact:
	endditem:
	ditem: user
		res:
			width		#(fWidth)*9
			itemType 	button
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*21
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	User
			insensitiveBitmapFile	User_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		
		endres:
		act:
			put on $(cmd3)
			$(user) = open $(menuPath)/User/main ++48++48
			trap $(user) user_off
			setval user sensitive false
			job insense
		endact:
	endditem:
	ditem: group
		res:
			width		#(fWidth)*9
			itemType 	button
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*31
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	Group
			insensitiveBitmapFile	Group_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		׷
		endres:
		act:
			put on $(cmd4)
			$(group) = open $(menuPath)/Group/main ++48++48
			trap $(group) group_off
			setval group sensitive false
			job insense
		endact:
	endditem:
	ditem: passwd
		res:
			width		#(fWidth)*9
			itemType 	button
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*41
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	Passwd
			insensitiveBitmapFile	Passwd_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		н
		endres:
		act:
			ifdef $(USER)
			switch #(status)
				case 0:
					break
				default:
					quit
			endswitch
			put on $(cmd5)
			$(etc)/Common/Syp_line.sh chk '$(USER):::' /etc/passwd
			switch #(status)
				case 0:
					$(passwd) = open $(menuPath)/Passwd/passwd ++48++48
					break
				default:
					switch $(YP)
						case server:
						case client:
							$(passwd) = open $(menuPath)/Passwd/yppasswd ++48++48
							break
						default:
							$(passwd) = open $(menuPath)/Passwd/passwd ++48++48
							break
					endswitch
			endswitch
			trap $(passwd) passwd_off
			setval passwd sensitive false
			job insense
		endact:
	endditem:
	ditem: disk
		res:
			width		#(fWidth)*9
			itemType 	button
			fromVert	basic
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	HardDisk
			insensitiveBitmapFile	HardDisk_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		ũ
		endres:
		act:
			put on $(cmd6)
			$(disk) = open $(menuPath)/Disk/main ++48++48
			trap $(disk) disk_off
			setval disk sensitive false
			job insense
		endact:
	endditem:
	ditem: nfs
		res:
			width		#(fWidth)*9
			itemType 	button
			fromVert	basic
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)*11
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	RemoteDisk
			insensitiveBitmapFile	RemoteDisk_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		NFS
		endres:
		act:
			put on $(cmd7)
			switch $(NEWS_OS)
				case 4.\*:
					$(nfs) = open $(menuPath)/Nfs/main ++48++48
					break
				default:
					$(nfs) = open $(menuPath)/Nfs/main_3 ++48++48
					break
			endswitch
			trap $(nfs) nfs_off
			setval nfs sensitive false
			job insense
		endact:
	endditem:
	ditem: display
		res:
			width		#(fWidth)*9
			itemType 	button
			fromVert	basic
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)*21
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	Display
			insensitiveBitmapFile	Display_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		Display
		endres:
		act:
			put on $(cmd8)
			$(display) = open $(menuPath)/Display/main ++48++48
			trap $(display) display_off
			setval display sensitive false
			job insense
		endact:
	endditem:
	ditem: printer
		res:
			width		#(fWidth)*9
			itemType 	button
			fromVert	basic
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)*31
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	LBP
			insensitiveBitmapFile	LBP_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		
		endres:
		act:
			put on $(cmd9)
			$(printer) = open $(menuPath)/Printer/main ++48++48
			trap $(printer) printer_off
			setval printer sensitive false
			job insense
		endact:
	endditem:
	ditem: terminal
		res:
			width		#(fWidth)*9
			itemType 	button
			fromVert	basic
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)*41
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	Terminal
			insensitiveBitmapFile	Terminal_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		͹̳
		endres:
		act:
			put on $(cmd10)
			$(terminal) = open $(menuPath)/Terminal/main ++48++48
			trap $(terminal) terminal_off
			setval terminal sensitive false
			job insense
		endact:
	endditem:
	ditem: mail
		res:
			width		#(fWidth)*9
			itemType 	button
			fromVert	disk
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	Mail
			insensitiveBitmapFile	Mail_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		
		endres:
		act:
			put on $(cmd11)
			$(mail) = open $(menuPath)/Mail/main ++48++48
			trap $(mail) mail_off
			setval mail sensitive false
			job insense
		endact:
	endditem:
	ditem: backup
		res:
			width		#(fWidth)*9
			itemType 	button
			fromVert	disk
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)*11
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	Backup
			insensitiveBitmapFile	Backup_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		Backup
		endres:
		act:
			put on $(cmd12)
			$(backup) = open $(menuPath)/Backup/main ++48++48
			trap $(backup) backup_off
			setval backup sensitive false
			job insense
		endact:
	endditem:
	ditem: restore
		res:
			width		#(fWidth)*9
			itemType 	button
			fromVert	disk
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)*21
			orientation	vertical
			bitmapPath	$(icons)
			bitmapFile	Restore
			insensitiveBitmapFile	Restore_ins
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		Restore
		endres:
		act:
			put on $(cmd13)
			$(restore) = open $(menuPath)/Restore/device ++48++48
			trap $(restore) restore_off
			setval restore sensitive false
			job insense
		endact:
	endditem:
enddialog:
proc: pre
	put 0 $(cmd_no)
	put off $(version_on)
	put off $(readme_on)
	put off $(error_on)
endproc:
proc: close
	switch $(ONRUN)
		case on:
			quit
	endswitch
	switch $(cmd1)
		case on:
			close $(basic)
	endswitch
	switch $(cmd2)
		case on:
			close $(network)
	endswitch
	switch $(cmd3)
		case on:
			close $(user)
	endswitch
	switch $(cmd4)
		case on:
			close $(group)
	endswitch
	switch $(cmd5)
		case on:
			close $(passwd)
	endswitch
	switch $(cmd6)
		case on:
			close $(disk)
	endswitch
	switch $(cmd7)
		case on:
			close $(nfs)
	endswitch
	switch $(cmd8)
		case on:
			close $(display)
	endswitch
	switch $(cmd9)
		case on:
			close $(printer)
	endswitch
	switch $(cmd10)
		case on:
			close $(terminal)
	endswitch
	switch $(cmd11)
		case on:
			close $(mail)
	endswitch
	switch $(cmd12)
		case on:
			close $(backup)
	endswitch
	switch $(cmd13)
		case on:
			close $(restore)
	endswitch
	rm -f $(ODLIST) $(TULIST)
	exit
endproc:
proc: open
	put off $(cmd1)
	put off $(cmd2)
	put off $(cmd3)
	put off $(cmd4)
	put off $(cmd5)
	put off $(cmd6)
	put off $(cmd7)
	put off $(cmd8)
	put off $(cmd9)
	put off $(cmd10)
	put off $(cmd11)
	put off $(cmd12)
	put off $(cmd13)
	job sense
endproc:
proc: icon
	switch $(version_on)
		case on:
			unmap $(version)
			break
	endswitch
	switch $(readme_on)
		case on:
			unmap $(readme)
			break
	endswitch
	switch $(error_on)
		case on:
			unmap $(error)
			break
	endswitch
	switch $(cmd1)
		case on:
			unmap $(basic)
	endswitch
	switch $(cmd2)
		case on:
			unmap $(network)
	endswitch
	switch $(cmd3)
		case on:
			unmap $(user)
	endswitch
	switch $(cmd4)
		case on:
			unmap $(group)
	endswitch
	switch $(cmd5)
		case on:
			unmap $(passwd)
	endswitch
	switch $(cmd6)
		case on:
			unmap $(disk)
	endswitch
	switch $(cmd7)
		case on:
			unmap $(nfs)
	endswitch
	switch $(cmd8)
		case on:
			unmap $(display)
	endswitch
	switch $(cmd9)
		case on:
			unmap $(printer)
	endswitch
	switch $(cmd10)
		case on:
			unmap $(terminal)
	endswitch
	switch $(cmd11)
		case on:
			unmap $(mail)
	endswitch
	switch $(cmd12)
		case on:
			unmap $(backup)
	endswitch
	switch $(cmd13)
		case on:
			unmap $(restore)
	endswitch
endproc:
proc: deicon
	switch $(version_on)
		case on:
			raise $(version)
			map $(version)
			break
	endswitch
	switch $(readme_on)
		case on:
			raise $(readme)
			map $(readme)
			break
	endswitch
	switch $(error_on)
		case on:
			raise $(error)
			map $(error)
			break
	endswitch
	switch $(cmd1)
		case on:
			raise $(basic)
			map $(basic)
	endswitch
	switch $(cmd2)
		case on:
			raise $(network)
			map $(network)
	endswitch
	switch $(cmd3)
		case on:
			raise $(user)
			map $(user)
	endswitch
	switch $(cmd4)
		case on:
			raise $(group)
			map $(group)
	endswitch
	switch $(cmd5)
		case on:
			raise $(passwd)
			map $(passwd)
	endswitch
	switch $(cmd6)
		case on:
			raise $(disk)
			map $(disk)
	endswitch
	switch $(cmd7)
		case on:
			raise $(nfs)
			map $(nfs)
	endswitch
	switch $(cmd8)
		case on:
			raise $(display)
			map $(display)
	endswitch
	switch $(cmd9)
		case on:
			raise $(printer)
			map $(printer)
	endswitch
	switch $(cmd10)
		case on:
			raise $(terminal)
			map $(terminal)
	endswitch
	switch $(cmd11)
		case on:
			raise $(mail)
			map $(mail)
	endswitch
	switch $(cmd12)
		case on:
			raise $(backup)
			map $(backup)
	endswitch
	switch $(cmd13)
		case on:
			raise $(restore)
			map $(restore)
	endswitch
endproc:
proc: title
	switch $(version_on)
		case on:
			move $(version)
			raise $(version)
			break
	endswitch
	switch $(readme_on)
		case on:
			move $(readme)
			raise $(readme)
			break
	endswitch
	switch $(error_on)
		case on:
			move $(error)
			raise $(error)
			break
	endswitch
endproc:
proc: raise
	switch $(version_on)
		case on:
			raise $(version)
			break
	endswitch
	switch $(readme_on)
		case on:
			raise $(readme)
			break
	endswitch
	switch $(error_on)
		case on:
			raise $(error)
			break
	endswitch
endproc:
proc: child_off
	put 0 $(cmd_no)
	job sense
endproc:
proc: version_off
	put off $(version_on)
endproc:
proc: readme_off
	put off $(readme_on)
endproc:
proc: error_off
	put off $(error_on)
endproc:
proc: sense
	setval basic sensitive true
	setval network sensitive true
	setval user sensitive true
	setval group sensitive true
	setval passwd sensitive true
	setval disk sensitive true
	setval nfs sensitive true
	setval display sensitive true
	setval printer sensitive true
	setval terminal sensitive true
	setval mail sensitive true
	setval backup sensitive true
	setval restore sensitive true
endproc:
proc: insense
	setval basic sensitive false
	setval network sensitive false
	setval user sensitive false
	setval group sensitive false
	setval passwd sensitive false
	setval disk sensitive false
	setval nfs sensitive false
	setval display sensitive false
	setval printer sensitive false
	setval terminal sensitive false
	setval mail sensitive false
	setval backup sensitive false
	setval restore sensitive false
endproc:
proc: basic_off
	job child_off
	put off $(cmd1)
endproc:
proc: network_off
	job child_off
	put off $(cmd2)
endproc:
proc: user_off
	job child_off
	put off $(cmd3)
endproc:
proc: group_off
	job child_off
	put off $(cmd4)
endproc:
proc: passwd_off
	job child_off
	put off $(cmd5)
endproc:
proc: disk_off
	job child_off
	put off $(cmd6)
endproc:
proc: nfs_off
	job child_off
	put off $(cmd7)
endproc:
proc: display_off
	job child_off
	put off $(cmd8)
endproc:
proc: printer_off
	job child_off
	put off $(cmd9)
endproc:
proc: terminal_off
	job child_off
	put off $(cmd10)
endproc:
proc: mail_off
	job child_off
	put off $(cmd11)
endproc:
proc: backup_off
	job child_off
	put off $(cmd12)
endproc:
proc: restore_off
	job child_off
	put off $(cmd13)
endproc:
