B
    '˜t\d  ã               @   sT   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„ de	ƒZ
e e
¡ dS )	é    )Úunicode_literals)ÚOutputé   )ÚVt100_Output)ÚWin32OutputÚConEmuOutputc               @   s    e Zd ZdZdd„ Zdd„ ZdS )r   a  
    ConEmu (Windows) output abstraction.

    ConEmu is a Windows console application, but it also supports ANSI escape
    sequences. This output class is actually a proxy to both `Win32Output` and
    `Vt100_Output`. It uses `Win32Output` for console sizing and scrolling, but
    all cursor movements and scrolling happens through the `Vt100_Output`.

    This way, we can have 256 colors in ConEmu and Cmder. Rendering will be
    even a little faster as well.

    http://conemu.github.io/
    http://gooseberrycreative.com/cmder/
    c             C   s   t |ƒ| _t|dd„ ƒ| _d S )Nc               S   s   d S )N© r   r   r   ú;lib/python3.7/site-packages/prompt_toolkit/output/conemu.pyÚ<lambda>   s    z'ConEmuOutput.__init__.<locals>.<lambda>)r   Úwin32_outputr   Úvt100_output)ÚselfÚstdoutr   r   r	   Ú__init__   s    
zConEmuOutput.__init__c             C   s$   |dkrt | j|ƒS t | j|ƒS d S )N)Zget_sizeZget_rows_below_cursor_positionZenable_mouse_supportZdisable_mouse_supportZscroll_buffer_to_promptZget_win32_screen_buffer_infoZenable_bracketed_pasteZdisable_bracketed_paste)Úgetattrr   r   )r   Únamer   r   r	   Ú__getattr__    s    zConEmuOutput.__getattr__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r	   r      s   N)Z
__future__r   Zprompt_toolkit.rendererr   Zvt100r   Zwin32r   Ú__all__Úobjectr   Úregisterr   r   r   r	   Ú<module>   s   