<plugin id="TutoGui">

    <requirement id="servicesReg" />

    <extension implements="::fwServices::registry::AppConfig">
        <id>tutoGuiConfig</id>
        <type>parameters</type>
        <config>

        <object type="::fwData::Image">
           <service uid="myFrame" type="::fwGui::IFrameSrv" impl="::gui::frame::DefaultFrame" autoConnect="no" >
                <gui>
                    <frame>
                        <name>TutoGui</name>
                        <icon>Bundles/TutoGui_0-1/tuto.ico</icon>
                        <minSize width="800" height="600"/>
                    </frame>
                    <menuBar />
                    <toolBar >
                        <toolBitmapSize height= "32" width="32" />
                    </toolBar>
                </gui>
                <registry>
                    <menuBar sid="menuBar" start="yes" />
                    <toolBar sid="toolBar" start="yes" />
                    <view sid="view" start="yes" />
                </registry>
            </service>

            <service uid="menuBar" type="::fwGui::IMenuBarSrv" impl="::gui::aspect::DefaultMenuBarSrv" autoConnect="no" >
                <gui>
                    <layout>
                        <menu name="My Menu"/>
                        <menu name="My Menu 2"/>
                        <menu name="My Menu 3"/>
                    </layout>
                </gui>
                <registry>
                    <menu sid="myMenu" start="yes" />
                    <menu sid="myMenu2" start="yes" />
                </registry>
            </service>

            <service uid="toolBar" type="::fwGui::IToolBarSrv" impl="::gui::aspect::DefaultToolBarSrv" autoConnect="no" >
                <gui>
                    <layout>
                        <menuItem name="My item 1" style="check" icon="Bundles/TutoGui_0-1/icons/important.png" />
                        <separator />
                        <menuItem name="My item 2" style="radio" icon="Bundles/TutoGui_0-1/icons/system.png"/>
                        <menuItem name="My item 3" style="radio" icon="Bundles/TutoGui_0-1/icons/system.png"/>
                        <separator />
                        <menuItem name="My item A" style="radio" icon="Bundles/TutoGui_0-1/icons/monkey.png"/>
                        <menuItem name="My item B" style="radio" icon="Bundles/TutoGui_0-1/icons/monkey.png"/>
                        <separator />
                        <menuItem name="start 2-3 / stop A-B" style="radio" icon="Bundles/TutoGui_0-1/icons/important.png" />
                        <menuItem name="start A-B / stop 2-3" style="radio" icon="Bundles/TutoGui_0-1/icons/important.png" />
                        <menuItem name="Quit" icon="Bundles/TutoGui_0-1/icons/unreadable.png"/>
                    </layout>
                </gui>
                <registry>
                    <menuItem sid="item1" start="yes" />
                    <menuItem sid="item2" start="no" />
                    <menuItem sid="item3" start="no" />
                    <menuItem sid="item4" start="no" />
                    <menuItem sid="item5" start="no" />
                    <menuItem sid="item16" start="yes" />
                    <menuItem sid="item17" start="yes" />
                    <menuItem sid="actionQuit" start="yes" />
                </registry>
            </service>

            <service uid="myMenu" type="::fwGui::IMenuSrv" impl="::gui::aspect::DefaultMenuSrv" autoConnect="no" >
                <gui>
                    <layout>
                        <menuItem name="My item 1" shortcut="1" style="check" />
                        <separator />
                        <menuItem name="My item 2" shortcut="2" style="radio" />
                        <menuItem name="My item 3" shortcut="3" style="radio" />
                        <separator />
                        <menuItem name="My item A" shortcut="A" style="radio" />
                        <menuItem name="My item B" shortcut="B" style="radio" />
                        <separator />
                        <menuItem name="Quit" shortcut="Ctrl+Q" specialAction="QUIT" />
                    </layout>
                </gui>
                <registry>
                    <menuItem sid="item1" start="no" />
                    <menuItem sid="item2" start="no" />
                    <menuItem sid="item3" start="no" />
                    <menuItem sid="item4" start="no" />
                    <menuItem sid="item5" start="no" />
                    <menuItem sid="actionQuit" start="no" />
                </registry>
            </service>

            <service uid="myMenu2" type="::fwGui::IMenuSrv" impl="::gui::aspect::DefaultMenuSrv" autoConnect="no" >
                <gui>
                    <layout>
                        <menuItem name="My item 1" style="check" />
                        <separator />
                        <menuItem name="start 2-3 / stop A-B" style="radio" />
                        <menuItem name="start A-B / stop 2-3" style="radio" />
                    </layout>
                </gui>
                <registry>
                    <menuItem sid="item1" start="no" />
                    <menuItem sid="item16" start="no" />
                    <menuItem sid="item17" start="no" />
                </registry>
            </service>

            <service uid="item1" type="::fwGui::IActionSrv" impl="::gui::action::NothingActionSrv" autoConnect="no">
                <state active="true" />
            </service>
            <service uid="item2" type="::fwGui::IActionSrv" impl="::gui::action::NothingActionSrv" autoConnect="no" >
                <state active="true" />
            </service>
            <service uid="item3" type="::fwGui::IActionSrv" impl="::gui::action::NothingActionSrv" autoConnect="no" />
            <service uid="item4" type="::fwGui::IActionSrv" impl="::gui::action::NothingActionSrv" autoConnect="no" >
                <state active="false" />
            </service>
            <service uid="item5" type="::fwGui::IActionSrv" impl="::gui::action::NothingActionSrv" autoConnect="no" >
                <state active="true" />
            </service>

            <service uid="item16" type="::fwGui::IActionSrv" impl="::gui::action::StarterActionService" autoConnect="no">
                <state active="true" />
                <start uid="item2" />
                <start uid="item3" />
                <stop uid="item4" />
                <stop uid="item5" />
            </service>
            <service uid="item17" type="::fwGui::IActionSrv" impl="::gui::action::StarterActionService" autoConnect="no">
                <stop uid="item2" />
                <stop uid="item3" />
                <start uid="item4" />
                <start uid="item5" />
            </service>

            <service uid="actionQuit" type="::fwGui::IActionSrv" impl="::gui::action::QuitAction" autoConnect="no" />


            <service uid="view" type="::gui::view::IView" impl="::gui::view::DefaultView" autoConnect="no" >
                <gui>
                    <layout type="::fwGui::LineLayoutManager" >
                        <orientation value="vertical" />
                        <view caption="view1" />
                        <view caption="view2" />
                    </layout>
                </gui>
                <registry>
                    <view wid="myView" />
                    <view sid="subView2" start="yes" />
                </registry>
            </service>

            <service uid="subView1" type="::gui::view::IView" impl="::gui::view::DefaultView" autoConnect="no" >
                <gui>
                    <layout type="::fwGui::LineLayoutManager" >
                        <orientation value="horizontal" />
                        <view caption="view3" />
                        <view caption="view4" />
                        <view caption="view5" />
                    </layout>
                </gui>
                <registry>
                    <parent wid="myView" />
                    <view sid="subView3" start="yes" />
                </registry>
            </service>


            <service uid="subView2" type="::gui::view::IView" impl="::gui::view::DefaultView" autoConnect="no" >
                <gui>
                    <layout type="::fwGui::CardinalLayoutManager" >
                        <view caption="CardinalView1" align="center" />
                        <view caption="CardinalView2" align="right" minWidth="400" />
                        <view caption="CardinalView3" align="right" minWidth="400" />
                    </layout>
                </gui>
                <registry>
                    <view sid="view12" start="yes" />
                </registry>
            </service>

            <service uid="subView3" type="::gui::view::IView" impl="::gui::view::DefaultView" autoConnect="no" >
                <gui>
                    <layout type="::fwGui::TabLayoutManager" >
                        <view caption="TabView1"  />
                        <view caption="TabView2" selected="yes" />
                        <view caption="TabView3" />
                    </layout>
                </gui>
                <registry/>
            </service>

            <service uid="view12" type="::gui::view::IView" impl="::gui::view::DefaultView" autoConnect="no" >
                <gui>
                    <layout type="::fwGui::LineLayoutManager" >
                        <orientation value="vertical" />
                    </layout>
                    <toolBar />
                </gui>
                <registry>
                    <toolBar sid="toolbar2" start="yes" />
                </registry>
            </service>

            <service uid="toolbar2" type="::fwGui::IToolBarSrv" impl="::gui::aspect::DefaultToolBarSrv" autoConnect="no" >
                <gui>
                    <layout>
                        <menuItem name="My item 2" style="radio" icon="Bundles/TutoGui_0-1/icons/system.png"/>
                        <menuItem name="My item 3" style="radio" icon="Bundles/TutoGui_0-1/icons/system.png"/>
                        <separator />
                        <menuItem name="My item A" style="radio" icon="Bundles/TutoGui_0-1/icons/monkey.png"/>
                        <menuItem name="My item B" style="radio" icon="Bundles/TutoGui_0-1/icons/monkey.png"/>
                    </layout>
                </gui>
                <registry>
                    <menuItem sid="item2" />
                    <menuItem sid="item3" />
                    <menuItem sid="item4" />
                    <menuItem sid="item5" />
                </registry>
            </service>

            <start uid="myFrame" />
            <start uid="subView1" />

        </object>

        </config>
    </extension>

</plugin>
