<?xl version="0.1" encoding="SHIFT_JIS"?>



<vobj type="raw">

<Define> ^win-close-event ()
<Arguments> ^id </Arguments>
        (Quit)
</Define>

<Define> ^main-window ()
<Arguments/>
<Let>
<Env> ^vobj </Env>
<Env> ^current-lang-env </Env>

<vobjTarget>
	<Define> ^current (CurrentEnvironment) </Define>
	<Define> ^info-area ()
	<Arguments>
		^id ^arg
	</Arguments>
	<Let>

		<VScrollView visible="1"
				refer = "attr-indicator"
				children="clear"
				min_size="150,150"
				padding="0,0"
				alignv="fill"
				alignh="fill">
		<HTML name="attr-ind-HTML" eval.flag="on">
			^arg
		</HTML>
		</VScrollView>
	</Let>
	</Define>

	<VWindow	name="main-window"
		resizable="1"
		spacing="0,0"
		descriptor="COSMOS"
		visible="0">

		<VVAlignView
			alignh="fill"
			alignv="fill"
			padding="0,0"
			spacing="0,0"
			visible="1">
			
			<VHAlignView
				alignh="top"
				alignv="top"
				padding="0,0"
				spacing="0,0"
				visible="1">
	
				<VVAlignView alignh="left" spacing="0,0">
					<VHAlignView>
					<VexDraw 	name="grab"
					mouse_click="rotate"
					mouse_press="hilight">
					<VImage image="file:button/grab.gif"/>
					<VImage image="file:button/grab-s.gif"/>
					</VexDraw>
					</VHAlignView>
					<VHAlignView><VStaticText descriptor="Grab" fsize="100"/></VHAlignView>
				</VVAlignView>

				<VVAlignView alignh="left" spacing="0,0">
					<VHAlignView>
					<VexDraw 	name="rotate"
					mouse_click="rotate"
					mouse_press="hilight">
					<VImage image="file:button/rotate.gif"/>
					<VImage image="file:button/rotate-s.gif"/>
					</VexDraw>
					</VHAlignView>
					<VHAlignView><VStaticText descriptor="Rotate" fsize="100"/></VHAlignView>
				</VVAlignView>

				<VVSeparator alignh="left"/>

				<VVAlignView alignh="left" spacing="0,0">
					<VHAlignView>
					<VexDraw  name="zoomin"
						mouse_click="stay"
						mouse_press="hilight"
						disabled="hilight">
					<VImage image="file:button/zoomin.gif"/>
					</VexDraw>
					</VHAlignView>
					<VHAlignView><VStaticText descriptor="ZoomIn" fsize="100"/></VHAlignView>
				</VVAlignView>

				<VVAlignView alignh="left" spacing="0,0">
					<VHAlignView>
					<VexDraw name="zoomout"
						mouse_click="stay"
						mouse_press="hilight"
						disabled="hilight">
					<VImage
					   image="file:button/zoomout.gif"/>
					</VexDraw>
					</VHAlignView>
					<VHAlignView><VStaticText descriptor="ZoomOut" fsize="100"/></VHAlignView>
				</VVAlignView>

				<VVSeparator alignh="left"/>

				<VVAlignView alignh="left" spacing="0,0">
					<VHAlignView>
					<VexDraw 		name="info"
						mouse_click="stay"
						mouse_press="hilight">
						<VImage image="file:button/info.gif"/>
					</VexDraw>
					</VHAlignView>
					<VHAlignView><VStaticText descriptor="Info" fsize="100"/></VHAlignView>
				</VVAlignView>

				<VVAlignView alignh="left" spacing="0,0">
					<VHAlignView>
					<VexDraw 		name="note"
						mouse_click="stay"
						mouse_press="hilight">
						<VImage image="file:button/note.gif"/>
					</VexDraw>
					</VHAlignView>
					<VHAlignView><VStaticText descriptor="Status" fsize="100"/></VHAlignView>
				</VVAlignView>

				<VVAlignView alignh="left" spacing="0,0">
					<VHAlignView>
					<VexDraw 		name="bookmark"
						mouse_click="stay"
						mouse_press="hilight">
						<VImage image="file:button/bookmark.gif"/>
					</VexDraw>
					</VHAlignView>
					<VHAlignView><VStaticText descriptor="Bookmark" fsize="100"/></VHAlignView>
				</VVAlignView>

				<VVSeparator alignh="left"/>

				<VVAlignView alignh="right">

					<VgbIndicate
						alignv="expand"
						name="Indicate"
						visible="1"
						ws="NormalStyle"
						size="100"
						indicate.ary0-11.raw="file:ind1.gif"
						indicate.ary0-11.levels="16"
						indicate.ary0-11.elr="5,0,10,15"
						indicate.ary0-11.pitch="16"
						indicate.ary0.name="BEAM"
						indicate.ary5.name="."
						indicate.ary10.name=" "
						indicate.ary11.name="ERR"
						/>
				</VVAlignView>
			</VHAlignView>

		<VHSeparator padding="0,0" alignv="top"/>

		<VVSplitView
			alignh="fill"
			alignv="fill"
			padding="0,0"
			spacing="0,0"
			visible="1"
			on_resize="expand0"
			shrinkable1="1"
			def_size="400,-1">

			<VHSplitView
				alignh="fill"
				alignv="fill"
				padding="0,0"
				spacing="0,0"
				visible="1"
				shrinkable1="1"
				on_resize="expand0"
				def_size="700,-1">
			<VHAlignView
				alignh="fill"
				alignv="fill"
				padding="0,0"
				spacing="0,0"
				visible="1">

				<VgbFlameStandard 	name="map"
					min_size="150,150"
					padding="0,0"
					alignh="fill"
					alignv="fill"
					descripter="mapr"
					flame.Focus="on"
					flame.Style="exFlameButton"
					flame.DefaultWS="DefaultStyle"
					flame.IndicateTreeEye.raw="file:eye1.gif"
					flame.IndicateTreeEye.elr="v2h1"
				flame.IndicateTreeInfo.raw="file:button1.gif"
				flame.IndicateTreeInfo.elr="v2h1"
				flame.IndicateTreeBase.raw="file:baselock1.gif"
				flame.IndicateTreeBase.elr="v5h1"
					/>

				<VVSeparator alignh="right" padding="0,0"/>

<!--
				<VVAlignView
					padding="8,16"
					alignh="right"
					alignv="fill"
					visible="1">

					<VRadioButton 	name="Grab"
						alignv="top"
						vert_desc="0"
						descriptor="Grab"/>
					<VRadioButton 	name="Rotate"
						alignv="top"
						vert_desc="0"
						descriptor="Rotate"/>
					<VPushButton 	name="ZoomIn"
						alignv="bottom"
						vert_desc="0"
						descriptor="ZoomIn"/>
					<VPushButton 	name="ZoomOut"
						alignv="bottom"
						vert_desc="0"
						descriptor="ZoomOut"/>
				</VVAlignView>
-->

			</VHAlignView>
			<VScrollView visible="1"
					name = "attr-indicator"
					min_size="150,150"
					padding="0,0"
					alignv="fill"
					alignh="fill">
			<VStaticText descriptor="Information Area"/>
			</VScrollView>
			</VHSplitView>

			<VTabView
				alignh="fill"
				alignv="fill"
				visible="1">
			<VTabPage label="^window-main-conditions">
				<VVAlignView
						alignh="fill"
						alignv="fill"
						padding="0,0"
						spacing="0,0"
						visible="1">
				<VHAlignView
						alignv="top"
						padding="0,0"
						spacing="0,0"
						visible="1">
					<VPushButton 	
					name="conditions.NewButton"
						alignh="left"
						alignv="bottom"
						vert_desc="0"
						descriptor="^general-new"/>
					<VPushButton
				 	name="conditions.DelButton"
						alignh="left"
						alignv="bottom"
						vert_desc="0"
						descriptor="^general-del"/>
					<VPushButton
				 	name="conditions.EditButton"
						alignh="left"
						alignv="bottom"
						vert_desc="0"
						descriptor="^general-edit"/>
					
				</VHAlignView>
				<VgbQueryIndicate
					name = "scroll-conditions"
					min_size="500,100"
					padding="0,0"
					alignh="fill"
					alignv="fill"
					visible="1"	
					name="conditions"
				qind.Eye.raw="file:eye1.gif"
				qind.Eye.elr="v2h1"
				qind.NewButton="conditions.NewButton"
				qind.DelButton="conditions.DelButton"
				qind.EditButton="conditions.EditButton"
				qind.EditEvent="e/vobj/qind-edit-window"
				qind.Focus="on"
				qind.Scroll="on"
					/>
				</VVAlignView>
			</VTabPage>
			<VTabPage label="^window-main-coodinates">
					<VxlTreeView
						alignh="fill"
						alignv="fill"
						visible="1"
						name="coordinates"
						min_size="500,100"
						padding="0,0"
						alignv="fill"
						alignh="fill"
				xltreeview.focus ="on"
				xltreeview.scroll = "on"
				xltreeview.Dir="HorizontalLeftToRight"
				xltreeview.Img.raw="file:../../lib/direct.gif"
				xltreeview.Img.elr0="0,0,15,15"
				xltreeview.Img.elr1="0,15,15,30"
				xltreeview.Img.elr2="0,30,15,45"/>
			</VTabPage>
			</VTabView>
		</VVSplitView>

		</VVAlignView>

	</VWindow>
	<gv-resource rid="4">
	<Let>
	<Sub>
	<sts> (gv-resource-status) </sts>
	<size>
		(+ ([GE path="gv-resource/window-size/'2"]
				sts)
				","
				([GE 
				path="gv-resource/window-size/'3"]
				sts))
	</size>
	<radar-query>
		(read-default-conditions)
	</radar-query>
	<zoom-target>
		(read-start-point-URL)
	</zoom-target>
	<buttons>
	<VMarshaler
		objects="grab,rotate,zoomin,zoomout"
		values="3"
		rule="	I	-> VE1:VE0:VE1:VE1 / 1:0:0,
			1:0:C:X	->				/ X:C:X,
			1:0:X:C	->				/ X:X:C,
			C:X:X:X	-> 1:0:E:E 	/ 1:X:X,
			X:C:X:X	-> 0:1:e:e 	/ 2:X:X,
		"/>
<!--
	 	value0 = Mode 1=Grab/2=Rotate ::
		value1 = Click of ZoomIn
		value2 = Click of ZoomOut
-->
	</buttons>
	<gw-server> ([GE path="gv-resource/gateway"
			el="1"
			default=""] 
		preferences)
	</gw-server>
	<gw-port> ([GE path="gv-resource/gateway"
			el="2"
			default=""] 
		preferences)
	</gw-port>
	</Sub>
<!--

			flame.switch.Mode="Remote"
			flame.switch.AgentURL="xlp://isjhp1.nichibun.ac.jp:8080/"
-->
	<Switch>
	<Case> (= gw-server "")
		<VgbFlameStandard	refer="map"
			flame.switch.Mode="Local"/>
	</Case>
	<Case> 1
		<Let>
		<Sub>
		<server>
			(+ "xlp://" gw-server ":" gw-port "/")
		</server>
		</Sub>
		<VgbFlameStandard	refer="map"
			flame.switch.Mode="Remote"
			flame.switch.AgentURL="^server"
			flame.switch.Format="jpeg"
			flame.switch.Quality="90"/>
		</Let>
	</Case>
	</Switch>

	<VgbFlameStandard	refer="map"
			size = "^size"

			flame.ButtonsControl="^buttons"

			flame.IndicateObj="Indicate"
			flame.IndicateTreeObj="coordinates"

			flame.RadarReplaceQuery="radar-query"
			flame.crd.Target="^zoom-target"
			flame.OAttributeHandler="e/current/info-area"

			/>

	<VgbQueryIndicate	refer="conditions"
			qind.Flame="map" />
	</Let>
	</gv-resource>
</vobjTarget>
</Let>
</Define>

<Define> ^call-menu-new () ^sym
<Let>
<Sub>
	<win><main-window/></win>
</Sub>
(PrintStd "=============================== OPEN")
<SetStatus visible="1">
	(GetObjectID win 'main-window)
</SetStatus>
</Let>
</Define>

</vobj>

