Xj8PdZddlmZmZddlmZGddeZGddeZy) zTabstop-related proxy types.)WD_TAB_ALIGNMENT WD_TAB_LEADER) ElementProxycteZdZdZfdZdZdZdZdZe je jfdZ dZxZS) TabStopsa6A 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<tt| |d||_yN)superr__init___pPrselfelement __class__s f/mnt/ssd/data/Dropbox/adrian/vault-secondbrain/venv/lib/python3.12/site-packages/docx/text/tabstops.pyr zTabStops.__init__s h&w5 c|jj} |j||t |dk(r|jj|yy#ttf$r t dwxYw)z0Remove the tab at offset `idx` in this sequence.ztab index out of rangerN)r tabsremoveAttributeError IndexErrorlen)ridxrs r __delitem__zTabStops.__delitem__sjyy~~ 7 KKS " t9> II  T "  + 756 6 7s AA2c||jj}| td|j|}t |S)z#Enables list-style access by index.zTabStops object is empty)r rrtab_lstTabStop)rrrtabs r __getitem__zTabStops.__getitem__s8yy~~ <78 8ll3s|rc#zK|jj}||jD]}t|yyw)zXGenerate a TabStop object for each of the w:tab elements, in XML document order.N)r rrr)rrrs r__iter__zTabStops.__iter__'s=yy~~  || #cl" # s9;c^|jj}|yt|jS)Nr)r rrr)rrs r__len__zTabStops.__len__/s&yy~~ <4<<  rcr|jj}|j|||}t|S)aAdd 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_tabsinsert_tab_in_orderr)rposition alignmentleaderrrs r add_tab_stopzTabStops.add_tab_stop5s4yy((*&&xFCs|rc8|jjy)zRemove all custom tab stops.N)r _remove_tabsrs r clear_allzTabStops.clear_allCs  r)__name__ __module__ __qualname____doc__r rrr!r#rLEFTrSPACESr*r. __classcell__rs@rrrs? ##! 0@/D/D]MaMa !rrceZdZdZfdZedZejdZedZejdZedZ e jdZ xZ S) rzAn individual tab stop applying to a paragraph or style. Accessed using list semantics on its containing |TabStops| object. c<tt| |d||_yr )r rr _tabr s rr zTabStop.__init__Ns gt%gt4 rc.|jjS)z{A member of :ref:`WdTabAlignment` specifying the alignment setting for this tab stop. Read/write. r9valr-s rr(zTabStop.alignmentRyy}}rc&||j_yr r;rvalues rr(zTabStop.alignment[s  rc.|jjS)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. r9r)r-s rr)zTabStop.leader_syyrc&||j_yr rBr?s rr)zTabStop.leaderis  rc.|jjS)zA |Length| object representing the distance of this tab stop from the inside edge of the paragraph. May be positive or negative. Read/write. )r9posr-s rr'zTabStop.positionmr=rc|j}|j}|j||j|j|_|j |yr )r9 getparentr&r<r)r)rr@rrs rr'zTabStop.positionvs@ii}},,UCGGSZZH  Cr) r/r0r1r2r propertyr(setterr)r'r5r6s@rrrHs    ]]!!__rrN)r2docx.enum.textrr docx.sharedrrrrrrMs'":$>!|>!B3l3r