<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel
	follows="left|right|top|bottom"
	name="MediaControls"
	background_visible="false"
	height="200"
	mouse_opaque="false"
	min_width="300"
	width="800">
  <string name="control_background_image_name">square_btn_32x128.tga</string>
  <string name="skip_step">0.2</string>
  <string name="min_width">300</string>
  <string name="min_height">75</string>
  <string name="zoom_near_padding">1.0</string>
  <string name="zoom_medium_padding">1.1</string>
  <string name="zoom_far_padding">1.5</string>
  <string name="top_world_view_avoid_zone">50</string>

  <layout_stack
	  name="progress_indicator_area"
	  follows="left|right|top"
	  height="8"
          animate="false"
	  left="0"
	  orientation="horizontal"
	  bottom="-30">
        <layout_panel
		width="0"
		name="left_bookend_bottom"
		mouse_opaque="false"
		user_resize="false"
		/>
        <layout_panel
		name="media_progress_indicator"
		mouse_opaque="false"
		height="8"
		user_resize="false"
		left="0"
		top="0"
		auto_resize="false"
		min_width="100"
		width="200">
	  <progress_bar
		  name="media_progress_bar"
		  color_bg="1 1 1 1"
		  color_bar="1 1 1 0.96"
		  follows="left|right|top"
		  height="8"
		  top="0"
                  left="0"
		  tool_tip="Media is Loading"/>
	</layout_panel>
	<layout_panel
		name="right_bookend_bottom"
		width="0"
		mouse_opaque="false"
		user_resize="false"
		/>
  </layout_stack>
  <layout_stack
	  name="media_controls"
	  follows="left|right|top"
	  animate="false"
	  height="45"
	  bottom="-45"
	  left="0"
	  border_size="0"
	  mouse_opaque="false"
	  orientation="horizontal">
	<!-- outer layout_panels center the inner one -->
	<layout_panel
		name="left_bookend"
		top="0"
		width="0"
		user_resize="false"
		mouse_opaque="false"/>
	<layout_panel
		name="back"
		user_resize="false"
		auto_resize="false"
		mouse_opaque="false"
		min_width="22"
		width="22">
	  <button
                  name="back_btn"
                  follows="top"
                  image_overlay="go-previous.png"
                  auto_resize="false"
                  label=""
		  tool_tip="Navigate back"
		  bottom="-22"
                  left="0"
		  width="22"
		  height="22">
		<button.commit_callback
			function="MediaCtrl.Back" />
	  </button>

	</layout_panel>
	<layout_panel
		name="fwd"
		user_resize="false"
		mouse_opaque="false"
		auto_resize="false"
		min_width="22"
		height="22"
		width="22">
          <button
                  name="fwd_btn"
                  follows="top"
                  image_overlay="go-next.png"
                  label=""
		  bottom="-22"
                  height="22"
                  width="22"
		  tool_tip="Navigate forward">
                <button.commit_callback
                        function="MediaCtrl.Forward" />
          </button>
	</layout_panel>
	<layout_panel
		name="home"
		user_resize="false"
		mouse_opaque="false"
		auto_resize="false"
		top="0"
		height="22"
		min_width="22"
		width="22">
	  <button
	          name="home_btn"
		  follows="top"
		  image_overlay="go-home.png"
	          label=""
		  tool_tip="Home page"
		  bottom="-22"
	          height="22"
	          width="22">
	        <button.commit_callback
                        function="MediaCtrl.Home" />
	  </button>
	</layout_panel>
	<layout_panel
		name="media_stop"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		top="0"
		height="22"
		min_width="22"
		width="22">
	  <button
	          name="media_stop_btn"
		  follows="top"
	          image_overlay="go-media-stop.png"
	          label=""
		  tool_tip="Stop media"
		  bottom="-22"
		  height="22"
	          width="22">
	        <button.commit_callback
	                function="MediaCtrl.MediaStop" />
	  </button>
	</layout_panel>
	<layout_panel
		name="reload"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		top="0"
		height="22"
		min_width="22"
		width="22">
	  <button
		  name="reload_btn"
		  follows="top"
		  image_overlay="go-reload.png"
		  label=""
		  tool_tip="Reload"
		  bottom="-22"
		  height="22"
		  width="22">
		<button.commit_callback
		        function="MediaCtrl.Reload" />
	  </button>
	</layout_panel>
	<layout_panel
		name="stop"
		mouse_opaque="false"
		auto_resize="false"
		  user_resize="false"
		top="0"
		height="22"
		min_width="22"
		width="22">
           <button
		  name="stop_btn"
		  follows="top"
		  image_overlay="go-stop.png"
		  label=""
		  tool_tip = "Stop loading"
		  bottom="-22"
                  height="22"
                  width="22">
		<button.commit_callback
		        function="MediaCtrl.Stop" />
           </button>
	</layout_panel>
	<layout_panel
		name="play"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		top="0"
		height="22"
		min_width="22"
		width="22">
	  <button
		  name="play_btn"
		  follows="top"
		  image_overlay="go-media-play.png"
		  label=""
		   tool_tip = "Play media"
		  bottom="-22"
		  height="22"
		  width="22">
		<button.commit_callback
			function="MediaCtrl.Play" />
	  </button>
  	</layout_panel>
	<layout_panel
		name="pause"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		top="0"
		min_width="22"
		width="22">
	  <button
		  name="pause_btn"
		  follows="top"
		  image_overlay="go-media-pause.png"
		  label=""
		  bottom="-22"
		  height="22"
		  width="22"
		  tool_tip = "Pause media">
		<button.commit_callback
			function="MediaCtrl.Pause" />
	  </button>
	</layout_panel>
	<!-- media URL entry  -->
	<layout_panel
		name="media_address"
		mouse_opaque="false"
		auto_resize="true"
		height="24"
		follows="left|right|bottom"
		user_resize="false"
		width="190"
		min_width="90">
	  <line_editor 
		  name="media_address_url"
		  max_length_bytes="1023"
		  follows="top|left|right" 
		  height="22"
		  bottom="-22"
		  tool_tip="Media URL"
		  text_pad_right="16"> 
		<line_editor.commit_callback
			function="MediaCtrl.CommitURL"/>
	  </line_editor>
	  <layout_stack
		  name="media_address_url_icons"
		  animate="false"
		  follows="top|right"
		  height="20"
		  width="38"
		  left="140"
		  bottom="0"
		  border_size="0"
		  mouse_opaque="false"
		  orientation="horizontal">
		<layout_panel
			user_resize="false"
			width="16"
			mouse_opaque="false"
			auto_resize="false">
		  <icon
			  name="media_whitelist_flag"
			  follows="top|right"
			  height="16"
			  image_name="Flag.png"
			  layout="topleft"
			  tool_tip="White List enabled"
			  bottom="-16"
			  width="16" />
		</layout_panel>
		<layout_panel
			user_resize="false"
			width="16"
			mouse_opaque="false"
			auto_resize="false">
		  <icon
			  name="media_secure_lock_flag"
			  height="16"
			  image_name="lock.png"
			  bottom="-16"
			  tool_tip="Secured Browsing"
			  width="16" />
		</layout_panel>
	  </layout_stack>
	</layout_panel>
	<layout_panel
		name="media_play_position"
		mouse_opaque="false"
		auto_resize="true"
		follows="left|right"
		user_resize="false"
		height="22"
		min_width="100"
		width="200">
	  <slider_bar
		  name="media_play_slider"
		  follows="left|right|top"
		  bottom="-22"
		  height="22"
		  increment="0.01"
		  initial_value="0.5"
		  tool_tip="Movie play progress"
		  width="200">
		<slider_bar.commit_callback
			function="MediaCtrl.JumpProgress" />
	  </slider_bar>
	</layout_panel>
	<layout_panel
		name="skip_back"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		min_width="22"
		width="22">
	  <button
		  name="skip_back_btn"
		  follows="top"
		  image_overlay="go-media-skip-backwards.png"
		  label=""
		  bottom="-22"
		  auto_resize="false"
		  height="22"
		  tool_tip="Step back"
		  width="22">
		<button.commit_callback
			function="MediaCtrl.SkipBack" />
	  </button>
	</layout_panel>
	<layout_panel
		name="skip_forward"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		min_width="22"
		width="22">
	  <button
		  name="skip_forward_btn"
		  follows="top"
		  image_overlay="go-media-skip-forward.png"
		  label=""
		  bottom="-22"
		  height="22"
		  tool_tip="Step forward"
		  width="22">
		<button.commit_callback
			function="MediaCtrl.SkipForward" />
	  </button>

	</layout_panel>
	<layout_panel
		name="media_volume"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		height="72"
		min_width="22"
		width="32">
	  <!-- Note: this is not quite right either...the mute button is not the -->
	  <!-- same as the others because it cannot have the "image_overlay" be  -->
	  <!-- two different images.  -->
	  <!-- Note also: the button and the slider must overlap! -->
	  <button
		  name="media_mute_button"
		  follows="top"
		  label=""
		  image_selected="icn_speaker-muted_dark.tga"
		  image_unselected="icn_speaker_dark.tga"
		  hover_glow_amount="0.15"
		  is_toggle="true"
		  scale_image="false"
		  tool_tip="Mute This Media"
		  left_delta="5"
		  bottom="-20"
		  draw_border="true"
		  height="20"
		  width="22" >
		<button.commit_callback
			function="MediaCtrl.ToggleMute" />
		<button.mouseenter_callback
			function="MediaCtrl.ShowVolumeSlider" />
		<button.mouseleave_callback
			function="MediaCtrl.HideVolumeSlider" />
	  </button>
	  <slider
		  orientation="vertical"
		  left="-35"
		  height="20"
		  bottom="-42"
		  increment="0.01"
		  initial_value="0.5"
		  name="volume_slider"
		  tool_tip="Media Volume"
		  show_text="false"
		  width="40"
		  volume="true">
		<slider.commit_callback
			function="MediaCtrl.Volume"/>
		<slider.mouseenter_callback
			function="MediaCtrl.ShowVolumeSlider" />
		<slider.mouseleave_callback
			function="MediaCtrl.HideVolumeSlider" />
	  </slider>
	</layout_panel>
	<layout_panel
		name="moap_stop"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		height="28"
		min_width="22"
		width="22">
	  <button
		  name="stop_btn"
		  follows="top"
	          image_overlay="go-media-stop.png"
		  label=""
		  bottom="-22"
		  height="22"
		  tool_tip="Stop media"
		  width="22">
		<button.commit_callback function="MediaCtrl.MOAPStop" />
	  </button>
	</layout_panel>
	<layout_panel
		name="zoom_frame"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		height="28"
		min_width="22"
		width="22">
	  <button
		  name="zoom_frame_btn"
		  follows="top"
		  image_overlay="go-media-zoom.png"
		  label=""
		  bottom="-22"
		  height="22"
		  tool_tip="Zoom into media"
		  width="22">
		<button.commit_callback
			function="MediaCtrl.Zoom" />
	  </button>
	</layout_panel>
	<layout_panel
		name="close"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		top="0"
		min_width="21"
		width="21" >
	   <button
		  name="close_btn"
		  follows="top"
		  image_overlay="go-media-unzoom.png"
		  label=""
		  height="22"
		  tool_tip ="Zoom Back"
		  bottom="-22"
		  width="21">
		<button.commit_callback
			function="MediaCtrl.Close" />
	  </button>
	</layout_panel>
	<layout_panel
		name="new_window"
		mouse_opaque="false"
		auto_resize="false"
		user_resize="false"
		min_width="22"
		width="22">
	  <button
		  name="new_window_btn"
		  follows="top"
		  image_overlay="media_btn_newwindow.png"
		  label=""
		  bottom="-22"
		  height="22"
		  tool_tip = "Open URL in browser"
		  width="24" >
		<button.commit_callback
			function="MediaCtrl.Open" />
	  </button>
	</layout_panel>
	<!-- bookend panel -->
	<layout_panel
		name="right_bookend"
		mouse_opaque="false"
		user_resize="false"
		width="0"/>
		
  </layout_stack>
  <panel
	  name="media_region"
	  height="100"
	  follows="left|right|top|bottom"
	  mouse_opaque="false"
	  bottom="10" />
</panel>
