home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 September / PCWorld_2006-09_cd.bin / audio-video / sonique / s2beta_103_install.exe / a7_file / index.mml next >
Text File  |  2003-10-29  |  16KB  |  415 lines

  1. <?mml version="0.6" ?>
  2. <mml>
  3.     <interface cosmetic_name="orange pill" unique_name="ians/orange/pill/1.0">
  4.         <exports>
  5.             <remote name="Pill" window="pill" thumb_120="pill.psd|thumb_120" thumb_60="pill.psd|thumb_60"/>
  6.         </exports>
  7.         <FontStyle name="pill_display_font" face="Arial Bold" size="9" style="normal" />
  8.         <FontStyle name="track_display_font" type="raster" source="pill.psd|track_display_font" monochrome="true">
  9.             <glyphlist>0123456789</glyphlist>
  10.         </FontStyle>
  11.         <FontStyle name="time_display_font" type="raster" source="pill.psd|time_display_font" monochrome="true">
  12.             <glyphlist>0123456789:.&#e001;&#e000;&#e002;</glyphlist>
  13.         </FontStyle>
  14.  
  15.         <?macrodef "btnImageStyle3State"
  16.             <ImageStyle name="$(name)">
  17.                  <raster 
  18.                      source            ="pill.psd|$(norm)" 
  19.                      alignment        ="entire"
  20.                      blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  21.                      source_offset    ="pill.psd|$(norm) @ pill.psd|$(base)" 
  22.                     
  23.                 />
  24.                 <raster 
  25.                     state            ="HIT" 
  26.                     source            ="pill.psd|$(hit)" 
  27.                     source_offset    ="pill.psd|$(hit) @ pill.psd|$(base)" 
  28.                     alignment        ="entire"
  29.                     blendmode        ="COPY|RGB|ALPHA_SRCALPHA" 
  30.                     
  31.                 />
  32.                 <raster 
  33.                     state            ="Hover" 
  34.                     source            ="pill.psd|$(hover)" 
  35.                     source_offset    ="pill.psd|$(hover) @ pill.psd|$(base)" 
  36.                     alignment        ="entire"
  37.                     blendmode        ="COPY|RGB|ALPHA_SRCALPHA" 
  38.                 />                
  39.             </ImageStyle>
  40.         ?>
  41.  
  42.         <?macrodef "btnImageStyle2State"
  43.             <ImageStyle name="$(name)">
  44.                  <raster 
  45.                      source            ="pill.psd|$(norm)" 
  46.                      alignment        ="entire"
  47.                      blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  48.                      source_offset    ="pill.psd|$(norm) @ pill.psd|$(base)" 
  49.                     
  50.                 />
  51.                 <raster 
  52.                     state            ="HIT" 
  53.                     source            ="pill.psd|$(hit)" 
  54.                     source_offset    ="pill.psd|$(hit) @ pill.psd|$(base)" 
  55.                     alignment        ="entire"
  56.                     blendmode        ="COPY|RGB|ALPHA_SRCALPHA" 
  57.                 />            
  58.             </ImageStyle>
  59.         ?>
  60. <!--  This block should replace the next, in order to use OS transparency.  It's disabled because of our 95 & 98 users.  -->
  61. <!--    <window name="pill" default_size = "pill.psd" transparent="true" hitstyle="pillhitstyle">                      
  62.             <ImageStyle name="background">
  63.                 <raster
  64.                     source                = "pill.psd|shadow"
  65.                     source_offset        = "pill.psd|shadow"
  66.                     blendmode            = "BM_PIXELCOPY"
  67.                     alignment            = "entire"
  68.                 />
  69.                 <raster
  70.                     source                = "pill.psd|chassis"
  71.                     source_offset        = "pill.psd|chassis"
  72.                     alignment    = "entire"
  73.                     blendmode    = "ps_normal"
  74.                 />
  75.  
  76.             </ImageStyle>  
  77.                            -->
  78.  
  79. <!-- Without transparency use this:  -->
  80.         <window name="pill" default_size = "pill.psd" hitstyle="pillhitstyle" shape="pillshape">
  81.             <shape name="pillshape">
  82.                 <shape_raster source="pill.psd|chassis" source_offset="pill.psd|chassis"/>
  83.             </shape>
  84.             <ImageStyle name="background">
  85.                 <raster    source = "pill.psd|chassis" source_offset="pill.psd|chassis" />
  86.             </ImageStyle>
  87.             
  88. <!-- End of non-transparency specific block -->
  89.  
  90.             <dock_point type="slave" name="MonitorUL"     alignment="upperleft" offset="6,0" /> 
  91.             <dock_point type="slave" name="MonitorUR"     alignment="upperright" offset="-8,0"/> 
  92.             <dock_point type="slave" name="MonitorLL"     alignment="lowerleft" offset="6,-10" /> 
  93.             <dock_point type="slave" name="MonitorLR"     alignment="lowerright" offset="-8,-10"/> 
  94.             
  95.             <hitstyle name="pillhitstyle" default_hitcode="DRAG" >
  96.                 <hitcode type="INACTIVE">
  97.                     <shape>
  98.                         <shape_raster
  99.                                source ="pill.psd|door_region"
  100.                                offset ="pill.psd|door_region @ pill.psd"
  101.                         />
  102.                     </shape>
  103.                 </hitcode>
  104.             </hitstyle>
  105.  
  106.  
  107.             <script name="OnVolumeChanged">
  108.                 volume.SetRealPos( :sonique.players.default.GetVolume() );
  109.             </script>
  110.  
  111.             <script name="OnInit">
  112.                 SetDesiredFPS(45);
  113.                 :sonique.players.default.RegisterCallback("VolumeChanged","OnVolumeChanged()", this);
  114.                 OnVolumeChanged();
  115.  
  116.                 $section = "sonique/gui/slate/hotkeys";
  117.                 :sonique.prefs.CreateSection($section);
  118.                 alwaysontop = :sonique.prefs.GetString($section, "alwaysontop"); 
  119.                 if (alwaysontop) { :app.RegisterWindowKeyScript( alwaysontop, "SetAlwaysOnTop(!GetAlwaysOnTop());", this ); }
  120.             </script>
  121.             <script name="OnDestroy">
  122.                 if (alwaysontop) { :app.UnregisterWindowKeyScript( alwaysontop, "SetAlwaysOnTop(!GetAlwaysOnTop());", this ); }
  123.             </script>
  124.  
  125.             <script name="OpenDoor" >
  126.                 door_frame.door_open(); 
  127.                 OpenDoor="";
  128.             </script>
  129.  
  130.             <window name="eep" type="Sonique2_StatusBar" offset="pill.psd|status_bg" shape="eepshape" >
  131.                 <shape name="eepshape" >
  132.                     <shape_raster source="pill.psd|status_bg" alignment="entire" />
  133.                 </shape>
  134.                 <ImageStyle name="background">
  135.                     <color_fill        color      = "0xFF3FBBEF"    alignment = "entire"     />
  136.                 </ImageStyle>
  137.  
  138.                 <ImageStyle name="progress_empty">
  139.                     <color_fill color="#7BCBFB" />
  140.                 </ImageStyle>
  141.                 <ImageStyle name="progress_fill">
  142.                     <color_fill color="#0074BB" />
  143.                 </ImageStyle>
  144.  
  145.                 <property 
  146.                         info_font_style="pill_display_font" 
  147.                         info_font_color="0xFF00537B" 
  148.                         info_font_justification="trim_pixels"
  149.                         error_font_style="pill_display_font" 
  150.                         error_font_color="0xFF00537B" 
  151.                         error_font_justification="trim_pixels"
  152.                         warning_font_style="pill_display_font" 
  153.                         warning_font_color="0xFF00537B" 
  154.                         warning_font_justification="trim_pixels"
  155.                         fallback_font_style="pill_display_font" 
  156.                         fallback_font_color="0xFF00537B" 
  157.                         fallback_font_justification="trim_pixels"
  158.                         scroll_mode="horizontal,pingpong"
  159.                         scroll_speed="100"
  160.                         pause_delay="500"
  161.                         whitespace="0"
  162.                         rect_status_offset="5,0,-15,0"
  163.                         rect_progress_offset="8,3,-8,-3"
  164.                 />
  165.             </window>
  166.             <window name="track_display" transparent="true" type="Sonique2_TrackDisplay" offset="pill.psd|track_box" >
  167.                 <property font_style="track_display_font" font_color="0xFF00537B" font_justification="v_center|right" hoverhint="Current track number" />
  168.             </window>
  169.             <window name="time_display" transparent="true" type="Sonique2_TimeDisplay" offset="pill.psd|time_box" hitstyle="ACTIVE" >
  170.                 <ImageStyle name="background"></ImageStyle>
  171.                 <property font_style="time_display_font" font_color="0xFFC2EBFE" font_justification="v_center" updateinterval="100" hovertext="true" />
  172.             </window>
  173.  
  174.             <window name="progress" transparent="true" type="Sonique2_Progress" offset="pill.psd|progress_bar" hitstyle="ACTIVE" >
  175.                 <ImageStyle name="background">
  176.                      <raster 
  177.                              source            ="pill.psd|progress_bar_background"
  178.                              alignment        ="entire"
  179.                              blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  180.                     />
  181.                 </ImageStyle>
  182.                 <ImageStyle name="barempty">
  183.                     <color_fill color="0xFF0179B3"
  184.                                blendmode     = "COPY|RGB"
  185.                                alignment = "entire"
  186.                     />
  187.                 </ImageStyle>
  188.                 <ImageStyle name="barfilled">
  189.                     <color_fill color="0xFF00537B"
  190.                                blendmode     = "COPY|RGB"
  191.                                alignment = "entire"
  192.                     />
  193.                 </ImageStyle>
  194.                 <Property type="LoadProgress"
  195.                           orientation="left_to_right"
  196.                           bar_offset_rect="2,2,-2,-2"
  197.                           bar_align_rect ="0,0,1,1" />
  198.             </window>
  199.             <window name="progress_handle" transparent="true" type="Sonique2_Progress" offset="pill.psd|progress_bar" hitstyle="ACTIVE" >
  200.                 <ImageStyle name="handle">
  201.                      <raster 
  202.                              source            ="pill.psd|progress_bar_handle"
  203.                              alignment        ="entire"
  204.                              blendmode        ="COPY|RGB"
  205.                     />
  206.                 </ImageStyle>
  207.                 <Property type="SongProgress"
  208.                           orientation="left_to_right"
  209.                           bar_offset_rect="1,0,-1,0"
  210.                           bar_align_rect ="0,0,1,1"
  211.                           outer_handle_offset_rect="-3,1,3,6"
  212.                           outer_handle_align_rect="0,0,0,0"
  213.                           hovertext="true" />
  214.             </window>
  215.             <window name="volume" transparent="true" type="fillbar" offset="pill.psd|volume_mask"  hitstyle="ACTIVE" >
  216.                 <script name="OnPosChange">
  217.                     :sonique.players.default.SetVolume( GetRealPos() );
  218.                 </script>
  219.  
  220.                 <ImageStyle name="barfilled">
  221.                      <raster 
  222.                              source            ="pill.psd|volume_bg"
  223.                              alignment        ="upperleft"
  224.                             offset            ="pill.psd|volume_mask@pill.psd|volume_mask"
  225.                              blendmode        ="COPY|ALPHA_SRCALPHA"
  226.                     />
  227.                 </ImageStyle>
  228.                 <ImageStyle name="barempty">
  229.                      <raster 
  230.                              source            ="pill.psd|volume_fg"
  231.                              alignment        ="lowerleft"
  232.                             offset            ="pill.psd|volume_mask@pill.psd|volume_mask"
  233.                              blendmode        ="COPY|ALPHA_SRCALPHA"
  234.                     />
  235.                 </ImageStyle>
  236.                 <Property orientation="bottom_to_top" relative="true"  />
  237.             </window>
  238.             
  239.             <?macrodef btn_start
  240.                 <window name="$(name)" type="button" transparent="true"  offset = "pill.psd|$(name)a" hitstyle="ACTIVE" >
  241.                     <property    default_delay    = "150"    hover="true" hoverhint="$(hint)" />
  242.                     <?macroins "btnImageStyle3State" name="state0" norm="$(name)a" hit="$(name)b" hover="$(name)ha" base="$(name)a" ?$>
  243.             ?>
  244.  
  245.             <?macrodef cornerbtn_start
  246.                 <window name="$(name)" type="button" transparent="true"  offset = "pill.psd|$(name)a" hitstyle="ACTIVE" >
  247.                     <property    default_delay= "150" hoverhint="$(hint)" />
  248.                     <?macroins "btnImageStyle2State" name="state0" norm="$(name)a" hit="$(name)b"  base="$(name)a" ?$>
  249.             ?>
  250.             
  251.             <?macrodef btn_end     </window> ?>
  252.         
  253.             
  254.             <?macroins btn_start name="b1" hint="Previous Track" ?>
  255.                 <script name="OnClick" > :sonique.players.default.Previous(); </script>
  256.             <?macroins btn_end ?>
  257.             <?macroins btn_start name="b2" hint="Play" ?>
  258.                 <script name="OnClick" > :sonique.players.default.Play(); </script>
  259.             <?macroins btn_end ?>
  260.             <?macroins btn_start name="b3" hint="Stop" ?> 
  261.                 <script name="OnClick" > :sonique.players.default.Stop(); </script>
  262.             <?macroins btn_end ?>
  263.             <?macroins btn_start name="b4" hint="Pause" ?>
  264.                 <script name="OnClick" > :sonique.players.default.TogglePause(); </script>
  265.             <?macroins btn_end ?>
  266.             <?macroins btn_start name="b5" hint="Next track" ?>
  267.                 <script name="OnClick" > 
  268.                     :sonique.players.default.Next();
  269.                 </script>
  270.             <?macroins btn_end ?>
  271.             <?macroins btn_start name="b6" hint="Cycle through repeat modes" ?>
  272.                 <script name="OnClick" > 
  273.                     $currentstate = :sonique.players.default.GetRepeat();
  274.                     :sonique.players.default.SetRepeat( { off: "one", one: "all", all: "off" }[$currentstate] ); 
  275.                 </script>
  276.                 <script name="OnInit">
  277.                     :sonique.players.default.RegisterCallback("RepeatChanged","OnRepeatChange()", this);
  278.                     OnRepeatChange();
  279.                 </script>
  280.                 <script name="OnRepeatChange">
  281.                     SetButtonState( { off: 0, one: 1, all: 2 }[:sonique.players.default.GetRepeat()] );
  282.                 </script>
  283.                 <?macroins "btnImageStyle3State" name="state1" norm="b6a_loop1" hit="b6b" hover="b6ha_loop1"    base="b6a" $?>
  284.                 <?macroins "btnImageStyle3State" name="state2" norm="b6a_loopall" hit="b6b" hover="b6ha_loopall" base="b6a" $?>
  285.             <?macroins btn_end ?>
  286.  
  287.             <?macroins btn_start name="b7" hint="Toggle shuffle" ?>
  288.                 <script name="OnInit">
  289.                     :sonique.players.default.RegisterCallback("ShuffleChanged","OnShuffleChange()", this);
  290.                     OnShuffleChange();
  291.                 </script>
  292.                 <script name="OnClick">
  293.                     $currentstate = :sonique.players.default.GetShuffle();
  294.                     :sonique.players.default.SetShuffle( { "false": "true", "true": "false" }[$currentstate] );
  295.                 </script>
  296.                 <script name="OnShuffleChange">
  297.                     SetButtonState( { "false": 0, "true": 1 }[:sonique.players.default.GetShuffle()] );
  298.                 </script>
  299.                 <?macroins "btnImageStyle3State" name="state1" norm="b7a_shuffleon" hit="b7b" hover="b7ha_shuffleon" base="b7a" $?>
  300.             <?macroins btn_end ?>
  301.  
  302.             <?macroins btn_start name="b8" hint="Open audio" ?>
  303.                 <script name="OnClick">
  304.                     :sonique.OpenFiles();
  305.                 </script>
  306.             <?macroins btn_end ?>
  307.             <?macroins cornerbtn_start name="b9" hint="Minimize window" ?>
  308.                 <script name="OnClick">
  309.                     parent.MinimizeWindow(1);
  310.                 </script>
  311.             <?macroins btn_end ?>
  312.             <?macroins cornerbtn_start name="b10" hint="Close window" ?>
  313.                 <script name="OnClick" >
  314.                     parent.DestroyWindow();
  315.                 </script>
  316.             <?macroins btn_end ?>
  317.             
  318.  
  319.  
  320.  
  321.             <window name="door_frame" transparent="true" alignment="upperleft" offset="pill.psd|door_region @ pill.psd" shape="doorshape" hitstyle="NONE" >
  322.                 <shape name="doorshape" > <shape_raster alignment="entire" source="pill.psd|door_region" threshold="255" />    </shape>
  323.  
  324.                 <script name="OnInit">
  325.                     left_door_pos         = left_door.GetOffset();
  326.                     left_door_shadow_pos = left_door_shadow.GetOffset();
  327.                     right_door_pos       = right_door.GetOffset();
  328.                 </script>
  329.                 <script name="door_open">
  330.                     left_door.SetOffset({-125,0,-125,0}+left_door_pos,0,1200,"linear_accel"); 
  331.                     left_door_shadow.SetOffset({-125,0,-125,0}+left_door_shadow_pos,0,1200,"linear_accel"); 
  332.                     right_door.SetOffset({125,0,125,0}+right_door_pos,0,1200,"linear_accel"); 
  333.                     left_door_cover.SetOffset({0,0,-125,0}+left_door_pos,0,1200,"linear_accel"); 
  334.                     right_door_cover.SetOffset({125,0,0,0}+right_door_pos,0,1200,"linear_accel");
  335.                 </script>        
  336.                 <script name="door_close">
  337.                     left_door.SetOffset(left_door_pos,0,1200,"linear_decel");
  338.                     left_door_shadow.SetOffset(left_door_shadow_pos,0,1200,"linear_decel"); 
  339.                     right_door.SetOffset(right_door_pos,0,1200,"linear_decel");
  340.                     left_door_cover.SetOffset(left_door_pos,0,1200,"linear_decel"); 
  341.                     right_door_cover.SetOffset(right_door_pos,0,1200,"linear_decel");
  342.                 </script>
  343.                 
  344.                 <window name="left_door_shadow" transparent="true" offset="pill.psd|left_door_shadow @ pill.psd|door_region">
  345.                     <ImageStyle name="background">
  346.                         <raster 
  347.                              source            ="pill.psd|left_door_shadow" 
  348.                              alignment        ="entire"
  349.                              blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  350.                              opacity            =".75" 
  351.                              />
  352.                     </ImageStyle>
  353.                 </window>
  354.                 
  355.                 <window name="left_door" transparent="false" offset="pill.psd|left_door @ pill.psd|door_region">
  356.                     <ImageStyle name="background">
  357.                         <raster 
  358.                              source            ="pill.psd|left_door" 
  359.                              alignment        ="entire"
  360.                              blendmode        ="COPY|PIXEL"
  361.                              source_offset    ="pill.psd|left_door @ pill.psd|left_door" 
  362.                              />
  363.                     </ImageStyle>
  364.                 </window>
  365.                 
  366.                 <window name="right_door" transparent="false" offset="pill.psd|right_door @ pill.psd|door_region">
  367.                     <ImageStyle name="background">
  368.                         <raster 
  369.                              source            ="pill.psd|right_door" 
  370.                              alignment        ="entire"
  371.                              blendmode        ="COPY|PIXEL"
  372.                              source_offset    ="pill.psd|right_door @ pill.psd|right_door" 
  373.                              />
  374.                     </ImageStyle>
  375.                 </window>
  376.                 
  377.                 <window name="left_door_cover" transparent="true" offset="pill.psd|left_door @ pill.psd|door_region" hitstyle="ACTIVE" >
  378.                     <ImageStyle name="background">
  379.                         <gradient_fourpoint
  380.                              color_ul        ="0x60000000"
  381.                              color_lr        ="0x60FFFFFF"
  382.                              color_ur        ="0x00000000"
  383.                              color_ll        ="0x00000000"
  384.                              alignment        ="upperleft"
  385.                              offset            ="pill.psd|door_region @ pill.psd|left_door"
  386.                              blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  387.                               
  388.                              />
  389.                     </ImageStyle>
  390.                     <script name="OnMouseOver">
  391.                         OpenDoor();
  392.                     </script>
  393.                 </window>
  394.                 
  395.                 <window name="right_door_cover" transparent="true" offset="pill.psd|right_door @ pill.psd|door_region" hitstyle="ACTIVE" >
  396.                     <ImageStyle name="background">
  397.                         <gradient_fourpoint
  398.                              color_ul        ="0x40653807"
  399.                              color_lr        ="0x40FFFFB7"
  400.                              color_ur        ="0x00000000"
  401.                              color_ll        ="0x00000000"
  402.                              alignment        ="upperright"
  403.                              offset            ="pill.psd|door_region @ pill.psd|right_door"
  404.                              blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  405.                          />
  406.                     </ImageStyle>
  407.                     <script name="OnMouseOver">
  408.                         OpenDoor();
  409.                     </script>
  410.                 </window>
  411.             </window>
  412.         </window>
  413.     </interface>
  414. </mml>
  415.