o
    tf                     @   s   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	m
Z
 ddlmZmZ ddlmZmZmZ e	G d	d
 d
eeZe	G dd dee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.
   )DescriptionStyleDescriptionWidget)
CoreWidget)ValueWidget)registerwidget_serialization)ColorInstanceDict    )UnicodeBoolCaselessStrEnumc                   @   s6   e Zd ZdZedjddZeddddjddZdS )CheckboxStylezCheckbox widget style.ZCheckboxStyleModelTsyncNzBackground specifications.
allow_nonehelp)__name__
__module____qualname____doc__r   tag_model_name
background r   r   g/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/ipywidgets/widgets/widget_bool.pyr      s    r   c                   @   s   e Zd ZdZedjddZeddddjddZeddddjddZeddd	djddZ	eddd
djddZ
eddddjddZeddddjddZeddddjddZdS )ToggleButtonStylezToggleButton widget style.ZToggleButtonStyleModelTr   NzToggle button text font family.r   zToggle button text font size.zToggle button text font style.z Toggle button text font variant.zToggle button text font weight.zToggle button text colorzToggle button text decoration.)r   r   r   r   r   r   r   Zfont_familyZ	font_sizeZ
font_styleZfont_variantZfont_weightr   Z
text_colorZtext_decorationr   r   r   r   r      s    r   c                       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r   Tr   zEnable or disable user changes.Nc                    s&   |d ur||d< t  jdi | d S )Nvaluer   )super__init__)selfr    kwargs	__class__r   r   r"   *   s   z_Bool.__init__Z	BoolModel)N)r   r   r   r   r   r   r    disabledr"   r   r   __classcell__r   r   r%   r   r   %   s    r   c                   @   s`   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	e
eddjdd	die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CheckboxViewTr   ZCheckboxModelzCIndent the control to align with other controls with a description.r   Styling customizationsr   Nr   )r   r   r   r   r   r   
_view_namer   r   indentr	   r   r   styler   r   r   r   r)   2   s     r)   c                   @   sz   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e	g d	dd
djddZ
eeddjdddieZdS )ToggleButtona  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 on the button
    icon: str
        font-awesome icon name
    style: instance of DescriptionStyle
        styling customizations
    button_style: enum
        button predefined styling
    ZToggleButtonViewTr   ZToggleButtonModel zFont-awesome icon.r   )primarysuccessinfowarningZdangerr/   z(Use a predefined styling for the button.)valuesdefault_valuer   r*   r   Nr   )r   r   r   r   r   r   r+   r   iconr   Zbutton_styler	   r   r   r-   r   r   r   r   r.   F   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 Falser   Tr   Z	ValidViewZ
ValidModelN)	r   r   r   r   r   r   Zreadoutr+   r   r   r   r   r   r7   b   s
    r7   N)r   Zwidget_descriptionr   r   Zwidget_corer   Zvaluewidgetr   Zwidgetr   r   Ztrait_typesr   r	   Z	traitletsr   r   r   r   r   r   r)   r.   r7   r   r   r   r   <module>   s$   