o
    VÌh÷)  ã                   @  s   d dl mZ G dd„ dƒZdS )é    )Úannotationsc                   @  sH  e Zd ZdZdUdd„ZedVdd„ƒZedWd
d„ƒZedVdd„ƒZedWdd„ƒZ	edVdd„ƒZ
edVdd„ƒZedVdd„ƒZedVdd„ƒZedVdd„ƒZedVdd„ƒZedVdd„ƒZdXdd „Z	!dYdZd%d&„Z	!dYdZd'd(„Z	!	!	!d[d\d5d6„Zd]d8d9„Zd^d;d<„Zd_d>d?„Zd`dAdB„ZdadDdE„ZdbdGdH„ZdcdJdK„ZdddMdN„ZdedfdSdT„Zd!S )gÚ
TableStylez-
    Defines styles for Table instances.
    ÚreturnÚNonec                 C  s”   d| _ d| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d	| _d S )
Nú ú-ú|ú+z<b> {} </b>z<c1>{}</c1>z{}z {} Úright)Ú_padding_charÚ_horizontal_outside_border_charÚ_horizontal_inside_border_charÚ_vertical_outside_border_charÚ_vertical_inside_border_charÚ_crossing_charÚ_crossing_top_right_charÚ_crossing_top_mid_charÚ_crossing_top_left_charÚ_crossing_mid_right_charÚ_crossing_bottom_right_charÚ_crossing_bottom_mid_charÚ_crossing_bottom_left_charÚ_crossing_mid_left_charÚ_crossing_top_left_bottom_charÚ_crossing_top_mid_bottom_charÚ_crossing_top_right_bottom_charÚ_header_title_formatÚ_footer_title_formatÚ_cell_header_formatÚ_cell_row_formatÚ_cell_row_content_formatÚ_border_formatÚ	_pad_type©Úself© r%   úg/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/cleo/ui/table_style.pyÚ__init__	   s0   
zTableStyle.__init__Ústrc                 C  ó   | j S ©N)r   r#   r%   r%   r&   Úpadding_char#   ó   zTableStyle.padding_charú	list[str]c                 C  s   | j | j| j| jgS r*   )r   r   r   r   r#   r%   r%   r&   Úborder_chars'   s
   üzTableStyle.border_charsc                 C  r)   r*   )r   r#   r%   r%   r&   Úcrossing_char0   r,   zTableStyle.crossing_charc                 C  s4   | j | j| j| j| j| j| j| j| j| j	| j
| jgS r*   ©r   r   r   r   r   r   r   r   r   r   r   r   r#   r%   r%   r&   Úcrossing_chars4   s   ôzTableStyle.crossing_charsc                 C  r)   r*   ©r   r#   r%   r%   r&   Úcell_header_formatE   r,   zTableStyle.cell_header_formatc                 C  r)   r*   ©r   r#   r%   r%   r&   Úcell_row_formatI   r,   zTableStyle.cell_row_formatc                 C  r)   r*   ©r    r#   r%   r%   r&   Úcell_row_content_formatM   r,   z"TableStyle.cell_row_content_formatc                 C  r)   r*   ©r!   r#   r%   r%   r&   Úborder_formatQ   r,   zTableStyle.border_formatc                 C  r)   r*   ©r   r#   r%   r%   r&   Úheader_title_formatU   r,   zTableStyle.header_title_formatc                 C  r)   r*   ©r   r#   r%   r%   r&   Úfooter_title_formatY   r,   zTableStyle.footer_title_formatc                 C  r)   r*   )r"   r#   r%   r%   r&   Úpad_type]   r,   zTableStyle.pad_typer+   c                 C  s   |st dƒ‚|| _| S )z@
        Sets padding character, used for cell padding.
        z#The padding char must not be empty.)Ú
ValueErrorr   )r$   r+   r%   r%   r&   Úset_padding_chara   s   zTableStyle.set_padding_charNÚoutsideÚinsideú
str | Nonec                 C  ó"   || _ |du r|| _| S || _| S )u  
        Sets horizontal border characters.

        â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•—
        1 ISBN          2 Title                    â”‚ Author           â•‘
        â• â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•£
        â•‘ 99921-58-10-7 â”‚ Divine Comedy            â”‚ Dante Alighieri  â•‘
        â•‘ 9971-5-0210-0 â”‚ A Tale of Two Cities     â”‚ Charles Dickens  â•‘
        â•‘ 960-425-059-0 â”‚ The Lord of the Rings    â”‚ J. R. R. Tolkien â•‘
        â•‘ 80-902734-1-6 â”‚ And Then There Were None â”‚ Agatha Christie  â•‘
        â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
        N)r   r   ©r$   rA   rB   r%   r%   r&   Úset_horizontal_border_charsl   s
   þz&TableStyle.set_horizontal_border_charsc                 C  rD   )u×  
        Sets vertical border characters.

        â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•—
        â•‘ ISBN          â”‚ Title                    â”‚ Author           â•‘
        â• â•â•â•â•â•â•â•1â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•£
        â•‘ 99921-58-10-7 â”‚ Divine Comedy            â”‚ Dante Alighieri  â•‘
        â•‘ 9971-5-0210-0 â”‚ A Tale of Two Cities     â”‚ Charles Dickens  â•‘
        â•Ÿâ”€â”€â”€â”€â”€â”€â”€2â”€â”€â”€â”€â”€â”€â”€â”¼â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¼â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•¢
        â•‘ 960-425-059-0 â”‚ The Lord of the Rings    â”‚ J. R. R. Tolkien â•‘
        â•‘ 80-902734-1-6 â”‚ And Then There Were None â”‚ Agatha Christie  â•‘
        â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
        N)r   r   rE   r%   r%   r&   Úset_vertical_border_chars€   s
   þz$TableStyle.set_vertical_border_charsÚcrossÚtop_leftÚtop_midÚ	top_rightÚ	mid_rightÚbottom_rightÚ
bottom_midÚbottom_leftÚmid_leftÚtop_left_bottomÚtop_mid_bottomÚtop_right_bottomc                 C  sv   || _ || _|| _|| _|| _|| _|| _|| _|	| _|
du r!|	n|
| _	|du r*|n|| _
|du r6|| _| S || _| S )uÁ  
        Sets crossing characters.

        Example:

        1â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•2â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•2â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•3
        â•‘ ISBN          â”‚ Title                    â”‚ Author           â•‘
        8'â•â•â•â•â•â•â•â•â•â•â•â•â•â•0'â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•0'â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•4'
        â•‘ 99921-58-10-7 â”‚ Divine Comedy            â”‚ Dante Alighieri  â•‘
        â•‘ 9971-5-0210-0 â”‚ A Tale of Two Cities     â”‚ Charles Dickens  â•‘
        8â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€0â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€0â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€4
        â•‘ 960-425-059-0 â”‚ The Lord of the Rings    â”‚ J. R. R. Tolkien â•‘
        â•‘ 80-902734-1-6 â”‚ And Then There Were None â”‚ Agatha Christie  â•‘
        7â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•6â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•6â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•5
        Nr0   )r$   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   r%   r%   r&   Úset_crossing_chars•   s&   ÿÿ
ÿýÿzTableStyle.set_crossing_charsÚcharc                 C  s   |   |||||||||¡	S )zF
        Sets default crossing character used for each cross.
        )rT   )r$   rU   r%   r%   r&   Úset_default_crossing_charÈ   s   ÿz$TableStyle.set_default_crossing_charr3   c                 C  ó
   || _ | S )z.
        Sets the header cell format.
        r2   )r$   r3   r%   r%   r&   Úset_cell_header_formatÐ   ó   z!TableStyle.set_cell_header_formatr5   c                 C  rW   )z+
        Sets the row cell format.
        r4   )r$   r5   r%   r%   r&   Úset_cell_row_formatØ   rY   zTableStyle.set_cell_row_formatr7   c                 C  rW   )z3
        Sets the row cell content format.
        r6   )r$   r7   r%   r%   r&   Úset_cell_row_content_formatà   rY   z&TableStyle.set_cell_row_content_formatr9   c                 C  rW   )z)
        Sets the border format.
        r8   )r$   r9   r%   r%   r&   Úset_border_formatè   rY   zTableStyle.set_border_formatr;   c                 C  rW   )z/
        Sets the header title format.
        r:   )r$   r;   r%   r%   r&   Úset_header_title_formatð   rY   z"TableStyle.set_header_title_formatr=   c                 C  rW   )z/
        Sets the footer title format.
        r<   )r$   r=   r%   r%   r&   Úset_footer_title_formatø   rY   z"TableStyle.set_footer_title_formatr>   c                 C  s   |dvrt dƒ‚|| _| S )z(
        Sets the padding type.
        >   Úleftr
   ÚcenterzAInvalid padding type. Expected one of "left", "right", "center").)r?   r"   )r$   r>   r%   r%   r&   Úset_pad_type   s   ÿzTableStyle.set_pad_typer   ÚstringÚlengthÚintc                 C  s8   | j dkr| ||¡S | j dkr| ||¡S | ||¡S )Nr_   r
   )r"   ÚrjustÚljustr`   )r$   rb   rc   rU   r%   r%   r&   Úpad  s
   

zTableStyle.pad)r   r   )r   r(   )r   r-   )r+   r(   r   r   r*   )rA   r(   rB   rC   r   r   )NNN)rH   r(   rI   r(   rJ   r(   rK   r(   rL   r(   rM   r(   rN   r(   rO   r(   rP   r(   rQ   rC   rR   rC   rS   rC   r   r   )rU   r(   r   r   )r3   r(   r   r   )r5   r(   r   r   )r7   r(   r   r   )r9   r(   r   r   )r;   r(   r   r   )r=   r(   r   r   )r>   r(   r   r   )r   )rb   r(   rc   rd   rU   r(   r   r(   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r'   Úpropertyr+   r.   r/   r1   r3   r5   r7   r9   r;   r=   r>   r@   rF   rG   rT   rV   rX   rZ   r[   r\   r]   r^   ra   rg   r%   r%   r%   r&   r      sV    

ÿÿ ó
3






r   N)Ú
__future__r   r   r%   r%   r%   r&   Ú<module>   s    