§
    £”j8  ã                   ó^   — d Z ddlmZmZ ddlmZ  G d„ de¦  «        Z G d„ de¦  «        ZdS )	zTabstop-related proxy types.é    )ÚWD_TAB_ALIGNMENTÚWD_TAB_LEADER)ÚElementProxyc                   ó`   ‡ — 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                 óh   •— t          t          | ¦  «                             |d ¦  «         || _        d S ©N)Úsuperr   Ú__init__Ú_pPr©ÚselfÚelementÚ	__class__s     €úa/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/docx/text/tabstops.pyr   zTabStops.__init__   s.   ø€ Ý�h˜ÑÔ×&Ò& w°Ñ5Ô5Ð5ØˆŒ	ˆ	ˆ	ó    c                 óþ   — | j         j        }	 |                     ||         ¦  «         n$# t          t          f$ r t	          d¦  «        ‚w xY wt          |¦  «        dk    r| j                              |¦  «         dS dS )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__   sŒ   € àŒyŒ~ˆð	7Ø�KŠK˜˜Sœ	Ñ"Ô"Ð"Ð"øÝ¥
Ð+ð 	7ð 	7ð 	7ÝÐ5Ñ6Ô6Ð6ð	7øøøõ ˆt‰9Œ9˜Š>ˆ>ØŒI×Ò˜TÑ"Ô"Ð"Ð"Ð"ð ˆ>s	   Ž* ª!Ac                 ót   — | j         j        }|€t          d¦  «        ‚|j        |         }t	          |¦  «        S )z#Enables list-style access by index.NzTabStops object is empty)r   r   r   Útab_lstÚTabStop)r   r   r   Útabs       r   Ú__getitem__zTabStops.__getitem__   s7   € àŒyŒ~ˆØˆ<ÝÐ7Ñ8Ô8Ð8ØŒl˜3ÔˆÝ�s‰|Œ|Ðr   c              #   ó`   K  — | j         j        }|�|j        D ]}t          |¦  «        V — ŒdS dS )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__'   sO   è è € ð ŒyŒ~ˆØÐØ”|ð #ð #�Ý˜c‘l”lÐ"Ð"Ð"Ð"ð Ðð#ð #r   c                 óJ   — | j         j        }|€dS t          |j        ¦  «        S )Nr   )r   r   r   r   )r   r   s     r   Ú__len__zTabStops.__len__/   s%   € ØŒyŒ~ˆØˆ<Ø�1Ý�4”<Ñ Ô Ð r   c                 ó€   — | 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   s:   € ð Œy×(Ò(Ñ*Ô*ˆØ×&Ò& x°¸FÑCÔCˆÝ�s‰|Œ|Ðr   c                 ó8   — | j                              ¦   «          dS )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È]Ô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                 óh   •— t          t          | ¦  «                             |d ¦  «         || _        d S r	   )r
   r   r   Ú_tabr   s     €r   r   zTabStop.__init__N   s.   ø€ Ý�g�tÑÔ×%Ò% g¨tÑ4Ô4Ð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Œ}Ðr   c                 ó   — || j         _        d S 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ÔÐr   c                 ó   — || j         _        d S 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        ¦  «        | _         |                     |¦  «         d S r	   )r9   Ú	getparentr&   r<   r)   r   )r   r@   r   r   s       r   r'   zTabStop.positionv   sK   € àŒiˆØ�}Š}‰ŒˆØ×,Ò,¨U°C´G¸S¼ZÑHÔHˆŒ	Ø�Š�CÑÔÐÐÐr   )r/   r0   r1   r2   r   Úpropertyr(   Úsetterr)   r'   r5   r6   s   @r   r   r   H   sì   ø€ € € € € ðð ð
ð ð ð ð ð ðð ñ „Xðð Ôðð ñ Ôðð ð ð  ñ „Xð ð „]ð!ð !ñ „]ð!ð ðð ñ „Xðð „_ðð ñ „_ðð ð ð ð r   r   N)r2   Údocx.enum.textr   r   Údocx.sharedr   r   r   © r   r   ú<module>rM      s”   ðØ "Ð "à :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ø $Ð $Ð $Ð $Ð $Ð $ð>!ð >!ð >!ð >!ð >!ˆ|ñ >!ô >!ð >!ðB3ð 3ð 3ð 3ð 3ˆlñ 3ô 3ð 3ð 3ð 3r   