
    d0	                    h    d dl mZ d dlZd dlmZ d dlmZ d dlmZ erd dlm	Z	  G d d          Z
dS )	    )annotationsN)TYPE_CHECKING)TextIO)IO)Outputc                      e Zd ZdddZdd dZdd dZdd!dZd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S )%CursorNioIO | OutputinputTextIO | NonereturnNonec                v    t          |t                    r|j        }|| _        |t          j        }|| _        d S N)
isinstancer   output_outputsysstdin_input)selfr
   r   s      O/home/feoh/.local/pipx/venvs/poetry/lib/python3.11/site-packages/cleo/cursor.py__init__zCursor.__init__   s9    b" 	B=IE       linesintc                B    | j                             d| d           | S )N[Ar   writer   r   s     r   move_upzCursor.move_up   )    +5+++,,,r   c                B    | j                             d| d           | S )Nr    Br"   r$   s     r   	move_downzCursor.move_down    r&   r   columnsc                B    | j                             d| d           | S )Nr    Cr"   r   r*   s     r   
move_rightzCursor.move_right%   )    -7---...r   c                B    | j                             d| d           | S )Nr    Dr"   r-   s     r   	move_leftzCursor.move_left*   r/   r   columnc                B    | j                             d| d           | S )Nr    Gr"   )r   r3   s     r   move_to_columnzCursor.move_to_column/   s)    ,6,,,---r   rowc                N    | j                             d|dz    d| d           | S )Nr    r   ;Hr"   )r   r3   r7   s      r   move_to_positionzCursor.move_to_position4   s5    63766V666777r   c                :    | j                             d           | S )Nz7r"   r   s    r   save_positionzCursor.save_position9       7###r   c                :    | j                             d           | S )Nz8r"   r=   s    r   restore_positionzCursor.restore_position>   r?   r   c                :    | j                             d           | S )Nz[?25lr"   r=   s    r   hidezCursor.hideC   s    ;'''r   c                :    | j                             d           | S )Nz[?25h[?0cr"   r=   s    r   showzCursor.showH   s    .///r   c                :    | j                             d           | S )z>
        Clears all the output from the current line.
        z[2Kr"   r=   s    r   
clear_linezCursor.clear_lineM        	9%%%r   c                :    | j                             d           | S )zY
        Clears all the output from the current line after the current position.
        z[Kr"   r=   s    r   clear_line_afterzCursor.clear_line_afterU   s     	8$$$r   c                :    | j                             d           | S )zl
        Clears all the output from the cursors' current position
        to the end of the screen.
        z[0Jr"   r=   s    r   clear_outputzCursor.clear_output]   s    
 	9%%%r   c                :    | j                             d           | S )z+
        Clears the entire screen.
        z[2Jr"   r=   s    r   clear_screenzCursor.clear_screenf   rH   r   r   )r
   r   r   r   r   r   )r   )r   r   r   r	   )r*   r   r   r	   )r3   r   r   r	   )r3   r   r7   r   r   r	   )r   r	   )__name__
__module____qualname__r   r%   r)   r.   r2   r6   r;   r>   rA   rC   rE   rG   rJ   rL   rN    r   r   r	   r	      sY       	 	 	 	 	    
    
    
    
   
   
   
   
   
   
              r   r	   )
__future__r   r   typingr   r   
cleo.io.ior   cleo.io.outputs.outputr   r	   rR   r   r   <module>rW      s    " " " " " " 



                          .------] ] ] ] ] ] ] ] ] ]r   