;ς
ό?c           @   ss   d  Z  d k Td k Z d e f d     YZ e d j o6 e   Z e e d d d d	   i	   e i
   n d S(
   s   Simple text browser for IDLE

(   s   *Ns
   TextViewerc           B   s8   t  Z d  Z e d  Z d   Z d   Z e d  Z RS(   s,   
    simple text viewer dialog for idle
    c         C   s,  t  i |  |  |  i d d  |  i d d d | i   d | i   d f  d |  _ d |  _	 |  i
   |  i |  |  i |  |  i   |  i d	 |  i  | |  _ |  i i   |  i d
 |  i  |  i d |  i  | o |  i i d |  n |  i |  |  i i d t  |  i   d S(   s   If data exists, load it into viewer, otherwise try to load file.

        fileName - string, should be an absoulute filename
        s   borderwidthi   s   =%dx%d+%d+%diq  iτ  i
   s   #ffffffs   #000000s   WM_DELETE_WINDOWs   <Return>s   <Escape>f0.0s   stateN(   s   Toplevels   __init__s   selfs   parents	   configures   geometrys   winfo_rootxs   winfo_rootys   bgs   fgs   CreateWidgetss   titles	   transients   grab_sets   protocols   Oks   textViews	   focus_sets   binds   datas   inserts   LoadTextFiles   fileNames   configs   DISABLEDs   wait_window(   s   selfs   parents   titles   fileNames   data(    (    s-   /mit/python/lib/python2.3/idlelib/textView.pys   __init__   s(     1		

	c         C   sk   t  } y t | d  } Wn2 t j
 o& t i d d d d | d  n X|  i i	 d | i
    d  S(   Ns   rs   titles   File Load Errors   messages   Unable to load file s    .f0.0(   s   Nones   textFiles   opens   fileNames   IOErrors   tkMessageBoxs	   showerrors   selfs   textViews   inserts   read(   s   selfs   fileNames   textFile(    (    s-   /mit/python/lib/python2.3/idlelib/textView.pys   LoadTextFile+   s    c      
   C   sC  t  |  d t d d } t  |   } t | d d d |  i d t |  _ t	 | d t
 d t d	 d
 |  _ t | d t d	 d
 d |  i d |  i |  _ |  i i d |  i i  |  i i d |  i i  |  i i   |  i i d t d t  |  i i d t d t d t  | i d t d t  | i d t d t d t  d  S(   Ns   reliefs   heightiΌ  s   texts   Closes   commands	   takefocuss   orients   highlightthicknessi    s   wraps   fgs   bgs   yscrollcommands   sides   fills   expand(   s   Frames   selfs   SUNKENs	   frameTexts   frameButtonss   Buttons   Oks   FALSEs   buttonOks	   Scrollbars   VERTICALs   scrollbarViews   Texts   WORDs   fgs   bgs   textViews   configs   yviews   sets   packs   RIGHTs   Ys   LEFTs   TRUEs   BOTHs   BOTTOMs   Xs   TOP(   s   selfs	   frameTexts   frameButtons(    (    s-   /mit/python/lib/python2.3/idlelib/textView.pys   CreateWidgets5   s    c         C   s   |  i   d  S(   N(   s   selfs   destroy(   s   selfs   event(    (    s-   /mit/python/lib/python2.3/idlelib/textView.pys   OkF   s    (   s   __name__s
   __module__s   __doc__s   Nones   __init__s   LoadTextFiles   CreateWidgetss   Ok(    (    (    s-   /mit/python/lib/python2.3/idlelib/textView.pys
   TextViewer   s
    	
	s   __main__s   texts   Views   commandc           C   s   t  t d d  S(   Ns   Texts   ./textView.py(   s
   TextViewers   root(    (    (    s-   /mit/python/lib/python2.3/idlelib/textView.pys   <lambda>M   s    (   s   __doc__s   Tkinters   tkMessageBoxs   Toplevels
   TextViewers   __name__s   Tks   roots   Buttons   packs   mainloop(   s
   TextViewers   tkMessageBoxs   root(    (    s-   /mit/python/lib/python2.3/idlelib/textView.pys   ?   s   	A	