ok
Direktori : /opt/alt/python36/lib64/python3.6/idlelib/__pycache__/ |
Current File : //opt/alt/python36/lib64/python3.6/idlelib/__pycache__/tooltip.cpython-36.opt-2.pyc |
3 ��2aV � @ sz d dl T G dd� de�ZG dd� de�ZG dd� de�Zdd � Zed krvd dlmZ edd dd� d dl m Z e e� dS )� )�*c @ sD e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dS )�TooltipBasec C s || _ d | _d S )N)� anchor_widget� tipwindow)�selfr � r �,/opt/alt/python36/lib64/python3.6/tooltip.py�__init__ s zTooltipBase.__init__c C s | j � d S )N)�hidetip)r r r r �__del__ s zTooltipBase.__del__c C s| | j r d S t| j� | _ }|jd� y|jjdd|jdd� W n tk rR Y nX | j� | j � | j j � | j j� d S )N� z!::tk::unsupported::MacWindowStyleZstyle�helpZnoActivates)r �Toplevelr Zwm_overrideredirectZtkZcallZ_w�TclError�position_window�showcontentsZupdate_idletasksZlift)r �twr r r �showtip s zTooltipBase.showtipc C s@ | j � \}}| jj� | }| jj� | }| jjd||f � d S )Nz+%d+%d)�get_positionr Zwinfo_rootxZwinfo_rootyr Zwm_geometry)r �x�yZroot_xZroot_yr r r r / s zTooltipBase.position_windowc C s d| j j� d fS )N� r )r Zwinfo_height)r r r r r 6 s zTooltipBase.get_positionc C s t �d S )N)�NotImplementedError)r r r r r A s zTooltipBase.showcontentsc C s6 | j }d | _ |r2y|j� W n tk r0 Y nX d S )N)r Zdestroyr )r r r r r r F s zTooltipBase.hidetipN) �__name__� __module__�__qualname__r r r r r r r r r r r r s r c sZ e Zd Zd� fdd� Z� fdd�Zddd�Zdd d �Zdd� Zd d� Z� fdd�Z � Z S )�OnHoverTooltipBase�� c sV t t| �j|� || _d | _| jjd| j�| _| jjd| j �| _ | jjd| j �| _d S )Nz<Enter>z<Leave>z<Button>)�superr r �hover_delay� _after_idr Zbind�_show_event�_id1�_hide_event�_id2�_id3)r r r )� __class__r r r U s zOnHoverTooltipBase.__init__c s\ y4| j jd| j� | j jd| j� | j jd| j� W n tk rH Y nX tt| �j� d S )Nz<Enter>z<Leave>z<Button>) r Zunbindr"