Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 3.145.96.41
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : textView.cpython-34.pyo
�
e f��@s�dZddlTddljZGdd�de�Zddd�Zddd	d
�Ze	dkr�ddl
Z
e
jdd
ddd�ddlm
Z
e
e�ndS)zSimple text browser for IDLE

�)�*Nc@sCeZdZdZdddd�Zdd�Zdd	d
�ZdS)�
TextViewerz*A simple text viewer dialog for IDLE

    TFcCs)tj||�|jdd�|jddd|j�d|j�|sQdndf�d|_d	|_|j�|j	|�|j
d
|j�||_|j
j�|jd|j�|jd|j�|j
jd
|�|j
jdt�|r%|j|�|j�|j�ndS)aHShow the given text in a scrollable window with a 'close' button

        If modal option set to False, user can interact with other windows,
        otherwise they will be unable to interact with other windows until
        the textview window is closed.

        _htest - bool; change box location when running htest.
        Zborderwidth�z=%dx%d+%d+%di�i��
�dz#ffffffz#000000ZWM_DELETE_WINDOWz<Return>z<Escape>g�stateN)�Toplevel�__init__Z	configureZgeometryZwinfo_rootxZwinfo_rooty�bg�fg�
CreateWidgets�titleZprotocol�Ok�parent�textViewZ	focus_setZbind�insert�configZDISABLEDZ	transientZgrab_setZwait_window)�selfrr
�text�modalZ_htest�r�5/opt/alt/python34/lib64/python3.4/idlelib/textView.pyr	s(	
!		

	


zTextViewer.__init__c
CsCt|dtdd�}t|�}t|ddd|jdt�|_t|dtdtd	d
�|_t	|dt
d	d
d|jd
|j�|_
|jjd|j
j�|j
jd|jj�|jj�|jjdtdt�|j
jdtdtdt�|jdtdt�|jdtdtdt�dS)NZreliefZheighti�rZCloseZcommandZ	takefocusZorientZhighlightthicknessrZwraprr
ZyscrollcommandZsideZfill�expand)ZFrameZSUNKENZButtonrZFALSEZbuttonOkZ	ScrollbarZVERTICALZ
scrollbarViewZTextZWORDrr
rrZyview�setZpackZRIGHT�YZLEFTZTRUEZBOTHZBOTTOM�XZTOP)rZ	frameTextZframeButtonsrrrr/s
zTextViewer.CreateWidgetsNcCs|j�dS)N)Zdestroy)rZeventrrrr@sz
TextViewer.Ok)�__name__�
__module__�__qualname__�__doc__r	rrrrrrrs#rTcCst||||�S)N)r)rr
rrrrr�	view_textDsr cCszy.t|dd|��}|j�}WdQXWn2tk
rbtjdddd|d|�YnXt||||�SdS)N�r�encodingr
zFile Load Error�messagezUnable to load file %r .r)�open�read�IOError�tkMessageBoxZ	showerrorr )rr
�filenamer"r�file�contentsrrr�	view_fileGs

r+�__main__zidlelib.idle_test.test_textview�	verbosity��exitF)�run)rZtkinterZtkinter.messageboxZ
messageboxr'rrr r+rZunittest�mainZidlelib.idle_test.htestr0rrrr�<module>s
<
© 2025 GrazzMean-Shell