
    d"                     z   d Z ddlZddlZddlZddlmZmZ ddlmZm	Z	m
Z
mZmZ ddlmZmZmZmZmZmZmZmZmZmZ ddlmZ  e            Zej        dk    rej        dk    rd	nd
Zn e            d         dd         Z G d de          Zedk    r'ddlmZ  eddd           ddl m!Z!  e!e           dS dS )zAbout Dialog for IDLE

    N)python_versionarchitecture)ToplevelFrameLabelButton
PhotoImage)
SUNKENTOPBOTTOMLEFTXBOTHWEWNSEWE)textviewdarwinl        6432   c                   b    e Zd ZdZdddddZd Zd Zd Zd	 Zd
 Z	d Z
d Zd ZddZddZdS )AboutDialogz!Modal about dialog for idle

    NF)_htest_utestc                V   t          j        | |           |                     d           |                     d|                                dz   |                                |sdndz   fz             d| _        d| _        |                                  | 	                    dd	           | 
                    |pd
t           dt           d           |                     |           |                                  |                     d| j                   || _        | j                                         |                     d| j                   |                     d| j                   d| _        || _        |s*|                                  |                                  dS dS )a  Create popup, do not return until tk widget destroyed.

        parent - parent of this dialog
        title - string which is title of popup dialog
        _htest - bool, change box location when running htest
        _utest - bool, don't wait_window when running unittest
           )borderwidthz+%d+%d   d   z#bbbbbbz#000000F)heightwidthzAbout IDLE z (z bit)WM_DELETE_WINDOWz<Return>z<Escape>N)r   __init__	configuregeometrywinfo_rootxwinfo_rootybgfgcreate_widgets	resizabletitlepyverbits	transientgrab_setprotocolokparent	button_ok	focus_setbind_current_textviewr   	deiconifywait_window)selfr5   r.   r   r   s        $  /croot/python-split_1694437901252/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/idlelib/help_about.pyr%   zAboutDialog.__init__   s    	$'''1%%%h**,,R/**,,.GbbCH"J J 	K 	K 	K e5111

5 6555$555	7 	7 	7v($'222  """		*dg&&&		*dg&&&!% 	NN	 	    c                 t   t          | dt                    }t          |           }|                    t          t                     |                    t
          dt                     t          |d| j                  | _	        | j	                            dd	           t          || j
        
          }|                    dt                     t          |d| j        | j
        d          }|                    ddt          dd           |                                                     d          }|dk    rdnd}t"          j                            t"          j                            t"          j                            t,                              dd|           }t/          |                                 |          | _        t          || j        | j
                  }|                    ddt2          ddd           d}	t          ||	t4          | j        | j
                  }
|
                    ddt2          ddd           t          |dt4          | j        | j
                  }|                    d ddt2          dd!           d"t6          j        d d         z  }t          ||t4          | j        | j
                                      d#ddt2          dd!                               d$fd%           t          |d&t          d| j
        '                              d(dt<          ddd           t?          |                                            }||k    rd)|z   nd*}d+tB           d,| | }t          ||| j        | j
        -          }|                    d.dt2          dd           t          || j
        
          }|                    dddtD          /           t          |d0d(| j
        | j#        1          | _$        | j$                            t4          dd2           t          |d3d(| j
        | j%        1          | _&        | j&                            t4          dd2           t          |d4d(| j
        | j'        1          | _(        | j(                            t4          dd2           t          |d&t          d| j
        '                              d5dt<          ddd           t          |d| j        | j
        -          }|                    d6dt2          dd           t          || j
        
          }|                    d7ddtD          /           t          |d8d(| j
        | j)        1          | _*        | j*                            t4          dd2           t          |d9d(| j
        | j+        1          | _,        | j,                            t4          dd2           t          |d4d(| j
        | j-        1          | _.        | j.                            t4          dd2           d S ):Nr   )r   relief)sidefillT)rA   expandrB   Close)textcommandr   )padxpady)r*   )rC   rB   IDLE)courier   bold)rE   r+   r*   fontr   
   )rowcolumnstickyrG   rH   tk_patchLevelz8.6z.pngz.gifIconsidle_48)masterfile)imager*   )rO   rP   rQ   rowspanrG   rH   z=Python's Integrated Development
and Learning Environment




)rE   justifyr+   r*      )rO   rP   rQ   
columnspanrG   rH   zemail:  idle-dev@python.org   )rO   rP   r[   rQ   rG   rH   z/https://docs.python.org/%d.%d/library/idle.html   z
<Button-1>c                 8    t          j        d                   S )NrE   )
webbrowseropen)eventdocss    r=   <lambda>z,AboutDialog.create_widgets.<locals>.<lambda>`   s    jod6l.K.K r>      )r   r@   r"   r*      z and  zPython z with tcl/tk )rE   r+   r*   	   )rO   rP   r[   rQ   License)rE   r#   highlightbackgroundrF   )rA   rG   rH   	CopyrightCredits         READMENEWS)/r   r
   packr   r   r   r   r   r4   r6   r*   r   r+   gridr   _rootgetvarospathjoinabspathdirname__file__r	   
icon_imager   r   sysversion_infor8   r   strinfo_patchlevelr/   r   show_py_license
py_licenseshow_py_copyrightpy_copyrightshow_py_credits
py_creditsshow_readmereadmeshow_idle_news	idle_newsshow_idle_creditsidle_credits)r<   frameframe_buttonsframe_backgroundheadertkpatchexticonlogobyline_textbylineemaildocs_urltclvertkverversionsvers
py_buttonsidleidle_buttonsrb   s                       @r=   r,   zAboutDialog.create_widgets<   s0   d&999dQ///

Dt
444G(,1 1 1+++ 47333T555'f'(?A A A!ABR@@@**,,%%o665((fffw||BGOOBGOOH,E,EFF#_s__6 6$DJJLLtDDD%T_III		a!QRb	IIIZ'k4'dg/ / /!A!"1MMM&-J"tw47< < <

qq!
LLLE$RaR()%H!dg$'; ; ;		aa	KKK		, K K K KLLLAf47	$ 	$ 	$$(DQq45AA %) %G %G %G T))++,,%,%6%6'!!B@U@@@@@%HTWMMM		a!"1	===+888
BqQtDDD )159W)-)=? ? ? 	$Rb999":Kq7;w+/+AC C C 	Dr;;; )159W)-)=? ? ? 	$Rb999Af47	$ 	$ 	$$(DR"45AA %) %G %G %G %#7tw0 0 0 			b12A	>>>-$':::bqFFF\15%)%57 7 7 	d"555648G(,(;= = = 	BR888"<iq7;w+/+AC C C 	Dr;;;;;r>   c                 <    |                      dt                     dS )zHandle License button event.zAbout - LicenseN)display_printer_textlicenser<   s    r=   r   zAboutDialog.show_py_license   s    !!"3W=====r>   c                 <    |                      dt                     dS )zHandle Copyright button event.zAbout - CopyrightN)r   	copyrightr   s    r=   r   zAboutDialog.show_py_copyright   s    !!"5yAAAAAr>   c                 <    |                      dt                     dS )z#Handle Python Credits button event.zAbout - Python CreditsN)r   creditsr   s    r=   r   zAboutDialog.show_py_credits   s    !!":GDDDDDr>   c                 4    |                      ddd           dS )z!Handle Idle Credits button event.zAbout - CreditszCREDITS.txtutf-8Ndisplay_file_textr   s    r=   r   zAboutDialog.show_idle_credits   s!    0-IIIIIr>   c                 4    |                      ddd           dS )zHandle Readme button event.zAbout - Readmez
README.txtasciiNr   r   s    r=   r   zAboutDialog.show_readme   s!    /wGGGGGr>   c                 4    |                      ddd           dS )zHandle News button event.zAbout - NEWSzNEWS.txtr   Nr   r   s    r=   r   zAboutDialog.show_idle_news   s     ~z7CCCCCr>   c                     |                                  d                    |j                  }t          j        | ||| j                  | _        dS )a  Create textview for built-in constants.

        Built-in constants have type _sitebuiltins._Printer.  The
        text is extracted from the built-in and then sent to a text
        viewer with self as the parent and title as the title of
        the popup.
        
r   N)_Printer__setuprw   _Printer__linesr   	view_textr   r9   )r<   r.   printerrE   s       r=   r   z AboutDialog.display_printer_text   sU     	!!!yy011!)!3%dk"3 "3 "3r>   c                 
   t           j                            t           j                            t           j                            t
                              |          }t          j        | |||| j                  | _	        dS )zCreate textview for filename.

        The filename needs to be in the current directory.  The path
        is sent to a text viewer with self as the parent, title as
        the title of the popup, and the file encoding.
        r   N)
ru   rv   rw   rx   ry   rz   r   	view_filer   r9   )r<   r.   filenameencodingfns        r=   r   zAboutDialog.display_file_text   sb     W\\"'//"'//(*C*CDDhOO!)!3%Xdk"; "; ";r>   c                 V    |                                   |                                  dS )zDismiss help_about dialog.N)grab_releasedestroy)r<   ra   s     r=   r4   zAboutDialog.ok   s%    r>   )N)__name__
__module____qualname____doc__r%   r,   r   r   r   r   r   r   r   r   r4    r>   r=   r   r      s          U5          DS< S< S<l> > >B B BE E EJ J JH H HD D D3 3 3	; 	; 	; 	;     r>   r   __main__)mainz!idlelib.idle_test.test_help_aboutF)	verbosityexit)run)"r   ru   r|   r_   platformr   r   tkinterr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   idlelibr   r/   maxsizer0   r   r   unittestr   idlelib.idle_test.htestr   r   r>   r=   <module>r      s    
			 



     1 1 1 1 1 1 1 1 > > > > > > > > > > > > > > F F F F F F F F F F F F F F F F F F F F F F F F      <8;&&44DDD<>>!RaR Dq q q q q( q q qh zD	,FFFF++++++C r>   