Ë
    \Rði8  ã                   óP   — d Z ddlmZmZ ddlmZ  G d„ de«      Z G d„ de«      Zy)	zTabstop-related proxy types.é    )ÚWD_TAB_ALIGNMENTÚWD_TAB_LEADER)ÚElementProxyc                   ót   ‡ — e Zd ZdZˆ fd„Zd„ Zd„ Zd„ Zd„ Ze	j                  ej                  fd„Zd„ Zˆ xZS )	ÚTabStopsa6  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                 ó<   •— t         t        | �  |d «       || _        y ©N)Úsuperr   Ú__init__Ú_pPr©ÚselfÚelementÚ	__class__s     €úM/var/www/html/Extract/venv/lib/python3.12/site-packages/docx/text/tabstops.pyr   zTabStops.__init__   s   ø€ ÜŒh˜Ñ& w°Ô5Øˆ�	ó    c                 óê   — | j                   j                  }	 |j                  ||   «       t        |«      dk(  r| j                   j                  |«       yy# t        t        f$ r t	        d«      ‚w xY w)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__zTabStops.__delitem__   sj   € à�y‰y�~‰~ˆð	7Ø�K‰K˜˜S™	Ô"ô ˆt‹9˜Š>Ø�I‰I×Ñ˜TÕ"ð øô ¤
Ð+ò 	7ÜÐ5Ó6Ð6ð	7ús   ˜A ÁA2c                 ó|   — | j                   j                  }|€t        d«      ‚|j                  |   }t	        |«      S )z#Enables list-style access by index.zTabStops object is empty)r   r   r   Útab_lstÚTabStop)r   r   r   Útabs       r   Ú__getitem__zTabStops.__getitem__   s8   € à�y‰y�~‰~ˆØˆ<ÜÐ7Ó8Ð8Ø�l‰l˜3ÑˆÜ�s‹|Ðr   c              #   óz   K  — | j                   j                  }|�|j                  D ]  }t        |«      –— Œ yy­w)zXGenerate 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__zTabStops.__iter__'   s=   è ø€ ð �y‰y�~‰~ˆØÐØ—|‘|ò #�Ü˜c“lÓ"ñ#ð ùs   ‚9;c                 ó^   — | j                   j                  }|€yt        |j                  «      S )Nr   )r   r   r   r   )r   r   s     r   Ú__len__zTabStops.__len__/   s&   € Ø�y‰y�~‰~ˆØˆ<ØÜ�4—<‘<Ó Ð r   c                 ór   — | j                   j                  «       }|j                  |||«      }t        |«      S )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_stopzTabStops.add_tab_stop5   s4   € ð �y‰y×(Ñ(Ó*ˆØ×&Ñ& x°¸FÓCˆÜ�s‹|Ðr   c                 ó8   — | j                   j                  «        y)zRemove all custom tab stops.N)r   Ú_remove_tabs©r   s    r   Ú	clear_allzTabStops.clear_allC   s   € à�	‰	×ÑÕ r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r!   r#   r   ÚLEFTr   ÚSPACESr*   r.   Ú__classcell__©r   s   @r   r   r      s?   ø„ ñôò	#òò#ò!ð 0@×/DÑ/DÈ]×MaÑMaó ö!r   r   c                   ó¾   ‡ — e Zd ZdZˆ f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   z…An individual tab stop applying to a paragraph or style.

    Accessed using list semantics on its containing |TabStops| object.
    c                 ó<   •— t         t        | �  |d «       || _        y r	   )r
   r   r   Ú_tabr   s     €r   r   zTabStop.__init__N   s   ø€ ÜŒg�tÑ% g¨tÔ4Øˆ�	r   c                 ó.   — | j                   j                  S )z{A member of :ref:`WdTabAlignment` specifying the alignment setting for this
        tab stop.

        Read/write.
        ©r9   Úvalr-   s    r   r(   zTabStop.alignmentR   ó   € ð �y‰y�}‰}Ðr   c                 ó&   — || j                   _        y r	   r;   ©r   Úvalues     r   r(   zTabStop.alignment[   s   € àˆ�	‰	�r   c                 ó.   — | j                   j                  S )zúA 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.
        ©r9   r)   r-   s    r   r)   zTabStop.leader_   s   € ð �y‰y×ÑÐr   c                 ó&   — || j                   _        y r	   rB   r?   s     r   r)   zTabStop.leaderi   s   € à ˆ�	‰	Õr   c                 ó.   — | j                   j                  S )z¦A |Length| object representing the distance of this tab stop from the inside
        edge of the paragraph.

        May be positive or negative. Read/write.
        )r9   Úposr-   s    r   r'   zTabStop.positionm   r=   r   c                 ó¶   — | j                   }|j                  «       }|j                  ||j                  |j                  «      | _         |j                  |«       y r	   )r9   Ú	getparentr&   r<   r)   r   )r   r@   r   r   s       r   r'   zTabStop.positionv   s@   € à�i‰iˆØ�}‰}‹ˆØ×,Ñ,¨U°C·G±G¸S¿Z¹ZÓHˆŒ	Ø�‰�CÕr   )r/   r0   r1   r2   r   Úpropertyr(   Úsetterr)   r'   r5   r6   s   @r   r   r   H   s“   ø„ ñô
ð ñó ðð ×Ññó ðð ñ ó ð ð ‡]�]ñ!ó ð!ð ñó ðð ‡_�_ñó ôr   r   N)r2   Údocx.enum.textr   r   Údocx.sharedr   r   r   © r   r   ú<module>rM      s'   ðÙ "ç :Ý $ô>!ˆ|ô >!ôB3ˆlõ 3r   