/*
    Copyright 2005-2007 Adobe Systems Incorporated
    Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
    or a copy at http://stlab.adobe.com/licenses.html)
*/

layout tabs_and_panels
{
    interface:
        tab_group_visible : @first;
        panel_list_visible : @plv_second;

    view dialog(name: "Tabs and Panels Sampler", placement: place_column, grow: true, horizontal: align_fill, vertical: align_fill)
    {
        tab_group(  bind: @tab_group_visible, vertical: align_fill, horizontal: align_fill,
                    items: [
                        {name: "Sample", value: @first},
                        {name: "Tab", value: @second},
                        {name: "Example", value: @third}
                    ])
        {
            panel(value: @first, bind: @tab_group_visible)
            {
                static_text(name: "I am the first panel", vertical: align_center, horizontal: align_center);
            }
    
            panel(value: @second, bind: @tab_group_visible)
            {
                static_text(name: "I am the second panel", vertical: align_center, horizontal: align_center);
            }
    
            panel(value: @third, bind: @tab_group_visible)
            {
                static_text(name: "I am the last panel. Save the best for last!", horizontal: align_center);
                radio_button(name: "Don't click me!", bind: @tab_group_visible, value: @na);
            }
            panel(value: @na, bind: @tab_group_visible)
            {
                radio_button(name: "Told you not to click that...", bind: @tab_group_visible, value: @second);
            }
        }
    
        row()
        {
            column()
            {
                radio_button(name: "Another", bind: @panel_list_visible, value: @plv_first);
                radio_button(name: "Panel", bind: @panel_list_visible, value: @plv_second);
                radio_button(name: "Example", bind: @panel_list_visible, value: @plv_third);
            }
    
            overlay(vertical: align_center, horizontal: align_center)
            {
                panel(bind: @panel_list_visible, value: @plv_first)
                {
                    static_text(name: "I am the first panel", vertical: align_center, horizontal: align_center);
                }
    
                panel(bind: @panel_list_visible, value: @plv_second)
                {
                    static_text(name: "I am the second panel", vertical: align_center, horizontal: align_center);
                }
    
                panel(bind: @panel_list_visible, value: @plv_third)
                {
                    static_text(name: "I am the last panel. Save the best for last!", vertical: align_center, horizontal: align_center);
                }
            }
        }
    }
}
