o
    7 hc                     @  sd  d Z ddlm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 ddlmZmZmZ ddlmZ dd	lm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m Z m!Z! erddl"m#Z# ddlm$Z$mZm%Z% ddl&m'Z' ddl(m)Z)m*Z*m+Z+m,Z,m-Z- ddl.m/Z/m0Z0 G dd deZ1G dd de2Z3G dd deZ4G dd deZ5G dd deZ6dS )z5Text-related objects such as TextFrame and Paragraph.    )annotations)TYPE_CHECKINGIteratorcast)
FillFormat)MSO_FILL)MSO_LANGUAGE_ID)MSO_AUTO_SIZEMSO_UNDERLINEMSO_VERTICAL_ANCHOR)RELATIONSHIP_TYPE)ST_TextWrappingType)Subshape)	FontFiles)
TextFitter)CentipointsEmuLengthPtlazyproperty)ColorFormat)MSO_TEXT_UNDERLINE_TYPEr   PP_PARAGRAPH_ALIGNMENT)CT_Hyperlink)CT_RegularTextRunCT_TextBodyCT_TextCharacterPropertiesCT_TextParagraphCT_TextParagraphProperties)ProvidesExtentsProvidesPartc                      s~  e Zd ZdZdN fddZdd	 ZedOddZejdPddZdd Z						dQdRdd Z
edSd"d#ZejdTd%d#ZedSd&d'ZejdTd(d'ZedSd)d*ZejdTd+d*ZedSd,d-ZejdTd.d-ZedUd0d1ZedVd2d3ZejdWd5d3ZedXd7d8ZejdYd9d8ZedZd;d<Zejd[d=d<Zd\dAdBZd]dDdEZedFdG Zed^dIdJZd_dLdMZ  ZS )`	TextFramezThe part of a shape that contains its text.

    Not all shapes have a text frame. Corresponds to the `p:txBody` element that can
    appear as a child element of `p:sp`. Not intended to be constructed directly.
    txBodyr   parentr    c                   s&   t t| | | | _| _|| _d S N)superr!   __init___element_txBody_parent)selfr"   r#   	__class__ V/var/www/html/figdemos/bartoux_crm/venv/lib/python3.10/site-packages/pptx/text/text.pyr&   +   s   
zTextFrame.__init__c                 C     | j  }t|| S )z
        Return new |_Paragraph| instance appended to the sequence of
        paragraphs contained in this text frame.
        )r(   add_p
_Paragraphr*   pr-   r-   r.   add_paragraph0   s   

zTextFrame.add_paragraphreturnMSO_AUTO_SIZE | Nonec                 C     | j jS )as  Resizing strategy used to fit text within this shape.

        Determins the type of automatic resizing used to fit the text of this shape within its
        bounding box when the text would otherwise extend beyond the shape boundaries. May be
        |None|, `MSO_AUTO_SIZE.NONE`, `MSO_AUTO_SIZE.SHAPE_TO_FIT_TEXT`, or
        `MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE`.
        _bodyPrautofitr*   r-   r-   r.   	auto_size8   s   	zTextFrame.auto_sizevaluec                 C     || j _d S r$   r8   r*   r=   r-   r-   r.   r<   C      c                 C  s8   | j jdd D ]}| j | q| jd }|  dS )z+Remove all paragraphs except one empty one.   Nr   )r(   p_lstremove
paragraphsclearr2   r-   r-   r.   rE   G   s   
zTextFrame.clearCalibri   FNfont_familystrmax_sizeintboldboolitalic	font_file
str | Nonec                 C  s4   | j dkrdS | |||||}| |||| dS )a  Fit text-frame text entirely within bounds of its shape.

        Make the text in this text frame fit entirely within the bounds of its shape by setting
        word wrap on and applying the "best-fit" font size to all the text it contains.

        :attr:`TextFrame.auto_size` is set to :attr:`MSO_AUTO_SIZE.NONE`. The font size will not
        be set larger than `max_size` points. If the path to a matching TrueType font is provided
        as `font_file`, that font file will be used for the font metrics. If `font_file` is |None|,
        best efforts are made to locate a font file with matchhing `font_family`, `bold`, and
        `italic` installed on the current system (usually succeeds if the font is installed).
         N)text_best_fit_font_size
_apply_fit)r*   rH   rJ   rL   rN   rO   	font_sizer-   r-   r.   fit_textN   s   
zTextFrame.fit_textr   c                 C  r7   )z|Length| value representing the inset of text from the bottom text frame border.

        :meth:`pptx.util.Inches` provides a convenient way of setting the value, e.g.
        `text_frame.margin_bottom = Inches(0.05)`.
        r9   bInsr;   r-   r-   r.   margin_bottomh   s   zTextFrame.margin_bottomemuc                 C  r>   r$   rW   r*   rZ   r-   r-   r.   rY   q   r@   c                 C  r7   )z<Inset of text from left text frame border as |Length| value.r9   lInsr;   r-   r-   r.   margin_leftu      zTextFrame.margin_leftc                 C  r>   r$   r\   r[   r-   r-   r.   r^   z   r@   c                 C  r7   )z=Inset of text from right text frame border as |Length| value.r9   rInsr;   r-   r-   r.   margin_right~   r_   zTextFrame.margin_rightc                 C  r>   r$   r`   r[   r-   r-   r.   rb      r@   c                 C  r7   )z;Inset of text from top text frame border as |Length| value.r9   tInsr;   r-   r-   r.   
margin_top   r_   zTextFrame.margin_topc                 C  r>   r$   rc   r[   r-   r-   r.   re      r@   tuple[_Paragraph, ...]c                      t  fdd jjD S )zqSequence of paragraphs in this text frame.

        A text frame always contains at least one paragraph.
        c                   s   g | ]}t | qS r-   )r1   ).0r3   r;   r-   r.   
<listcomp>   s    z(TextFrame.paragraphs.<locals>.<listcomp>)tupler(   rB   r;   r-   r;   r.   rD      s   zTextFrame.paragraphsc                 C  s   d dd | jD S )au  All text in this text-frame as a single string.

        Read/write. The return value contains all text in this text-frame. A line-feed character
        (`"\n"`) separates the text for each paragraph. A vertical-tab character (`"\v"`) appears
        for each line break (aka. soft carriage-return) encountered.

        The vertical-tab character is how PowerPoint represents a soft carriage return in clipboard
        text, which is why that encoding was chosen.

        Assignment replaces all text in the text frame. A new paragraph is added for each line-feed
        character (`"\n"`) encountered. A line-break (soft carriage-return) is inserted for each
        vertical-tab character (`"\v"`) encountered.

        Any control character other than newline, tab, or vertical-tab are escaped as plain-text
        like "_x001B_" (for ESC (ASCII 32) in this example).
        
c                 s      | ]}|j V  qd S r$   rR   )rh   Z	paragraphr-   r-   r.   	<genexpr>       z!TextFrame.text.<locals>.<genexpr>)joinrD   r;   r-   r-   r.   rR      s   zTextFrame.textrR   c                 C  s4   | j }|  |dD ]}| }|| qd S )Nrk   )r(   clear_contentsplitr0   append_text)r*   rR   r"   Zp_textr3   r-   r-   r.   rR      s   MSO_VERTICAL_ANCHOR | Nonec                 C  s
   | j jjS )zRepresents the vertical alignment of text in this text frame.

        |None| indicates the effective value should be inherited from this object's style hierarchy.
        r(   bodyPranchorr;   r-   r-   r.   vertical_anchor      
zTextFrame.vertical_anchorc                 C  s   | j j}||_d S r$   ru   )r*   r=   rv   r-   r-   r.   rx      s   
bool | Nonec                 C  s   t jdt jdddi| jjj S )az  `True` when lines of text in this shape are wrapped to fit within the shape's width.

        Read-write. Valid values are True, False, or None. True and False turn word wrap on and
        off, respectively. Assigning None to word wrap causes any word wrap setting to be removed
        from the text frame, causing it to inherit this setting from its style hierarchy.
        TFN)r   SQUARENONEr(   rv   wrapr;   r-   r-   r.   	word_wrap   s   	zTextFrame.word_wrapc                 C  s2   |dvr
t d| tjtjd d| | jj_d S )N)TFNz3assigned value must be True, False, or None, got %s)
ValueErrorr   r{   r|   r(   rv   r}   r?   r-   r-   r.   r~      s   rU   is_bold	is_italicc                 C  s"   t j| _d| _| |||| dS )zArrange text in this text frame to fit inside its extents.

        This is accomplished by setting auto size off, wrap on, and setting the font of
        all its text to `font_family`, `font_size`, `is_bold`, and `is_italic`.
        TN)r	   r|   r<   r~   	_set_font)r*   rH   rU   r   r   r-   r-   r.   rT      s   zTextFrame._apply_fitfamilyc                 C  s*   |du rt |||}t| j| j||S )a  Return font-size in points that best fits text in this text-frame.

        The best-fit font size is the largest integer point size not greater than `max_size` that
        allows all the text in this text frame to fit inside its extents when rendered using the
        font described by `family`, `bold`, and `italic`. If `font_file` is specified, it is used
        to calculate the fit, whether or not it matches `family`, `bold`, and `italic`.
        N)r   findr   Zbest_fit_font_sizerR   _extents)r*   r   rJ   rL   rN   rO   r-   r-   r.   rS      s   
zTextFrame._best_fit_font_sizec                 C  r7   r$   )r(   rv   r;   r-   r-   r.   r9         zTextFrame._bodyPrtuple[Length, Length]c                 C  s8   t d| j}t|j| j | j t|j| j | j fS )z(cx, cy) 2-tuple representing the effective rendering area of this text-frame.

        Margins are taken into account.
        r   )	r   r)   r   widthr^   rb   heightre   rY   )r*   r#   r-   r-   r.   r      s   zTextFrame._extentssizec           	        s@   ddd}d fdd}| j }||D ]
}|| ||| qdS )z;Set the font properties of all the text in this text frame.r"   r   r5   $Iterator[CT_TextCharacterProperties]c                 s  s2    | j D ]}|jD ]}| V  q	| V  qd S r$   )rB   content_childrenget_or_add_rPrget_or_add_endParaRPr)r"   r3   elmr-   r-   r.   	iter_rPrs  s   

z&TextFrame._set_font.<locals>.iter_rPrsrPrr   namerI   r   rK   rL   rM   rN   c                   s,   t | } t|||f\|_|_|_|_d S r$   )Fontr   r   r   rL   rN   )r   r   r   rL   rN   fr   r-   r.   set_rPr_font  s   $z)TextFrame._set_font.<locals>.set_rPr_fontN)r"   r   r5   r   )
r   r   r   rI   r   rK   rL   rM   rN   rM   )r'   )	r*   r   r   rL   rN   r   r   r"   r   r-   r   r.   r     s   
zTextFrame._set_font)r"   r   r#   r    )r5   r6   )r=   r6   )rF   rG   FFN)
rH   rI   rJ   rK   rL   rM   rN   rM   rO   rP   )r5   r   )rZ   r   )r5   rf   r5   rI   rR   rI   )r5   rt   )r=   rt   r5   rz   r=   rz   )rH   rI   rU   rK   r   rM   r   rM   )r   rI   rJ   rK   rL   rM   rN   rM   rO   rP   r5   rK   )r5   r   )r   rI   r   rK   rL   rM   rN   rM   )__name__
__module____qualname____doc__r&   r4   propertyr<   setterrE   rV   rY   r^   rb   re   rD   rR   rx   r~   rT   rS   r9   r   r   __classcell__r-   r-   r+   r.   r!   $   sh    
	



r!   c                      s   e Zd ZdZd& fddZed'dd	Zejd(dd	Zed)ddZ	ed*ddZ
ed'ddZejd(ddZed+ddZejd,ddZed-ddZejd.ddZed/ddZejd0d!dZed1d#d$Zejd2d%d$Z  ZS )3r   zCharacter properties object, providing font size, font name, bold, italic, etc.

    Corresponds to `a:rPr` child element of a run. Also appears as `a:defRPr` and
    `a:endParaRPr` in paragraph and `a:defRPr` in list style elements.
    r   r   c                   s   t t|   | | _| _d S r$   )r%   r   r&   r'   _rPrr*   r   r+   r-   r.   r&     s   zFont.__init__r5   rz   c                 C  r7   )aj  Get or set boolean bold value of |Font|, e.g. `paragraph.font.bold = True`.

        If set to |None|, the bold setting is cleared and is inherited from an enclosing shape's
        setting, or a setting in a style or master. Returns None if no bold attribute is present,
        meaning the effective bold value is inherited from a master or the theme.
        r   br;   r-   r-   r.   rL   #     z	Font.boldr=   c                 C  r>   r$   r   r?   r-   r-   r.   rL   -  r@   r   c                 C  s    | j jtjkr| j   | j jS )zTThe |ColorFormat| instance that provides access to the color settings for this font.)filltyper   SOLIDsolid
fore_colorr;   r-   r-   r.   color1  s   
z
Font.colorr   c                 C  s   t | jS )zm|FillFormat| instance for this font.

        Provides access to fill properties such as fill color.
        )r   from_fill_parentr   r;   r-   r-   r.   r   8  s   z	Font.fillc                 C  r7   )zGet or set boolean italic value of |Font| instance.

        Has the same behaviors as bold with respect to None values.
        r   ir;   r-   r-   r.   rN   @  s   zFont.italicc                 C  r>   r$   r   r?   r-   r-   r.   rN   H  r@   MSO_LANGUAGE_ID | Nonec                 C  s   | j j}|du rtjS | j jS )zGet or set the language id of this |Font| instance.

        The language id is a member of the :ref:`MsoLanguageId` enumeration. Assigning |None|
        removes any language setting, the same behavior as assigning `MSO_LANGUAGE_ID.NONE`.
        N)r   langr   r|   )r*   r   r-   r-   r.   language_idL  s   zFont.language_idc                 C  s   |t jkrd }|| j_d S r$   )r   r|   r   r   r?   r-   r-   r.   r   X  s   
rP   c                 C     | j j}|du r
dS |jS )a5  Get or set the typeface name for this |Font| instance.

        Causes the text it controls to appear in the named font, if a matching font is found.
        Returns |None| if the typeface is currently inherited from the theme. Setting it to |None|
        removes any override of the theme typeface.
        N)r   latintypeface)r*   r   r-   r-   r.   r   ^     z	Font.namec                 C  s*   |d u r| j   d S | j  }||_d S r$   )r   _remove_latinget_or_add_latinr   )r*   r=   r   r-   r-   r.   r   k  s   

Length | Nonec                 C  s   | j j}|du r
dS t|S )a@  Indicates the font height in English Metric Units (EMU).

        Read/write. |None| indicates the font size should be inherited from its style hierarchy,
        such as a placeholder or document defaults (usually 18pt). |Length| is a subclass of |int|
        having properties for convenient conversion into points or other length units. Likewise,
        the :class:`pptx.util.Pt` class allows convenient specification of point values::

            >>> font.size = Pt(24)
            >>> font.size
            304800
            >>> font.size.pt
            24.0
        N)r   szr   )r*   r   r-   r-   r.   r   s  s   z	Font.sizerZ   c                 C  s*   |d u r
d | j _d S t|j}|| j _d S r$   )r   r   r   centipoints)r*   rZ   r   r-   r-   r.   r     s   
%bool | MSO_TEXT_UNDERLINE_TYPE | Nonec                 C  s(   | j j}|tju rdS |tju rdS |S )a  Indicaties the underline setting for this font.

        Value is |True|, |False|, |None|, or a member of the :ref:`MsoTextUnderlineType`
        enumeration. |None| is the default and indicates the underline setting should be inherited
        from the style hierarchy, such as from a placeholder. |True| indicates single underline.
        |False| indicates no underline. Other settings such as double and wavy underlining are
        indicated with members of the :ref:`MsoTextUnderlineType` enumeration.
        FT)r   ur
   r|   SINGLE_LINE)r*   r   r-   r-   r.   	underline  s   


zFont.underlinec                 C  s*   |du rt j}n|du rt j}|| j_d S )NTF)r
   r   r|   r'   r   r?   r-   r-   r.   r     s
   )r   r   r   r   )r5   r   )r5   r   )r5   r   )r=   r   r5   rP   )r=   rP   r5   r   )rZ   r   )r5   r   )r=   r   )r   r   r   r   r&   r   rL   r   r   r   r   rN   r   r   r   r   r   r-   r-   r+   r.   r     s>    	r   c                      s`   e Zd ZdZd fddZedd
dZejdddZdddZedddZ	dd Z
  ZS )
_Hyperlinkz{Text run hyperlink object.

    Corresponds to `a:hlinkClick` child element of the run's properties element (`a:rPr`).
    r   r   r#   r    c                      t t| | || _d S r$   )r%   r   r&   r   )r*   r   r#   r+   r-   r.   r&        
z_Hyperlink.__init__r5   rP   c                 C  s   | j du rdS | j| j jS )z{The URL of the hyperlink.

        Read/write. URL can be on http, https, mailto, or file scheme; others may work.
        N)_hlinkClickpart
target_refrIdr;   r-   r-   r.   address  s   
z_Hyperlink.addressurlc                 C  s(   | j d ur	|   |r| | d S d S r$   )r   _remove_hlinkClick_add_hlinkClick)r*   r   r-   r-   r.   r     s
   
rI   c                 C  s$   | j j|tjdd}| j| d S )NT)is_external)r   	relate_toRT	HYPERLINKr   add_hlinkClick)r*   r   r   r-   r-   r.   r     s   z_Hyperlink._add_hlinkClickCT_Hyperlink | Nonec                 C  r7   r$   )r   
hlinkClickr;   r-   r-   r.   r     r   z_Hyperlink._hlinkClickc                 C  s,   | j d usJ | j| j j | j  d S r$   )r   r   drop_relr   r   r   r;   r-   r-   r.   r     s   z_Hyperlink._remove_hlinkClick)r   r   r#   r    r   )r   rP   )r   rI   )r5   r   )r   r   r   r   r&   r   r   r   r   r   r   r   r-   r-   r+   r.   r     s    	
r   c                      s(  e Zd ZdZd6 fddZdd	 Zd7ddZed8ddZej	d9ddZdd Z
ed:ddZed;ddZej	d<ddZed=ddZej	d>d dZed?d"d#Zed@d%d&Zej	dAd'd&Zed@d(d)Zej	dAd*d)ZedBd,d-Zej	dCd/d-ZedDd1d2ZedEd4d5Z  ZS )Fr1   z:Paragraph object. Not intended to be constructed directly.r3   r   r#   r    c                   s    t t| | | | _| _d S r$   )r%   r1   r&   r'   _p)r*   r3   r#   r+   r-   r.   r&     s   z_Paragraph.__init__c                 C  s   | j   dS )z(Add line break at end of this paragraph.N)r   add_brr;   r-   r-   r.   add_line_break  s   z_Paragraph.add_line_breakr5   _Runc                 C  r/   )z8Return a new run appended to the runs in this paragraph.)r   add_rr   )r*   rr-   r-   r.   add_run     

z_Paragraph.add_runPP_PARAGRAPH_ALIGNMENT | Nonec                 C  r7   )a  Horizontal alignment of this paragraph.

        The value |None| indicates the paragraph should 'inherit' its effective value from its
        style hierarchy. Assigning |None| removes any explicit setting, causing its inherited
        value to be used.
        _pPralgnr;   r-   r-   r.   	alignment  r   z_Paragraph.alignmentr=   c                 C  r>   r$   r   r?   r-   r-   r.   r     r@   c                 C  s   | j jD ]}| j | q| S )zRemove all content from this paragraph.

        Paragraph properties are preserved. Content includes runs, line breaks, and fields.
        )r'   r   rC   )r*   r   r-   r-   r.   rE     s   z_Paragraph.clearr   c                 C  s
   t | jS )aJ  |Font| object containing default character properties for the runs in this paragraph.

        These character properties override default properties inherited from parent objects such
        as the text frame the paragraph is contained in and they may be overridden by character
        properties set at the run level.
        )r   _defRPrr;   r-   r-   r.   font  s   
z_Paragraph.fontrK   c                 C  r7   )a  Indentation level of this paragraph.

        Read-write. Integer in range 0..8 inclusive. 0 represents a top-level paragraph and is the
        default value. Indentation level is most commonly encountered in a bulleted list, as is
        found on a word bullet slide.
        r   lvlr;   r-   r-   r.   level  r   z_Paragraph.levelr   c                 C  r>   r$   r   )r*   r   r-   r-   r.   r     r@   int | float | Length | Nonec                 C  r   )a  The space between baselines in successive lines of this paragraph.

        A value of |None| indicates no explicit value is assigned and its effective value is
        inherited from the paragraph's style hierarchy. A numeric value, e.g. `2` or `1.5`,
        indicates spacing is applied in multiples of line heights. A |Length| value such as
        `Pt(12)` indicates spacing is a fixed height. The |Pt| value class is a convenient way to
        apply line spacing in units of points.
        N)r   pPrline_spacingr*   r   r-   r-   r.   r     s   
z_Paragraph.line_spacingc                 C     | j  }||_d S r$   )r   get_or_add_pPrr   r*   r=   r   r-   r-   r.   r   !  r   tuple[_Run, ...]c                   rg   )z#Sequence of runs in this paragraph.c                 3  s    | ]}t | V  qd S r$   )r   )rh   r   r;   r-   r.   rn   )  s    z"_Paragraph.runs.<locals>.<genexpr>)rj   r'   r_lstr;   r-   r;   r.   runs&  s   z_Paragraph.runsr   c                 C  r   )a{  The spacing to appear between this paragraph and the subsequent paragraph.

        A value of |None| indicates no explicit value is assigned and its effective value is
        inherited from the paragraph's style hierarchy. |Length| objects provide convenience
        properties, such as `.pt` and `.inches`, that allow easy conversion to various length
        units.
        N)r   r   space_afterr   r-   r-   r.   r   +  s   	z_Paragraph.space_afterc                 C  r   r$   )r   r   r   r   r-   r-   r.   r   9  r   c                 C  r   )aj  The spacing to appear between this paragraph and the prior paragraph.

        A value of |None| indicates no explicit value is assigned and its effective value is
        inherited from the paragraph's style hierarchy. |Length| objects provide convenience
        properties, such as `.pt` and `.cm`, that allow easy conversion to various length units.
        N)r   r   space_beforer   r-   r-   r.   r   >  r   z_Paragraph.space_beforec                 C  r   r$   )r   r   r   r   r-   r-   r.   r   K  r   rI   c                 C  s   d dd | jjD S )aT  Text of paragraph as a single string.

        Read/write. This value is formed by concatenating the text in each run and field making up
        the paragraph, adding a vertical-tab character (`"\v"`) for each line-break element
        (`<a:br>`, soft carriage-return) encountered.

        While the encoding of line-breaks as a vertical tab might be surprising at first, doing so
        is consistent with PowerPoint's clipboard copy behavior and allows a line-break to be
        distinguished from a paragraph boundary within the str return value.

        Assignment causes all content in the paragraph to be replaced. Each vertical-tab character
        (`"\v"`) in the assigned str is translated to a line-break, as is each line-feed
        character (`"\n"`). Contrast behavior of line-feed character in `TextFrame.text` setter.
        If line-feed characters are intended to produce new paragraphs, use `TextFrame.text`
        instead. Any other control characters in the assigned string are escaped as a hex
        representation like "_x001B_" (for ESC (ASCII 27) in this example).
        rQ   c                 s  rl   r$   rm   )rh   r   r-   r-   r.   rn   c  ro   z"_Paragraph.text.<locals>.<genexpr>)rp   r'   r   r;   r-   r-   r.   rR   P  s   z_Paragraph.textrR   c                 C  s   |    | j| d S r$   )rE   r'   rs   r*   rR   r-   r-   r.   rR   e  s   r   c                 C  
   | j  S )zThe element that defines the default run properties for runs in this paragraph.

        Causes the element to be added if not present.
        )r   get_or_add_defRPrr;   r-   r-   r.   r   j  ry   z_Paragraph._defRPrr   c                 C  r   )zlContains the properties for this paragraph.

        Causes the element to be added if not present.
        )r   r   r;   r-   r-   r.   r   r  ry   z_Paragraph._pPr)r3   r   r#   r    )r5   r   )r5   r   )r=   r   )r5   r   )r5   rK   )r   rK   )r5   r   )r=   r   )r5   r   r   )r=   r   r   r   )r5   r   )r5   r   )r   r   r   r   r&   r   r   r   r   r   rE   r   r   r   r   r   r   rR   r   r   r   r-   r-   r+   r.   r1     sL    
				r1   c                      sX   e Zd ZdZd fddZedd	 ZedddZedd Z	e	j
dddZ	  ZS )r   zCText run object. Corresponds to `a:r` child element in a paragraph.r   r   r#   r    c                   r   r$   )r%   r   r&   _r)r*   r   r#   r+   r-   r.   r&   ~  r   z_Run.__init__c                 C  s   | j  }t|S )a`  |Font| instance containing run-level character properties for the text in this run.

        Character properties can be and perhaps most often are inherited from parent objects such
        as the paragraph and slide layout the run is contained in. Only those specifically
        overridden at the run level are contained in the font object.
        )r   r   r   r   r-   r-   r.   r     s   
z	_Run.fontr5   r   c                 C  r/   )a;  Proxy for any `a:hlinkClick` element under the run properties element.

        Created on demand, the hyperlink object is available whether an `a:hlinkClick` element is
        present or not, and creates or deletes that element as appropriate in response to actions
        on its methods and attributes.
        )r   r   r   r   r-   r-   r.   	hyperlink  s   

z_Run.hyperlinkc                 C  r7   )ab  Read/write. A unicode string containing the text in this run.

        Assignment replaces all text in the run. The assigned value can be a 7-bit ASCII
        string, a UTF-8 encoded 8-bit string, or unicode. String values are converted to
        unicode assuming UTF-8 encoding.

        Any other control characters in the assigned string other than tab or newline
        are escaped as a hex representation. For example, ESC (ASCII 27) is escaped as
        "_x001B_". Contrast the behavior of `TextFrame.text` and `_Paragraph.text` with
        respect to line-feed and vertical-tab characters.
        r   rR   r;   r-   r-   r.   rR     s   z	_Run.textrR   rI   c                 C  r>   r$   r   r   r-   r-   r.   rR     r@   )r   r   r#   r    )r5   r   r   )r   r   r   r   r&   r   r   r   r   rR   r   r   r-   r-   r+   r.   r   {  s    



r   N)7r   
__future__r   typingr   r   r   pptx.dml.fillr   pptx.enum.dmlr   pptx.enum.langr   pptx.enum.textr	   r
   r   pptx.opc.constantsr   r   pptx.oxml.simpletypesr   Zpptx.shapesr   Zpptx.text.fontsr   Zpptx.text.layoutr   	pptx.utilr   r   r   r   r   pptx.dml.colorr   r   r   pptx.oxml.actionr   pptx.oxml.textr   r   r   r   r   Z
pptx.typesr   r    r!   objectr   r   r1   r   r-   r-   r-   r.   <module>   s6     u * )