<?xml version="1.0" encoding="utf-8"?>

<!--

/**
 *  Latest information on this project can be found at http://www.rogue-development.com/objectHandles.xml
 * 
 *  Copyright (c) 2008 Marc Hughes 
 * 
 *  Permission is hereby granted, free of charge, to any person obtaining a 
 *  copy of this software and associated documentation files (the "Software"), 
 *  to deal in the Software without restriction, including without limitation 
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
 *  and/or sell copies of the Software, and to permit persons to whom the Software 
 *  is furnished to do so, subject to the following conditions:
 * 
 *  The above copyright notice and this permission notice shall be included in all 
 *  copies or substantial portions of the Software.
 * 
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
 *  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
 *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
 *  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
 * 
 * 
 * 
 **/

-->

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
                layout="absolute"
                backgroundAlpha="1"
                
                xmlns:objecthandles="com.roguedevelopment.objecthandles.*"
                xmlns:degrafa="com.degrafa.*"
                xmlns:paint="com.degrafa.paint.*"
                xmlns:geometry="com.degrafa.geometry.*"                
                viewSourceURL="srcview/index.html"
                xmlns:degrafa1="http://www.degrafa.com/2007"
                creationComplete="init()"
                backgroundColor="#343434"
                xmlns:shapes="com.roguedevelopment.flowchart.shapes.*" xmlns:flowchart="com.roguedevelopment.flowchart.*">
    <mx:Script>
        <![CDATA[
            import com.roguedevelopment.flowchart.shapes.Cross;
            import com.roguedevelopment.flowchart.shapes.TriangleOne;
            import com.roguedevelopment.flowchart.shapes.RoundRect4;
            import com.roguedevelopment.flowchart.shapes.RoundRect3;
            import com.roguedevelopment.flowchart.shapes.RoundRect2;
            import com.roguedevelopment.flowchart.shapes.RoundRect1;
            import com.roguedevelopment.flowchart.shapes.CircleShape;
            import com.roguedevelopment.flowchart.shapes.SquareShape;
            import com.roguedevelopment.flowchart.ObjectSource;
        
        
            protected function init() : void
            {
                
//                //Step 4 
//                
//                // Each of these sources represents one of the shapes in the toolbar on the left that you can drag
//                // shapes from.
//                
                var source:ObjectSource = new ObjectSource(
                                            new ClassFactory( com.roguedevelopment.flowchart.shapes.SquareShape),
                                            mainCanvas,
                                            new Point(30,20) );
                                            
                source = new ObjectSource(  new ClassFactory( com.roguedevelopment.flowchart.shapes.CircleShape),
                                            mainCanvas,
                                            new Point(90,20) );
                                            
                source = new ObjectSource(
                                            new ClassFactory( com.roguedevelopment.flowchart.shapes.RoundRect1),
                                            mainCanvas,
                                            new Point(30,80) );
                                            
                source = new ObjectSource(  new ClassFactory( com.roguedevelopment.flowchart.shapes.RoundRect2),
                                            mainCanvas,
                                            new Point(90,80) );
                                            
                source = new ObjectSource(  new ClassFactory( com.roguedevelopment.flowchart.shapes.RoundRect3),
                                            mainCanvas,
                                            new Point(30,140) );
                                            
                source = new ObjectSource(  new ClassFactory( com.roguedevelopment.flowchart.shapes.RoundRect4),
                                            mainCanvas,
                                            new Point(90,140) );
                                            
                source = new ObjectSource(  new ClassFactory( com.roguedevelopment.flowchart.shapes.TriangleOne),
                                            mainCanvas,
                                            new Point(30,200) );
                                            
                source = new ObjectSource(  new ClassFactory( com.roguedevelopment.flowchart.shapes.Cross),
                                            mainCanvas,
                                            new Point(90,200) );

                
            }
            
            
            
        ]]>
    </mx:Script>

    


    
        
        <degrafa:Surface width="100%" top="0" bottom="50">
               
                <degrafa:fills>
                    <paint:LinearGradientFill    id="blueGradient" angle="90">
                        <paint:GradientStop alpha="1" color="#050952"/>
                        <paint:GradientStop alpha="1" color="#080e87"/>
                    </paint:LinearGradientFill>
                </degrafa:fills>
                                
                <degrafa:strokes>
                    <paint:SolidStroke id="grey" color="#555555" alpha="1" weight="2" pixelHinting="true"/>
                    <paint:SolidStroke id="thinGrey" color="#555555" alpha="0.5" weight="1" pixelHinting="true"/>
                </degrafa:strokes>
                
               
                <degrafa:GeometryGroup>
                    <!-- Left side box -->                               
                    <geometry:RoundedRectangleComplex    fill="{blueGradient}"
                                                stroke="{grey}"
                                                height="{height-60}"
                                                x="5"
                                                y="5"
                                                width="200"
                                                bottomLeftRadius="0"
                                                bottomRightRadius="20"
                                                topLeftRadius="0"
                                                topRightRadius="20"
                                                />
                    
                    <!-- Main box -->
                    <geometry:RegularRectangle    fill="{blueGradient}"
                                                x="210"
                                                y="5"
                                                stroke="{grey}"
                                                height="{height-60}"
                                                width="{width-220}"                                                
                                                />
                    <!-- Grid lines -->                           
                    <degrafa1:VerticalLineRepeater                                                          
                                            count="{(width-220) / 25}"
                                            stroke="{thinGrey}"
                                            x="225"
                                            y="7"
                                            y1="{height-55}"
                                            offsetX="0"
                                            offsetY="0"
                                            moveOffsetX="25"
                                            moveOffsetY="0"/>
                                            
                    <degrafa1:HorizontalLineRepeater                                                          
                                            count="{(height-70) / 25}"
                                            stroke="{thinGrey}"
                                            x="210"
                                            y="30"
                                            x1="{width-10}"
                                            offsetX="0"
                                            offsetY="0"
                                            moveOffsetX="0"
                                            moveOffsetY="25"/>
                   
                </degrafa:GeometryGroup>                                             
        </degrafa:Surface>


    <!-- Step 2 
        
            <shapes:SquareShape />
            <shapes:CircleShape />
        -->        
        
        
        <!-- Step 3 --> 
        <objecthandles:ObjectHandlesCanvas autoLayout="false" width="100%" height="100%" id="mainCanvas"  >
            <!--
            <shapes:SquareShape />
            <shapes:CircleShape />
            --> 
        </objecthandles:ObjectHandlesCanvas>    
        
        
        
        <!-- -->
        <flowchart:Toolbar  x="10" bottom="0"/>
        
    

</mx:Application>