| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/matplotlib/__pycache__/ |
Upload File : |
o
�:�a�+ � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z
ejdedd� e�
e�ZG d d
� d
�ZG dd� de�ZG d
d� de�ZG dd� de�ZdS )a�
Classes used for blocking interaction with figure windows:
`BlockingInput`
Creates a callable object to retrieve events in a blocking way for
interactive sessions. Base class of the other classes listed here.
`BlockingKeyMouseInput`
Creates a callable object to retrieve key or mouse clicks in a blocking
way for interactive sessions. Used by `~.Figure.waitforbuttonpress`.
`BlockingMouseInput`
Creates a callable object to retrieve mouse clicks in a blocking way for
interactive sessions. Used by `~.Figure.ginput`.
`BlockingContourLabeler`
Creates a callable object to retrieve mouse clicks in a blocking way that
will then be used to place labels on a `.ContourSet`. Used by
`~.Axes.clabel`.
� N)�Integral)�_api)�MouseButtonz3.5�module)�name�obj_typec @ sR e Zd ZdZddd�Zdd� Zdd� Zd d
� Zdd� Zddd�Z e Z
ddd�ZdS )�
BlockingInputz1Callable for retrieving events in a blocking way.� c C s || _ || _d S �N��fig�
eventslist)�selfr r
r r �;/usr/lib/python3/dist-packages/matplotlib/blocking_input.py�__init__$ s
zBlockingInput.__init__c C sZ | � |� t�dt| j�� | �� t| j�| j kr dkr+n dS | jj� � dS dS )zY
Event handler; will be passed to the current figure to retrieve events.
zEvent %ir N)
� add_event�_log�info�len�events�
post_event�nr �canvas�stop_event_loop�r �eventr r r �on_event( s
"�zBlockingInput.on_eventc C s dS )z-For baseclass, do nothing but collect events.Nr �r r r r r 8 s zBlockingInput.post_eventc C s$ | j D ] }| jj�|� qg | _ dS )zDisconnect all callbacks.N)� callbacksr r �mpl_disconnect)r �cbr r r �cleanup; s
zBlockingInput.cleanupc C � | j �|� dS )z5For base class, this just appends an event to events.N)r �appendr r r r r A s zBlockingInput.add_event���c C r"