<extension implements="::fwServices::registry::AppConfig">
    <id>OrganManagerWithSeries</id>
    <type>parameters</type>
    <parameters>
        <param name="GENERIC_UID" />
        <param name="ORGAN_MANAGER_MODELSERIES" />
        <param name="ICON_PATH" />
    </parameters>
    <config>


        <object type="::fwData::Composite">

            <!-- MAIN FRAME -->
            <service uid="${GENERIC_UID}_organManagerFrame" type="::fwGui::IFrameSrv" impl="::gui::frame::DefaultFrame" autoConnect="no">
                <window onclose="notify" />
                <gui>
                    <frame>
                        <name>Organs Manager</name>
                        <icon>${ICON_PATH}</icon>
                        <!-- <minSize width="400" height="750" /> -->
                        <style mode="STAY_ON_TOP" />
                    </frame>
                </gui>
                <registry>
                    <view sid="${GENERIC_UID}_multiViewOrgans" start="yes" />
                </registry>
            </service>

            <service uid="${GENERIC_UID}_multiViewOrgans" type="::gui::view::IView" impl="::gui::view::DefaultView" autoConnect="no">
                <gui>
                    <layout type="::fwGui::ToolboxLayoutManager" >
                        <view caption="Organs" expanded="true" />
                        <view caption="Material" expanded="true" />
                        <view caption="Representation" />
                    </layout>
                </gui>
                <registry>
                    <view sid="${GENERIC_UID}_listOrganEditor" start="yes" />
                    <view sid="${GENERIC_UID}_organMaterialEditor" start="no" />
                    <view sid="${GENERIC_UID}_representationEditor" start="no" />
                </registry>
            </service>

            <item key="selection">
                <object type="::fwData::Composite">

                    <service uid="${GENERIC_UID}_myUpdaterReconst" impl="::ctrlSelection::updater::SReconstructionFromModelSeriesUpdater" type="::ctrlSelection::IUpdaterSrv" autoConnect="no">
                        <update compositeKey="reconstruction" onEvent="NEW_RECONSTRUCTION_SELECTED" fromUID="*" actionType="ADD_OR_SWAP" />
                        <update compositeKey="reconstruction" onEvent="REMOVED_RECONSTRUCTIONS" fromUID="*" actionType="REMOVE_IF_PRESENT" />
                    </service>

                    <service uid="${GENERIC_UID}_myManagerForOrgansFrame" impl="::ctrlSelection::manager::SwapperSrv" type="::ctrlSelection::IManagerSrv" autoConnect="yes">
                        <mode type="dummy" />
                        <config>

                            <object id="reconstruction" type="::fwData::Reconstruction">
                                <service uid="${GENERIC_UID}_organMaterialEditor" impl="::uiReconstruction::OrganMaterialEditor" type="::gui::editor::IEditor" autoConnect="no" />
                                <service uid="${GENERIC_UID}_representationEditor" impl="::uiReconstruction::RepresentationEditor" type="::gui::editor::IEditor" autoConnect="no" />
                            </object>

                        </config>
                    </service>

                </object>
            </item>

            <item key="modelSeries">
                <object uid="${ORGAN_MANAGER_MODELSERIES}" src="ref" type="::fwMedData::ModelSeries">
                    <service uid="${GENERIC_UID}_listOrganEditor" impl="::uiMedData::editor::SModelSeriesList" type="::gui::editor::IEditor" autoConnect="yes" />
                </object>
            </item>

            <connect>
                <signal>${ORGAN_MANAGER_MODELSERIES}/objectModified</signal>
                <slot>${GENERIC_UID}_myUpdaterReconst/receive</slot>
            </connect>

            <!-- START AND STOP SERVICES -->
            <start uid="${GENERIC_UID}_organManagerFrame" />
            <start uid="${GENERIC_UID}_myUpdaterReconst" />
            <start uid="${GENERIC_UID}_myManagerForOrgansFrame" />

        </object>

    </config>
</extension>
