
    ,h[b                     
   d 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 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  G d de      Z G d de      Z G d de      Z G d de      Z  G d de      Z!y)z5Text-related objects such as TextFrame and Paragraph.    )
to_unicode)
FillFormat)MSO_FILL)MSO_LANGUAGE_ID)MSO_AUTO_SIZEMSO_UNDERLINE)RELATIONSHIP_TYPE)ST_TextWrappingType)Subshape)	FontFiles)
TextFitter)CentipointsEmulazypropertyPtc                   "    e Zd ZdZ fdZd Zed        Zej                  d        Zd Z		 	 	 	 	 ddZ
ed        Zej                  d	        Zed
        Zej                  d        Zed        Zej                  d        Zed        Zej                  d        Zed        Zed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d        Zd Zd Zed        Zed        Zd Z x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.
    c                 H    t         t        |   |       |x| _        | _        y N)superr   __init___element_txBody)selftxBodyparent	__class__s      P/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/pptx/text/text.pyr   zTextFrame.__init__   s     i'/'--    c                 N    | j                   j                         }t        ||       S )z
        Return new |_Paragraph| instance appended to the sequence of
        paragraphs contained in this text frame.
        )r   add_p
_Paragraphr   ps     r   add_paragraphzTextFrame.add_paragraph   s#    
 LL !T""r   c                 .    | j                   j                  S )aP  
        The type of automatic resizing that should be 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   s    r   	auto_sizezTextFrame.auto_size%   s     ||###r   c                 &    || j                   _        y r   r'   r   values     r   r+   zTextFrame.auto_size0   s    $r   c                     | j                   j                  dd D ]  }| j                   j                  |        | j                  d   }|j	                          y)z+Remove all paragraphs except one empty one.   Nr   )r   p_lstremove
paragraphsclearr#   s     r   r4   zTextFrame.clear4   sK    ##AB' 	#ALL"	#OOA		r   c                 v    | j                   dk(  ry| j                  |||||      }| j                  ||||       y)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   font_familymax_sizebolditalic	font_file	font_sizes          r   fit_textzTextFrame.fit_text;   sA    , 99?,,4
	 	Yf=r   c                 .    | j                   j                  S )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)``.
        r(   bInsr*   s    r   margin_bottomzTextFrame.margin_bottomY   s     ||   r   c                 &    || j                   _        y r   rB   r   emus     r   rD   zTextFrame.margin_bottomb       r   c                 .    | j                   j                  S )zN
        Inset of text from left text frame border as |Length| value.
        r(   lInsr*   s    r   margin_leftzTextFrame.margin_leftf       
 ||   r   c                 &    || j                   _        y r   rJ   rF   s     r   rL   zTextFrame.margin_leftm   rH   r   c                 .    | j                   j                  S )zO
        Inset of text from right text frame border as |Length| value.
        r(   rInsr*   s    r   margin_rightzTextFrame.margin_rightq   rM   r   c                 &    || j                   _        y r   rP   rF   s     r   rR   zTextFrame.margin_rightx   rH   r   c                 .    | j                   j                  S )zM
        Inset of text from top text frame border as |Length| value.
        r(   tInsr*   s    r   
margin_topzTextFrame.margin_top|   rM   r   c                 &    || j                   _        y r   rU   rF   s     r   rW   zTextFrame.margin_top   rH   r   c           	      z    t        | j                  j                  D cg c]  }t        ||        c}      S c c}w )z
        Immutable sequence of |_Paragraph| instances corresponding to the
        paragraphs in this text frame. A text frame always contains at least
        one paragraph.
        )tupler   r1   r"   r#   s     r   r3   zTextFrame.paragraphs   s.     4<<3E3EFajD)FGGFs   8c                 F    dj                  d | j                  D              S )al  Unicode/str containing all text in this text-frame.

        Read/write. The return value is a str (unicode) containing 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. The assigned value can be
        a 7-bit ASCII string, a UTF-8 encoded 8-bit string, or unicode. A bytes value
        (such as a Python 2 ``str``) is converted to unicode assuming UTF-8 encoding.
        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              3   4   K   | ]  }|j                     y wr   r7   ).0	paragraphs     r   	<genexpr>z!TextFrame.text.<locals>.<genexpr>   s     III   )joinr3   r*   s    r   r7   zTextFrame.text   s    , yyIIIIr   c                     | j                   }|j                          t        |      j                  d      D ]#  }|j	                         }|j                  |       % y )Nr\   )r   clear_contentr   splitr!   append_text)r   r7   r   p_textr$   s        r   r7   zTextFrame.text   sM     &,,T2 	"FAMM&!	"r   c                 B    | j                   j                  j                  S )a  
        Read/write member of :ref:`MsoVerticalAnchor` enumeration or |None|,
        representing 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*   s    r   vertical_anchorzTextFrame.vertical_anchor   s     ||"")))r   c                 >    | j                   j                  }||_        y r   rj   )r   r.   rk   s      r   rm   zTextFrame.vertical_anchor   s    $$r   c                     t         j                  dt         j                  dddi| j                  j                  j
                     S )a  
        Read-write setting determining whether lines of text in this shape
        are wrapped to fit within the shape's width. 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   rk   wrapr*   s    r   	word_wrapzTextFrame.word_wrap   sC      &&$$e$
 ,,


"
"	$ 	$r   c                     |dvrt        d|z        t        j                  t        j                  d d|   | j                  j
                  _        y )N)TFNz3assigned value must be True, False, or None, got %s)
ValueErrorr
   rp   rq   r   rk   rr   r-   s     r   rs   zTextFrame.word_wrap   sU    ++EM  &,,&++$
 	$ r   c                 d    t         j                  | _        d| _        | j	                  ||||       y)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   rq   r+   rs   	_set_font)r   r:   r?   is_bold	is_italics        r   r9   zTextFrame._apply_fit   s*     '++{Iw	Br   c                     |t        j                  |||      }t        j                  | j                  | j
                  ||      S )a{  
        Return 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*.
        )r   findr   best_fit_font_sizer7   _extents)r   familyr;   r<   r=   r>   s         r   r8   zTextFrame._best_fit_font_size   s@     !vtV<I,,IIt}}h	
 	
r   c                 .    | j                   j                  S r   )r   rk   r*   s    r   r(   zTextFrame._bodyPr   s    ||"""r   c                     | j                   j                  | j                  z
  | j                  z
  | j                   j                  | j
                  z
  | j                  z
  fS )z
        A (cx, cy) 2-tuple representing the effective rendering area for text
        within this text frame when margins are taken into account.
        )_parentwidthrL   rR   heightrW   rD   r*   s    r   r}   zTextFrame._extents   sR     LL!1!11D4E4EELL$//1D4F4FF
 	
r   c                 `    d }fd}| j                   } ||      D ]  } |||||        y)z
        Set the font properties of all the text in this text frame to
        *family*, *size*, *bold*, and *italic*.
        c              3      K   | j                   D ]7  }|j                  D ]  }|j                           |j                          9 y wr   )r1   content_childrenget_or_add_rPrget_or_add_endParaRPr)r   r$   elms      r   	iter_rPrsz&TextFrame._set_font.<locals>.iter_rPrs  sN     \\ 0-- /C,,../ --//	0s   AA
c                 l    t        |       }t        |      ||f\  |_        |_        |_        |_        y r   )Fontr   namesizer<   r=   )rPrr   r   r<   r=   fr~   s         r   set_rPr_fontz)TextFrame._set_font.<locals>.set_rPr_font  s/    S	A/5r$xv/M,AFAFAFAHr   N)r   )	r   r~   r   r<   r=   r   r   r   r   s	    `       r   rw   zTextFrame._set_font  s=    	0	N V$ 	:CfdD&9	:r   )Calibri   FFN)__name__
__module____qualname____doc__r   r%   propertyr+   setterr4   r@   rD   rL   rR   rW   r3   r7   rm   rs   r9   r8   r(   r}   rw   __classcell__r   s   @r   r   r      s   .# $ $ % % >< ! !     ! !     ! !     ! !     H H J J. 
[[" " * *   $ $ 	 	C
 # # 
 
:r   r   c                   z    e Zd ZdZ fdZed        Zej                  d        Zed        Z	ed        Z
ed        Zej                  d        Zed	        Zej                  d
        Zed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d        Z xZS )r   a  
    Character 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.
    c                 F    t         t        |           |x| _        | _        y r   )r   r   r   r   _rPr)r   r   r   s     r   r   zFont.__init__   s    dD"$$''	r   c                 .    | j                   j                  S )a  
        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*   s    r   r<   z	Font.bold$  s     yy{{r   c                 &    || j                   _        y r   r   r-   s     r   r<   z	Font.bold0      		r   c                     | j                   j                  t        j                  k7  r| j                   j	                          | j                   j
                  S )zn
        The |ColorFormat| instance that provides access to the color settings
        for this font.
        )filltyper   SOLIDsolid
fore_colorr*   s    r   colorz
Font.color4  s6     99>>X^^+IIOOyy###r   c                 @    t        j                  | j                        S )zv
        |FillFormat| instance for this font, providing access to fill
        properties such as fill color.
        )r   from_fill_parentr   r*   s    r   r   z	Font.fill>  s     **49955r   c                 .    | j                   j                  S )z
        Get or set boolean italic value of |Font| instance, with the same
        behaviors as bold with respect to None values.
        r   ir*   s    r   r=   zFont.italicF  s     yy{{r   c                 &    || j                   _        y r   r   r-   s     r   r=   zFont.italicN  r   r   c                 ~    | j                   j                  }|t        j                  S | j                   j                  S )a  
        Get 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`.
        )r   langr   rq   )r   r   s     r   language_idzFont.language_idR  s0     yy~~<"'''yy~~r   c                 P    |t         j                  k(  rd }|| j                  _        y r   )r   rq   r   r   r-   s     r   r   zFont.language_id_  s     O(((E		r   c                 L    | j                   j                  }|y|j                  S )aF  
        Get or set the typeface name for this |Font| instance, causing 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   s     r   r   z	Font.namee  s#     		=~~r   c                     || j                   j                          y | j                   j                         }||_        y r   )r   _remove_latinget_or_add_latinr   )r   r.   r   s      r   r   z	Font.names  s0    =II##%II..0E"ENr   c                 J    | j                   j                  }|yt        |      S )ao  
        Read/write |Length| value or |None|, indicating the font height in
        English Metric Units (EMU). |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   s     r   r   z	Font.size{  s#    " YY\\:2r   c                 x    |d | j                   _        y t        |      j                  }|| j                   _        y r   )r   r   r   centipoints)r   rG   r   s      r   r   z	Font.size  s,    ;DIILS%%BDIILr   c                 ~    | j                   j                  }|t        j                  u ry|t        j                  u ry|S )a  
        Read/write. |True|, |False|, |None|, or a member of the
        :ref:`MsoTextUnderlineType` enumeration indicating the underline
        setting for this font. |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   rq   SINGLE_LINE)r   r   s     r   	underlinezFont.underline  s8     IIKK""")))r   c                 x    |du rt         j                  }n|du rt         j                  }|| j                  _        y )NTF)r   r   rq   r   r   r-   s     r   r   zFont.underline  s1    D=!--Ee^!&&Er   )r   r   r   r   r   r   r<   r   r   r   r   r=   r   r   r   r   r   r   s   @r   r   r     sA   ( 	 	 
[[  $ $ 6 6   ]]  
 
  
   
[[# #  * 
[[   $    r   r   c                   r     e Zd ZdZ fdZed        Zej                  d        Zd Zed        Z	d Z
 xZS )
_Hyperlinkz
    Text run hyperlink object. Corresponds to ``<a:hlinkClick>`` child
    element of the run's properties element (``<a:rPr>``).
    c                 :    t         t        |   |       || _        y r   )r   r   r   r   )r   r   r   r   s      r   r   z_Hyperlink.__init__  s    j$(0	r   c                 z    | j                   y| j                  j                  | j                   j                        S )z
        Read/write. The URL of the hyperlink. URL can be on http, https,
        mailto, or file scheme; others may work.
        N)_hlinkClickpart
target_refrIdr*   s    r   addressz_Hyperlink.address  s4     #yy##D$4$4$8$899r   c                 d    | j                   | j                          |r| j                  |       y y r   )r   _remove_hlinkClick_add_hlinkClick)r   urls     r   r   z_Hyperlink.address  s2     '##%  % r   c                     | j                   j                  |t        j                  d      }| j                  j                  |       y )NT)is_external)r   	relate_toRT	HYPERLINKr   add_hlinkClick)r   r   r   s      r   r   z_Hyperlink._add_hlinkClick  s3    ii!!#r||!F		  %r   c                 .    | j                   j                  S r   )r   
hlinkClickr*   s    r   r   z_Hyperlink._hlinkClick  s    yy###r   c                     | j                   J | j                  j                  | j                   j                         | j                  j                          y r   )r   r   drop_relr   r   r   r*   s    r   r   z_Hyperlink._remove_hlinkClick  s?    ++		4++//0		$$&r   )r   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r     sW    
 : : ^^& && $ $'r   r   c                       e Zd ZdZ fdZd Zd Zed        Zej                  d        Zd Z
ed        Zed	        Zej                  d
        Zed        Zej                  d        Zed        Zed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d        Zed        Zed        Z xZS )r"   z:Paragraph object. Not intended to be constructed directly.c                 H    t         t        |   |       |x| _        | _        y r   )r   r"   r   r   _p)r   r$   r   r   s      r   r   z_Paragraph.__init__  s     j$(0"##r   c                 8    | j                   j                          y)z(Add line break at end of this paragraph.N)r   add_brr*   s    r   add_line_breakz_Paragraph.add_line_break  s    r   c                 N    | j                   j                         }t        ||       S )zJ
        Return a new run appended to the runs in this paragraph.
        )r   add_r_Run)r   rs     r   add_runz_Paragraph.add_run  s     GGMMOAt}r   c                 .    | j                   j                  S )aq  
        Horizontal alignment of this paragraph, represented by either
        a member of the enumeration :ref:`PpParagraphAlignment` or |None|.
        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*   s    r   	alignmentz_Paragraph.alignment  s     yy~~r   c                 &    || j                   _        y r   r   r-   s     r   r   z_Paragraph.alignment  s    		r   c                 r    | j                   j                  D ]  }| j                   j                  |        | S )z
        Remove all content from this paragraph. Paragraph properties are
        preserved. Content includes runs, line breaks, and fields.
        )r   r   r2   )r   r   s     r   r4   z_Paragraph.clear   s4    
 ==11 	&CMM  %	&r   c                 ,    t        | j                        S )aZ  
        |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*   s    r   fontz_Paragraph.font	  s     DLL!!r   c                 .    | j                   j                  S )a&  
        Read-write integer indentation level of this paragraph, having a
        range of 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*   s    r   levelz_Paragraph.level  s     yy}}r   c                 &    || j                   _        y r   r   )r   r   s     r   r   z_Paragraph.level  s    		r   c                 L    | j                   j                  }|y|j                  S )a1  
        Numeric or |Length| value specifying 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   s     r   r   z_Paragraph.line_spacing"  s%     ggkk;r   c                 F    | j                   j                         }||_        y r   )r   get_or_add_pPrr   r   r.   r   s      r   r   z_Paragraph.line_spacing3      gg$$& r   c                 T     t         fd j                  j                  D              S )zk
        Immutable sequence of |_Run| objects corresponding to the runs in
        this paragraph.
        c              3   6   K   | ]  }t        |        y wr   )r   )r_   r   r   s     r   ra   z"_Paragraph.runs.<locals>.<genexpr>>  s     @qT!T]@s   )rZ   r   r_lstr*   s   `r   runsz_Paragraph.runs8  s      @DMM,?,?@@@r   c                 L    | j                   j                  }|y|j                  S )a  
        |Length| value specifying 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   s     r   r  z_Paragraph.space_after@  s#     ggkk;r   c                 F    | j                   j                         }||_        y r   )r   r   r  r   s      r   r  z_Paragraph.space_afterO  s    gg$$&r   c                 L    | j                   j                  }|y|j                  S )a  
        |Length| value specifying 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   s     r   r  z_Paragraph.space_beforeT  s%     ggkk;r   c                 F    | j                   j                         }||_        y r   )r   r   r  r   s      r   r  z_Paragraph.space_beforec  r   r   c                 Z    dj                  d | j                  j                  D              S )aR  str (unicode) representation of paragraph contents.

        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).

        The assigned value can be a 7-bit ASCII byte string (Python 2 str), a UTF-8
        encoded 8-bit byte string (Python 2 str), or unicode. Bytes values are converted
        to unicode assuming UTF-8 encoding.
        r6   c              3   4   K   | ]  }|j                     y wr   r^   )r_   r   s     r   ra   z"_Paragraph.text.<locals>.<genexpr>  s     JCsxxJrb   )rc   r   r   r*   s    r   r7   z_Paragraph.texth  s#    2 wwJ4==+I+IJJJr   c                 l    | j                          | j                  j                  t        |             y r   )r4   r   rg   r   )r   r7   s     r   r7   z_Paragraph.text  s"    

!!*T"23r   c                 6    | j                   j                         S )z
        The |CT_TextCharacterProperties| instance (<a:defRPr> 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*   s    r   r   z_Paragraph._defRPr  s     yy**,,r   c                 6    | j                   j                         S )z
        The |CT_TextParagraphProperties| instance for this paragraph, the
        <a:pPr> element containing its paragraph properties. Causes the
        element to be added if not present.
        )r   r   r*   s    r   r   z_Paragraph._pPr  s     ww%%''r   )r   r   r   r   r   r   r   r   r   r   r4   r   r   r   r   r  r  r7   r   r   r   r   s   @r   r"   r"     s~   D$     " "   \\       ! ! A A           ! ! K K4 
[[4 4 - - ( (r   r"   c                   v     e Zd ZdZ fdZed        Zed        Zed        Z	e	j                  d        Z	 xZS )r   zGText run object. Corresponds to ``<a:r>`` child element in a paragraph.c                 :    t         t        |   |       || _        y r   )r   r   r   _r)r   r   r   r   s      r   r   z_Run.__init__  s    dD"6*r   c                 L    | j                   j                         }t        |      S )ap  
        |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   s     r   r   z	_Run.font  s      gg$$&Cyr   c                 N    | j                   j                         }t        ||       S )as  
        |_Hyperlink| instance acting as 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  s     r   	hyperlinkz_Run.hyperlink  s#     gg$$&#t$$r   c                 .    | j                   j                  S )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  r7   r*   s    r   r7   z	_Run.text  s     ww||r   c                 8    t        |      | j                  _        y r   )r   r  r7   )r   strs     r   r7   z	_Run.text  s    !#r   )r   r   r   r   r   r   r   r   r  r7   r   r   r   s   @r   r   r     s_    Q 	 	 	% 	%   
[[' 'r   r   N)"r   pptx.compatr   pptx.dml.fillr   pptx.enum.dmlr   pptx.enum.langr   pptx.enum.textr   r   pptx.opc.constantsr	   r   pptx.oxml.simpletypesr
   pptx.shapesr   pptx.text.fontsr   pptx.text.layoutr   	pptx.utilr   r   r   r   r   objectr   r   r"   r    r   r   <module>r$     st    < " $ " * 7 6 5   % ' 8 8C: C:LZ 6 Z z'' ''Ty( y(x0'8 0'r   