KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux server112.speedpacket.com 3.10.0-962.3.2.lve1.5.36.el7.x86_64 #1 SMP Mon May 18 02:16:06 EDT 2020 x86_64
User : equistyl ( 1341)
PHP Version : 8.1.30
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/matplotlib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/matplotlib/blocking_input.pyc
�
r`]c@s�dZddlmZddlmZddlmZddljZ	de
fd��YZdefd	��YZd
efd��YZ
defd
��YZdS(s0
This provides several classes used for blocking interaction with figure
windows:

:class:`BlockingInput`
    creates a callable object to retrieve events in a blocking way for
    interactive sessions

:class:`BlockingKeyMouseInput`
    creates a callable object to retrieve key or mouse clicks in a blocking
    way for interactive sessions.
    Note: Subclass of BlockingInput. Used by waitforbuttonpress

:class:`BlockingMouseInput`
    creates a callable object to retrieve mouse clicks in a blocking way for
    interactive sessions.
    Note: Subclass of BlockingInput.  Used by ginput

:class:`BlockingContourLabeler`
    creates a callable object to retrieve mouse clicks in a blocking way that
    will then be used to place labels on a ContourSet
    Note: Subclass of BlockingMouseInput.  Used by clabel
i����(tprint_function(tverbose(tis_sequence_of_stringsNt
BlockingInputcBsqeZdZdd�Zd�Zd�Zd�Zd�Zdd�Zdd�Z	eje	_d	d
d�Z
RS(
sX
    Class that creates a callable object to retrieve events in a
    blocking way.
    cCs.||_t|�s!td��||_dS(Ns)Requires a sequence of event name strings(tfigRtAssertionErrort
eventslist(tselfRR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyt__init__$s	cCso|j|�tjdt|j��|j�t|j�|jkrk|jdkrk|jjj	�ndS(se
        Event handler that will be passed to the current figure to
        retrieve events.
        sEvent %iiN(
t	add_eventRtreporttlenteventst
post_eventtnRtcanvaststop_event_loop(Rtevent((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyton_event*s


'cCsdS(s,For baseclass, do nothing but collect eventsN((R((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR
=scCs4x$|jD]}|jjj|�q
Wg|_dS(sDisconnect all callbacksN(t	callbacksRRtmpl_disconnect(Rtcb((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pytcleanupAscCs|jj|�dS(s5For base class, this just appends an event to events.N(Rtappend(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR	Hsi����cCs|jj|�dS(s'
        This removes an event from the event list.  Defaults to
        removing last event, but an index can be supplied.  Note that
        this does not check that there are events, much like the
        normal pop method.  If not events exist, this will throw an
        exception.
        N(Rtpop(Rtindex((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyt	pop_eventLscCs|j|�dS(N(R(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyRVsiicCs�t|t�std��||_g|_g|_|jj�x6|jD]+}|jj	|jj
j||j��qMWz|jj
j
d|�Wd|j�X|jS(s4
        Blocking call to retrieve n events
        sRequires an integer argumentttimeoutN(t
isinstancetintRRRRRtshowRRRtmpl_connectRtstart_event_loopR(RRR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyt__call__Zs			
	 ((t__name__t
__module__t__doc__RRR
RR	RRR!(((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyRs				
tBlockingMouseInputcBs�eZdZdZdZdZdddd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dd
�Zdd�Zdd�Zdded�ZRS(s;
    Class that creates a callable object to retrieve mouse clicks in a
    blocking way.

    This class will also retrieve keyboard clicks and treat them like
    appropriate mouse clicks (delete and backspace are like mouse button 3,
    enter is like mouse button 2 and all others are like mouse button 1).
    iiicCs8tj|d|dd�||_||_||_dS(NRRtbutton_press_eventtkey_press_event(R&R'(RRt
button_addt
button_poptbutton_stop(RRt	mouse_addt	mouse_popt
mouse_stop((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR�s		cCsRt|j�dks!td��|jdjdkrD|j�n
|j�dS(s7
        This will be called to process events
        is
No events yeti����R'N(RRRtnamet	key_eventtmouse_event(R((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR
�s!
cCse|jd}|j}||jkr5|j|�n,||jkrT|j|�n
|j|�dS(sProcess a mouse click eventi����N(RtbuttonR)tmouse_event_popR*tmouse_event_stoptmouse_event_add(RRR1((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR0�s
	cCsx|jd}|jdkr dS|jj�}|dkrK|j|�n)|dkrg|j|�n
|j|�dS(	so
        Process a key click event.  This maps certain keys to appropriate
        mouse click events.
        i����Nt	backspacetdeletetescapetenter(R5R6(sescapeR8(RtkeytNonetlowerR2R3R4(RRR9((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR/�s
cCs-|jr|j|�ntj|d�dS(s�
        Will be called for any event involving a button other than
        button 2 or 3.  This will add a click if it is inside axes.
        i����N(tinaxest	add_clickRR(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR4�s	cCs$tj|d�|jjj�dS(sh
        Will be called for any event involving button 2.
        Button 2 ends blocking input.
        i����N(RRRRR(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR3�scCs<tj|d�t|j�dkr8|j|d�ndS(sk
        Will be called for any event involving button 3.
        Button 3 removes the last click.
        i����iN(RRRR(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR2�scCs�|jj|j|jf�tjdt|j�|j|jf�|jr�tj	|jg|jgdddd�}|j
j|�|jj|�|j
jj�ndS(sL
        This add the coordinates of an event to the list of clicks
        sinput %i: %f,%ftmarkert+tcolortrN(tclicksRtxdatatydataRR
Rtshow_clickstmlinestLine2DR<tadd_linetmarksRRtdraw(RRtline((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR=�s	 	i����cCsL|jj|�|jrH|jj|�}|j�|jjj�ndS(sm
        This removes a click from the list of clicks.  Defaults to
        removing the last click.
        N(RBRRERItremoveRRRJ(RRRtmark((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyt	pop_click�s
	
cCs$|j||�tj||�dS(s�
        This removes a click and the associated event from the object.
        Defaults to removing the last click, but any index can be
        supplied.
        N(RNRR(RRR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyRscCsT|jrCx|jD]}|j�qWg|_|jjj�ntj|�dS(N(RERIRLRRRJRR(RRRM((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyRs		icCs;||_g|_g|_tj|d|d|�|jS(s\
        Blocking call to retrieve n coordinate pairs through mouse
        clicks.
        RR(RERBRIRR!(RRRRE((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR!s
			N(R"R#R$R(R)R*RR
R0R/R4R3R2R=RNRR:RtTrueR!(((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR%xs 		
		
				
tBlockingContourLabelercBsPeZdZd�Zd�Zdd�Zd�Zd�Zdddd�ZRS(	s�
    Class that creates a callable object that uses mouse clicks or key
    clicks on a figure window to place contour labels.
    cCs&||_tj|d|jj�dS(NR(tcsR%Rtaxtfigure(RRQ((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR*s	cCs|j|�dS(N(tbutton1(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR=.si����cCs|j|�dS(N(tbutton3(RRR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyRN1scCsg|j|jjkrV|jj|j|j|jd|jdt�|j	j
j�n
tj
|�dS(s�
        This will be called if an event involving a button other than
        2 or 3 occcurs.  This will add a label to a contour.
        tinline_spacingt	transformN(R<RQRRtadd_label_neartxtytinlineRVtFalseRRRJRR(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyRT4s	cCs3|jrn#|jj�|jjjjj�dS(sY
        This will be called if button 3 is clicked.  This will remove
        a label if not in inline mode.  Unfortunately, if one is doing
        inline labels, then there is currently no way to fix the
        broken contour - once humpty-dumpty is broken, he can't be put
        back together.  In inline mode, this does nothing.
        N(R[RQt	pop_labelRRRSRRJ(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyRUCs		
icCs5||_||_tj|d|d|dt�dS(NRRRE(R[RVR%R!R\(RR[RVRR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR!Rs		(	R"R#R$RR=RNRTRUR!(((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyRP%s				tBlockingKeyMouseInputcBs,eZdZd�Zd�Zdd�ZRS(s_
    Class that creates a callable object to retrieve a single mouse or
    keyboard click
    cCstj|d|dd�dS(NRRR&R'(sbutton_press_eventskey_press_event(RR(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR_scCs>t|j�dks!td��|jdjdk|_dS(s1
        Determines if it is a key event
        is
No events yeti����R'N(RRRR.t
keyormouse(R((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR
cs!icCs)d|_tj|ddd|�|jS(s�
        Blocking call to retrieve a single mouse or key click
        Returns True if key click, False if mouse, or None if timeout
        RiRN(R:R_RR!(RR((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR!ks	(R"R#R$RR
R!(((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyR^Zs		(R$t
__future__Rt
matplotlibRtmatplotlib.cbookRtmatplotlib.linestlinesRFtobjectRR%RPR^(((s?/usr/lib64/python2.7/site-packages/matplotlib/blocking_input.pyt<module>sY�5

Anon7 - 2021