
    hi(                    z    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d
S )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dS )	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        }|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      n/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/pptx/oxml/chart/legend.pyr   zCT_Legend.defRPr   s!     ##%%    c                &    | j         }|dS |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.
        Ng        )layouthorz_offset)r   r   s     r   r   zCT_Legend.horz_offset(   s     >3!!r   c                <    |                                  }||_        dS )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 	-HQRRLAAAIYzhqrrl;;;Fi===G9X(122,777D  X 	" 	" X	" $ $ $& & & & &r   r
   c                  8    e Zd ZdZ edeej                  ZdS )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   s6         
 
E#5?Q?W
X
X
XCCCr   r/   N)r'   
__future__r   pptx.enum.chartr   pptx.oxml.textr   pptx.oxml.xmlchemyr   r   r   r
   r/   r-   r   r   <module>r7      s    B B " " " " " " . . . . . . & & & & & & L L L L L L L L L L5& 5& 5& 5& 5& 5& 5& 5&pY Y Y Y Y? Y Y Y Y Yr   