???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................
^c           @   s  d  d l  Z  d  d l Z  d  d l Z d  d l Z d  d l Td  d l Z d  d l Z dQ Z dR Z dS Z	 dT Z
 dU Z d Z d	 dV d
     YZ d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d d d d g a d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d    Z  d!   Z! d"   Z" d#   Z# d$   Z$ d%   Z% d&   Z& d'   Z' d(   Z( d)   Z) d*   Z* d+   Z+ d,   Z, d-   Z- i d. d/ 6d0 d1 6Z. i d2 d2 6d3 d4 6d5 d6 6d7 d8 6d9 d: 6d; d< 6d= d= 6d> d? 6d@ dA 6dB dC 6dD dE 6dF dG 6dH dI 6dJ dK 6Z/ i  Z0 d2 d4 d6 d= d: d< d? dA dE dC dG dI dK g e0 d/ <d8 g e0 d1 <dL   Z1 dM   Z2 dN   Z3 dO   Z4 e5 dP k re j6   a7 e t7  n  d S(W   iN(   t   *i   i   i   i   i   i    t   Democ           B   sP   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         C   sT  | |  _  d |  _ d  |  _ d  |  _ t j   |  _ |  j j d  d  |  _	 d  |  _
 d |  _ d |  _ t j d } t j j |  } | r'| t j k r'| |  _ d } xH t t t j   D]1 } t j | } | d t j f k r | } q q W| d k r| t j | <q6t j j d |  n t j   |  _ t j j d |  j d  d  S(   Nit   0t    i    s   /samples(   t   roott   exitt   Nonet   dirt   balloont   Tixt	   StringVart   useBalloonst   sett	   statusbart   welmsgt   welfontt   welsizet   syst   argvt   ost   patht   dirnamet   curdirt   ranget   lent   insertt   getcwd(   t   selft   topt   prognameR   t   indext   it   p(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   __init__   s0    									c      	   C   s  |  j  } t j | d d d t } t j | d d d d d d } t j | d d	 d d d d } | j d
 t  | j d
 t  t j | d d } | | d <t j | d d } | | d <| j	 d d d d d |  d   | j
 d d d d d t d |  j  | S(   Nt   bdi   t   relieft   textt   Filet	   underlinei    t	   takefocust   Helpt   sidet   tearofft   menut   labelt   Exiti   t   commandc         S   s
   |  j    S(   N(   t   quitcmd(   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   <lambda>F   R   t   BalloonHelpt   variable(   R   R	   t   Framet   RAISEDt
   Menubuttont   packt   LEFTt   RIGHTt   Menut   add_commandt   add_checkbuttont
   ToggleHelpR   (   R   R   t   wt   filet   helpt   fmt   hm(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt
   MkMainMenu9   s    	!!


c      
   C   s,  |  j  } t j | d d d d d d } | d | d <| j d d d	 d
 d d | d d  | j d d d d
 d d | d d  | j d d d d
 d d | d d  | j d d d d
 d d | d d  | j d d d d
 d d | d d  | j d d d d
 d d | d d  | S(   Nt   ipadxi   t   ipadyt   optionssC   
        tagPadX 6
        tagPadY 4
        borderWidth 2
        t   bgt   welR,   t   WelcomeR&   i    t	   createcmdc         S   s   t  |  |  S(   N(   t	   MkWelcome(   R=   t   name(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   Z   R   t   chot   Choosersc         S   s   t  |  |  S(   N(   t
   MkChoosers(   R=   RK   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   \   R   t   scrs   Scrolled Widgetsc         S   s   t  |  |  S(   N(   t   MkScroll(   R=   RK   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   ^   R   t   mgrs   Manager Widgetsc         S   s   t  |  |  S(   N(   t	   MkManager(   R=   RK   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   `   R   R   s   Directory Listc         S   s   t  |  |  S(   N(   t	   MkDirList(   R=   RK   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   b   R   t   exps   Run Sample Programsc         S   s   t  |  |  S(   N(   t   MkSample(   R=   RK   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   d   R   (   R   R	   t   NoteBookt   add(   R   R   R=   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   MkMainNotebookO   s"    		c      	   C   sq   |  j  } t j | d t j d d } t j | d t j d d t _ t j j d d d d d d d	 d
  | S(   NR#   R"   i   t   padxi   t   padyt   lefti    t   rights   %70(	   R   R	   R3   R4   t   Labelt   SUNKENt   demoR   t   form(   R   R   R=   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   MkMainStatusg   s
    	!%c         C   s  |  j  } | j   } | j d  | j   d k rD | j d  n | j d  t j |  t _ |  j	   } |  j
   } |  j   } | j d t d t  | j d t d t  | j d t d d d t d	 d
 d d
  t j t j d <| j d |  d   d  S(   Ns   Tix Widget Demonstrationi   s   790x590+10+10s   890x640+10+10R)   t   fillt   expandi   RY   i   RZ   R   t   WM_DELETE_WINDOWc         S   s
   |  j    S(   N(   R/   (   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0      R   (   R   t   winfo_toplevelt   wm_titlet   winfo_screenwidtht   geometryR	   t   BalloonR_   R   RB   RX   Ra   R6   t   TOPt   Xt   BOTTOMt   BOTHR   t   wm_protocol(   R   R   t   zt   frame1t   frame2t   frame3(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   buildp   s    	(c         C   s   d |  _  d S(   s@   Quit our mainloop. It is up to you to call root.destroy() after.i    N(   R   (   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR/      s    c         C   s  x|  j  d k  ry- x& |  j  d k  r= |  j j j t  q WWq t k
 r\ d |  _  d St k
 r t j d d  d k r d |  _  d Sq q t	 j
   \ } } } d } x+ t j | | |  D] } | | d 7} q Wy t j d	 |  Wn n Xd |  _  t d  q Xq Wd S(
   s   This is an explict replacement for _tkinter mainloop()
        It lets you catch keyboard interrupts easier, and avoids
        the 20 msec. dead sleep() which burns a constant CPU.i    i   Nt	   Interrupts   Really Quit?t   yesR   s   
t   Error(   R   R   t   tkt
   dooneeventt   TCL_ALL_EVENTSt
   SystemExitt   KeyboardInterruptt   tkMessageBoxt   askquestionR   t   exc_infot	   tracebackt   format_exceptiont	   showerror(   R   t   tt   vt   tbR$   t   line(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   loop   s.    		  	c         C   s   |  j  j   d  S(   N(   R   t   destroy(   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR      s    (
   t   __name__t
   __module__R!   RB   RX   Ra   Rs   R/   R   R   (    (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR      s   								"c         C   s.   t  |   a t j   t j   t j   d  S(   N(   R   R_   Rs   R   R   (   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   RunMain   s    

c      	   C   si   |  j  |  } t |  } t |  } | j d t d t d d d d  | j d t d t d d  d  S(   NR)   Rb   RY   i   RZ   Rc   i   (   t   paget   MkWelcomeBart   MkWelcomeTextR6   Rj   Rk   Rm   (   t   nbRK   R=   t   barR$   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRJ      s
    "c         C   s  t  j |  d d d t  j } t  j | d |  d  } t  j | d |  d  } d | j d <d	 | j j d
 <d | j d <d	 | j j d
 <| t _ | t _	 | j
 t  j d  | j
 t  j d  | j
 t  j d  | j
 t  j d  | j
 t  j d  | j
 t  j d  | j
 t  j d  | j
 t  j d  | j
 t  j d  | j d  | j d	  | j d t  j d d d d  | j d t  j d d d d  t j j | d d d d t j j | d d d d | S(   NR"   i   R#   R.   c         S   s
   t  |   S(   N(   t   MainTextFont(   R=   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0      R   c         S   s
   t  |   S(   N(   R   (   R=   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0      R   i   t   widthi   t   heighti   t   Couriert	   Helveticat   Lucidas   Times Romant   8t   10t   12t   14t   18i   R)   RY   RZ   t   msgs   Choose
a fontt	   statusmsgs   Choose a font for this pages
   Point sizes"   Choose the font size for this page(   R	   R3   t   GROOVEt   ComboBoxt   entryt   slistboxt   listboxR_   R   R   R   t   ENDt   pickR6   R7   R   t   bind_widget(   R   R=   t   b1t   b2(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR      s6    		c      
   C   s   t  j |  d d } | j } d } t  j | d d d d d t  j d	 | } t  j | d d d d
 d t  j d	 d } | j d d d t  j d d d d  | j d d d t  j d d d d  | t _	 | S(   Nt	   scrollbart   autos   Welcome to TIX in PythonR"   i    R   i   t   anchorR$   i  s%  Tix is a set of mega-widgets based on TK. This program demonstrates the widgets in the Tix widget set. You can choose the pages in this window to look at the corresponding widgets. 

To quit this program, choose the "File | Exit" command.

For more information, see http://tix.sourceforge.net.Rc   i   Rb   RY   i
   RZ   (
   R	   t   ScrolledWindowt   windowR]   t   Nt   MessageR6   Rm   R_   R   (   R   R=   t   winR$   t   titleR   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR      s    		%%	c         C   s]   t  j s d  St  j d } t  j d } | d k r< d } n  d | | f } | t  j d <d  S(   Nt   values   Times Romant   timess   %s %st   font(   R_   R   R   R   (   R=   R   t   pointt   fontstr(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR      s    		c           C   s6   t  j j   d k r% d t  j d <n d t  j d <d  S(   Nt   1t   botht   statet   none(   R_   R   t   getR   (    (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR<     s    c      	   C   sw  |  j  |  } d } t j | d d d | } t j | d d d | } t j | d d d | } t j | d d d | } t j | d d d | } t j | d d	 d | }	 t j | d d
 d | }
 t j | d d d | } t | j  t | j  t | j  t | j  t | j  t	 |	 j  t
 |
 j  t | j  | j d d d d d d  | j d d d d t |  d |  | j d d d d t |  d | d d  | j d | d d d d  | j d | d d t |  d |  |	 j d | d d t |  d |  | j d | d d t |  d |	 d d  |
 j d d d d d d  d  S(   Ns   label.padX 4R,   s   Chooser WidgetsRE   t   tixComboBoxt
   tixControlt	   tixSelectt   tixOptionMenut   tixFileEntryt   tixFileSelectBoxs   Tool BarR   i    R[   R\   s   %33t   &t   bottomis   %66(   R   R	   t
   LabelFramet   MkTitlet   framet   MkCombot	   MkControlt   MkSelectt	   MkOptMenut	   MkFileEntt	   MkFileBoxt	   MkToolBarR`   t   str(   R   RK   R=   RE   t   tilt   cbxt   ctlt   selt   optt   filt   fbxt   tbr(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRN     s4    &,&&,c         C   se  d d t  j d f } t  j |  d d d d d | } t  j |  d d	 d d
 d | } t  j |  d d d d
 d d
 d t  j d | } | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d  | j t  j d   | j t  j d!  | j d" t  j d# d$ d% d&  | j d" t  j d# d$ d% d&  | j d" t  j d# d$ d% d&  d  S('   Ns-   label.width %d label.anchor %s entry.width %di
   i   R,   t   Statict   editablei    RE   t   Editablei   t   Historyt   historyR   t   Januaryt   Februaryt   Marcht   Aprilt   Mayt   Junet   Julyt   Augustt	   Septembert   Octobert   Novembert   Decembert   Angolat
   Bangladesht   Chinat   Denmarkt   Ecuadors   /usr/bin/kshs   /usr/local/lib/pythons   /var/admR)   RY   i   RZ   i   (   R	   t   ER   R   R   R6   Rj   (   R=   RE   t   staticR   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR   0  s8    !!t   Bengalt   Delhit	   Karnatakas
   Tamil Naduc         C   sh   t  j t j    | } | d k  r8 t t   d } n | t t   k rS d } n  t j t  |  d  S(   Ni    i   (   t   statesR   t   demo_spintxtR   R   R   (   R=   t   inct   idx(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   spin_cmdT  s    	c         C   s:   y t  j t j    } Wn t k
 r1 t  d SXt  | S(   Ni    (   R   R   R   R   t
   ValueError(   R=   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   spin_validate^  s
    	c         C   s   d d t  j d f } t  j   a t j t d  t  j |  d d d | } t  j |  d d d	 t d | } | d
  | d <| d  | d <| d  | d <| j d t  j d d d d  | j d t  j d d d d  d  S(   Ns-   label.width %d label.anchor %s entry.width %di
   i   i    R,   t   NumbersRE   t   StatesR2   c         S   s   t  |  d  S(   Ni   (   R   (   R=   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   r  R   t   incrcmdc         S   s   t  |  d  S(   Ni(   R   (   R=   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   s  R   t   decrcmdc         S   s
   t  |   S(   N(   R   (   R=   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   t  R   t   validatecmdR)   RY   i   RZ   i   (	   R	   R   R
   R   R   R   t   ControlR6   Rj   (   R=   RE   t   simplet   spintxt(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR   h  s    	c         C   s  d t  j } t  j |  d d d d d d d t  j d t  j d	 | } t  j |  d d
 d d d d d t  j d t  j d	 | } | j d d d | j d d d | j d d d | j d d d | j d d d | j d d d | j d d d | j d d d | j d d d | j d d d | j d t  j d d d d d  t  j  | j d t  j d d d d d  t  j  d  S(!   Ns   label.anchor %sR,   s   Mere Mortalst	   allowzeroi   t   radiot   orientationt	   labelsideRE   t   Geeksi    t   eatR$   t   Eatt   workt   Workt   playt   Playt   partyt   Partyt   sleept   Sleept   prog1t   Programt   prog2t   prog3R)   RY   i   RZ   i   Rb   (	   R	   t   CENTERt   Selectt   VERTICALRj   RW   R6   R7   Rk   (   R=   RE   t   sel1t   sel2(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR   y  s*    						(c         C   s   d t  j } t  j |  d d d | } | j d d d | j d d d | j d	 d d
 | j d d d | j d  | j d d d | j d d d | j d t  j d d d d  d  S(   Ns#   menubutton.width 15 label.anchor %sR,   s   File Format : RE   R$   s
   Plain Textt   postt
   PostScriptt   formats   Formatted Textt   htmlt   HTMLt   sept   text   LaTeXt   rtfs   Rich Text FormatRb   RY   i   RZ   i   (   R	   R   t
   OptionMenuR:   R6   Rk   (   R=   RE   t   m(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR     s    c         C   s   t  j |  d t  j d d d t  j d d } t  j |  d d } | j d	 t  j d
 d d t  j d d d d  | j d	 t  j d t  j d d d d  d  S(   NR#   R   i   R   R$   sG   Press the "open file" icon button and a TixFileSelectDialog will popup.R,   s   Select a file : R)   Rc   i   Rb   RY   i   RZ   (	   R	   R   t   FLATR   t	   FileEntryR6   Rj   Rm   Rk   (   R=   R   t   ent(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR     s    	.c         C   s   t  j |  d t  j d d d t  j d d } t  j |   } | j d t  j d d	 d
 t  j d d d d  | j d t  j d
 t  j d d d d  d S(   s   The FileSelectBox is a Motif-style box with various enhancements.
    For example, you can adjust the size of the two listboxes
    and your past selections are recorded.
    R#   R   i   R   R$   s   The Tix FileSelectBox is a Motif-style box with various enhancements. For example, you can adjust the size of the two listboxes and your past selections are recorded.R)   Rc   i   Rb   RY   i   RZ   N(	   R	   R   R"  R   t   FileSelectBoxR6   Rj   Rm   Rk   (   R=   R   t   box(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR     s    	.c         C   s;  d } t  j |  d t  j d d d t  j d d } t  j |  d d	 d t  j } t  j |  d
 d d d d d d | } t  j |  d
 d d d d d d | } | j d d d t j	 d | j d d d t j	 d | j d d d t j	 d | j d d d t j	 d | j d d d t j	 d | j d d d t j	 d | j d d d t j	 d  | j d! d d t j	 d" | j
 d# t  j d$ d d% t  j d& d' d( d'  | j
 d# t  j d% t  j d& d' d( d'  | j
 i | d) 6d# t  j d& d' d( d' | j
 i | d) 6d# t  j d& d' d( d' d* S(+   sH   The Select widget is also good for arranging buttons in a tool bar.
    s   frame.borderWidth 1R#   R   i   R   R$   sC   The Select widget is also good for arranging buttons in a tool bar.R"   i   R   i   R   i    R,   R   RE   t   boldt   bitmapt   @s   /bitmaps/bold.xbmt   italics   /bitmaps/italic.xbmR&   s   /bitmaps/underline.xbmt   capitals   /bitmaps/capital.xbmR[   s   /bitmaps/leftj.xbmR\   s   /bitmaps/rightj.xbmt   centers   /bitmaps/centerj.xbmt   justifys   /bitmaps/justify.xbmR)   Rc   Rb   RY   i   RZ   t   inN(   R	   R   R"  R   R3   R4   R  RW   R_   R   R6   Rj   Rm   Rk   R7   (   R=   RE   R   R   R   t   para(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR     s&    	''.()c         C   s_   t  j |  d t  j d d d t  j d d } | j d t  j d d	 d
 t  j d d d d  d  S(   NR#   R   i   R   R$   se   There are many types of "chooser" widgets that allow the user to input different types of informationR)   Rc   i   Rb   RY   i   RZ   (   R	   R   R"  R   R6   Rj   Rm   (   R=   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR     s    	c      	   C   s   |  j  |  } d } t j | d d d | } t j | d d d | } t j | d d d | } t | j  t | j  t | j  | j d d d	 d d
 d d d  | j d d d	 | d
 d d d  | j d d d	 | d
 d d d  d  S(   Ns   label.padX 4R,   s   Tix.ScrolledListBoxRE   s   Tix.ScrolledWindows   Tix.ScrolledTextR   i    R[   R\   s   %33R   is   %66(   R   R	   R   t   MkSListR   t	   MkSWindowt   MkSTextR`   (   R   RK   R=   RE   t   slst   swnt   stx(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRP     s    ""c         C   s  t  j |  d d d d } t  j |   } t  j | d t  j d d d t  j d d	 } t  j | d
 d } | j d d d d d d d d  | j j t  j	 d  | j j t  j	 d  | j j t  j	 d  | j j t  j	 d  | j j t  j	 d  | j j t  j	 d  | j j t  j	 d  t  j
 | d d d t  j d d d d d d d  d! } t  j | d d" d# | | d$  } | j d%  | j d& t  j  | j d t  j  | j d' d d& t  j  | j d& t  j  | j d( d) d% | | d*  d+ S(,   s   This TixScrolledListBox is configured so that it uses scrollbars
    only when it is necessary. Use the handles to resize the listbox and
    watch the scrollbars automatically appear and disappear.  R   i,  R   iJ  R#   i   R   R$   s   This TixScrolledListBox is configured so that it uses scrollbars only when it is necessary. Use the handles to resize the listbox and watch the scrollbars automatically appear and disappear.R   R   t   xi2   t   yi   ix   iP   t   Alabamat
   Californiat   Montanas
   New Jerseys   New Yorkt   Pennsylvaniat
   WashingtonRF   t   blackt
   handlesizei   t   griddedi   t   minwidtht	   minheighti   t   ResetR.   c         S   s   t  |  |  S(   N(   t   SList_reset(   R=   R6  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0     R   i    Rb   Rc   s   <Map>t   funcc         S   s%   | j  j d t |  d t |   S(   Nt   tixDoWhenIdlet   attachwidget(   Rw   t   callR   (   t   argt   rht   list(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0     s    N(   R	   R3   R   R"  R   t   ScrolledListBoxt   placeR   R   R   t   ResizeHandleR4   t   Buttont	   propagateR6   Rk   R  Rm   t   bind(   R=   R   t   botR   RJ  RI  t   btn(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0    s0    	"	$c      	   C   s=   | j  d d d d d d d d  | j   |  j |  d  S(	   NR6  i2   R7  i   R   ix   R   iP   (   RL  t   updatet   attach_widget(   RI  RJ  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRC  
  s    "
c         C   s  d } t  j j t j d d  } t  j j |  s@ | d 7} n  t j |  d d d d } t j |   } t j | d t j	 d d	 d
 t j
 d | } t j | d d } | j j d d | } t j | j d | } | j d d d t j  | j d d d d d d d d  t j | d d d t j d d d d d d  d! d }	 t j | d d" d# |	 | d$  }
 | j d%  | j d t j  |
 j d
 t j  | j d d d t j  | j d t j  | j d& d' d% |	 | d(  d) S(*   s   The ScrolledWindow widget allows you to scroll any kind of Tk
    widget. It is more versatile than a scrolled canvas widget.
    s}   The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.t   bitmapss   tix.gifs    (Image missing)R   iJ  R   R#   i   R   R$   R   R   t   photoR>   t   imageRc   i   Rb   R6  i   R7  i   i   ix   RF   R=  R>  i   R?  R@  i2   RA  RB  R.   c         S   s   t  |  |  S(   N(   t   SWindow_reset(   R=   R6  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   ,  R   i    s   <Map>RD  c         S   s%   | j  j d t |  d t |   S(   NRE  RF  (   Rw   RG  R   (   RH  RI  R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   3  s    N(   R   R   t   joinR_   R   t   isfileR	   R3   R   R"  R   R   R   t   image_createR]   R6   Rm   RL  RM  R4   RN  RO  Rk   R  RP  (   R=   R$   R>   R   RQ  R   R   t   image1t   lblRI  RR  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR1    s0    	"	$c      	   C   s=   | j  d d d d d d d d  | j   |  j |  d  S(	   NR6  i   R7  i   R   i   R   ix   (   RL  RS  RT  (   RI  R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRX  6  s    "
c         C   s  t  j |  d d d d } t  j |   } t  j | d t  j d d d t  j d d } t  j | d	 d
 } d | j d <| j j t  j d  | j	 d d d d d d d d  t  j
 | d d d t  j d d d d d d d d } t  j | d d d | | d  } | j d   | j d! t  j  | j d t  j  | j d" d d! t  j  | j d! t  j  | j d# d$ d  | | d%  d& S('   s   The TixScrolledWindow widget allows you to scroll any kind of Tk
    widget. It is more versatile than a scrolled canvas widget.R   iJ  R   R#   i   R   R$   s}   The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.R   R   R   t   wraps  When -scrollbar is set to "auto", the
scrollbars are shown only when needed.
Additional modifiers can be used to force a
scrollbar to be shown or hidden. For example,
"auto -y" means the horizontal scrollbar
should be shown when needed but the vertical
scrollbar should always be hidden;
"auto +x" means the vertical scrollbar
should be shown when needed but the horizontal
scrollbar should always be shown, and so on.R6  i   R7  i   i   id   RF   R=  R>  i   R?  i   R@  i2   RA  RB  R.   c         S   s   t  |  |  S(   N(   t   SText_reset(   R=   R6  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   V  R   i    Rb   Rc   s   <Map>RD  c         S   s%   | j  j d t |  d t |   S(   NRE  RF  (   Rw   RG  R   (   RH  RI  R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0   \  s    N(   R	   R3   R   R"  R   t   ScrolledTextR$   R   R   RL  RM  R4   RN  RO  R6   Rk   R  Rm   RP  (   R=   R   RQ  R   R   RI  RR  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR2  ;  s(    		"	$c      	   C   s=   | j  d d d d d d d d  | j   |  j |  d  S(	   NR6  i   R7  i   R   i   R   ix   (   RL  RS  RT  (   RI  R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR_  _  s    "
c      	   C   s   |  j  |  } d } t j | d d d | } t j | d d d | } t | j  t | j  | j d d d d d	 | d
 d  | j d d d	 d d
 d  d  S(   Ns   label.padX 4R,   s   Tix.PanedWindowRE   s   Tix.NoteBookR   i    R[   R\   R   i(   R   R	   R   t   MkPanedWindowR   t
   MkNoteBookR`   (   R   RK   R=   RE   t   panet   note(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRR   d  s    "c         C   s[  t  j |  d t  j d d d t  j d d } t  j |  d d d	 d
 } | j j d d  t  j |  d d } | j d d d d d } | j d d d } t  j	 |  } t  j
 |  } | j j t  j d  | j j t  j d  | j j t  j d  | j j t  j d  | j j t  j d  | j j t  j d  | j j t  j d  | j d | j d <d | j d <| j j t  j d  | j d d  d! t  j d" d# d$ d%  | j d d  d! t  j d" d# d$ d%  | j d& t  j d" d' d$ d' d! t  j  | j d& t  j d" d' d$ d' d! t  j  | j d& t  j d" d' d$ d' d! t  j d d   d( S()   s   The PanedWindow widget allows the user to interactively manipulate
    the sizes of several panes. The panes can be arranged either vertically
    or horizontally.
    R#   R   i   R   R$   s   The PanedWindow widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.R,   s
   Newsgroup:RE   s   entry.width 25i    s   comp.lang.pythonR  t   verticalRJ  t   miniF   t   sizeid   s+     12324 Re: Tkinter is good for your healths+   + 12325 Re: Tkinter is good for your healthsH   + 12326 Re: Tix is even better for your health (Was: Tkinter is good...)sH     12327 Re: Tix is even better for your health (Was: Tkinter is good...)sH   + 12328 Re: Tix is even better for your health (Was: Tkinter is good...)sH     12329 Re: Tix is even better for your health (Was: Tkinter is good...)sH   + 12330 Re: Tix is even better for your health (Was: Tkinter is good...)RF   R   R^  sO  
Mon, 19 Jun 1995 11:39:52        comp.lang.python              Thread   34 of  220
Lines 353       A new way to put text and bitmaps together iNo responses
ioi@blue.seas.upenn.edu                Ioi K. Lam at University of Pennsylvania

Hi,

I have implemented a new image type called "compound". It allows you
to glue together a bunch of bitmaps, images and text strings together
to form a bigger image. Then you can use this image with widgets that
support the -image option. For example, you can display a text string
together with a bitmap, at the same time, inside a TK button widget.
Rc   i   Rb   RY   i   RZ   i   R)   i   N(   R	   R   R"  R   t
   LabelEntryR   R   t   PanedWindowRW   RK  R`  R   R   R$   R6   Rm   Rj   (   R=   R   t   groupRc  t   p1t   p2RJ  R$   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRa  q  s4    	%%((c   	      C   s  t  j |  d t  j d d d t  j d d } d d d	 t  j f } t  j |  d
 d d d d | } | j d d d d d | j d d d d d t  j | j  } | j	 d t  j
 d d d d d t  j  t |  t  j | j d d d d } t  j | j d d d d }  t  j | j d d d d } t  j | j d d  d d! } | j	 d t  j d d" d d  |  j	 d t  j d d" d d  | j	 d t  j d d" d d  | j	 d t  j d d" d d  t  j | j  } | j	 d t  j
 d d d d d t  j  t |  t  j | j d d d d } t  j | j d d d d }  t  j | j d d d d } t  j | j d d  d d! } t  j | j d d d d# } | j	 d t  j d d" d d  |  j	 d t  j d d" d d  | j	 d t  j d d" d d  | j	 d t  j d d" d d  | j	 d t  j d d" d d  | j	 d t  j d d$ d d$ d t  j  | j	 d t  j d d% d d% d t  j d& d'  d  S((   NR#   R   i   R   R$   sS   The NoteBook widget allows you to layout a complex interface into individual pages.s-   entry.width %d label.width %d label.anchor %si
   i   RC   i   RD   RE   t	   hard_diskR,   s	   Hard DiskR&   i    t   networkt   NetworkR)   RY   i   RZ   Rb   R   i   s   Access Time: i  s   Write Throughput: s   Read Throughput: i  s
   Capacity: i   s   Users: i   i   Rc   i   (   R	   R   R"  R   R   RV   RW   R3   Rm  R6   R8   t   Yt   CreateCommonButtonsR   Rj   Rn  Rm   (	   R=   R   RE   R   t   commont   at   rt   ct   u(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRb    sB    	!(
(
(c         C   sx   t  j |  d d d d } t  j |  d d d d } | j d t  j d d d	 d  | j d t  j d d d	 d  d  S(
   NR$   t   OKR   i   t   CancelR)   RY   i   RZ   (   R	   RN  R6   Rj   (   t   ft   okt   cancel(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRq    s    c      	   C   s   |  j  |  } d } t j | d d d | } t j | d d d | } t | j  t | j  | j d d d d d	 d
 d d  | j d d d d
 d	 d d d  d  S(   Ns   label.padX 4R,   s   Tix.DirListRE   s   Tix.ExFileSelectBoxR   i    R[   R\   s   %40R   i(   R   R	   R   t   MkDirListWidgetR   t   MkExFileWidgetR`   (   R   RK   R=   RE   R   t   fsbox(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRS     s    "c         C   s   t  j |  d t  j d d d t  j d d } t  j |  d d } | j d	 t  j d
 d d t  j d d d d  | j d	 t  j d d d d  d S(   s   The TixDirList widget gives a graphical representation of the file
    system directory and makes it easy for the user to choose and access
    directories.
    R#   R   i   R   R$   s   The Tix DirList widget gives a graphical representation of the file system directory and makes it easy for the user to choose and access directories.RE   s+   hlist.padY 1 hlist.width 25 hlist.height 16R)   Rc   i   Rb   RY   i   RZ   N(   R	   R   R"  R   t   DirListR6   Rj   Rm   (   R=   R   t   dirlist(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR|    s    	.c         C   s   t  j |  d t  j d d d t  j d d } t  j |  d d d t  j } | j d	 t  j d
 d d t  j d d d d  | j d	 t  j d d d d  d S(   s]   The TixExFileSelectBox widget is more user friendly than the Motif
    style FileSelectBox.  R#   R   i   R   R$   sX   The Tix ExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.R"   i   R)   Rc   i   Rb   RY   i   RZ   N(	   R	   R   R"  R   t   ExFileSelectBoxR4   R6   Rj   Rm   (   R=   R   R&  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR}    s    	.s   Widget Demost   widgets   Image DemosRW  Ri   t   BtnBoxs
   Button BoxR   s	   Combo Boxt   CmpImgs   Compound ImageR  s   Directory Listt   DirTrees   Directory TreeR   RV   t   Notebookt   OptMenus   Option Menut   PanedWins   Paned Windowt   PopMenus
   Popup Menut   SHList1s   ScrolledHList (1)t   SHList2s   ScrolledHList (2)t   Trees   Tree (dynamic)c         C   sv  |  j  |  } d } t j | d d } | j d t j d d d t j  | j d d d	 } | j d
 d d } d | d <d | d <t j | d d } | j d t j d d d t j d d d d  t j | d d } | j d t j d d d t j d d d d  t j | j	 d d }	 |	 j d t j d d d t j d d  t j
 | j	 d d }
 t j j d  } |
 j j d |  t j | j	 d d } t j | d
 d d d } t j | d
 d d d } | j d t j d d d t j  | j d t j d d d t j  |	 j d  |
 j d  <d! |
 j d" <d# |
 j d$ <d% |
 j d& <| j d t j d d d t j d d'  |
 j d t j d d d t j d d'  d( |	 j d) <d* |	 j d& <d |	 j d+ <d, |	 j d- <d |	 j d. <d | |	 |
 | | d/  |	 j d0 <d | |	 |
 | | d1  |	 j d2 <d | |	 |
 | | d3  | d0 <d | |	 |
 | | d4  | d0 <x d5 d6 g D] } | d5 k rt j |	 j d7 d8 d9 d8 d& d: d t j d  |	 j d  } |	 j j d; t j d< | d" d!  n  |	 j j d; t j d" d! d
 t |  } x7 t | D]+ } |	 j j | d; t j d= | d
 | qWqzW|	 j j   d! | d" <d! | d" <d  S(>   Ns   label.padX 4R  t
   horizontalR)   Rc   i   Rb   RJ  R   R$   t   5t   flatR#   R,   s   Select a sample program:RY   i   RZ   s   Source:RE   s   hlist.width 20RK   t   stexts   tix option get fixed_fontR   R   s   Run ...t   runs   View Source ...t   viewi    RF   t   disabledR   R   R^  iP   R   i   t   .t	   separatori   t
   drawbranchi
   t   indentt
   wideselectc         S   s   t  | | | | | d  S(   NR  (   t   Sample_Action(   t   argsR=   t   slbR  R  R  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0     R   R.   c         S   s   t  | | | | | d  S(   Nt   browse(   R  (   R  R=   R  R  R  R  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0     R   t	   browsecmdc         S   s   t  | | | | | d  S(   NR  (   R  (   R  R=   R  R  R  R  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0     R   c         S   s   t  | | | | | d  S(   NR  (   R  (   R  R=   R  R  R  R  (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0     R   R  RW  R"   i   R   i   t   itemtypeR   t   data(   R   R	   Ri  R6   Rj   Rm   RW   R   R  R   R`  R   Rw   t   evalR$   t   configR3   RN  R7   t   NONEt   hlistRl   Rk   R^   t	   add_childt   WINDOWt   TEXTt   commentst   stypest   selection_clear(   R   RK   R=   RE   Rc  t   f1t   f2t   labt   lab1R  R  R   R   R  R  t   typeR6  t   key(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyRU   k  sd    "

..(""((""!%
c         B   s@  | j  } | j   } | s2 d | d <d | d <n | j |  sE d  Sd | d <d | d <| j |  } | }	 e | }
 | d k r d |
 d  Ue j   }  |  j |	  e |
 d  } | |   nv | d k re j   }  |  j d |	  e	 |  t
 j d	 |
 d
  n. | d k r<e | j t
 j d	 |
 d
  n  d  S(   NR  R   t   normalR  s   import s
   .RunSampleR  s   Source view: s	   /samples/s   .pyR  (   R  t   info_anchort   info_parentt	   info_datat   samplesR	   t   ToplevelR   R  t   LoadFileR_   R   t   ReadFileR$   (   R=   R  R  R  R  t   actionR  R   R  R   t   progt   rtn(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR    s0    	



c         C   s   t  j |  d d d |  j } t  j |   } | j   | j   t j j d  } | j j	 d |  d | j d <d | j d	 <t
 | j |  d  S(
   NR$   t   CloseR.   s   tix option get fixed_fontR   i   R"   R   R^  (   R	   RN  R   R`  R6   R   Rw   R  R$   R  R  (   R=   t   fnamet   bR   R   (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR    s    

c         C   s   |  d } d |  d <|  j  d t j  zJ t |  } | j   } x! | D] } |  j t j |  qI W| j   Wd  | |  d <Xd  S(   NR   R  s   0.0(   t   deleteR	   R   t   opent	   readlinesR   t   close(   R=   R  t	   old_stateRy  t   linest   s(    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyR    s    

t   __main__i   i   i   i   i    (    (8   R   t   os.pathR   R	   t   TkconstantsR   R|   t   TCL_DONT_WAITt   TCL_WINDOW_EVENTSt   TCL_FILE_EVENTSt   TCL_TIMER_EVENTSt   TCL_IDLE_EVENTSRy   R   R   RJ   R   R   R   R<   RN   R   R   R   R   R   R   R   R   R   R   R   RP   R0  RC  R1  RX  R2  R_  RR   Ra  Rb  Rq  RS   R|  R}  R  R  R  RU   R  R  R  R   t   TkR   (    (    (    s+   /usr/lib64/python2.7/Demo/tix/tixwidgets.pyt   <module>   s   0
	
		%				%	"	
	
									 		'		$			/	.				

^	@			