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

.. oe:namespace:: OEDepict


.. _OEDepict_OELegendLayout:

.. oe:class:: OELegendLayout

   .. oe:api::

      class OELegendLayout

   This class represents :ref:`OELegendLayout <OEDepict_OELegendLayout>` which is a
   layout manager that allows to create interactive legends in
   :file:`SVG` image format.

   .. only:: oehtml

      .. raw:: html

         <p align="center">
         <b>click on the "Legend" label</b>
         </p>

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

         <p align="center">
         <b>Example of legend layout</b>
         <p>

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

      .. only:: oepdf

         |NOPDFIMAGE|


   .. seealso::

      * :ref:`OELegendLayoutOptions <OEDepict_OELegendLayoutOptions>` class
      * :oe:func:`OEDepict::OEDrawLegendLayout` function
      * :oe:constns:`OEDepict::OELegendLayoutStyle` namespace
      * :oe:constns:`OEDepict::OELegendColorStyle` namespace
      * :oe:constns:`OEDepict::OELegendInteractiveStyle` namespace


   .. ################################################################
      #
      ################################################################

   .. oe:method:: Constructors

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

         .. oe:api::

            OELegendLayout(OEImageBase& parent, const std::string& text,
                           const OELegendLayoutOptions& opts)

      .. oe:language:: python

         .. oe:api:: python

            OELegendLayout(image: OEImageBase, buttontext: str,
                           opts: OELegendLayoutOptions) -> OELegendLayout

      Creates an :ref:`OELegendLayout <OEDepict_OELegendLayout>` object with the specified
      options.

      *parent*
          The :ref:`OEImageBase <OEDepict_OEImageBase>` object on which the
          :ref:`OELegendLayout <OEDepict_OELegendLayout>` object is placed.

      *text*
          The text of the button of the legend.

      *opts*
          The :ref:`OELegendLayoutOptions <OEDepict_OELegendLayoutOptions>` object that
          defines the properties and style of the legend layout.

      .. seealso::

         * :oe:meth:`OEDepict::OELegendLayout::GetOptions` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetLegendArea

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

         .. oe:api::

            OEImage& GetLegendArea()

      .. oe:language:: python

         .. oe:api:: python

            GetLegendArea() -> OEImage

      Provides access to the legend area of the :ref:`OELegendLayout <OEDepict_OELegendLayout>`
      object.

      .. seealso::

          * :ref:`OEImage <OEDepict_OEImage>` class


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetOptions

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

         .. oe:api::

            const OELegendLayoutOptions& GetOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetOptions() -> OELegendLayoutOptions

      Returns the options used to initialized the :ref:`OELegendLayout <OEDepict_OELegendLayout>`
      object.

      .. seealso::

          * :ref:`OELegendLayoutOptions <OEDepict_OELegendLayoutOptions>` class


   .. ################################################################
      #
      ################################################################

   .. oe:method: Render INTERNAL ONLY

      .. oe:api::

         bool Render()
