
#include <builder.def>

scriptfile "/mit/musedev/MuseLib/vidplay.xs"

screenset
{
  ( [SCREENSET_NAME+.back] window [SCREENSET_NAME] 10 10 698 791 1 59 47 )
  ( [SCREENSET_NAME+.viewer] video [SCREENSET_NAME+.back] 30 79 640 480 0 59 98 )
  ( [SCREENSET_NAME+.dialog] window [SCREENSET_NAME+.back] 190 719 195 44 1 59 97 )
  ( [SCREENSET_NAME+.counter] window [SCREENSET_NAME+.back] 393 716 110 49 1 50 67)
 }

package [PACK_NAME]
{
	screen_name [SCREENSET_NAME+.back]
	active
	dimension "frame" 
	{
		min 1 
		max 54000 
		boundary limit
		timer_fn pace
		parameter [PACK_NAME] 1
		rate 0
	}
	dimension "findframe" { ( 0 1 0 0 limit ) }

	element "video"
	{
		type video
		screen_name [SCREENSET_NAME+.viewer]
		active
		map video
		{
			pos_in 1 0
			pos_out 54000 1
			in 1
			out 54000
			key_dimension 0
		 }
	 }

	element "counter2"
	{
		type graphic
		screen_name [SCREENSET_NAME+.counter]
		active
		map label
		{
			pos_in 1 0
			pos_out 54000 1
			label set_label_equal([PACK_NAME,frame,position])
			x1 30
			y1 25
			foreground 128
			font "helvetica-medium24"
		 }
	 }

	element "DummyCounter"
	{
		type tkwidget
		screen_name [SCREENSET_NAME+.counter]
		active
		map button
		{
			pos_in  1 0
			pos_out 54000 1
			label " "
			(0 -50 5 5 98 67 40 0)
			font "helvetica-medium18"
		 }
	 }

	element "E1"
	{
		type tkwidget
		screen_name [SCREENSET_NAME+.back]
		active
		map tkscroll
		{
			pos_in 1 0
			pos_out 54000 1
			(37 565 518 35 128 97 58 2)
			orientation horizontal
			name "videoscroll"
			represents [PACK_NAME] "frame" position 54000
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(38 22 531 48 92 128 58 1)
			label "Video Viewer"
			font "helvetica-bold24"
			resize 0
		 }
	 }
	element "E2"
	{
		type tkwidget
		screen_name [SCREENSET_NAME+.back]
		active
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(36 661 85 43 92 128 58 1)
			label "<<<"
			font "times-roman24"
			resize 0
			function set_rate ([PACK_NAME] (-1) -11 -1 )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(36 611 268 43 92 128 58 1)
			label "<----"
			font "times-roman24"
			resize 0
			function set_rate ([PACK_NAME] (-1) -33 -1 )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(127 661 85 43 92 128 58 1)
			label "<<"
			font "times-roman24"
			resize 0
			function set_rate ([PACK_NAME] (-1) -165 -1 )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(218 661 85 43 92 128 58 1)
			label "<"
			font "times-roman24"
			resize 0
			function rset_position ([PACK_NAME] (-1) -1 -1 )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(311 611 76 93 92 128 58 1)
			label "||"
			font "times-roman24"
			resize 0
			function set_rate ([PACK_NAME] (-1) 0 -1 )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(394 661 85 43 92 128 58 1)
			label ">"
			font "times-roman24"
			resize 0
			function rset_position ([PACK_NAME] (-1) 1 -1  )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(485 661 85 43 92 128 58 1)
			label ">>"
			font "times-roman24"
			resize 0
			function set_rate ([PACK_NAME] (-1) 165 -1 )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(394 611 268 43 92 128 58 1)
			label "---->"
			font "times-roman24"
			resize 0
			function set_rate ([PACK_NAME] (-1) 33 -1 )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(576 661 85 43 92 128 58 1)
			label ">>>"
			font "times-roman24"
			resize 0
			function set_rate ([PACK_NAME] (-1) 11 -1 )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(565 565 93 37 92 128 58 1)
			label "Reset"
			font "times-roman24"
			resize 0
			function set_position ([PACK_NAME] (-1) 1 -1  )
		 }
		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(578 22 79 48 92 128 58 1)
			label "<>"
			font "times-roman24"
			resize 0
			function expire ([PACK_NAME] (-1) 0 0 )
		 }
	 }

	element "E3"
	{
		type tkwidget
		screen_name [SCREENSET_NAME+.back]
		active

		map button
		{
			pos_in 1 0
			pos_out 54000 1
			(37 720 15 10 92 128 58 1)
			label "Find Frame"
			font "times-roman24"
			function rset_position ([PACK_NAME] (-1) 0 1  )
		 }
	}

	element "Search"
	{
		type text
		screen_name [SCREENSET_NAME+.dialog]
		active
		script "GetNumber"
		map tktext
		{
			pos_in 1 1
			pos_out 54000 1
			(3 3 185 34 59 97 45 2)
			font "helvetica-medium18"
			name "text"
			label "#"
			text_options 2
			edit_type edit
		 }
	 }
 }
