Hacked By AnonymousFox
��YfW � @ s d Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z m
Z
m Z d d l m
Z
d a Gd d � d � Z Gd d
� d
e
� Z Gd d � d e
� Z Gd
d � d e
� Z d d � Z e d k rd d l m Z e e � d S)a� Class browser.
XXX TO DO:
- reparse when source changed (maybe just a button would be OK?)
(or recheck on window popup)
- add popup menu with more options (e.g. doc strings, base classes, imports)
- show function argument list? (have to do pattern matching on source)
- should the classes and methods lists also be in the module's menu bar?
- add base classes to class browser tree
� N)�PyShell)�ListedToplevel)�TreeNode�TreeItem�ScrolledCanvas)�idleConfc @ sR e Z d Z d d d � Z d d d � Z d d � Z d d
� Z d d � Z d S)
�ClassBrowserFc C sX | s t j j a | | _ t j j | d | j d � | _ | | _ | j
| � d S)zH
_htest - bool, change box when location running htest.
r z.pyN)r �flist�open� file_open�name�os�path�join�file�_htest�init)�selfr r r r � r �9/opt/alt/python35/lib64/python3.5/idlelib/ClassBrowser.py�__init__ s # zClassBrowser.__init__Nc C s | j j � | j j � d S)N)�topZdestroy�node)r Zeventr r r �close) s
zClassBrowser.closec C s5 | | _ t j j � t | j � | _ } | j d | j � | j d | j � | j
r� | j d | j j � | j j
� d f � | j � | j � t j � } t j | d � d } t | d | d d d
d �} | j j d d d
d � | j � } t | j d | � | _ } | j � | j � d S)NZWM_DELETE_WINDOWz<Escape>z+%d+%d�� Znormal�
backgroundZbgZhighlightthicknessr Z takefocus� �expandZfillZboth)r �pyclbrZ_modules�clearr �rootr Zprotocolr Zbindr ZgeometryZwinfo_rootxZwinfo_rooty�settitleZ focus_setr ZCurrentThemeZGetHighlightr �frameZpack�rootnoder Zcanvasr �updater )r r r Zthemer Zsc�itemr r r r r - s$
$
zClassBrowser.initc C s+ | j j d | j � | j j d � d S)NzClass Browser - z
Class Browser)r Zwm_titler Zwm_iconname)r r r r r! D s zClassBrowser.settitlec C s
t | j � S)N)�ModuleBrowserTreeItemr )r r r r r# H s zClassBrowser.rootnode)�__name__�
__module__�__qualname__r r r r! r# r r r r r s
r c @ sd e 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 S)r&