
                         z    S r SSKJr  SSKJrJr  SSKJr  SSKJ	r	  Sr
 " S S\" \\5      5      r " S	 S
\5      rg)z
Interface for an output.
    )unicode_literals)ABCMetaabstractmethod)with_metaclassSize)Outputc                      \ rS rSrSr\S 5       r\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S"S j5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rS rS r S r!S r"S r#g!)#r	      z
Base class defining the output interface for a
:class:`~prompt_toolkit.renderer.Renderer`.

Actual implementations are
:class:`~prompt_toolkit.terminal.vt100_output.Vt100_Output` and
:class:`~prompt_toolkit.terminal.win32_output.Win32Output`.
c                     g)zAReturn the file descriptor to which we can write for the output. N selfs    (lib/third_party/prompt_toolkit/output.pyfilenoOutput.fileno           c                     g)z
Return the encoding for this output, e.g. 'utf-8'.
(This is used mainly to know which characters are supported by the
output the data, so that the UI can provide alternatives, when
required.)
Nr   r   s    r   encodingOutput.encoding   r   r   c                     g)z@Write text (Terminal escape sequences will be removed/escaped.) Nr   r   datas     r   writeOutput.write$   r   r   c                     g)zWrite text. Nr   r   s     r   	write_rawOutput.write_raw(   r   r   c                     g)zSet terminal title. Nr   r   titles     r   	set_titleOutput.set_title,   r   r   c                     g)z0Clear title again. (or restore previous title.) Nr   r   s    r   clear_titleOutput.clear_title0   r   r   c                     g)z"Write to output stream and flush. Nr   r   s    r   flushOutput.flush4   r   r   c                     g)zL
Erases the screen with the background colour and moves the cursor to
home.
Nr   r   s    r   erase_screenOutput.erase_screen8   r   r   c                     g)zCGo to the alternate screen buffer. (For full screen applications). Nr   r   s    r   enter_alternate_screenOutput.enter_alternate_screen?   r   r   c                     g)z#Leave the alternate screen buffer. Nr   r   s    r   quit_alternate_screenOutput.quit_alternate_screenC   r   r   c                     g)zEnable mouse. Nr   r   s    r   enable_mouse_supportOutput.enable_mouse_supportG   r   r   c                     g)zDisable mouse. Nr   r   s    r   disable_mouse_supportOutput.disable_mouse_supportK   r   r   c                     g)zI
Erases from the current cursor position to the end of the current line.
Nr   r   s    r   erase_end_of_lineOutput.erase_end_of_lineO   r   r   c                     g)zK
Erases the screen from the current line down to the bottom of the
screen.
Nr   r   s    r   
erase_downOutput.erase_downU   r   r   c                     g)z$Reset color and styling attributes. Nr   r   s    r   reset_attributesOutput.reset_attributes\   r   r   c                     g)z&Set new color and styling attributes. Nr   r   attrss     r   set_attributesOutput.set_attributes`   r   r   c                     g)zDisable auto line wrapping. Nr   r   s    r   disable_autowrapOutput.disable_autowrapd   r   r   c                     g)zEnable auto line wrapping. Nr   r   s    r   enable_autowrapOutput.enable_autowraph   r   r   c                     g)zMove cursor position. Nr   r   rowcolumns      r   cursor_gotoOutput.cursor_gotol   r   r   c                     g)zMove cursor `amount` place up. Nr   r   amounts     r   	cursor_upOutput.cursor_upp   r   r   c                     g)z!Move cursor `amount` place down. Nr   rU   s     r   cursor_downOutput.cursor_downt   r   r   c                     g)z$Move cursor `amount` place forward. Nr   rU   s     r   cursor_forwardOutput.cursor_forwardx   r   r   c                     g)z%Move cursor `amount` place backward. Nr   rU   s     r   cursor_backwardOutput.cursor_backward|   r   r   c                     g)zHide cursor. Nr   r   s    r   hide_cursorOutput.hide_cursor   r   r   c                     g)zShow cursor. Nr   r   s    r   show_cursorOutput.show_cursor   r   r   c                     g)z8
Asks for a cursor position report (CPR).
(VT100 only.)
Nr   r   s    r   ask_for_cprOutput.ask_for_cpr   r   r   c                     g)zSound bell. Nr   r   s    r   bellOutput.bell   r   r   c                     gzFor vt100 only. Nr   r   s    r   enable_bracketed_pasteOutput.enable_bracketed_paste   r   r   c                     gro   r   r   s    r   disable_bracketed_pasteOutput.disable_bracketed_paste   r   r   r   Nr   r   )$__name__
__module____qualname____firstlineno____doc__r   r   r   r   r   r#   r&   r)   r,   r/   r2   r5   r8   r;   r>   rA   rF   rI   rL   rR   rW   rZ   r]   r`   rc   rf   ri   rl   rp   rs   __static_attributes__r   r   r   r	   r	      s    M M   L L       < < . .   O O / /      
   0 0 2 2 ( ( ' ' " " + + - - 0 0 1 1    r   r	   c                       \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rS rS rS rS rS rS#S jrS rS rS rS rS rS rS rS rS r S r!S  r"S!r#g")$DummyOutput   z<
For testing. An output class that doesn't render anything.
c                     [         e)z+There is no sensible default for fileno(). )NotImplementedErrorr   s    r   r   DummyOutput.fileno   s    !!r   c                     g)Nzutf-8r   r   s    r   r   DummyOutput.encoding   s    r   c                     g Nr   r   s     r   r   DummyOutput.write       4r   c                     g r   r   r   s     r   r   DummyOutput.write_raw       tr   c                     g r   r   r!   s     r   r#   DummyOutput.set_title       r   c                     g r   r   r   s    r   r&   DummyOutput.clear_title   r   r   c                     g r   r   r   s    r   r)   DummyOutput.flush   s    Tr   c                     g r   r   r   s    r   r,   DummyOutput.erase_screen   s    Dr   c                     g r   r   r   s    r   r/   "DummyOutput.enter_alternate_screen       dr   c                     g r   r   r   s    r   r2   !DummyOutput.quit_alternate_screen       Tr   c                     g r   r   r   s    r   r5    DummyOutput.enable_mouse_support   s    Dr   c                     g r   r   r   s    r   r8   !DummyOutput.disable_mouse_support   r   r   c                     g r   r   r   s    r   r;   DummyOutput.erase_end_of_line       r   c                     g r   r   r   s    r   r>   DummyOutput.erase_down   s    $r   c                     g r   r   r   s    r   rA   DummyOutput.reset_attributes   r   r   c                     g r   r   rD   s     r   rF   DummyOutput.set_attributes   r   r   c                     g r   r   r   s    r   rI   DummyOutput.disable_autowrap   r   r   c                     g r   r   r   s    r   rL   DummyOutput.enable_autowrap   r   r   c                     g r   r   rO   s      r   rR   DummyOutput.cursor_goto   s    Dr   c                     g r   r   rU   s     r   rW   DummyOutput.cursor_up   r   r   c                     g r   r   rU   s     r   rZ   DummyOutput.cursor_down   s    4r   c                     g r   r   rU   s     r   r]   DummyOutput.cursor_forward   r   r   c                     g r   r   rU   s     r   r`   DummyOutput.cursor_backward       tr   c                     g r   r   r   s    r   rc   DummyOutput.hide_cursor   r   r   c                     g r   r   r   s    r   rf   DummyOutput.show_cursor   r   r   c                     g r   r   r   s    r   ri   DummyOutput.ask_for_cpr   r   r   c                     g r   r   r   s    r   rl   DummyOutput.bell   s    Dr   c                     g r   r   r   s    r   rp   "DummyOutput.enable_bracketed_paste   r   r   c                     g r   r   r   s    r   rs   #DummyOutput.disable_bracketed_paste   r   r   c                     [        SSS9$ )N(   P   )rowscolumnsr   r   s    r   get_sizeDummyOutput.get_size   s    R((r   r   Nru   )$rv   rw   rx   ry   rz   r   r   r   r   r#   r&   r)   r,   r/   r2   r5   r8   r;   r>   rA   rF   rI   rL   rR   rW   rZ   r]   r`   rc   rf   ri   rl   rp   rs   r   r{   r   r   r   r}   r}      si    "  #$ *)()%$)$#0%'*+*+)r   r}   N)rz   
__future__r   abcr   r   sixr   prompt_toolkit.layout.screenr   __all__objectr	   r}   r   r   r   <module>r      sA    ( '  -
G^GV, GT()& ()r   