initial commit
[emacs-init.git] / nxhtml / tests / in / bug416505-Body.mxml
1 <?xml version="1.0" encoding="utf-8"?>
2 <mx:Canvas
3   xmlns:mx="http://www.adobe.com/2006/mxml"
4   xmlns:c="imo.utils.*"
5   xmlns:imocp="imo.components.*"
6   xmlns:fl="http://github.com/lancecarlson/flails"
7   xmlns:commons="imo.components.commons.*"
8   creationComplete="resetMenus()"
9   horizontalScrollPolicy="off" verticalScrollPolicy="off">
10
11   <mx:Script>
12     <![CDATA[
13       import imo.components.tooltips.MediaFileToolTip;
14
15       import mx.core.UIComponent;
16       import mx.events.DragEvent;
17       import mx.managers.DragManager;
18       
19       public static const LEFT_STATES:Array = [];
20       public static const RIGHT_STATES:Array = [];
21
22       [Deprecated]
23       public function changeState(state:String):void {
24         containers.currentState = state;
25       }
26
27       private function tabMouseDown(e:MouseEvent):void{
28         resetMenus(e.target.parent);
29         containers.currentState = e.target.label;
30       }
31
32       private function resetMenus(which:Object = null):void {
33         if (which == null) {
34           leftMenu.selectedIndex = -1;
35           rightMenu.selectedIndex = -1;
36         } else {
37           which.selectedIndex = -1;
38         }
39       }
40
41       private function onDragEnter( event:DragEvent ):void{
42         containers.currentState = "queue";
43         DragManager.acceptDragDrop( UIComponent(event.target) );
44       }
45
46       private function updateMenu(page:Object):void{
47         if (page.hasOwnProperty("menu")) {
48           this[page.menu + "Menu"].selectedIndex = page.menuIndex;
49         } else {
50           resetMenus();
51         }
52       }
53      ]]>
54   </mx:Script>
55
56   <!--<commons:TransparentBorderCanvas styleName="sideCanvas" x="-10" width="30" height="210"
57     horizontalScrollPolicy="off" verticalScrollPolicy="off"
58         customBorderThickness="2" borderAlpha=".6" cornerRadius="10">-->
59   <mx:Canvas styleName="sideCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="-8" width="30" height="174" >
60     <mx:TabBar id="leftMenu"
61                styleName="sideMenu"
62                dataProvider="{LEFT_STATES.reverse()}"
63                rotation="90"
64                x="24"
65                y="4"
66                width="163"
67                buttonMode="true"
68                mouseDown="tabMouseDown(event);"
69                toggleOnClick="true"/>
70     </mx:Canvas>
71   <!--</commons:TransparentBorderCanvas>-->
72
73   <imocp:MainContainer x="29" y="0" id="containers" width="376" height="473"/>
74         <mx:Canvas x="412" styleName="sideCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off"  width="40" height="155">
75           <mx:TabBar x="22" y="5" id="rightMenu" mouseDown="tabMouseDown(event);"
76                      styleName="rightSideMenu"
77                      dataProvider="{RIGHT_STATES.reverse()}"
78                      rotation="90"
79                      width="142"
80                      buttonMode="true"
81                      dragEnter="onDragEnter(event)"
82                      toggleOnClick="true"/>
83         </mx:Canvas>
84   <!--</commons:TransparentBorderCanvas>-->
85 </mx:Canvas>