<extension implements="sight::app::extension::config">
    <id>Tuto10LaunchBasicConfig_BasicFrameConfig_AppCfg</id>
    <!-- Declared the required parameters -->
    <parameters>
        <!-- image is defined by the previous configuration that called the config_launcher. -->
        <object uid="image" type="sight::data::image" />

        <!--
            CLOSE_CONFIG_CHANNEL is defined by config_launcher. It allows to connect the frame signal "closed" to the
            config_launcher slot "stopConfig".
            The default value "DummyChannel" is used if the paramter CLOSE_CONFIG_CHANNEL is not defined (for example if
            the configuration is launched from another service.
         -->
        <param name="CLOSE_CONFIG_CHANNEL" default="DummyChannel" />
    </parameters>
    <config>
        <!-- ******************************* UI declaration *********************************** -->

        <service uid="mainFrame" type="sight::module::ui::frame">
            <window onclose="notify" />
            <gui>
                <frame>
                    <name>Basic frame config</name>
                    <minSize width="900" height="600" />
                </frame>
            </gui>
            <registry>
                <view sid="imageRendereSrv" start="false" />
            </registry>
        </service>

        <!-- ******************************* Services ***************************************** -->

        <service uid="imageRendereSrv" type="sight::module::viz::sample::image">
            <in key="image" uid="${image}" />
        </service>

        <!-- ******************************* Connections ***************************************** -->

        <connect channel="${CLOSE_CONFIG_CHANNEL}">
            <signal>mainFrame/closed</signal>
        </connect>

        <!-- ******************************* Start services ***************************************** -->

        <start uid="mainFrame" />
        <start uid="imageRendereSrv" />
    </config>
</extension>
