
    ~Zic                       S r SSKJr  SSKJrJrJr  SSKJr  SSK	J
r
  SSKJr  SSKJrJrJr  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJrJrJrJ r J!r!  \(       a,  SSK"J#r#  SSKJ$r$JrJ%r%  SSK&J'r'  SSK(J)r)J*r*J+r+J,r,J-r-  SSK.J/r/J0r0   " S S\5      r1 " S S\25      r3 " S S\5      r4 " S S\5      r5 " S S\5      r6g)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                    ^  \ rS rSrSrSU 4S jjrS r\SS j5       r\R                  S S j5       rS r
     S!         S"S jjr\S#S	 j5       r\R                  S$S
 j5       r\S#S j5       r\R                  S$S j5       r\S#S j5       r\R                  S$S j5       r\S#S j5       r\R                  S$S j5       r\S%S j5       r\S&S j5       r\R                  S'S j5       r\S(S j5       r\R                  S)S j5       r\S*S j5       r\R                  S+S j5       rS,S jr            S-S jr\S 5       r\S.S j5       rS/S jrSrU =r$ )0	TextFrame$   zThe 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                T   > [         [        U ]  U5        U=U l        U l        X l        g N)superr#   __init___element_txBody_parent)selftxBodyparent	__class__s      h/var/www/eduai.edurigo.com/question_generate/ques_gen_env/lib/python3.13/site-packages/pptx/text/text.pyr(   TextFrame.__init__+   s%    i'/'--    c                L    U R                   R                  5       n[        X5      $ )zg
Return new |_Paragraph| instance appended to the sequence of
paragraphs contained in this text frame.
)r*   add_p
_Paragraphr,   ps     r0   add_paragraphTextFrame.add_paragraph0   s!    
 LL !""r2   c                .    U R                   R                  $ )aK  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,   s    r0   	auto_sizeTextFrame.auto_size8   s     ||###r2   c                $    XR                   l        g r&   r;   r,   values     r0   r?   r@   C   s    $r2   c                    U R                   R                  SS  H  nU R                   R                  U5        M      U R                  S   nUR	                  5         g)z+Remove all paragraphs except one empty one.   Nr   )r*   p_lstremove
paragraphsclearr6   s     r0   rI   TextFrame.clearG   sF    ##AB'ALL" (OOA		r2   c                p    U R                   S:X  a  gU R                  XX4U5      nU R                  XX45        g)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          r0   fit_textTextFrame.fit_textN   s5    ( 99?,,[DR[\	=r2   c                .    U R                   R                  $ )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    r0   margin_bottomTextFrame.margin_bottomh   s     ||   r2   c                $    XR                   l        g r&   rY   r,   emus     r0   r[   r\   q       r2   c                .    U R                   R                  $ )z<Inset of text from left text frame border as |Length| value.r<   lInsr>   s    r0   margin_leftTextFrame.margin_leftu        ||   r2   c                $    XR                   l        g r&   rb   r^   s     r0   rd   re   z   r`   r2   c                .    U R                   R                  $ )z=Inset of text from right text frame border as |Length| value.r<   rInsr>   s    r0   margin_rightTextFrame.margin_right~   rf   r2   c                $    XR                   l        g r&   ri   r^   s     r0   rk   rl      r`   r2   c                .    U R                   R                  $ )z;Inset of text from top text frame border as |Length| value.r<   tInsr>   s    r0   
margin_topTextFrame.margin_top   rf   r2   c                $    XR                   l        g r&   ro   r^   s     r0   rq   rr      r`   r2   c           	     ~    [        U R                  R                   Vs/ s H  n[        X5      PM     sn5      $ s  snf )zaSequence of paragraphs in this text frame.

A text frame always contains at least one paragraph.
)tupler*   rF   r5   r6   s     r0   rH   TextFrame.paragraphs   s2     4<<3E3EF3Eaj)3EFGGFs   :c                F    SR                  S U R                   5       5      $ )a  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              3  8   #    U  H  oR                   v   M     g 7fr&   rM   ).0	paragraphs     r0   	<genexpr>!TextFrame.text.<locals>.<genexpr>   s     II   )joinrH   r>   s    r0   rM   TextFrame.text   s    $ yyIIIIr2   c                    U R                   nUR                  5         UR                  S5       H$  nUR                  5       nUR	                  U5        M&     g )Nrx   )r*   clear_contentsplitr4   append_text)r,   rM   r-   p_textr7   s        r0   rM   r      sA    jj&FAMM&! 'r2   c                B    U R                   R                  R                  $ )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>   s    r0   vertical_anchorTextFrame.vertical_anchor   s     ||"")))r2   c                <    U R                   R                  nXl        g r&   r   )r,   rC   r   s      r0   r   r      s    $$r2   c                    [         R                  S[         R                  SSS0U R                  R                  R
                     $ )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*   r   wrapr>   s    r0   	word_wrapTextFrame.word_wrap   sC      &&$$e$
 ,,


"
"	$ 	$r2   c                    US;  a  [        SU-  5      e[        R                  [        R                  S S.U   U R                  R
                  l        g )N)TFNz3assigned value must be True, False, or None, got %s)
ValueErrorr   r   r   r*   r   r   rB   s     r0   r   r      sU    ++EM  &,,&++$
 	$ r2   c                `    [         R                  U l        SU l        U R	                  XX45        g)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,   rP   rU   is_bold	is_italics        r0   rO   TextFrame._apply_fit   s&     '++{wBr2   c                    Uc  [         R                  " XU5      n[        R                  " U R                  U R
                  X%5      $ )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`.
)r   findr   best_fit_font_sizerM   _extents)r,   familyrQ   rR   rS   rT   s         r0   rN   TextFrame._best_fit_font_size   s7     !vV<I,,TYYx[[r2   c                .    U R                   R                  $ r&   )r*   r   r>   s    r0   r<   TextFrame._bodyPr   s    ||"""r2   c                    [        SU R                  5      n[        UR                  U R                  -
  U R
                  -
  5      [        UR                  U R                  -
  U R                  -
  5      4$ )zp(cx, cy) 2-tuple representing the effective rendering area of this text-frame.

Margins are taken into account.
r    )	r   r+   r   widthrd   rk   heightrq   r[   )r,   r.   s     r0   r   TextFrame._extents   sa     '66<<$"2"22T5F5FFG6==4??2T5G5GGH
 	
r2   c                   ^ SS jn          SU4S jjnU R                   nU" U5       H  nU" UTX#U5        M     g)z;Set the font properties of all the text in this text frame.c              3     #    U R                    H:  nUR                   H  nUR                  5       v   M     UR                  5       v   M<     g 7fr&   )rF   content_childrenget_or_add_rPrget_or_add_endParaRPr)r-   r7   elms      r0   	iter_rPrs&TextFrame._set_font.<locals>.iter_rPrs  sC     \\--C,,.. . --//	 "s   AAc                j   > [        U 5      nT[        U5      X44u  Ul        Ul        Ul        Ul        g r&   )Fontr   namesizerR   rS   )rPrr   r   rR   rS   fr   s         r0   set_rPr_font)TextFrame._set_font.<locals>.set_rPr_font  s/     S	A/5r$x/M,AFAFAFAHr2   N)r-   r   returnz$Iterator[CT_TextCharacterProperties])
r   r   r   strr   intrR   boolrS   r   )r)   )	r,   r   r   rR   rS   r   r   r-   r   s	    `       r0   r   TextFrame._set_font  sc    	0	N+	N36	N>A	NIM	NW[	N V$Cfd&9 %r2   )r)   r+   r*   r?   r   )r-   r   r.   r!   )r   MSO_AUTO_SIZE | None)rC   r   )Calibri   FFN)
rP   r   rQ   r   rR   r   rS   r   rT   
str | None)r   r   )r_   r   )r   ztuple[_Paragraph, ...]r   r   rM   r   )r   MSO_VERTICAL_ANCHOR | None)rC   r   r   bool | NonerC   r   )rP   r   rU   r   r   r   r   r   )r   r   rQ   r   rR   r   rS   r   rT   r   r   r   )r   ztuple[Length, Length])r   r   r   r   rR   r   rS   r   )__name__
__module____qualname____firstlineno____doc__r(   r8   propertyr?   setterrI   rV   r[   rd   rk   rq   rH   rM   r   r   rO   rN   r<   r   r   __static_attributes____classcell__r/   s   @r0   r#   r#   $   sW   
# $ $ % % % $>> > 	>
 > >4 ! !     ! !     ! !     ! !     H H J J& 
[[" " * *   $ $ 	 	C\\%(\04\>B\OY\	\ # # 	
 	
: :r2   r#   c                    ^  \ rS rSrSrSU 4S jjr\SS j5       r\R                  SS j5       r\	SS j5       r
\	SS j5       r\SS j5       r\R                  SS	 j5       r\SS
 j5       r\R                  SS j5       r\SS j5       r\R                  SS j5       r\SS j5       r\R                  SS j5       r\SS j5       r\R                  SS j5       rSrU =r$ ) r   i  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.
c                F   > [         [        U ]  5         U=U l        U l        g r&   )r'   r   r(   r)   _rPr)r,   r   r/   s     r0   r(   Font.__init__  s    dD"$$''	r2   c                .    U R                   R                  $ )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>   s    r0   rR   	Font.bold#  s     yy{{r2   c                $    XR                   l        g r&   r   rB   s     r0   rR   r   -      		r2   c                    U R                   R                  [        R                  :w  a  U R                   R	                  5         U R                   R
                  $ )zTThe |ColorFormat| instance that provides access to the color settings for this font.)filltyper   SOLIDsolid
fore_colorr>   s    r0   color
Font.color1  s6     99>>X^^+IIOOyy###r2   c                B    [         R                  " U R                  5      $ )z]|FillFormat| instance for this font.

Provides access to fill properties such as fill color.
)r   from_fill_parentr   r>   s    r0   r   	Font.fill8  s     **49955r2   c                .    U R                   R                  $ )zqGet or set boolean italic value of |Font| instance.

Has the same behaviors as bold with respect to None values.
r   ir>   s    r0   rS   Font.italic@  s     yy{{r2   c                $    XR                   l        g r&   r   rB   s     r0   rS   r   H  r   r2   c                    U R                   R                  nUc  [        R                  $ U R                   R                  $ )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`.
)r   langr	   r   )r,   r   s     r0   language_idFont.language_idL  s0     yy~~<"'''yy~~r2   c                P    U[         R                  :X  a  S nXR                  l        g r&   )r	   r   r   r   rB   s     r0   r   r   X  s    O(((E		r2   c                N    U R                   R                  nUc  gUR                  $ )a  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   s     r0   r   	Font.name^  s#     		=~~r2   c                    Uc  U R                   R                  5         g U R                   R                  5       nXl        g r&   )r   _remove_latinget_or_add_latinr   )r,   rC   r   s      r0   r   r   k  s.    =II##%II..0E"Nr2   c                L    U R                   R                  nUc  g[        U5      $ )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   s     r0   r   	Font.sizes  s#     YY\\:2r2   c                x    Uc  S U R                   l        g [        U5      R                  nX R                   l        g r&   )r   r   r   centipoints)r,   r_   r   s      r0   r   r     s*    ;DIILS%%BIILr2   c                    U R                   R                  nU[        R                  L a  gU[        R                  L a  gU$ )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   s     r0   	underlineFont.underline  s8     IIKK""")))r2   c                z    USL a  [         R                  nOUSL a  [         R                  nXR                  l        g )NTF)r   r   r   r)   r   rB   s     r0   r   r     s/    D=!--Ee^!&&Er2   )r)   r   )r   r   r   r   )r   r   )r   r   )r   MSO_LANGUAGE_ID | None)rC   r  r   r   )rC   r   r   Length | None)r_   r  )r   %bool | MSO_TEXT_UNDERLINE_TYPE | None)rC   r  )r   r   r   r   r   r(   r   rR   r   r   r   r   rS   r   r   r   r   r   r   r   s   @r0   r   r     sA   (   
[[  $ $ 6 6   ]]  	 	  
 
 
 
[[# #  & 
[[        r2   r   c                     ^  \ rS rSrSrS
U 4S jjr\SS j5       r\R                  SS j5       rSS jr	\SS j5       r
S rS	rU =r$ )
_Hyperlinki  zsText run hyperlink object.

Corresponds to `a:hlinkClick` child element of the run's properties element (`a:rPr`).
c                8   > [         [        U ]  U5        Xl        g r&   )r'   r  r(   r   )r,   r   r.   r/   s      r0   r(   _Hyperlink.__init__  s    j$(0	r2   c                |    U R                   c  gU R                  R                  U R                   R                  5      $ )zkThe 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>   s    r0   address_Hyperlink.address  s4     #yy##D$4$4$8$899r2   c                p    U R                   b  U R                  5         U(       a  U R                  U5        g g r&   )r  _remove_hlinkClick_add_hlinkClick)r,   urls     r0   r  r    s2     '##%  % r2   c                    U R                   R                  U[        R                  SS9nU R                  R                  U5        g )NT)is_external)r  	relate_toRT	HYPERLINKr   add_hlinkClick)r,   r  r  s      r0   r  _Hyperlink._add_hlinkClick  s3    ii!!#r||!F		  %r2   c                .    U R                   R                  $ r&   )r   
hlinkClickr>   s    r0   r  _Hyperlink._hlinkClick  s    yy###r2   c                    U R                   c   eU R                  R                  U R                   R                  5        U R                  R                  5         g r&   )r  r  drop_relr  r   r  r>   s    r0   r  _Hyperlink._remove_hlinkClick  sB    +++		4++//0		$$&r2   )r   )r   r   r.   r!   r  )r  r   )r  r   )r   zCT_Hyperlink | None)r   r   r   r   r   r(   r   r  r   r  r  r  r   r   r   s   @r0   r  r    s\    
 : : ^^& && $ $' 'r2   r  c                    ^  \ rS rSrSrSU 4S jjrS rSS jr\SS j5       r	\	R                  SS j5       r	S r\SS	 j5       r\SS
 j5       r\R                  SS j5       r\SS j5       r\R                  S S j5       r\S!S j5       r\S"S j5       r\R                  S#S j5       r\S"S j5       r\R                  S#S j5       r\S$S j5       r\R                  S%S j5       r\S&S j5       r\S'S j5       rSrU =r$ )(r5   i  z:Paragraph object. Not intended to be constructed directly.c                H   > [         [        U ]  U5        U=U l        U l        g r&   )r'   r5   r(   r)   _p)r,   r7   r.   r/   s      r0   r(   _Paragraph.__init__  s     j$(0"##r2   c                8    U R                   R                  5         g)z(Add line break at end of this paragraph.N)r$  add_brr>   s    r0   add_line_break_Paragraph.add_line_break  s    r2   c                L    U R                   R                  5       n[        X5      $ )z8Return a new run appended to the runs in this paragraph.)r$  add_r_Run)r,   rs     r0   add_run_Paragraph.add_run  s    GGMMOA}r2   c                .    U R                   R                  $ )zHorizontal 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>   s    r0   	alignment_Paragraph.alignment  s     yy~~r2   c                $    XR                   l        g r&   r1  rB   s     r0   r4  r5    s    		r2   c                v    U R                   R                   H  nU R                   R                  U5        M      U $ )z}Remove all content from this paragraph.

Paragraph properties are preserved. Content includes runs, line breaks, and fields.
)r)   r   rG   )r,   r   s     r0   rI   _Paragraph.clear  s/    
 ==11CMM  % 2r2   c                ,    [        U R                  5      $ )a*  |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    r0   font_Paragraph.font  s     DLL!!r2   c                .    U R                   R                  $ )zIndentation 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.
r2  lvlr>   s    r0   level_Paragraph.level  s     yy}}r2   c                $    XR                   l        g r&   r>  )r,   r@  s     r0   r@  rA    s    		r2   c                N    U R                   R                  nUc  gU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,   rD  s     r0   rE  _Paragraph.line_spacing  s%     ggkk;r2   c                D    U R                   R                  5       nXl        g r&   )r$  get_or_add_pPrrE  r,   rC   rD  s      r0   rE  rG  !      gg$$& r2   c                V   ^  [        U 4S jT R                  R                   5       5      $ )z#Sequence of runs in this paragraph.c              3  <   >#    U  H  n[        UT5      v   M     g 7fr&   )r,  )r{   r-  r,   s     r0   r}   "_Paragraph.runs.<locals>.<genexpr>)  s     @,?qT!T]],?s   )ru   r)   r_lstr>   s   `r0   runs_Paragraph.runs&  s      @DMM,?,?@@@r2   c                N    U R                   R                  nUc  gUR                  $ )aS  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$  rD  space_afterrF  s     r0   rS  _Paragraph.space_after+  s#     ggkk;r2   c                D    U R                   R                  5       nXl        g r&   )r$  rI  rS  rJ  s      r0   rS  rT  9  s    gg$$&r2   c                N    U R                   R                  nUc  gU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$  rD  space_beforerF  s     r0   rW  _Paragraph.space_before>  s%     ggkk;r2   c                D    U R                   R                  5       nXl        g r&   )r$  rI  rW  rJ  s      r0   rW  rX  K  rK  r2   c                Z    SR                  S U R                  R                   5       5      $ )a  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).
rL   c              3  8   #    U  H  oR                   v   M     g 7fr&   rz   )r{   r   s     r0   r}   "_Paragraph.text.<locals>.<genexpr>c  s     J+ICxx+Ir   )r   r)   r   r>   s    r0   rM   _Paragraph.textP  s#    & wwJ4==+I+IJJJr2   c                Z    U R                  5         U R                  R                  U5        g r&   )rI   r)   r   r,   rM   s     r0   rM   r]  e  s    

!!$'r2   c                6    U R                   R                  5       $ )zThe element that defines the default run properties for runs in this paragraph.

Causes the element to be added if not present.
)r2  get_or_add_defRPrr>   s    r0   r:  _Paragraph._defRPrj  s     yy**,,r2   c                6    U R                   R                  5       $ )z\Contains the properties for this paragraph.

Causes the element to be added if not present.
)r$  rI  r>   s    r0   r2  _Paragraph._pPrr  s     ww%%''r2   )r)   r$  )r7   r   r.   r!   )r   r,  )r   PP_PARAGRAPH_ALIGNMENT | None)rC   re  )r   r   )r   r   )r@  r   )r   int | float | Length | None)rC   rf  )r   ztuple[_Run, ...]r  )rC   r  r   r   )r   r   )r   r   )r   r   r   r   r   r(   r(  r.  r   r4  r   rI   r;  r@  rE  rP  rS  rW  rM   r:  r2  r   r   r   s   @r0   r5   r5     s~   D$
     " "   \\      ! ! A A       
  
  ! ! K K( 
[[( ( - - ( (r2   r5   c                     ^  \ rS rSrSrS	U 4S jjr\S 5       r\S
S j5       r	\S 5       r
\
R                  SS j5       r
SrU =r$ )r,  i{  zCText run object. Corresponds to `a:r` child element in a paragraph.c                8   > [         [        U ]  U5        Xl        g r&   )r'   r,  r(   _r)r,   r-  r.   r/   s      r0   r(   _Run.__init__~  s    dD"6*r2   c                L    U R                   R                  5       n[        U5      $ )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.
)ri  r   r   r,   r   s     r0   r;  	_Run.font  s      gg$$&Cyr2   c                L    U R                   R                  5       n[        X5      $ )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.
)ri  r   r  rl  s     r0   	hyperlink_Run.hyperlink  s!     gg$$&#$$r2   c                .    U R                   R                  $ )a"  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.
ri  rM   r>   s    r0   rM   	_Run.text  s     ww||r2   c                $    XR                   l        g r&   rr  r_  s     r0   rM   rs    s    r2   )ri  )r-  r   r.   r!   )r   r  r   )r   r   r   r   r   r(   r   r;  r   ro  rM   r   r   r   r   s   @r0   r,  r,  {  s_    M   % %   
[[ r2   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   pptx.shapesr   pptx.text.fontsr   pptx.text.layoutr   	pptx.utilr   r   r   r   r   pptx.dml.colorr   r   r   pptx.oxml.actionr   pptx.oxml.textr   r   r   r   r   
pptx.typesr    r!   r#   objectr   r  r5   r,   r2   r0   <module>r     s    ; " 0 0 $ " * L L 6 5   % ' @ @* 
 .  9q: q:hN 6 N b'' ''Te( e(P.8 .r2   