<extension implements="::fwServices::registry::AppConfig">
    <id>VRRenderBase</id>
    <type>parameters</type>
    <parameters>
        <param name="appName" />
        <param name="appIconPath" />
    </parameters>
    <config>
        <object uid="seriesDB" type="::fwMedData::SeriesDB">

            <service uid="action_open" type="::fwGui::IActionSrv" impl="::uiIO::action::SSeriesDBMerger" autoConnect="no">
                <IOSelectorSrvConfig name="SDBOpenIOSelectorConfig" />
            </service>
            <service uid="action_save" type="::fwGui::IActionSrv" impl="::gui::action::StarterActionService" autoConnect="no">
                <start uid="SDBWriter" />
            </service>
            <service uid="SDBWriter" type="::gui::editor::IDialogEditor" impl="::uiIO::editor::IOSelectorService" autoConnect="no">
                <type mode="writer" />
                <selection mode="include" />
                <addSelection service="::ioAtoms::SWriter" />
                <config id="MDAtomsConfig" service="::ioAtoms::SWriter" />
            </service>


            <service uid="mainFrame" type="::fwGui::IFrameSrv" impl="::gui::frame::DefaultFrame" autoConnect="no">
                <gui>
                    <frame>
                        <name>${appName}</name>
                        <icon>${appIconPath}</icon>
                        <minSize width="800" height="600" />
                    </frame>
                    <menuBar />
                </gui>
                <registry>
                    <menuBar sid="menuBar" start="yes" />
                    <view sid="dynamicView" start="yes" />
                </registry>
            </service>

            <service uid="menuBar" type="::fwGui::IMenuBarSrv" impl="::gui::aspect::DefaultMenuBarSrv" autoConnect="no">
                <gui>
                    <layout>
                        <menu name="File" />
                        <menu name="Monitor" />
                        <menu name="Help" />
                    </layout>
                </gui>
                <registry>
                    <menu sid="menu_file" start="yes" />
                    <menu sid="menu_monitor" start="yes" />
                    <menu sid="menu_help" start="yes" />
                </registry>
            </service>

            <service uid="menu_file" type="::fwGui::IMenuSrv" impl="::gui::aspect::DefaultMenuSrv" autoConnect="no">
                <gui>
                    <layout>
                        <menuItem name="Open" shortcut="Ctrl+O" />
                        <menuItem name="Save" shortcut="Ctrl+S" />
                        <menuItem name="Quit" specialAction="QUIT" shortcut="Ctrl+Q" />
                    </layout>
                </gui>
                <registry>
                    <menuItem sid="action_open" start="yes" />
                    <menuItem sid="action_save" start="yes" />
                    <menuItem sid="action_quit" start="yes" />
                </registry>
            </service>

            <service uid="menu_monitor" type="::fwGui::IMenuSrv" impl="::gui::aspect::DefaultMenuSrv" autoConnect="no" >
                <gui>
                    <layout>
                        <menuItem name="ClassFactoryRegistry information"/>
                        <menuItem name="Framework related object metrics"/>
                        <separator />
                        <menuItem name="Show contributions tree"/>
                        <separator />
                        <menuItem name="Memory"/>
                        <menuItem name="Change dump status" style="check" />
                        <menuItem name="Dump all" />
                        <menuItem name="Increase memory consumption"/>
                        <menuItem name="Decrease memory consumption"/>
                    </layout>
                </gui>
                    <registry>
                       <menuItem sid="action_ClassFactoryRegistryInfo" start="yes" />
                       <menuItem sid="action_fwMetrics" start="yes" />
                       <menuItem sid="action_ComponentsTree" start="yes" />
                       <menuItem sid="action_MemInfo" start="yes" />
                       <menuItem sid="action_ChangeDumpStatus" start="yes" />
                       <menuItem sid="dumpAll" start="yes" />
                       <menuItem sid="action_incMemConsum" start="yes" />
                       <menuItem sid="action_decMemConsum" start="yes" />
                 </registry>
            </service>

            <service uid="menu_help" type="::fwGui::IMenuSrv" impl="::gui::aspect::DefaultMenuSrv" autoConnect="no">
                <gui>
                    <layout>
                        <menuItem name="About" specialAction="ABOUT" />
                        <menuItem name="Acknowledgments" />
                        <separator />
                        <menuItem name="VR-Render Website" />
                    </layout>
                </gui>
                <registry>
                    <menuItem sid="action_about" start="yes" />
                    <menuItem sid="action_acknowledgments" start="yes" />
                    <menuItem sid="action_openBrowser" start="yes" />
                </registry>
            </service>

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

            <service uid="action_about" type="::fwGui::IActionSrv" impl="::uiGeneric::action::SShowAbout" autoConnect="no">
                <filename id="Bundles/VRRender_0-9/about/about.html" />
            </service>

            <service uid="action_acknowledgments" type="::fwGui::IActionSrv" impl="::uiGeneric::action::ShowAcknowledgments" autoConnect="no">
                <filename id="Bundles/VRRender_0-9/documentations/ack.html" />
            </service>

            <service uid="action_openBrowser" type="::fwGui::IActionSrv" impl="::uiGeneric::action::LaunchBrowserActionService" autoConnect="no">
                <url>http://www.ircad.fr/softwares/vr-render/Software.php</url>
            </service>

            <service uid="dynamicView" type="::gui::view::IView" impl="::guiQt::editor::DynamicView" autoConnect="yes">
                <config>
                    <appConfig id="SDBVRRender" title="SDB" closable="false">
                        <parameters>
                            <parameter replace="SERIESDB" by="seriesDB" />
                            <parameter replace="ICON_PATH" by="${appIconPath}" />
                            <parameter replace="DYNAMICVIEW_CHANNEL" by="dynamicView" />
                        </parameters>
                    </appConfig>
                </config>
            </service>


            <service uid="action_fwMetrics" type="::fwGui::IActionSrv" impl="::monitor::action::fwMetrics" autoConnect="no" />
            <service uid="action_MemInfo" type="::fwGui::IActionSrv" impl="::monitor::action::MemoryInfo" autoConnect="no" />
            <service uid="action_incMemConsum" type="::fwGui::IActionSrv" impl="::monitor::action::MemoryConsumption" autoConnect="no">
                <config mode="increase" value="256" />
            </service>
            <service uid="action_decMemConsum" type="::fwGui::IActionSrv" impl="::monitor::action::MemoryConsumption" autoConnect="no">
                <config mode="decrease" />
            </service>

            <service uid="action_ClassFactoryRegistryInfo" type="::fwGui::IActionSrv" impl="::monitor::action::ClassFactoryRegistryInfo" autoConnect="no" />
            <service uid="action_ComponentsTree" type="::fwGui::IActionSrv" impl="::monitor::action::ComponentsTree" autoConnect="no" />
            <service uid="action_ChangeDumpStatus" type="::fwGui::IActionSrv" impl="::gui::action::SConfigLauncher" autoConnect="no">
                <config>
                    <appConfig id="DumpFrameConfig" />
                </config>
            </service>
            <service uid="dumpAll" impl="::monitor::action::SDumpAll" type="::fwGui::IActionSrv" autoConnect="no" />

            <proxy channel="dynamicView">
                <slot>dynamicView/receive</slot>
            </proxy>

            <start uid="mainFrame" />
        </object>

    </config>
</extension>
