B
    p[V                 @   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 G dd	 d	eeeZeG d
d deZeG dd deZeG dd deZdS )z2Bool class.

Represents a boolean using a widget.
   )DescriptionWidget)
CoreWidget)ValueWidget)register    )UnicodeBoolCaselessStrEnumc                   sZ   e Zd ZdZedddjddZedddjddZd fd	d
	Ze	djddZ
  ZS )_Boolz:A base class for creating widgets that represent booleans.Fz
Bool value)helpT)synczEnable or disable user changes.Nc                s&   |d k	r||d< t t| jf | d S )Nvalue)superr
   __init__)selfr   kwargs)	__class__ =lib/python3.7/site-packages/ipywidgets/widgets/widget_bool.pyr      s    z_Bool.__init__Z	BoolModel)N)__name__
__module____qualname____doc__r   tagr   Zdisabledr   r   _model_name__classcell__r   r   )r   r   r
      s
   r
   c               @   sD   e Zd ZdZedjddZedjddZedddjddZ	dS )	Checkboxa  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.
    ZCheckboxViewT)r   ZCheckboxModelzCIndent the control to align with other controls with a description.)r   N)
r   r   r   r   r   r   
_view_namer   r   indentr   r   r   r   r      s   r   c               @   sx   e Zd ZdZedjddZedjddZeddjddZedd	djddZ	e
d
dddddgdddjddZdS )ToggleButtonaj  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
    ZToggleButtonViewT)r   ZToggleButtonModelz%Tooltip caption of the toggle button.)r    zFont-awesome icon.ZprimaryZsuccessinfoZwarningZdangerz(Use a predefined styling for the button.)valuesZdefault_valuer   N)r   r   r   r   r   r   r   r   ZtooltipZiconr	   Zbutton_styler   r   r   r   r   /   s   r   c               @   sD   e Zd ZdZedddjddZedjddZedjddZd	S )
ValidzDisplays 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
    ZInvalidz)Message displayed when the value is False)r   T)r   Z	ValidViewZ
ValidModelN)	r   r   r   r   r   r   Zreadoutr   r   r   r   r   r   r#   I   s   	r#   N)r   Zwidget_descriptionr   Zwidget_corer   Zvaluewidgetr   Zwidgetr   Z	traitletsr   r   r	   r
   r   r   r#   r   r   r   r   <module>   s   