
    f                        d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 ddl
mZ ddlmZ dd	lmZ d
gZ G d d
e      Zy)    )annotations)TextIO)CursorShapeSize)Attrs   )Output)
ColorDepth)flush_stdoutPlainTextOutputc                  2   e Zd ZdZd'dZd(dZd)dZd*dZd*dZd+dZ	d,dZ
d,d	Zd,d
Zd,dZd,dZd,dZd,dZd,dZd,dZd,dZd-dZd,dZd,dZd.d/dZd0dZd0dZd0dZd0dZd,dZd,dZd1dZd,dZd,dZ d,dZ!d,d Z"d,d!Z#d,d"Z$d2d#Z%d(d$Z&d3d%Z'y&)4r   aR  
    Output that won't include any ANSI escape sequences.

    Useful when stdout is not a terminal. Maybe stdout is redirected to a file.
    In this case, if `print_formatted_text` is used, for instance, we don't
    want to include formatting.

    (The code is mostly identical to `Vt100_Output`, but without the
    formatting.)
    c                N    t        fddD              sJ | _        g | _        y )Nc              3  6   K   | ]  }t        |        y wN)hasattr).0astdouts     [/var/www/cvtools/html/venv/lib/python3.12/site-packages/prompt_toolkit/output/plain_text.py	<genexpr>z+PlainTextOutput.__init__.<locals>.<genexpr>   s     B!761%Bs   )writeflush)allr   _buffer)selfr   s    `r   __init__zPlainTextOutput.__init__   s&    B/ABBBB$"$    c                6    | j                   j                         S )z*There is no sensible default for fileno().)r   filenor   s    r   r    zPlainTextOutput.fileno"   s    {{!!##r   c                     y)Nzutf-8 r!   s    r   encodingzPlainTextOutput.encoding&   s    r   c                :    | j                   j                  |       y r   r   appendr   datas     r   r   zPlainTextOutput.write)       D!r   c                :    | j                   j                  |       y r   r&   r(   s     r   	write_rawzPlainTextOutput.write_raw,   r*   r   c                     y r   r#   )r   titles     r   	set_titlezPlainTextOutput.set_title/       r   c                     y r   r#   r!   s    r   clear_titlezPlainTextOutput.clear_title2   r0   r   c                    | j                   sy dj                  | j                         }g | _         t        | j                  |       y )N )r   joinr   r   r(   s     r   r   zPlainTextOutput.flush5   s3    ||wwt||$T[[$'r   c                     y r   r#   r!   s    r   erase_screenzPlainTextOutput.erase_screen=   r0   r   c                     y r   r#   r!   s    r   enter_alternate_screenz&PlainTextOutput.enter_alternate_screen@   r0   r   c                     y r   r#   r!   s    r   quit_alternate_screenz%PlainTextOutput.quit_alternate_screenC   r0   r   c                     y r   r#   r!   s    r   enable_mouse_supportz$PlainTextOutput.enable_mouse_supportF   r0   r   c                     y r   r#   r!   s    r   disable_mouse_supportz%PlainTextOutput.disable_mouse_supportI   r0   r   c                     y r   r#   r!   s    r   erase_end_of_linez!PlainTextOutput.erase_end_of_lineL   r0   r   c                     y r   r#   r!   s    r   
erase_downzPlainTextOutput.erase_downO   r0   r   c                     y r   r#   r!   s    r   reset_attributesz PlainTextOutput.reset_attributesR   r0   r   c                     y r   r#   )r   attrscolor_depths      r   set_attributeszPlainTextOutput.set_attributesU   r0   r   c                     y r   r#   r!   s    r   disable_autowrapz PlainTextOutput.disable_autowrapX   r0   r   c                     y r   r#   r!   s    r   enable_autowrapzPlainTextOutput.enable_autowrap[   r0   r   c                     y r   r#   )r   rowcolumns      r   cursor_gotozPlainTextOutput.cursor_goto^   r0   r   c                     y r   r#   r   amounts     r   	cursor_upzPlainTextOutput.cursor_upa   r0   r   c                :    | j                   j                  d       y )N
r&   rS   s     r   cursor_downzPlainTextOutput.cursor_downd   r*   r   c                @    | j                   j                  d|z         y )N r&   rS   s     r   cursor_forwardzPlainTextOutput.cursor_forwardg   s    C&L)r   c                     y r   r#   rS   s     r   cursor_backwardzPlainTextOutput.cursor_backwardj   r0   r   c                     y r   r#   r!   s    r   hide_cursorzPlainTextOutput.hide_cursorm   r0   r   c                     y r   r#   r!   s    r   show_cursorzPlainTextOutput.show_cursorp   r0   r   c                     y r   r#   )r   cursor_shapes     r   set_cursor_shapez PlainTextOutput.set_cursor_shapes   r0   r   c                     y r   r#   r!   s    r   reset_cursor_shapez"PlainTextOutput.reset_cursor_shapev   r0   r   c                     y r   r#   r!   s    r   ask_for_cprzPlainTextOutput.ask_for_cpry   r0   r   c                     y r   r#   r!   s    r   bellzPlainTextOutput.bell|   r0   r   c                     y r   r#   r!   s    r   enable_bracketed_pastez&PlainTextOutput.enable_bracketed_paste   r0   r   c                     y r   r#   r!   s    r   disable_bracketed_pastez'PlainTextOutput.disable_bracketed_paste   r0   r   c                     y r   r#   r!   s    r   scroll_buffer_to_promptz'PlainTextOutput.scroll_buffer_to_prompt   r0   r   c                    t        dd      S )N(   P   )rowscolumnsr   r!   s    r   get_sizezPlainTextOutput.get_size   s    R((r   c                     y)N   r#   r!   s    r   get_rows_below_cursor_positionz.PlainTextOutput.get_rows_below_cursor_position   s    r   c                "    t         j                  S r   )r   DEPTH_1_BITr!   s    r   get_default_color_depthz'PlainTextOutput.get_default_color_depth   s    %%%r   N)r   r   returnNone)r}   int)r}   str)r)   r   r}   r~   )r.   r   r}   r~   )r}   r~   )rG   r   rH   r   r}   r~   )r   r   )rO   r   rP   r   r}   r~   )rT   r   r}   r~   )rc   r   r}   r~   )r}   r   )r}   r   )(__name__
__module____qualname____doc__r   r    r$   r   r,   r/   r2   r   r7   r9   r;   r=   r?   rA   rC   rE   rI   rK   rM   rQ   rU   rX   r[   r]   r_   ra   rd   rf   rh   rj   rl   rn   rp   rv   ry   r|   r#   r   r   r   r      s    	%$""("*)&r   N)
__future__r   typingr   prompt_toolkit.cursor_shapesr   prompt_toolkit.data_structuresr   prompt_toolkit.stylesr   baser
   rH   r   r   __all__r   r#   r   r   <module>r      s3    "  4 / '  # &
&f &r   