{curl 1.7 applet}
{applet license = "development",
    resources={{ReadOnlyArray-of String} "data/geworld.xml"}
}

{document-style PlainDocument}


{import * from GE-BACKGROUND,
    location="background/load.curl"
}

{import * from GE-QUERIES, location="data/ge-queries.curl"}

{let geworld:GEWorld = {GEWorld {url "data/geworld.xml"}}}


|| 3D barchart hack
{import * from  CURL.SAMPLES.BAR-CHART-3D, location="bar-chart-3d/load.curl"}
{include "bar-chart-3d/GEChart.curl"}
{let bar-chart-graphic:BarChartGraphic =
    {bar-chart-graphic-from-world geworld}}


|| 3D cards hack
{import * from CURL.SAMPLES.DECK, location = "cards/load.curl"}
{include "cards/GECards.curl"}
{let cards-3D-graphic = {make-GE-cards geworld}}


|| two-way index hack
{import * from CURL.GE.COCKPIT, location = "two-way-index/load.scurl"}
{include "two-way-index/make-two-way-index.curl"}
{let two-way-graphic = {make-two-way-index geworld}}

|| world treemap hack
{import demo-world, world from GE-TREEMAP, location = "world/load.scurl"}
{let demo-world-graphic = {demo-world world}}

|| planetary display hack
{import * from CURL.SAMPLES.PLANETARY-CHART, location = "planetary/load.curl"}
{include "planetary/GEPlanetary.curl"}
{let planet-graphic = {make-GE-planetary-graphic geworld}}

|| GE backgrounder
{let gef:GEBackground = {GEBackground}}
|| Access to the GEBackground's CurvedFrame
{let scf:SplitCurvedFrame = gef.split-curved-frame}

{let gadgets:{Array-of Graphic} = 
    { new {Array-of Graphic},
        two-way-graphic,
        cards-3D-graphic,
        {make-GE-bars bar-chart-graphic},
        planet-graphic,
        demo-world-graphic
    }
}

{let show-index:int = 0}

{define-proc {next-graphic}:void
    {inc show-index}
    {if show-index >= gadgets.size then
        set show-index = 0
        set scf.split? = true
     else
        set scf.split? = false
    }
    
    {gef.add-content gadgets[show-index]}
}
    
{define-proc {previous-graphic}:void
    {inc show-index, -1}

    {if show-index < 0 then
        set show-index = gadgets.size - 1
        set scf.split? = false
    }
    {if show-index == 0 then
        set scf.split? = true
    }
    
    {gef.add-content gadgets[show-index]}
}


|| data

{value
    
    set gef.next-action = next-graphic
    set gef.previous-action = previous-graphic
    
    {gef.add-content two-way-graphic}


    
    gef.layout
    
}            

