# Copyright (c) 2018-2020, NVIDIA CORPORATION.  All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
__all__ = ["CollaborationColumnsWidgetExtension"]

import omni.ext
from .delegates import *
from omni.kit.widget.stage.stage_column_delegate_registry import StageColumnDelegateRegistry


class CollaborationColumnsWidgetExtension(omni.ext.IExt):
    """The entry point for Stage Window"""

    def on_startup(self):
        # Register column delegates
        self._live_column_sub = StageColumnDelegateRegistry().register_column_delegate(
            "Live", LiveColumnDelegate
        )

        self._reload_column_sub = StageColumnDelegateRegistry().register_column_delegate(
            "Reload", ReloadColumnDelegate
        )

        self._participants_column_sub = StageColumnDelegateRegistry().register_column_delegate(
            "Participants", ParticipantsColumnDelegate
        )

    def on_shutdown(self):
        self._live_column_sub = None
        self._reload_column_sub = None
        self._participants_column_sub = None
