3
<Ad]!	  ã               @   s<   d Z ddlZdd„ Zdd„ Zddd	„Zdd
d„Zdd„ ZdS )z Font utilities. é    Nc             C   sH   | j ƒ }| jƒ }| jƒ }| jƒ }| jƒ }| jƒ }tj||||||ƒ}|S )z Clones the specified font. )ÚGetPointSizeZ	GetFamilyÚGetStyleZ	GetWeightZGetUnderlinedZGetFaceNameÚwxZFont)ÚfontZ
point_sizeÚfamilyÚstyleÚweightZ	underlineZ	face_nameÚclone© r
   úh/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/pyface-6.1.2-py3.6.egg/pyface/wx/font.pyÚ
clone_font   s    r   c             C   sd   | j ƒ }t|ƒ}|j|ƒ | j|ƒ | jƒ }|dk	r<|jƒ  | jƒ  x| jƒ D ]}t||ƒ qNW dS )z8 Recursively sets the font size starting from 'window'. N)	ÚGetFontr   ÚSetPointSizeÚSetFontÚGetSizerÚLayoutÚRefreshÚGetChildrenÚset_font_size)ÚwindowÚsizer   r	   ÚsizerÚchildr
   r
   r   r   %   s    

r   é   c             C   sl   | j ƒ }t|ƒ}|j|jƒ | ƒ | j|ƒ | jƒ }|dk	rD|jƒ  | jƒ  x| jƒ D ]}t	||ƒ qVW dS )z= Recursively increases the font size starting from 'window'. N)
r   r   r   r   r   r   r   r   r   Úincrease_font_size)r   Údeltar   r	   r   r   r
   r
   r   r   :   s    
r   c             C   s   t | dd� dS )z= Recursively decreases the font size starting from 'window'. r   )r   Néþÿÿÿ)r   )r   r   r
   r
   r   Údecrease_font_sizeO   s    r   c             C   s"   | j ƒ }|jtjƒ | j|ƒ dS )z  Set 'window's font to be bold. N)r   Ú	SetWeightr   ZBOLDr   )r   r   r
   r
   r   Úset_bold_fontV   s    
r   )r   )r   )Ú__doc__r   r   r   r   r   r   r
   r
   r
   r   Ú<module>   s   

