a
    ÁQ\ac  ã                   @   sF   d Z ddlmZ ddlmZ ddgZG dd„ deƒZG dd„ dƒZd	S )
a˜  
Mouse events.


How it works
------------

The renderer has a 2 dimensional grid of mouse event handlers.
(`prompt_toolkit.layout.MouseHandlers`.) When the layout is rendered, the
`Window` class will make sure that this grid will also be filled with
callbacks. For vt100 terminals, mouse events are received through stdin, just
like any other key press. There is a handler among the key bindings that
catches these events and forwards them to such a mouse event handler. It passes
through the `Window` class where the coordinates are translated from absolute
coordinates to coordinates relative to the user control, and there
`UIControl.mouse_handler` is called.
é    )ÚEnumé   )ÚPointÚMouseEventTypeÚ
MouseEventc                   @   s    e Zd ZdZdZdZdZdZdS )r   ÚMOUSE_UPÚ
MOUSE_DOWNÚMOUSE_DOWN_MOVEÚ	SCROLL_UPÚSCROLL_DOWNN)Ú__name__Ú
__module__Ú__qualname__r   r   r	   r
   r   © r   r   ú:lib/python3.9/site-packages/prompt_toolkit/mouse_events.pyr      s
   c                   @   s0   e Zd ZdZeeddœdd„Zedœdd„ZdS )	r   zŠ
    Mouse event, sent to `UIControl.mouse_handler`.

    :param position: `Point` instance.
    :param event_type: `MouseEventType`.
    N)ÚpositionÚ
event_typeÚreturnc                 C   s   || _ || _d S )N©r   r   )Úselfr   r   r   r   r   Ú__init__)   s    zMouseEvent.__init__)r   c                 C   s   d| j | jf S )NzMouseEvent(%r, %r)r   )r   r   r   r   Ú__repr__-   s    zMouseEvent.__repr__)	r   r   r   Ú__doc__r   r   r   Ústrr   r   r   r   r   r   !   s   N)r   Úenumr   Zdata_structuresr   Ú__all__r   r   r   r   r   r   Ú<module>   s
   