
    ,hQ                     t    d Z ddlmZmZ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.
    )absolute_importprint_functionunicode_literals   )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      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      X/var/www/html/Resume-Scraper/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_offset8   s     '')#r   c                 *    t        j                         S )N)r	   new_txPr)r   s    r   	_new_txPrzCT_Legend._new_txPrB   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   RIGHTr3   r0   r   r   r2   r2   F   s    
 E#5?Q?W?W
XCr   r2   N)r*   
__future__r   r   r   
enum.chartr   textr	   xmlchemyr
   r   r   r   r2   r0   r   r   <module>r:      s:    I H ,  D D5& 5&pY? Yr   