ó
±xYc           @  sO   d  Z  d d l m Z d
 Z d d d     YZ e Z d e f d     YZ d	 S(   u  
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.
i’’’’(   t   unicode_literalsu   MouseEventTypeu
   MouseEventt   MouseEventTypec           B  s    e  Z d  Z d Z d Z d Z RS(   u   MOUSE_UPu
   MOUSE_DOWNu	   SCROLL_UPu   SCROLL_DOWN(   t   __name__t
   __module__t   MOUSE_UPt
   MOUSE_DOWNt	   SCROLL_UPt   SCROLL_DOWN(    (    (    s:   lib/python2.7/site-packages/prompt_toolkit/mouse_events.pyR      s   t
   MouseEventc           B  s    e  Z d  Z d   Z d   Z RS(   u   
    Mouse event, sent to `UIControl.mouse_handler`.

    :param position: `Point` instance.
    :param event_type: `MouseEventType`.
    c         C  s   | |  _  | |  _ d  S(   N(   t   positiont
   event_type(   t   selfR	   R
   (    (    s:   lib/python2.7/site-packages/prompt_toolkit/mouse_events.pyt   __init__+   s    	c         C  s   d |  j  |  j f S(   Nu   MouseEvent(%r, %r)(   R	   R
   (   R   (    (    s:   lib/python2.7/site-packages/prompt_toolkit/mouse_events.pyt   __repr__/   s    (   R   R   t   __doc__R   R   (    (    (    s:   lib/python2.7/site-packages/prompt_toolkit/mouse_events.pyR   $   s   	N(   u   MouseEventTypeu
   MouseEvent(    (   R   t
   __future__R    t   __all__R   t   MouseEventTypest   objectR   (    (    (    s:   lib/python2.7/site-packages/prompt_toolkit/mouse_events.pyt   <module>   s    