
    ^h                     
   S r SSKJrJr  SSKJr  SSKJrJrJ	r	  SSK
Jr  SSKJrJrJr  SSKJr  SS	KJrJrJr   " S
 S\\5      r\ " S S\5      5       r\ " S S\5      5       r\ " S S\5      5       r\ " S S\5      5       r " S S\\\5      r\ " S S\5      5       r\ " S S\5      5       r\ " S S\5      5       r\ " S S\5      5       r\ " S S\5      5       r \ " S  S!\ 5      5       r!\ " S" S#\ 5      5       r"g$)%z;String class.

Represents a unicode string using a widget.
   )DescriptionStyleDescriptionWidget)ValueWidget)CallbackDispatcherregisterwidget_serialization)
CoreWidget)ColorInstanceDict
TypedTuple)deprecation    )UnicodeBoolIntc                       \ rS rSrSr\" S5      R                  SS9r\" SSSS9R                  SS9r\" SSS	S9R                  SS9r	\
" SSS
S9R                  SS9rSrg)_StringStyle   Text input style widget.StringStyleModelTsyncNzBackground specifications.
allow_nonehelpzText font size.z
Text color )__name__
__module____qualname____firstlineno____doc__r   tag_model_name
background	font_sizer
   
text_color__static_attributes__r       Z/home/james-whalen/.local/lib/python3.13/site-packages/ipywidgets/widgets/widget_string.pyr   r      sv    ",-11t1<K$5QRVV\`VaJ4EFJJPTJUIt<@DD$DOJr(   r   c                      \ rS rSrSr\" S5      R                  SS9r\" SSSS9R                  SS9r\" SSS	S9R                  SS9r	\" SSS
S9R                  SS9r
\" SSSS9R                  SS9r\" SSSS9R                  SS9rSrg)
LabelStyle   zLabel style widget.LabelStyleModelTr   NzLabel text font family.r   zLabel text font style.zLabel text font variant.zLabel text font weight.zLabel text decoration.r   )r   r   r   r    r!   r   r"   r#   font_family
font_stylefont_variantfont_weighttext_decorationr'   r   r(   r)   r+   r+      s    +,00d0;K$46OPTTZ^T_K$5MNRRX\R]J4D7QRVV\`VaL$46OPTTZ^T_Kdt:RSWW]aWbOr(   r+   c                   B    \ rS rSrSr\" S5      R                  SS9rSrg)	TextStyle%   r   TextStyleModelTr   r   N	r   r   r   r    r!   r   r"   r#   r'   r   r(   r)   r4   r4   %   s    "*+//T/:Kr(   r4   c                   B    \ rS rSrSr\" S5      R                  SS9rSrg)	HTMLStyle*   zHTML style widget.HTMLStyleModelTr   r   Nr7   r   r(   r)   r9   r9   *   s    *+//T/:Kr(   r9   c                   B    \ rS rSrSr\" S5      R                  SS9rSrg)HTMLMathStyle/   zHTML with math style widget.HTMLMathStyleModelTr   r   Nr7   r   r(   r)   r=   r=   /   s    &./333>Kr(   r=   c                      ^  \ rS rSrSr\" SS9R                  SS9r\" SSS9R                  SS9r\	" \
5      R                  " SS	S0\D6rSU 4S
 jjr\" S5      R                  SS9rSrU =r$ )_String5   z:Base class used to create widgets that represent a string.zString valuer   Tr   u   ​z7Placeholder text to display when nothing has been typedr   c                 4   > Ub  XS'   [         TU ]  " S0 UD6  g )Nvaluer   )super__init__)selfrE   kwargs	__class__s      r)   rG   _String.__init__@   s     #7O"6"r(   StringModelr   N)r   r   r   r    r!   r   r"   rE   placeholderr   r   r   stylerG   r#   r'   __classcell__rJ   s   @r)   rA   rA   5   sy    D(,,$,7E
 ()bcggmqgrK&**MM8LME#
 -(,,$,7Kr(   rA   c                       \ rS rSrSr\" S5      R                  SS9r\" S5      R                  SS9r\	" \
5      R                  " SSS0\D6rSrg	)
HTMLG   z#Renders the string `value` as HTML.HTMLViewTr   	HTMLModelr   r   N)r   r   r   r    r!   r   r"   
_view_namer#   r   r9   r   rO   r'   r   r(   r)   rS   rS   G   sS    -$((d(3J+&***5K#''JTJ5IJEr(   rS   c                       \ rS rSrSr\" S5      R                  SS9r\" S5      R                  SS9r\	" \
5      R                  " SSS0\D6rSrg	)
HTMLMathN   z;Renders the string `value` as HTML, and render mathematics.HTMLMathViewTr   HTMLMathModelr   r   N)r   r   r   r    r!   r   r"   rW   r#   r   r=   r   rO   r'   r   r(   r)   rY   rY   N   sS    E(,,$,7J/*..D.9K'++NN9MNEr(   rY   c                       \ rS rSrSr\" S5      R                  SS9r\" S5      R                  SS9r\	" \
5      R                  " SSS0\D6rSrg	)
LabelV   zwLabel widget.

It also renders math inside the string `value` as Latex (requires $ $ or
$$ $$ and similar latex tags).
	LabelViewTr   
LabelModelr   r   N)r   r   r   r    r!   r   r"   rW   r#   r   r+   r   rO   r'   r   r(   r)   r^   r^   V   sW    
 %))t)4J,'+++6K$((KdK6JKEr(   r^   c                      \ rS rSrSr\" S5      R                  SS9r\" S5      R                  SS9r\	" SSSS	9R                  SS9r
\" S
SS9R                  SS9r\" SSS9R                  SS9r\" \5      R                  " SSS0\D6rSrg)Textareab   zMultiline text area widget.TextareaViewTr   TextareaModelNzThe number of rows to display.r   FEnable or disable user changesrC   lUpdate the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away.r   r   )r   r   r   r    r!   r   r"   rW   r#   r   rowsr   disabledcontinuous_updater   r4   r   rO   r'   r   r(   r)   rc   rc   b   s    %(,,$,7J/*..D.9Kt+KLPPVZP[DE @AEE4EPHT  )W  X  \  \  bf  \  g#''JTJ5IJEr(   rc   c                     ^  \ rS rSrSr\" S5      R                  SS9r\" S5      R                  SS9r\	" SSS	9R                  SS9r
\	" SS
S	9R                  SS9r\" \5      R                  " SSS0\D6rU 4S jrS rSS jrSrU =r$ )Textl   Single line textbox widget.TextViewTr   	TextModelFrg   rC   rh   r   c                 z   > [         TU ]  " U0 UD6  [        5       U l        U R	                  U R
                  5        g rM   )rF   rG   r   _submission_callbackson_msg_handle_string_msg)rH   argsrI   rJ   s      r)   rG   Text.__init__u   s2    $)&)%7%9"D++,r(   c                 T    UR                  SS5      S:X  a  U R                  U 5        gg)z^Handle a msg from the front-end.

Parameters
----------
content: dict
    Content of the msg.
event submitN)getrs   )rH   _contentbufferss       r)   ru   Text._handle_string_msgz   s*     ;;w#x/&&t, 0r(   c                 L    [        S5        U R                  R                  XS9  g)a  (Un)Register a callback to handle text submission.

Triggered when the user clicks enter.

Parameters
----------
callback: callable
    Will be called with exactly one argument: the Widget instance
remove: bool (optional)
    Whether to unregister the callback
zon_submit is deprecated. Instead, set the .continuous_update attribute to False and observe the value changing with: mywidget.observe(callback, 'value').)removeN)r   rs   register_callback)rH   callbackr   s      r)   	on_submitText.on_submit   s*     	  p  	q""44X4Mr(   )rs   r   )F)r   r   r   r    r!   r   r"   rW   r#   r   rj   rk   r   r4   r   rO   rG   ru   r   r'   rP   rQ   s   @r)   rm   rm   l   s    %$((d(3J+&***5KE @AEE4EPHT  )W  X  \  \  bf  \  g#''JTJ5IJE-
	-N Nr(   rm   c                      ^  \ rS rSrSr\" S5      R                  SS9r\" S5      R                  SS9r\	" SSS	9R                  SS9r
U 4S
 jrSrU =r$ )Password   ro   PasswordViewTr   PasswordModelFrg   rC   c              #   T   >#    [         TU ]  5       nU H  nUS:w  d  M  Uv   M     g 7f)NrE   )rF   
_repr_keys)rH   
super_keyskeyrJ   s      r)   r   Password._repr_keys   s)     W')
Cg~	 s   (	(r   )r   r   r   r    r!   r   r"   rW   r#   r   rj   r   r'   rP   rQ   s   @r)   r   r      s[    %(,,$,7J/*..D.9KE @AEE4EPH r(   r   c                       \ rS rSrSr\" S5      R                  SS9r\" S5      R                  SS9r\	" \" 5       SS9R                  SS9r
\" S	S
S9R                  SS9rSrg)Combobox   zCSingle line textbox widget with a dropdown and autocompletion.
    ComboboxModelTr   ComboboxViewz!Dropdown options for the combobox)traitr   FzDIf set, ensure value is in options. Implies continuous_update=False.rC   r   N)r   r   r   r    r!   r   r"   r#   rW   r   optionsr   ensure_optionr'   r   r(   r)   r   r      s{    /*..D.9K(,,$,7Ji0 
ctcn 
 S 
ctcn r(   r   N)#r!   widget_descriptionr   r   valuewidgetr   widgetr   r   r   widget_corer	   trait_typesr
   r   r   utilsr   	traitletsr   r   r   r   r+   r4   r9   r=   rA   rS   rY   r^   rc   rm   r   r   r   r(   r)   <module>r      s  
 D $ F F # 8 8  ( (P#Z P 
c c 
c 
; ; 
; 
; ; 
; 
?L ? 
?
8j 8$ 
K7 K 
K 
Ow O 
O 
LG L 
L 
Kw K 
K 
%N7 %N 
%NP 
t  
 
t  
r(   