³ò
˜iìDc           @   s9   d  Z  d d k Td d k Z d e i f d „  ƒ  YZ d S(   t   
iÿÿÿÿ(   t   *Nt   Groupc           B   s8   e  Z d  Z d d d „ Z d „  Z d „  Z d „  Z RS(   sá  An object for grouping together Form elements.
    
    <pre>Group(name=None,value=None)</pre>
    
    <dl>
    <dt>name<dd>name as used in the Form
    <dt>value<dd>values that are currently selected in the group
    </dl>
    
    <p>See [[gui-button]] for several examples.</p>
    
    <p>When the value changes, an <tt>gui.CHANGE</tt> event is sent.
    Although note, that when the value is a list, it may have to be sent by hand via
    <tt>g.send(gui.CHANGE)</tt></p>
    c         C   s)   t  i i |  d | d | ƒg  |  _ d  S(   Nt   namet   value(   t   widgett   Widgett   __init__t   widgets(   t   selfR   R   (    (    s   ../pgu/gui/group.pyR      s    c         C   s   |  i  i | ƒ d S(   sM   Add a widget to this group.
        
        <pre>Group.add(w)</pre>
        N(   R   t   append(   R	   t   w(    (    s   ../pgu/gui/group.pyt   add   s    c         C   s[   |  i  i | t ƒ } | |  i  | <| d j o( | t j o | | j o |  i ƒ  n d  S(   NR   (   t   __dict__t   gett   NOATTRt   _change(   R	   t   kt   vt   _v(    (    s   ../pgu/gui/group.pyt   __setattr__"   s    'c         C   s/   |  i  t ƒ x |  i D] } | i ƒ  q Wd  S(   N(   t   sendt   CHANGER   t   repaint(   R	   R   (    (    s   ../pgu/gui/group.pyR   (   s    
 N(   t   __name__t
   __module__t   __doc__t   NoneR   R   R   R   (    (    (    s   ../pgu/gui/group.pyR      s
   		(   R   t   constR   R   R   (    (    (    s   ../pgu/gui/group.pys   <module>   s   
