
    \
j                     @    d Z  G d de          Zd ZdZdZdZdZdZd	S )
z1Mouse constants and utilities for pyglet.window.
c                   *    e Zd ZdZd Zd Zd Zd ZdS )MouseStateHandlera  Simple handler that tracks the state of buttons from the mouse. If a
    button is pressed then this handler holds a True value for it.
    If the window loses focus, all buttons will be reset to False to avoid a
    "sticky" button state.

    For example::

        >>> win = window.Window()
        >>> mousebuttons = mouse.MouseStateHandler()
        >>> win.push_handlers(mousebuttons)

        # Hold down the "left" button...

        >>> mousebuttons[mouse.LEFT]
        True
        >>> mousebuttons[mouse.RIGHT]
        False

    c                     d| |<   d S )NT selfxybutton	modifierss        M/DATA/AppData/hermes/venv/lib/python3.11/site-packages/pyglet/window/mouse.pyon_mouse_pressz MouseStateHandler.on_mouse_press=   s    V    c                     d| |<   d S NFr   r   s        r   on_mouse_releasez"MouseStateHandler.on_mouse_release@   s    Vr   c                 .    |                                   d S )N)clear)r   s    r   on_deactivatezMouseStateHandler.on_deactivateC   s    

r   c                 .    |                      |d          S r   )get)r   keys     r   __getitem__zMouseStateHandler.__getitem__F   s    xxU###r   N)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r   (   sZ         (      $ $ $ $ $r   r   c                 f   g }| t           z  r|                    d           | t          z  r|                    d           | t          z  r|                    d           | t          z  r|                    d           | t
          z  r|                    d           d                    |          S )a  Return a string describing a set of active mouse buttons.

    Example::

        >>> buttons_string(LEFT | RIGHT)
        'LEFT|RIGHT'

    :Parameters:
        `buttons` : int
            Bitwise combination of mouse button constants.

    :rtype: str
    LEFTMIDDLERIGHTMOUSE4MOUSE5|)r   appendr   r    r!   r"   join)buttonsbutton_namess     r   buttons_stringr(   J   s     L~ $F### &H%%% %G$$$ &H%%% &H%%%88L!!!r                  N)	r   dictr   r(   r   r   r    r!   r"   r   r   r   <module>r/      si   H $ $ $ $ $ $ $ $D" " ": 			r   