<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

íÕYf  ã               @   sc   d  d l  Td  d l m Z Gd d „  d ƒ Z d d „  Z e d k r_ d  d l m Z e e ƒ d	 S)
é    )Ú*)ÚmacosxSupportc               @   sÐ   e  Z d  Z d Z d d „  Z d d „  Z d d „  Z d d	 „  Z d
 d „  Z d d „  Z	 d d „  Z
 d Z d d „  Z d d „  Z d d „  Z d d „  Z d d „  Z d d „  Z d d „  Z d d  „  Z d S)!ÚScrolledListz(None)c             K   sk  | |  _  t | ƒ |  _ } |  j j d d d d ƒ t | d d ƒ|  _ } |  j j d d d d	 ƒ t | d
 d d d ƒ|  _ } | r™ | j | ƒ | j d d d d ƒ | j	 | d <| j
 | d <| j d |  j ƒ | j d |  j ƒ t j ƒ  r$| j d |  j ƒ | j d |  j ƒ n | j d |  j ƒ | j d |  j ƒ | j d |  j ƒ |  j ƒ  d  S)NZfillZbothÚexpandé   ÚnameÚvbarZsideÚrightÚyZexportselectionr   Z
backgroundZwhiteZcommandZyscrollcommandz<ButtonRelease-1>z<Double-ButtonRelease-1>z<ButtonPress-2>z<Control-Button-1>z<ButtonPress-3>z<Key-Up>z
<Key-Down>)ÚmasterZFrameÚframeZpackZ	Scrollbarr   ZListboxÚlistboxZ	configureZyviewÚsetZbindÚclick_eventÚdouble_click_eventr   ZisAquaTkÚpopup_eventÚup_eventÚ
down_eventÚclear)Úselfr   Zoptionsr   r   r   © r   ú9/opt/alt/python35/lib64/python3.5/idlelib/ScrolledList.pyÚ__init__   s*    	zScrolledList.__init__c             C   s   |  j  j ƒ  d  S)N)r   Zdestroy)r   r   r   r   Úclose$   s    zScrolledList.closec             C   s6   |  j  j d d ƒ d |  _ |  j  j d |  j ƒ d  S)Nr   Úendr   )r   ÚdeleteÚemptyÚinsertÚdefault)r   r   r   r   r   '   s    	zScrolledList.clearc             C   sB   |  j  r% |  j j d d ƒ d |  _  |  j j d t | ƒ ƒ d  S)Nr   r   )r   r   r   r   Ústr)r   Úitemr   r   r   Úappend,   s    		zScrolledList.appendc             C   s   |  j  j | ƒ S)N)r   Úget)r   Úindexr   r   r   r"   2   s    zScrolledList.getc             C   sP   |  j  j d | j | j f ƒ |  j  j d ƒ } |  j | ƒ |  j | ƒ d S)Nz@%d,%dÚactiveÚbreak)r   ÚactivateÚxr
   r#   ÚselectÚ	on_select)r   Úeventr#   r   r   r   r   5   s
     zScrolledList.click_eventc             C   s0   |  j  j d ƒ } |  j | ƒ |  j | ƒ d S)Nr$   r%   )r   r#   r(   Ú	on_double)r   r*   r#   r   r   r   r   <   s    zScrolledList.double_click_eventNc             C   su   |  j  s |  j ƒ  |  j  } |  j j d | j | j f ƒ |  j j d ƒ } |  j | ƒ | j | j	 | j
 ƒ d  S)Nz@%d,%dr$   )ÚmenuÚ	make_menur   r&   r'   r
   r#   r(   Ztk_popupZx_rootZy_root)r   r*   r,   r#   r   r   r   r   D   s    	
	 zScrolledList.popup_eventc             C   s,   t  |  j d d ƒ} | |  _ |  j ƒ  d  S)NZtearoffr   )ZMenur   r,   Ú	fill_menu)r   r,   r   r   r   r-   M   s    	zScrolledList.make_menuc             C   s~   |  j  j d ƒ } |  j  j | ƒ r1 | d } n |  j  j ƒ  d } | d k  r` |  j  j ƒ  n |  j | ƒ |  j | ƒ d S)Nr$   r   r   r%   )r   r#   Úselection_includesÚsizeÚbellr(   r)   )r   r*   r#   r   r   r   r   R   s    zScrolledList.up_eventc             C   sz   |  j  j d ƒ } |  j  j | ƒ r1 | d } n d } | |  j  j ƒ  k r\ |  j  j ƒ  n |  j | ƒ |  j | ƒ d S)Nr$   r   r   r%   )r   r#   r/   r0   r1   r(   r)   )r   r*   r#   r   r   r   r   _   s    zScrolledList.down_eventc             C   sT   |  j  j ƒ  |  j  j | ƒ |  j  j d d ƒ |  j  j | ƒ |  j  j | ƒ d  S)Nr   r   )r   Z	focus_setr&   Zselection_clearZselection_setZsee)r   r#   r   r   r   r(   l   s
    zScrolledList.selectc             C   s   d  S)Nr   )r   r   r   r   r.   u   s    zScrolledList.fill_menuc             C   s   d  S)Nr   )r   r#   r   r   r   r)   x   s    zScrolledList.on_selectc             C   s   d  S)Nr   )r   r#   r   r   r   r+   {   s    zScrolledList.on_double)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r!   r"   r   r   r,   r   r-   r   r   r(   r.   r)   r+   r   r   r   r   r      s"   		r   c       	      C   s¼   t  ƒ  } | j d ƒ t t t t j d |  j ƒ  ƒ ƒ ƒ \ } } } } | j d | | d f ƒ Gd d „  d t ƒ } | | ƒ } x% t	 d ƒ D] } | j
 d | ƒ q“ W| j ƒ  d  S)	NzTest ScrolledListz[x+]z+%d+%dé–   c               @   s4   e  Z d  Z d d „  Z d d „  Z d d „  Z d S)z&_scrolled_list.<locals>.MyScrolledListc             S   s   |  j  j d d ƒ d  S)NZlabelzright click)r,   Zadd_command)r   r   r   r   r.   …   s    z0_scrolled_list.<locals>.MyScrolledList.fill_menuc             S   s   t  d |  j | ƒ ƒ d  S)Nr(   )Úprintr"   )r   r#   r   r   r   r)   †   s    z0_scrolled_list.<locals>.MyScrolledList.on_selectc             S   s   t  d |  j | ƒ ƒ d  S)NZdouble)r6   r"   )r   r#   r   r   r   r+   ‡   s    z0_scrolled_list.<locals>.MyScrolledList.on_doubleN)r2   r3   r4   r.   r)   r+   r   r   r   r   ÚMyScrolledList„   s   r7   é   z	Item %02d)ZTkÚtitleÚlistÚmapÚintÚreÚsplitZgeometryr   Úranger!   Zmainloop)	ÚparentÚrootÚwidthZheightr'   r
   r7   Zscrolled_listÚir   r   r   Ú_scrolled_list   s    	3rD   Ú__main__)ÚrunN)ZtkinterZidlelibr   r   rD   r2   Zidlelib.idle_test.htestrF   r   r   r   r   Ú<module>   s   
{