관리-도구
편집 파일: CallTipWindow.cpython-35.opt-1.pyc
��Yf� � @ s� d Z d d l m Z m Z m Z m Z m Z d Z d Z d Z d Z d Z d Z Gd d � d � Z d d � Z e d k r� d d l m Z e e � d S)z�A CallTip window class for Tkinter/IDLE. After ToolTip.py, which uses ideas gleaned from PySol Used by the CallTips IDLE extension. � )�Toplevel�Label�LEFT�SOLID�TclErrorz<<calltipwindow-hide>>�<Key-Escape>� <FocusOut>z<<calltipwindow-checkhide>>�<KeyRelease>�<ButtonRelease>�d Zcalltipwindowregion_rightc @ sg e Z d Z d d � Z d d � Z d d � Z d d d � Z d d � Z d d � Z d d � Z d S)�CallTipc C sO | | _ d | _ | _ d | _ | _ d | _ d | _ | _ d | _ d S)N) �widget� tipwindow�label� parenline�parencol�lastline�hideid�checkhideid�checkhide_after_id)�selfr � r �:/opt/alt/python35/lib64/python3.5/idlelib/CallTipWindow.py�__init__ s zCallTip.__init__c C s% t | j j d � j d � d � } | | j k r8 d S| | _ | j j d � | | j k r� | j j d | j | j f � } n | j j d | � } | s� t | j j d � � } d | d <d | d <| d | j j � d } | d | d | j j � } | j j d | | f � d S)z;Check if needs to reposition the window, and if so - do it.�insert�.r Nz%d.%dz%d.0� � � z+%d+%d)�intr �index�splitr Zseer Zbboxr �list�winfo_rootx�winfo_rootyr Zwm_geometry)r �curlineZbox�x�yr r r �position_window s % zCallTip.position_windowc C s� | | _ | j s | j r d S| j j t | � t t | j j | � j d � � \ | _ | _ t | j � | _ } | j � | j d � y# | j j d d | j d d � Wn t k r� Yn Xt | d | j d t d d d t d d d | j d �| _ | j j � | j � | j j t | j � | _ x! t D] } | j j t | � q>W| j j t | j � | j j t | j! � | _"