| Server IP : 121.121.20.254 / Your IP : 216.73.217.141 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/idlelib/__pycache__/ |
Upload File : |
�
���g� � � � d Z ddl� G d� d� Z G d� de� Z G d� de� Zd � Zed
k( r ddlmZ edd
d�� ddl m
Z
e
e� yy)z�Tools for displaying tool-tips.
This includes:
* an abstract base-class for different kinds of tooltips
* a simple text-only Tooltip class
� )�*c �: � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
y )
�TooltipBasez abstract base class for tooltipsc � � || _ d| _ y)z�Create a tooltip.
anchor_widget: the widget next to which the tooltip will be shown
Note that a widget will only be shown when showtip() is called.
N)�
anchor_widget� tipwindow)�selfr s �$C:\Python312\\Lib\idlelib\tooltip.py�__init__zTooltipBase.__init__
s � � +������ c �$ � | j � y �N��hidetip�r s r
�__del__zTooltipBase.__del__ s � ����r c � � | j ryt | j � x| _ }|j d� |j j dd|j dd� | j � | j � | j j � | j j � y# t $ r Y �`w xY w)zdisplay the tooltipN� z!::tk::unsupported::MacWindowStyle�style�help�noActivates)r �Toplevelr �wm_overrideredirect�tk�call�_w�TclError�position_window�showcontents�update_idletasks�lift�r �tws r
�showtipzTooltipBase.showtip s� � ��>�>��&�t�'9�'9�:�:����
���q�!� �
�E�E�J�J�:�G�R�U�U��}�
.�
�����������'�'�)��������
� �� �s �)B: �: C�Cc �� � | j � \ }}| j j � |z }| j j � |z }| j j d||fz � y)z&(re)-set the tooltip's screen position�+%d+%dN)�get_positionr �winfo_rootx�winfo_rootyr �wm_geometry)r �x�y�root_x�root_ys r
r zTooltipBase.position_window/ sb � �� � �"���1��#�#�/�/�1�A�5���#�#�/�/�1�A�5�����"�"�8�v�v�.>�#>�?r c �@ � d| j j � dz fS )z(choose a screen position for the tooltip� r )r �winfo_heightr s r
r'