
     h
                        d Z ddlmZ ddlmZ ddlmZ ddlmZ g dZ	 G d d	e          Z
 G d
 de          Z G d de          Z G 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.
    )annotations)Enum)	FrozenSet   )Point)MouseEventTypeMouseButtonMouseModifier
MouseEventc                  "    e Zd ZdZdZdZdZdZdS )r   MOUSE_UP
MOUSE_DOWN	SCROLL_UPSCROLL_DOWN
MOUSE_MOVEN)__name__
__module____qualname__r   r   r   r   r        W/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/prompt_toolkit/mouse_events.pyr   r      s-         H JIK JJJr   r   c                  "    e Zd ZdZdZdZdZdZdS )r	   LEFTMIDDLERIGHTNONEUNKNOWNN)r   r   r   r   r   r   r   r   r   r   r   r	   r	   ,   s+        DFE D
 GGGr   r	   c                      e Zd ZdZdZdZdS )r
   SHIFTALTCONTROLN)r   r   r   r   r    r!   r   r   r   r
   r
   :   s        E
CGGGr   r
   c                  "    e Zd ZdZddZddZdS )r   z
    Mouse event, sent to `UIControl.mouse_handler`.

    :param position: `Point` instance.
    :param event_type: `MouseEventType`.
    positionr   
event_typer   buttonr	   	modifiersfrozenset[MouseModifier]returnNonec                >    || _         || _        || _        || _        d S )N)r#   r$   r%   r&   )selfr#   r$   r%   r&   s        r   __init__zMouseEvent.__init__H   s$     !$"r   strc                Z    d                     | j        | j        | j        | j                  S )NzMouseEvent({!r},{!r},{!r},{!r}))formatr#   r$   r%   r&   )r+   s    r   __repr__zMouseEvent.__repr__T   s.    077MOKN	
 
 	
r   N)
r#   r   r$   r   r%   r	   r&   r'   r(   r)   )r(   r-   )r   r   r   __doc__r,   r0   r   r   r   r   r   @   sF         
# 
# 
# 
#
 
 
 
 
 
r   r   N)r1   
__future__r   enumr   typingr   data_structuresr   __all__r   r	   r
   r   r   r   r   <module>r7      s   " # " " " " "             " " " " " "
J
J
J    T        $       D   
 
 
 
 
 
 
 
 
 
r   