
    hF                     P    S r SSKJrJr  SSKJr   " S S\5      r " S S\5      rg)	zTabstop-related proxy types.    )WD_TAB_ALIGNMENTWD_TAB_LEADER)ElementProxyc                      ^  \ rS rSrSrU 4S jrS rS rS rS r	\
R                  \R                  4S jrS	 rS
rU =r$ )TabStops   a"  A sequence of |TabStop| objects providing access to the tab stops of a paragraph
or paragraph style.

Supports iteration, indexed access, del, and len(). It is accesed using the
:attr:`~.ParagraphFormat.tab_stops` property of ParagraphFormat; it is not intended
to be constructed directly.
c                 :   > [         [        U ]  US 5        Xl        g N)superr   __init___pPrselfelement	__class__s     D/var/www/html/env/lib/python3.13/site-packages/docx/text/tabstops.pyr   TabStops.__init__   s    h&w5	    c                     U R                   R                  n UR                  X!   5        [        U5      S:X  a  U R                   R                  U5        gg! [        [        4 a    [	        S5      ef = f)z0Remove the tab at offset `idx` in this sequence.ztab index out of ranger   N)r   tabsremoveAttributeError
IndexErrorlen)r   idxr   s      r   __delitem__TabStops.__delitem__   sh    yy~~	7KK	" t9>IIT"  
+ 	7566	7s   A A3c                 ~    U R                   R                  nUc  [        S5      eUR                  U   n[	        U5      $ )z#Enables list-style access by index.zTabStops object is empty)r   r   r   tab_lstTabStop)r   r   r   tabs       r   __getitem__TabStops.__getitem__   s8    yy~~<788ll3s|r   c              #      #    U R                   R                  nUb!  UR                   H  n[        U5      v   M     gg7f)zPGenerate a TabStop object for each of the w:tab elements, in XML document
order.N)r   r   r   r    )r   r   r!   s      r   __iter__TabStops.__iter__'   s7      yy~~||cl" $ s   <>c                 `    U R                   R                  nUc  g[        UR                  5      $ )Nr   )r   r   r   r   )r   r   s     r   __len__TabStops.__len__/   s&    yy~~<4<<  r   c                 p    U R                   R                  5       nUR                  XU5      n[        U5      $ )a  Add a new tab stop at `position`, a |Length| object specifying the location
of the tab stop relative to the paragraph edge.

A negative `position` value is valid and appears in hanging indentation. Tab
alignment defaults to left, but may be specified by passing a member of the
:ref:`WdTabAlignment` enumeration as `alignment`. An optional leader character
can be specified by passing a member of the :ref:`WdTabLeader` enumeration as
`leader`.
)r   get_or_add_tabsinsert_tab_in_orderr    )r   position	alignmentleaderr   r!   s         r   add_tab_stopTabStops.add_tab_stop5   s2     yy((*&&xFCs|r   c                 8    U R                   R                  5         g)zRemove all custom tab stops.N)r   _remove_tabsr   s    r   	clear_allTabStops.clear_allE   s    		 r   )r   )__name__
__module____qualname____firstlineno____doc__r   r   r"   r%   r(   r   LEFTr   SPACESr0   r5   __static_attributes____classcell__r   s   @r   r   r      sC    	##! #3"7"7@T@T ! !r   r   c                      ^  \ rS rSrSrU 4S jr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  S	 5       r
S
rU =r$ )r    J   z}An individual tab stop applying to a paragraph or style.

Accessed using list semantics on its containing |TabStops| object.
c                 :   > [         [        U ]  US 5        Xl        g r
   )r   r    r   _tabr   s     r   r   TabStop.__init__P   s    gt%gt4	r   c                 .    U R                   R                  $ )zcA member of :ref:`WdTabAlignment` specifying the alignment setting for this
tab stop.

Read/write.
rD   valr4   s    r   r.   TabStop.alignmentT        yy}}r   c                 $    XR                   l        g r
   rG   r   values     r   r.   rI   ]   s    		r   c                 .    U R                   R                  $ )zA member of :ref:`WdTabLeader` specifying a repeating character used as a
"leader", filling in the space spanned by this tab.

Assigning |None| produces the same result as assigning `WD_TAB_LEADER.SPACES`.
Read/write.
rD   r/   r4   s    r   r/   TabStop.leadera   s     yyr   c                 $    XR                   l        g r
   rO   rL   s     r   r/   rP   k   s     		r   c                 .    U R                   R                  $ )zA |Length| object representing the distance of this tab stop from the inside
edge of the paragraph.

May be positive or negative. Read/write.
)rD   posr4   s    r   r-   TabStop.positiono   rJ   r   c                     U R                   nUR                  5       nUR                  XR                  UR                  5      U l         UR                  U5        g r
   )rD   	getparentr,   rH   r/   r   )r   rM   r!   r   s       r   r-   rT   x   s>    ii}},,UGGSZZH	Cr   )rD   )r7   r8   r9   r:   r;   r   propertyr.   setterr/   r-   r>   r?   r@   s   @r   r    r    J   s    
         ]]! !   __ r   r    N)r;   docx.enum.textr   r   docx.sharedr   r   r     r   r   <module>r\      s)    " : $@!| @!F3l 3r   