
    li(                    l    d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	m
Z
  G d de      Z G d d	e      Zy
)z<lxml custom element classes for legend-related XML elements.    )annotations)XL_LEGEND_POSITION)CT_TextBody)BaseOxmlElementOptionalAttribute	ZeroOrOnec                      e Zd ZdZdZ ededd       Z ededd       Z ed	ed
d       Z ededd       Z	[e
d        Ze
d        Zej                  d        Zd Zy)	CT_Legendz-
    ``<c:legend>`` custom element class
    )c:legendPoszc:legendEntryc:layout	c:overlayzc:spPrc:txPrzc:extLstr      N)
successorsr      r      r      c                >    | j                         }|j                  }|S )z
        `./c:txPr/a:p/a:pPr/a:defRPr` great-great-grandchild element, added
        with its ancestors if not present.
        )get_or_add_txPrdefRPr)selftxPrr   s      T/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/pptx/oxml/chart/legend.pyr   zCT_Legend.defRPr   s      ##%    c                8    | j                   }|y|j                  S )z
        The float value in ./c:layout/c:manualLayout/c:x when
        ./c:layout/c:manualLayout/c:xMode@val == "factor". 0.0 if that
        XPath expression has no match.
        g        )layouthorz_offset)r   r   s     r   r   zCT_Legend.horz_offset(   s!     >!!!r   c                2    | j                         }||_        y)z
        Set the value of ./c:layout/c:manualLayout/c:x@val to *offset* and
        ./c:layout/c:manualLayout/c:xMode@val to "factor". Remove
        ./c:layout/c:manualLayout if *offset* == 0.
        N)get_or_add_layoutr   )r   offsetr   s      r   r   zCT_Legend.horz_offset4   s     '')#r   c                *    t        j                         S )N)r   new_txPr)r   s    r   	_new_txPrzCT_Legend._new_txPr>   s    ##%%r   )__name__
__module____qualname____doc___tag_seqr   	legendPosr   overlayr   propertyr   r   setterr#    r   r   r
   r
   
   s    H -HQRLAIzhqrl;F=GX(12,7D  	" 	" $ $&r   r
   c                  :    e Zd ZdZ edeej                        Zy)CT_LegendPoszx
    ``<c:legendPos>`` element specifying position of legend with respect to
    chart as a member of ST_LegendPos.
    val)defaultN)r$   r%   r&   r'   r   r   RIGHTr0   r-   r   r   r/   r/   B   s    
 E#5?Q?W?W
XCr   r/   N)r'   
__future__r   pptx.enum.chartr   pptx.oxml.textr   pptx.oxml.xmlchemyr   r   r   r
   r/   r-   r   r   <module>r7      s2    B " . & L L5& 5&pY? Yr   