³ņ
iģDc           @   s   d  Z  d d k Z d d k Td d k Z d e i f d     YZ d e i f d     YZ d e i f d	     YZ d
 e i f d     YZ d S(   sQ   These widgets are all grouped together because they are non-interactive widgets.
i’’’’N(   t   *t   Spacerc           B   s   e  Z d  Z d   Z RS(   sE   A invisible space.
    
    <pre>Spacer(width,height)</pre>
    
    c         K   s3   | i  d t  t i i |  d | d | | d  S(   Nt	   focusablet   widtht   height(   t
   setdefaultt   Falset   widgett   Widgett   __init__(   t   selfR   R   t   params(    (    s   ../pgu/gui/basic.pyR	      s    (   t   __name__t
   __module__t   __doc__R	   (    (    (    s   ../pgu/gui/basic.pyR   	   s   t   Colorc           B   s,   e  Z d  Z d d  Z d   Z d   Z RS(   sė   A block of color.
    
    <p>The color can be changed at run-time.</p>
    
    <pre>Color(value=None)</pre>
    
    <strong>Example</strong>
    <code>
    c = Color()
    c.value = (255,0,0)
    c.value = (0,255,0)
    </code>
    c         K   sB   | i  d t  | d  j o | | d <n t i i |  |  d  S(   NR   t   value(   R   R   t   NoneR   R   R	   (   R
   R   R   (    (    s   ../pgu/gui/basic.pyR	   $   s    c         C   s(   t  |  d  o | i |  i  n d  S(   NR   (   t   hasattrt   fillR   (   R
   t   s(    (    s   ../pgu/gui/basic.pyt   paint)   s    c         C   s   | d j o& t  |  t j o t i |  } n |  i i | t  } | |  i | <| d j o5 | t j o( | | j o |  i t  |  i	   n d  S(   NR   (
   t   typet   strt   pygameR   t   __dict__t   gett   NOATTRt   sendt   CHANGEt   repaint(   R
   t   kt   vt   _v(    (    s   ../pgu/gui/basic.pyt   __setattr__,   s    3'N(   R   R   R   R   R	   R   R"   (    (    (    s   ../pgu/gui/basic.pyR      s   	t   Labelc           B   s    e  Z d  Z d   Z d   Z RS(   s  A text label.
    
    <pre>Label(value)</pre>
    
    <dl>
    <dt>value<dd>text to be displayed
    </dl>
    
    <strong>Example</strong>
    <code>
    w = Label(value="I own a rubber chicken!")
    
    w = Label("3 rubber chickens")
    </code>
    c         K   sv   | i  d t  | i  d d  t i i |  |  | |  _ |  i i |  _ |  i i |  i  \ |  i _	 |  i _
 d  S(   NR   t   clst   label(   R   R   R   R   R	   R   t   stylet   fontt   sizeR   R   (   R
   R   R   (    (    s   ../pgu/gui/basic.pyR	   D   s    	c         C   s/   | i  |  i i |  i d |  i i  d  d  S(   Ni   i    (   i    i    (   t   blitR'   t   renderR   R&   t   color(   R
   R   (    (    s   ../pgu/gui/basic.pyR   L   s    (   R   R   R   R	   R   (    (    (    s   ../pgu/gui/basic.pyR#   4   s   	t   Imagec           B   s    e  Z d  Z d   Z d   Z RS(   s}   An image.
    
    <pre>Image(value)</pre>
    
    <dl>
    <dt>value<dd>a file name or a pygame.Surface
    </dl>
    
    c   	      K   sZ  | i  d t  t i i |  |  t |  t j o t i i	 |  } n | i
   | i   f \ } } \ } } |  i i |  i i } } | o! | o | | | | } } nH | o! | o | | | | } } n  | o | o | | } } n | | f | | f j o t i i | | | f  } n | | |  i _ |  i _ | |  _ d  S(   NR   (   R   R   R   R   R	   R   R   R   t   imaget   loadt	   get_widtht
   get_heightR&   R   R   t	   transformt   scaleR   (	   R
   R   R   t   owt   oht   iwt   iht   swt   sh(    (    s   ../pgu/gui/basic.pyR	   Y   s    )(c         C   s   | i  |  i d  d  S(   Ni    (   i    i    (   R)   R   (   R
   R   (    (    s   ../pgu/gui/basic.pyR   m   s    (   R   R   R   R	   R   (    (    (    s   ../pgu/gui/basic.pyR,   O   s   		(	   R   R   t   constR   R   R   R   R#   R,   (    (    (    s   ../pgu/gui/basic.pys   <module>   s   
 