ó
/¾I]c           @   sÖ   d  Z  d d l m Z d d l m Z d d l m Z d d l m Z d d l	 m
 Z
 m Z m Z d e e e f d	 „  ƒ  YZ e d
 e f d „  ƒ  Yƒ Z e d e f d „  ƒ  Yƒ Z e d e f d „  ƒ  Yƒ Z d S(   s2   Bool class.

Represents a boolean using a widget.
i   (   t   DescriptionWidget(   t
   CoreWidget(   t   ValueWidget(   t   registeriÿÿÿÿ(   t   Unicodet   Boolt   CaselessStrEnumt   _Boolc           B   sn   e  Z d  Z e e d d ƒj d e ƒ Z e e d d ƒj d e ƒ Z d d „ Z
 e d ƒ j d e ƒ Z RS(   s:   A base class for creating widgets that represent booleans.t   helps
   Bool valuet   syncs   Enable or disable user changes.c         K   s3   | d  k	 r | | d <n  t t |  ƒ j |   d  S(   Nt   value(   t   Nonet   superR   t   __init__(   t   selfR
   t   kwargs(    (    s=   lib/python2.7/site-packages/ipywidgets/widgets/widget_bool.pyR      s    t	   BoolModelN(   t   __name__t
   __module__t   __doc__R   t   Falset   tagt   TrueR
   t   disabledR   R   R   t   _model_name(    (    (    s=   lib/python2.7/site-packages/ipywidgets/widgets/widget_bool.pyR      s
   t   Checkboxc           B   s\   e  Z d  Z e d ƒ j d e ƒ Z e d ƒ j d e ƒ Z e e d d ƒj d e ƒ Z	 RS(   sº  Displays a boolean `value` in the form of a checkbox.

    Parameters
    ----------
    value : {True,False}
        value of the checkbox: True-checked, False-unchecked
    description : str
	    description displayed next to the checkbox
    indent : {True,False}
        indent the control to align with other controls with a description. The style.description_width attribute controls this width for consistence with other controls.
    t   CheckboxViewR	   t   CheckboxModelR   sC   Indent the control to align with other controls with a description.(
   R   R   R   R   R   R   t
   _view_nameR   R   t   indent(    (    (    s=   lib/python2.7/site-packages/ipywidgets/widgets/widget_bool.pyR      s   t   ToggleButtonc           B   s°   e  Z d  Z e d ƒ j d e ƒ Z e d ƒ j d e ƒ Z e d d ƒ j d e ƒ Z e d d d ƒj d e ƒ Z	 e
 d d	 d
 d d d d g d d d d ƒ j d e ƒ Z RS(   sj  Displays a boolean `value` in the form of a toggle button.

    Parameters
    ----------
    value : {True,False}
        value of the toggle button: True-pressed, False-unpressed
    description : str
	      description displayed next to the button
    tooltip: str
        tooltip caption of the toggle button
    icon: str
        font-awesome icon name
    t   ToggleButtonViewR	   t   ToggleButtonModelR   s%   Tooltip caption of the toggle button.t    s   Font-awesome icon.t   valuest   primaryt   successt   infot   warningt   dangert   default_values(   Use a predefined styling for the button.(   R   R   R   R   R   R   R   R   t   tooltipt   iconR   t   button_style(    (    (    s=   lib/python2.7/site-packages/ipywidgets/widgets/widget_bool.pyR   /   s   t   Validc           B   s\   e  Z d  Z e d d d ƒj d e ƒ Z e d ƒ j d e ƒ Z e d ƒ j d e ƒ Z RS(   sÊ   Displays a boolean `value` in the form of a green check (True / valid)
    or a red cross (False / invalid).

    Parameters
    ----------
    value: {True,False}
        value of the Valid widget
    t   InvalidR   s)   Message displayed when the value is FalseR	   t	   ValidViewt
   ValidModel(	   R   R   R   R   R   R   t   readoutR   R   (    (    (    s=   lib/python2.7/site-packages/ipywidgets/widgets/widget_bool.pyR,   I   s   	N(   R   t   widget_descriptionR    t   widget_coreR   t   valuewidgetR   t   widgetR   t	   traitletsR   R   R   R   R   R   R,   (    (    (    s=   lib/python2.7/site-packages/ipywidgets/widgets/widget_bool.pyt   <module>   s   