
<?xl version="0.1" encoding="EUC-JP"?>

<WritingStyle stylename="DefaultStyle">
<Font fontname="-*-r-normal--*-iso8859-1" method="nearly"/>
<Font fontname="-*-r-normal--*-iso8859-2" method="nearly"/>
<Font fontname="-*-r-normal--*-iso8859-3" method="nearly"/>
<Font fontname="-*-r-normal--*-iso8859-4" method="nearly"/>
<Font fontname="-*-r-normal--*-iso8859-5" method="nearly"/>
<Font fontname="-*-r-normal--*-iso8859-6" method="nearly"/>
<Font fontname="-*-r-normal--*-iso8859-7" method="nearly"/>
<Font fontname="-*-r-normal--*-iso8859-8" method="nearly"/>
<Font fontname="-*-r-normal--*-iso8859-9" method="nearly"/>
<Font fontname="-*-r-normal--*-jisx0208.1978-0" method="nearly"/>
<Font fontname="-*-r-normal--*-jisx0208.1983-0" method="nearly"/>
<Font fontname="-*-r-normal--*-jisx0208.1990-0" method="nearly"/>
<Font fontname="-*-r-normal--*-jisx0212.1990-0" method="nearly"/>

<Font fontname="times bold" method="nearly"/>
<Font fontname="Lucida Grande" method="nearly"/>
<Font fontname="Geneva" method="nearly"/>
<Font fontname="¥Ò¥é¥®¥Î³Ñ¥´ Pro W6" method="nearly"/>
<Font fontname="Osaka" method="nearly"/>
</WritingStyle>


<vobj type="raw">

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

<Define> ^set-window-size ()
<Arguments> ^w ^h </Arguments>
<Sequence>
	<SetStatus size.w="^w" size.h="^h">
		1001
	</SetStatus>
	(List <GetStatus flags="size"> 1001 </GetStatus> w h)
</Sequence>
</Define>

<Define> ^shrink-tree ()
<Arguments> ^id </Arguments>
<Sequence> ()
	<Define> ^w-size ([GetStatus flags="size"] 1001) </Define>
	<Define> ^w-w (car (cdr (GetElement w-size 'size.w))) </Define>
	<Define> ^w-h (car (cdr (GetElement w-size 'size.h))) </Define>
	<Define> ^tv-size ([GetStatus flags="size"] tv) </Define>
	<Define> ^tv-w (car (cdr (GetElement tv-size 'size.w))) </Define>
	<Define> ^tv-h (car (cdr (GetElement tv-size 'size.h))) </Define>

	([SetStatus visible="0"] s1)
	([SetStatus visible="0"] s2)
	([SetStatus descriptor="expand" value_event_handler="expand-tree"] se)

	(Layout)
	<Define> ^tv-size ([GetStatus flags="size"] tv) </Define>
	<Define> ^tv-h2 (car (cdr (GetElement tv-size 'size.h))) </Define>
	(set-window-size w-w (+ (- tv-h2 tv-h) w-h))
</Sequence>
</Define>

<Define> ^expand-tree ()
<Arguments> ^id </Arguments>
<Sequence> ()
	<Define> ^w-size ([GetStatus flags="size"] 1001) </Define>
	<Define> ^w-w (car (cdr (GetElement w-size 'size.w))) </Define>
	<Define> ^w-h (car (cdr (GetElement w-size 'size.h))) </Define>
	<Define> ^tv-size ([GetStatus flags="size"] tv) </Define>
	<Define> ^tv-w (car (cdr (GetElement tv-size 'size.w))) </Define>
	<Define> ^tv-h (car (cdr (GetElement tv-size 'size.h))) </Define>

	([SetStatus visible="1"] s1)
	([SetStatus visible="1"] s2)
	([SetStatus descriptor=" shrink " value_event_handler="shrink-tree"] se)

	(Layout)
	<Define> ^tv-size ([GetStatus flags="size"] tv) </Define>
	<Define> ^tv-h2 (car (cdr (GetElement tv-size 'size.h))) </Define>
	(set-window-size w-w (+ (- tv-h2 tv-h) w-h))
</Sequence>
</Define>

<Define> ^test-win
<VWindow descriptor="XL test" visible="0" close_event_handler="win-close-event" resizable="1">
	<VVAlignView alignv="FILL" alignh="FILL">
		<VDraw image="file:gb.gif" use_alpha="1" alignv="FILL"/>
		<VTableView alignv="TOP" alignh="FILL" rows="3" cols="2" spacing="0" name="tv">
			<TR>
				<TD><VPushButton name="se" descriptor=" shrink " value_event_handler="shrink-tree"/></TD>
				<TD><VStaticText descriptor="TEST - 0"/></TD>
			</TR>
			<TR>
				<TD></TD>
				<TD><VStaticText descriptor="TEST - 1" name="s1"/></TD>
			</TR>
			<TR>
				<TD></TD>
				<TD><VStaticText descriptor="TEST - 2" name="s2"/></TD>
			</TR>
		</VTableView>
	</VVAlignView>
</VWindow>
</Define>

<Define> ^se (GetObjectID test-win 'se)</Define>
<Define> ^s1 (GetObjectID test-win 's1)</Define>
<Define> ^s2 (GetObjectID test-win 's2)</Define>
<Define> ^tv (GetObjectID test-win 'tv)</Define>

<SetStatus visible="1" size="300,200">
	1001
</SetStatus>

<Define> ^size ([GetStatus flags="size"] 1001) </Define>
<Define> ^w (car (cdr (GetElement size 'size.w))) </Define>
<Define> ^h (car (cdr (GetElement size 'size.h))) </Define>
(List size w h)

</vobj>
