관리-도구
편집 파일: squeezer.cpython-36.opt-2.pyc
3 ��2a�3 � @ s� d dl Z d dlZd dlmZ d dljZd dlm Z d dl mZ d dlm Z d dlmZ dd d �ZG dd� dej�ZG d d� d�Zej� edkr�d dlmZ edddd� dS )� N)�Font)�idleConf)� view_text)�Hovertip)�macosx�P � c C s� d}d}d}x�t jd| �D ]�}|j� | }||7 }||7 }| | dkrT|d7 }d}n$|||| 7 }||krx|d7 }|}|d7 }|dkrt|d |�\}} ||7 }| d }qW |t| �| 7 }|dkr�||d | 7 }n|d8 }|S )Nr � z[\t\n]� )�re�finditer�start�divmod�len) �s� linewidth�tabwidth�posZ linecountZcurrent_column�m�numchars�lines�column� r �-/opt/alt/python36/lib64/python3.6/squeezer.py�count_lines_with_wrapping s0 r c @ sF e Zd Zdd� Zdd� Zddd�Zddd �Zdd d�ZdZdd� Z dS )�ExpandingButtonc s� � | _ || _|| _|| _|j | _}|j | _}|jj| _d| j }t j j| ||ddd� d}t| |dd� | j d| j� tj� r�| j d | j� n| j d | j� | j� fdd�� d | _| j| j� d S ) NzSqueezed text (%d lines).z#FFFFC0z#FFFFE0)�textZ backgroundZactivebackgroundz5Double-click to expand, right-click for more options.r )Zhover_delayz<Double-Button-1>z <Button-2>z <Button-3>c s � t | �t | �t |� � S )N)�int)�offsetZlength)r r r �<lambda>} s z*ExpandingButton.__init__.<locals>.<lambda>)r �tags� numoflines�squeezer�editwinr �per�bottom� base_text�tk�Button�__init__r Zbind�expandr ZisAquaTk�context_menu_eventZselection_handle�is_dangerousZ after_idle�set_is_dangerous) �selfr r r! r"