
#######################
WebViewerContextManager
#######################

.. js:class:: wvc.WebViewerContextManager

   Provides centralized context management for the Hoops Web Viewer ecosystem.
   
   This component acts as a context provider that manages the global state and coordinates communication between different web viewer components. It provides shared access to the WebViewer instance, state management, and service coordination.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wvc.WebViewerContextManager.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wvc.WebViewerContextManager.contextManager`
   * :js:data:`~wvc.WebViewerContextManager.webviewerState`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wvc.WebViewerContextManager.activeToolOperator`
   * :js:func:`~wvc.WebViewerContextManager.webViewer`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wvc.WebViewerContextManager.isRedlineOperatorActive`
   * :js:meth:`~wvc.WebViewerContextManager.refreshCameraOperator`
   * :js:meth:`~wvc.WebViewerContextManager.refreshToolOperator`
   * :js:meth:`~wvc.WebViewerContextManager.reset`
   * :js:meth:`~wvc.WebViewerContextManager.setDrawMode`
   * :js:meth:`~wvc.WebViewerContextManager.setRedlineOperator`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wvc.WebViewerContextManager.constructor

      .. rst-class:: sig-pretty-signature
      
         | WebViewerContextManager(): :js:class:`WebViewerContextManager <wvc.WebViewerContextManager>`
      
      **Returns**\ : :js:class:`WebViewerContextManager <wvc.WebViewerContextManager>`
      



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: wvc.WebViewerContextManager.contextManager

      .. rst-class:: sig-pretty-signature
      
         | contextManager: :js:class:`WebViewerContextManager <wvc.WebViewerContextManager>`
      



.. js:data:: wvc.WebViewerContextManager.webviewerState

      .. rst-class:: sig-pretty-signature
      
         | webviewerState: :js:class:`WebViewerState <wvc.WebViewerState>`
      



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: wvc.WebViewerContextManager.activeToolOperator

      .. rst-class:: sig-pretty-signature
      
         | *get* activeToolOperator(): (*undefined* | *OperatorId*\ )
      
      Gets the currently active tool operator. Returns the operator ID if a tool is active, undefined otherwise.
      
      **Returns**\ : (*undefined* \| *OperatorId*\ )
      
      
         The active tool operator ID or undefined if none is active
      
      
      .. rst-class:: sig-pretty-signature
      
         | *set* activeToolOperator(**value**\ : (*undefined* | *OperatorId*\ )): *void*
      
      Sets the active tool operator and updates the context state. Activates the specified operator in the web viewer's operator manager and synchronizes the context state to notify all consuming components.
      
      **Parameters**
      
      
         **value**\ : (*undefined* \| *OperatorId*\ )
      
      
            The operator ID to set as active, or undefined to clear
      
      
      
      **Returns**\ : *void*
      
      
      



.. js:method:: wvc.WebViewerContextManager.webViewer

      .. rst-class:: sig-pretty-signature
      
         | *get* webViewer(): (*undefined* | *WebViewer*\ )
      
      Gets the current WebViewer instance.
      
      **Returns**\ : (*undefined* \| *WebViewer*\ )
      
      
         The current WebViewer instance or undefined if not set
      
      
      .. rst-class:: sig-pretty-signature
      
         | *set* webViewer(**value**\ : (*undefined* | *WebViewer*\ )): *void*
      
      Sets the WebViewer instance and initializes all associated services. When set, automatically configures service dependencies and refreshes operator states.
      
      **Parameters**
      
      
         **value**\ : (*undefined* \| *WebViewer*\ )
      
      
            The WebViewer instance to set
      
      
      
      **Returns**\ : *void*
      
      
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wvc.WebViewerContextManager.isRedlineOperatorActive

      .. rst-class:: sig-pretty-signature
      
         | isRedlineOperatorActive(): *boolean*
      
      Checks if a redline operator is currently active. Returns true if any redline drawing mode is currently enabled.
      
      **Returns**\ : *boolean*
      
      
         True if a redline operator is active, false otherwise
      
      



.. js:method:: wvc.WebViewerContextManager.refreshCameraOperator

      .. rst-class:: sig-pretty-signature
      
         | refreshCameraOperator(): *void*
      
      Refreshes the camera operator state from the web viewer and updates the context. Synchronizes the context state with the current camera operator.
      
      **Returns**\ : *void*
      
      
      



.. js:method:: wvc.WebViewerContextManager.refreshToolOperator

      .. rst-class:: sig-pretty-signature
      
         | refreshToolOperator(): *void*
      
      Refreshes the tool operator state from the web viewer and updates the context. Synchronizes the context state with the current active tool operator.
      
      **Returns**\ : *void*
      
      
      



.. js:method:: wvc.WebViewerContextManager.reset

      .. rst-class:: sig-pretty-signature
      
         | reset(): *Promise*
      
      Resets the web viewer and all associated services to their initial state. Clears all active operations, handles, and resets service states.
      
      **Returns**\ : *Promise*
      
      
         Promise that resolves when reset is complete
      
      



.. js:method:: wvc.WebViewerContextManager.setDrawMode

      .. rst-class:: sig-pretty-signature
      
         | setDrawMode(**drawMode**\ : *DrawMode*\ ): *void*
      
      Sets the draw mode for the web viewer and updates the context state. Changes how 3D models are rendered (wireframe, shaded, etc.).
      
      **Parameters**
      
      
         **drawMode**\ : *DrawMode*
      
      
            The draw mode to apply to the web viewer
      
      
      
      **Returns**\ : *void*
      
      
      



.. js:method:: wvc.WebViewerContextManager.setRedlineOperator

      .. rst-class:: sig-pretty-signature
      
         | setRedlineOperator(**redlineOperatorId**\ : *OperatorId*\ ): *void*
      
      Sets the active redline operator for drawing markup annotations. Validates the operator ID against supported redline modes before setting.
      
      **Parameters**
      
      
         **redlineOperatorId**\ : *OperatorId*
      
      
            The redline operator ID to activate
      
      
      
      **Returns**\ : *void*
      
      
      




