403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/lib/python3.9/dist-packages/matplotlib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/lib/python3.9/dist-packages/matplotlib/__pycache__/backend_managers.cpython-39.pyc
a

���h.�@sVddlmZmZmZmZGdd�d�ZGdd�de�ZGdd�d�ZGdd	�d	�Zd
S)�)�_api�
backend_tools�cbook�widgetsc@seZdZdZddd�ZdS)�	ToolEventz)Event for tool manipulation (add/remove).NcCs||_||_||_||_dS�N)�name�sender�tool�data)�selfrr	r
r�r
�E/usr/local/lib/python3.9/dist-packages/matplotlib/backend_managers.py�__init__szToolEvent.__init__)N��__name__�
__module__�__qualname__�__doc__rr
r
r
rrsrcs"eZdZdZd�fdd�	Z�ZS)�ToolTriggerEventz/Event to inform that a tool has been triggered.Ncst��||||�||_dSr)�superr�canvasevent)rrr	r
rr��	__class__r
rrszToolTriggerEvent.__init__)NN)rrrrr�
__classcell__r
r
rrr
src@seZdZdZdd�ZdS)�ToolManagerMessageEventzs
    Event carrying messages from toolmanager.

    Messages usually get displayed to the user by the toolbar.
    cCs||_||_||_dSr)rr	�message)rrr	rr
r
rrsz ToolManagerMessageEvent.__init__Nrr
r
r
rrsrc@s�eZdZdZd)dd�Zedd��Zedd��Zejd	d��Zd*dd�Z	d
d�Z
dd�Zd+dd�Zedd��Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd,d!d"�Zd#d$�Zed%d&��Zd-d'd(�ZdS).�ToolManagera�
    Manager for actions triggered by user interactions (key press, toolbar
    clicks, ...) on a Figure.

    Attributes
    ----------
    figure : `.Figure`
    keypresslock : `~matplotlib.widgets.LockDraw`
        `.LockDraw` object to know if the `canvas` key_press_event is locked.
    messagelock : `~matplotlib.widgets.LockDraw`
        `.LockDraw` object to know if the message is available to write.
    NcCsJd|_i|_i|_i|_t��|_t��|_	t��|_
d|_|�|�dSr)
�_key_press_handler_id�_tools�_keys�_toggledrZCallbackRegistry�
_callbacksrZLockDraw�keypresslockZmessagelock�_figure�
set_figure�r�figurer
r
rr.s


zToolManager.__init__cCs|js
dS|jjS)z Canvas managed by FigureManager.N)r$�canvas�rr
r
rr(>szToolManager.canvascCs|jS)zFigure that holds the canvas.)r$r)r
r
rr'EszToolManager.figurecCs|�|�dSr)r%r&r
r
rr'JsTcCsN|jr|j�|j�||_|r0|j�d|j�|_|rJ|j��D]
}||_q>dS)z�
        Bind the given figure to the tools.

        Parameters
        ----------
        figure : `.Figure`
        update_tools : bool, default: True
            Force tools to update figure.
        Zkey_press_eventN)	rr(Zmpl_disconnectr$Zmpl_connect�
_key_pressr�valuesr')rr'Zupdate_toolsr
r
r
rr%Ns
�zToolManager.set_figurecCs|j�||�S)a�
        Connect event with string *s* to *func*.

        Parameters
        ----------
        s : str
            The name of the event. The following events are recognized:

            - 'tool_message_event'
            - 'tool_removed_event'
            - 'tool_added_event'

            For every tool added a new event is created

            - 'tool_trigger_TOOLNAME', where TOOLNAME is the id of the tool.

        func : callable
            Callback function for the toolmanager event with signature::

                def func(event: ToolEvent) -> Any

        Returns
        -------
        cid
            The callback id for the connection. This can be used in
            `.toolmanager_disconnect`.
        )r"�connect)r�s�funcr
r
r�toolmanager_connectbszToolManager.toolmanager_connectcCs|j�|�S)z�
        Disconnect callback id *cid*.

        Example usage::

            cid = toolmanager.toolmanager_connect('tool_trigger_zoom', onpress)
            #...later
            toolmanager.toolmanager_disconnect(cid)
        )r"Z
disconnect)rZcidr
r
r�toolmanager_disconnect�s
z"ToolManager.toolmanager_disconnectcCs.|dur|}d}t|||�}|j�||�dS)z!Emit a `ToolManagerMessageEvent`.NZtool_message_event)rr"�process)rrr	r-�eventr
r
r�
message_event�s
zToolManager.message_eventcCs|jS)zCurrently toggled tools.)r!r)r
r
r�
active_toggle�szToolManager.active_togglecs�fdd�|j��D�}|S)a
        Return the keymap associated with the specified tool.

        Parameters
        ----------
        name : str
            Name of the Tool.

        Returns
        -------
        list of str
            List of keys associated with the tool.
        csg|]\}}|�kr|�qSr
r
)�.0�k�i�rr
r�
<listcomp>��z/ToolManager.get_tool_keymap.<locals>.<listcomp>)r �items)rr�keysr
r8r�get_tool_keymap�szToolManager.get_tool_keymapcCs|�|�D]}|j|=q
dSr)r=r )rrr6r
r
r�_remove_keys�szToolManager._remove_keysc	Csv||jvrt|�d���|�|�t|t�r2|g}|D]:}||jvrft�d|�d|j|�d|���||j|<q6dS)z�
        Set the keymap to associate with the specified tool.

        Parameters
        ----------
        name : str
            Name of the Tool.
        key : str or list of str
            Keys to associate with the tool.
        z
 not in ToolszKey z changed from z to N)r�KeyErrorr>�
isinstance�strr r�
warn_external)rr�keyr6r
r
r�
update_keymap�s



�zToolManager.update_keymapcCsT|�|�}t|dd�r"|�|d�|�|�td||�}|j�|j|�|j|=dS)z�
        Remove tool named *name*.

        Parameters
        ----------
        name : str
            Name of the tool.
        �toggledFZtoolmanagerZtool_removed_eventN)	�get_tool�getattr�trigger_toolr>rr"r1rr)rrr
r2r
r
r�remove_tool�s	

zToolManager.remove_toolcOs�t�t|j�|�}|s&tdt|���||jvrDt�d�|j|S|||g|�Ri|��}||j|<|j	dur~|�
||j	�t|tj�r�|j
dur�|j�dt��n|j�|j
d�|jr�|�|dd�|�|j�td||�}|j�|j|�|S)a�
        Add *tool* to `ToolManager`.

        If successful, adds a new event ``tool_trigger_{name}`` where
        ``{name}`` is the *name* of the tool; the event is fired every time the
        tool is triggered.

        Parameters
        ----------
        name : str
            Name of the tool, treated as the ID, has to be unique.
        tool : type
            Class of the tool to be added.  A subclass will be used
            instead if one was registered for the current canvas class.
        *args, **kwargs
            Passed to the *tool*'s constructor.

        See Also
        --------
        matplotlib.backend_tools.ToolBase : The base class for tools.
        zImpossible to find class for %sz;A "Tool class" with the same name already exists, not addedNZtool_added_event)rZ_find_tool_class�typer(�
ValueErrorrArrrBZdefault_keymaprDr@�ToolToggleBase�radio_groupr!�
setdefault�setrE�_handle_toggler%r'rr"r1r)rrr
�args�kwargsZtool_clsZtool_objr2r
r
r�add_tool�s(





zToolManager.add_toolcCs�|j}|durH|j|jdvr2|jd�|j�n|jd�|j�dS|j||jkr^d}n2|j|durt|j}n|�|j||||�|j}||j|<dS)aO
        Toggle tools, need to untoggle prior to using other Toggle tool.
        Called from trigger_tool.

        Parameters
        ----------
        tool : `.ToolBase`
        canvasevent : Event
            Original Canvas event or None.
        data : object
            Extra data to pass to the tool when triggering.
        N)rMrr!�remove�addrH)rr
rrrMrEr
r
rrPs"�zToolManager._handle_togglecCst|�|�}|durdS|dur"|}t|tj�r<|�|||�|�|||�d|}t|||||�}|j�||�dS)a�
        Trigger a tool and emit the ``tool_trigger_{name}`` event.

        Parameters
        ----------
        name : str
            Name of the tool.
        sender : object
            Object that wishes to trigger the tool.
        canvasevent : Event
            Original Canvas event or None.
        data : object
            Extra data to pass to the tool when triggering.
        Nztool_trigger_%s)	rFr@rrLrP�triggerrr"r1)rrr	rrr
r-r2r
r
rrH;s
zToolManager.trigger_toolcCsF|jdus|j��rdS|j�|jd�}|dur4dS|j||d�dS)N)r)rCr#�lockedr �getrH)rr2rr
r
rr*ZszToolManager._key_presscCs|jS)z,A dict mapping tool name -> controlled tool.)rr)r
r
r�toolscszToolManager.toolscCsHt|tj�r|j|jvr|S||jvr>|r:t�d|���dS|j|S)a�
        Return the tool object with the given name.

        For convenience, this passes tool objects through.

        Parameters
        ----------
        name : str or `.ToolBase`
            Name of the tool, or the tool itself.
        warn : bool, default: True
            Whether a warning should be emitted it no tool with the given name
            exists.

        Returns
        -------
        `.ToolBase` or None
            The tool or None if no tool with the given name exists.
        z"ToolManager does not control tool N)r@rZToolBaserrrrB)rr�warnr
r
rrFhs
�
�zToolManager.get_tool)N)T)N)NNN)T)rrrrr�propertyr(r'�setterr%r/r0r3r4r=r>rDrIrSrPrHr*rYrFr
r
r
rr s2





	
9+
	
rN)	Z
matplotlibrrrrrrrrr
r
r
r�<module>s	

Youez - 2016 - github.com/yon3zu
LinuXploit