Sindbad~EG File Manager

Current Path : /proc/2470164/root/lib64/python3.6/tkinter/__pycache__/
Upload File :
Current File : //proc/2470164/root/lib64/python3.6/tkinter/__pycache__/font.cpython-36.pyc

3


 \��@szdZddlZddlZdZdZdZdZdd�ZGd	d
�d
�Zd!dd�Z	d"d
d�Z
edk�rvej�Z
edded�Zeej��eejd��eejd��eej��eejd��eejd��ee
��eejd�ejd��eeje
d��ed#d�Zeejd�ejde
d��eje
ded�Zej�eje
de
jd�Zej�eedd�j�Zejed �ejed�ej�dS)$z0.9�NZnormalZroman�boldZitaliccCst|dd�S)zFGiven the name of a tk named font, returns a Font representation.
    T)�name�exists)�Font)r�r�$/usr/lib64/python3.6/tkinter/font.py�
nametofontsrc@s�eZdZdZejd�Zdd�Zdd�Zdd�Z	d#dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zd$dd�Zdd�Zdd�ZeZd%dd �Zd!d"�Zd	S)&ra�Represents a named font.

    Constructor options are:

    font -- font specifier (name, system font, or (family, size, style)-tuple)
    name -- name to use for this font configuration (defaults to a unique name)
    exists -- does a named font by this name already exist?
       Creates a new named font if False, points to the existing font if True.
       Raises _tkinter.TclError if the assertion is false.

       the following are ignored if font is specified:

    family -- font 'family', e.g. Courier, Times, Helvetica
    size -- font size in points
    weight -- font thickness: NORMAL, BOLD
    slant -- font slant: ROMAN, ITALIC
    underline -- font underlining: false (0), true (1)
    overstrike -- font strikeout: false (0), true (1)

    �cCs>g}x0|j�D]$\}}|jd|�|jt|��qWt|�S)N�-)�items�append�str�tuple)�self�kw�options�k�vrrr�_set1s
z	Font._setcCs(g}x|D]}|jd|�q
Wt|�S)Nr
)rr)r�argsrrrrr�_get8s
z	Font._getcCs>i}x4tdt|�d�D] }||d|||dd�<qW|S)Nr�r	)�range�len)rrr�irrr�_mkdict>s zFont._mkdictNFcKs�|s
tj}t|d|�}|r0|j|jdd|��}n
|j|�}|sPdtt|j��}||_	|r�d|_
|j	|j|jdd��kr�tjjd|j	f��|r�|jdd|j	f|��n|jdd|j	f|��d	|_
||_
|j|_|j|_dS)
N�tk�font�actualF�namesz$named font %s does not already exist�	configureZcreateT)�tkinter�
_default_root�getattr�	splitlist�callrr
�next�counterr�delete_fontZ_tkinterZTclError�_tk�_split�_call)r�rootrrrrrrrr�__init__Ds*
z
Font.__init__cCs|jS)N)r)rrrr�__str__cszFont.__str__cCst|t�o|j|jkS)N)�
isinstancerr)r�otherrrr�__eq__fszFont.__eq__cCs
|j|�S)N)�cget)r�keyrrr�__getitem__iszFont.__getitem__cCs|jf||i�dS)N)r )rr3�valuerrr�__setitem__lszFont.__setitem__cCs4y|jr|jdd|j�Wntk
r.YnXdS)Nr�delete)r(r+r�	Exception)rrrr�__del__os
zFont.__del__cCst|jf|j��S)z*Return a distinct copy of the current font)rr)r)rrrr�copyvsz	Font.copycCs^f}|rd|f}|r8|d|f}|jdd|jf|��S|j|j|jdd|jf|����SdS)zReturn actual font attributesz
-displayofr
rrN)r+rrr*)r�option�	displayofrrrrrzszFont.actualcCs|jdd|jd|�S)zGet font attributer�configr
)r+r)rr;rrrr2�sz	Font.cgetcKsB|r"|jdd|jf|j|���n|j|j|jdd|j���SdS)zModify font attributesrr=N)r+rrrr*)rrrrrr=�s
zFont.configcCs2|f}|rd||f}|jj|jdd|jf|���S)zReturn text widthz
-displayofr�measure)r)�getintr+r)r�textr<rrrrr>�s
zFont.measurecOs�f}|jdd�}|rd|f}|rL||j|�}|jj|jdd|jf|���S|j|jdd|jf|���}i}x<tdt|�d�D](}|jj||d�|||dd�<q~W|SdS)	z}Return font metrics.

        For best performance, create a dummy widget
        using this font before calling this method.r<Nz
-displayofr�metricsrrr	)	�poprr)r?r+rr*rr)rrrrr<�resrrrrrA�s(zFont.metrics)NNNF)NN)N)�__name__�
__module__�__qualname__�__doc__�	itertools�countr'rrrr-r.r1r4r6r9r:rr2r=r r>rArrrrrs$


	
rcCs2|s
tj}f}|rd|f}|jj|jjd|���S)zGet font families (as a tuple)z
-displayofr�families)rrJ)r!r"rr$r%)r,r<rrrrrJ�srJcCs |s
tj}|jj|jjdd��S)z'Get names of defined fonts (as a tuple)rr)r!r"rr$r%)r,rrrr�sr�__main__�times�)�family�size�weightrNrPZhelloZ	linespace)r<�Courier�)rzHello, world)r@rzQuit!)r@Zcommandr)rP)NN)N)rQrRr)�__version__rHr!ZNORMALZROMANZBOLDZITALICrrrJrrDZTkr,�f�printrr=r2r>rAZLabel�wZpackZButtonZdestroyr:ZfbZmainlooprrrr�<module>sB








Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists