<?xml version="1.0" encoding="utf-8"?>
<mx:Application pageTitle="Flex 2 Style Explorer" xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()"
 width="100%" height="100%" backgroundSize="100%" viewSourceURL="srcview/index.html" xmlns:views="views.*"  xmlns:navigator="navigators.*">

<!--
Copyright 2005-2006 Adobe Systems Inc., Adobe Consulting, and Peter Baird with
thanks to Ryan Hicks.  

This work is licensed under a Creative Commons License.  You may freely 
duplicate, distribute, display and alter this application for both 
commercial and non-commercial uses, but you must include this attribution, 
as well as the links to Adobe Systems and Adobe Consulting in the footer 
of the application.

For more information contact pbaird@adobe.com.

******************************************************************************
Extended to support primitive objects by Jason Hawryluk 03/2007
Flexible Experiments http://flexibleexperiments.wordpress.com

All contents provided by Jason Hawryluk fall under the same creative commons 
license as stated above.
******************************************************************************

-->

<mx:Style source="css/flexStyleExplorer.css" />
<mx:Script source="as/main.as" />


<mx:VBox horizontalAlign="left" width="100%" verticalGap="5">
    <mx:HBox verticalAlign="middle">
        <mx:Image source="@Embed('assets/fseLogo.png')" />
        <mx:Label text="Flex Primitive Explorer" styleName="styleExplorerTitle">
            <mx:filters>
                  <flash.filters:DropShadowFilter xmlns:flash.filters="flash.filters.*" angle="90" blurX="5" blurY="5"
                       distance="2" alpha=".3" color="0x000000" />
              </mx:filters>
        </mx:Label>
        <mx:Box height="20" verticalAlign="bottom" >
            <mx:Label text="v 2.0.1" fontFamily="Myriad" color="#FFFFFF" fontSize="8" />    
        </mx:Box>
        
    </mx:HBox>
    
</mx:VBox>

<mx:HBox width="100%" height="100%">
    <mx:Canvas width="180" height="100%" id="box1">
        <mx:Box width="100%" height="100%" styleName="fseControlBar" />
        <mx:Box width="100%" height="100%" styleName="fseControlBar" backgroundAlpha="1" >
            <mx:filters>
                  <flash.filters:BevelFilter xmlns:flash.filters="flash.filters.*" angle="90" blurX="1" blurY="1"
                       distance="1" highlightAlpha=".4" shadowAlpha=".4" highlightColor="0x000000" shadowColor="0xFFFFFF" knockout="true" />
              </mx:filters>
        </mx:Box>
                
        <mx:ViewStack left="5" top="20" bottom="30" right="5" id="navStack" change="{syncChecks()}">
            
            <navigator:treeNav id="treeNav" change="currentView = treeNav.currentView;"  />
            <navigator:listNav id="listNav" change="currentView = listNav.currentView; " currentView="{currentView}"   />
            
        </mx:ViewStack>
        
            <mx:ToggleButtonBar left="5" bottom="5" id="viewToggle" styleName="fseToggleButtons"
                 itemClick="navStack.selectedIndex = viewToggle.selectedIndex">
                 <mx:dataProvider>
                    <mx:Array>
                        <mx:Object icon="{navCategories}"  toolTip="Categories"/>                   
                        <mx:Object icon="{navList}" toolTip="Alphabetical List"/>
                        
                    </mx:Array>
                </mx:dataProvider>
            </mx:ToggleButtonBar>
            
            
    </mx:Canvas>
    
<mx:ViewStack width="100%" height="100%" id="myViewstack" selectedIndex="{currentView}" change="{syncChecks()}" >
    
    <views:PrimitivePreview name="Primitive Preview"    /> 
    <views:StarClass name="StarClass"   /> 
    <views:StarComponent name="StarComponent"   /> 
    
    <views:BurstClass name="BurstClass"   /> 
    <views:BurstComponent name="BurstComponent"   />
    <views:ReverseBurstComponent name="ReverseBurstComponent"   />
        
    <views:PolygonClass name="PolygonClass"   /> 
    <views:PolygonComponent name="PolygonComponent"   />
    
    <views:GearClass name="GearClass"   /> 
    <views:GearComponent name="GearComponent"   />
    
    <views:WedgeClass name="WedgeClass"   /> 
    <views:WedgeComponent name="WedgeComponent"   />
    
    <views:ArcClass name="ArcClass"   /> 
    <views:ArcComponent name="ArcComponent"   />
    
    <views:RatingComponent name="RatingComponent"/> 
        

</mx:ViewStack>


    
    
</mx:HBox>

<mx:HBox width="100%" height="26">
    <mx:LinkButton label="Copyright (c) 2007 Adobe Systems, Inc. All Rights Reserved" 
        click="navigateToURL(new URLRequest('http://www.adobe.com/'));"
        styleName="footerLink" alpha="0.2"
        />
    <mx:Spacer width="100%" />
    <mx:LinkButton label="Created by Adobe Consulting" 
        click="navigateToURL(new URLRequest('http://weblogs.macromedia.com/mc/'));"
        styleName="footerLink"
        textDecoration="underline" alpha="0.2"
        />
    <mx:LinkButton label="Extended For Primitives by Flexible Experiments" 
        click="navigateToURL(new URLRequest(' http://flexibleexperiments.wordpress.com'));"
        styleName="footerLink"
        textDecoration="underline" alpha="0.2"
        />    
</mx:HBox>

    <mx:Resize id="shrink" widthTo="50" target="{box1}" duration="1000" effectEnd="navStack.visible = true;" />
    <mx:Resize id="grow" widthTo="180" target="{box1}" duration="1000" 
        effectEnd="navStack.visible = true; viewToggle.visible = true;" />


</mx:Application>