.. include:: ../../toolkit-substitutions
.. include:: ../substitutions

.. oe:namespace:: OEDepict

.. _OEDepict_OEAddSVGHover:


.. oe:function:: OEAddSVGHover


   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OEAddSVGHover(OESVGGroup* area, OESVGGroup* target)

   .. oe:language:: python

      .. oe:api:: python

         OEAddSVGHover(area: OESVGGroup, target: OESVGGroup) -> bool

   Adds a hover effect to the objects drawn between the two given
   groups.
   While hovering the mouse over objects drawn inside the **area** group
   the objects drawn in the **target** group are displayed.

   .. note::

      This functionality is **only available** for :file:`.svg`
      image format.

   .. seealso::

      * :ref:`chapter_svg` chapter
      * :ref:`OESVGGroup <OEDepict_OESVGGroup>` class
      * :oe:func:`OEDepict::OEAddSVGClickEvent` function
      * :oe:func:`OEDepict::OEAddSVGToggle` function


   **Example:**

   .. oe:source:: AddSVGHover.cpp
      :language: c++
      :frag:     SNIPPET-ADD-SVG-HOVER

   .. oe:source:: AddSVGHover.py
      :language: python
      :frag:     SNIPPET-ADD-SVG-HOVER

   .. oe:source:: AddSVGHover.java
      :language: java
      :noindent:
      :frag:     SNIPPET-ADD-SVG-HOVER

   .. oe:source:: AddSVGHover.cs
      :language: csharp
      :noindent:
      :frag:     SNIPPET-ADD-SVG-HOVER

   .. only:: oehtml

      .. oe:language:: c++

         .. admonition:: Download code

            :download:`AddSVGHover.cpp <../../../../../sublibs/tklibs/depict/examples/docs/AddSVGHover.cpp>`

      .. oe:language:: python

         .. admonition:: Download code

            :download:`AddSVGHover.py <../../../../../wrappers/python/docexamples/depict/AddSVGHover.py>`

      .. oe:language:: java

         .. admonition:: Download code

            :download:`AddSVGHover.java <../../../../../wrappers/java/examples/openeye/docexamples/oedepict/AddSVGHover.java>`

      .. oe:language:: csharp

         .. admonition:: Download code

            :download:`AddSVGHover.cs <../../../../../wrappers/csharp/Csharp-Examples/OEDepictDocs/AddSVGHover.cs>`

   .. hint::

      The :oe:func:`OEDepict::OEAddSVGHover` function should always be called
      prior to pushing / popping the :ref:`OESVGGroup <OEDepict_OESVGGroup>` objects.

.. only:: oehtml

   .. raw:: html

      <p align="center">
      <b>hover the mouse over the red rectangle below</b>
      </p>

      <p align="center">
      <object data="../../_images/AddSVGHover.svg" type="image/svg+xml"  width = "300" ></object>
      <p>

      <p align="center">
      <b>Example of using the OEAddSVGHover function</b>
      <p>

   .. image:: ../../depicttk/images/AddSVGHover.svg
      :width: 1pt

   .. only:: oepdf

      |NOPDFIMAGE|

   .. oe:api::

      bool OEAddSVGHover(OESVGGroup* area, OESVGGroup* targetA,
                         OESVGGroup* targetB)

   Adds a hover effect to the objects drawn between the three given
   groups.
   While hovering the mouse over objects drawn inside the **area** group
   the objects drawn in the **targetA** and  **targetB** groups are displayed.

   .. note::

      This functionality is **only available** for :file:`.svg`
      image format.
