Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
overlay.cpython-313.pyc321 linesDownload Raw Back to __pycache__
1�

2��j'��3���SSKJr SSKrSSKrSSKJr SSKJrJr SSK	J4r5 SSKJrJ
r
JrJrJrJrJrJrJrJrJrJrJrJr SSKJrJr SS	KJr SS6KJ r  SSK!J"r"J#r#J$r$ \RJ(aSSKJ&r&J'r' SS
K(J)r) \RT"S5r+\RT"S5r,"SS\#5r-"SS\$5r.SSjr/"SS\R`5r1"SS\"\\\Rd\+\,45r3g)�)�annotationsN)�MutableSequence)�
CanvasOverlay�CompositeCanvas)�remove_defaults�)�RELATIVE_100�Align�Sizing�VAlign�7WHSettings�WrapMode�normalize_align�normalize_height�normalize_valign�normalize_width�simplify_align�simplify_height�simplify_valign�simplify_width)� WidgetContainerListContentsMixin�WidgetContainerMixin)�calculate_top_bottom_filler)�calculate_left_right_padding)�Widget�WidgetError�
WidgetWarning)�Iterator�Sequence)�Literal�	TopWidget�BottomWidgetc��\rSrSrSrSrg)�OverlayError�)zOverlay specific errors.�N��__name__�8__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r&��ZD:\code\apps\devtools\python\user_packages\Python313\site-packages\urwid/widget/overlay.pyr$r$)s��"r.r$c��\rSrSrSrSrg)�OverlayWarning�-zOverlay specific warnings.r&Nr'r&r.r/r1r1-s��$r.r1c���[U[5(dMURRSURR3n[9R"US3[SS9 gg)N�.z is not subclass of Widget���10stacklevel)�11isinstancer�	__class__r)r(�warnings�warn�DeprecationWarning)�widget�obj_class_paths  r/�_check_widget_subclassr?1s\���f�f�%�%�"�,�,�7�7�8��&�:J�:J�:S�:S�9T�U���
�
���8�9���	12�&r.c��\rSrSr%S\S'S\S'S\S'S\S'S\S	'S13\S'S14\S'S
\S'S\S'S\S'S\S'S\S'S15\S'S16\S'Srg)�OverlayOptions�;z$Align | Literal[WHSettings.RELATIVE]�align�17int | None�align_amountr
�18width_type�width_amount�	min_width�int�left�rightz%VAlign | Literal[WHSettings.RELATIVE]�valign_type�
valign_amount�height_type�
height_amount�19min_height�top�bottomr&N)r(r)r*r+�__annotations__r-r&r.r/rArA;sR��/�/���������20
�I��J�6�6���������	�H��Kr.rAc�^�\rSrSrSrSr\"\RS\	RSSSS\RS\	RSSSSS9r
S#S$U4SjjjrS%S	jrS&S'U4S21jjjrS(S)SjjrS*U4SjjrS+S
jr\S,Sj5r\S-Sj5r\S.Sj5r\S/Sj5r\S#S0Sjj5rS#S1SjjrS2SjrS3Sjr\S4Sj5r\S5Sj5r\R@S6Sj5r\S7Sj5r!\!R@S8Sj5r!S9Sjr"S:Sjr#S;Sjr$S<Sjr%S=Sjr&S(S>S jjr'S?S!jr(S"r)U=r*$)@�Overlay�Lz�Overlay contains two widgets and renders one on top of the other.22 23Top widget can be Box, Flow or Fixed.24Bottom widget should be Box.25TN�dr)rCrErFrGrHrJrKrLrMrNrOrPrQrRc
�>�[T
U]5 XlX lUR	X4XVXxX�X�526 [U5 [U5 g)a�27:param top_w: a flow, box or fixed widget to overlay "on top".28:type top_w: Widget29:param bottom_w: a box widget to appear "below" previous widget.30:type bottom_w: Widget31:param align: alignment, one of ``'left'``, ``'center'``, ``'right'`` or32    (``'relative'``, *percentage* 0=left 100=right)33:type align: Literal["left", "center", "right"] | tuple[Literal["relative"], int]34:param width: width type, one of:35    ``'pack'``36      if *top_w* is a fixed widget37    *given width*38      integer number of columns wide39    (``'relative'``, *percentage of total width*)40      make *top_w* width related to container width41:type width: Literal["pack"] | int | tuple[Literal["relative"], int]42:param valign: alignment mode, one of ``'top'``, ``'middle'``, ``'bottom'`` or43    (``'relative'``, *percentage* 0=top 100=bottom)44:type valign: Literal["top", "middle", "bottom"] | tuple[Literal["relative"], int]45:param height: one of:46    ``'pack'``47      if *top_w* is a flow or fixed widget48    *given height*49      integer number of rows high50    (``'relative'``, *percentage of total height*)51      make *top_w* height related to container height52:type height: Literal["pack"] | int | tuple[Literal["relative"], int]53:param min_width: the minimum number of columns for *top_w* when width is not fixed.54:type min_width: int55:param min_height: minimum number of rows for *top_w* when height is not fixed.56:type min_height: int57:param left: a fixed number of columns to add on the left.58:type left: int59:param right: a fixed number of columns to add on the right.60:type right: int61:param top: a fixed number of rows to add on the top.62:type top: int63:param bottom: a fixed number of rows to add on the bottom.64:type bottom: int65 66Overlay widgets behave similarly to :class:`Padding` and :class:`Filler`67widgets when determining the size and position of *top_w*. *bottom_w* is68always rendered the full size available "below" *top_w*.69N)�super�__init__�top_w�bottom_w�set_overlay_parametersr?)�selfr[r\rC�width�valign�heightrHrPrJrKrQrRr9s             �r/rZ�Overlay.__init__fsC���F	�����70� �
��#�#�E�&�)�Y]�fi�r��u�%��x�(r.c	�v�[R1nURR5nUR[71R:Xa�[RU;a!UR[R5 GO�[R"SURS[RR5S[72RR53[SS9 GOJUR[73R:Xa�[RU;a�UR[R5 UR(aNUR[74R :XdUR"(aUR[R5 GO�[R"SURS[RR5SURR53[SS9 GO5UR$(Ga#UR[75R :XdUR&(a�[RU;aUR[R5 UR(aNUR[76R :XdUR"(aUR[R5 Oa[R"SURS[RR5SURR53[SS9 [)U5$)a�Actual widget sizing.77 78:returns: Sizing information depends on the top widget sizing and sizing parameters.79:rtype: frozenset[Sizing]80 81Rules:82* BOX sizing is always supported provided by the bottom widget83* FLOW sizing is supported if top widget has:84* * PACK height type and FLOW supported by the TOP widget85* * BOX supported by TOP widget AND height amount AND height type GIVEN of min_height86* FIXED sizing is supported if top widget has:87* * PACK width type and FIXED supported by the TOP widget88* * width amount and GIVEN width or min_width AND:89* * * FLOW supported by the TOP widget AND PACK height type90* * * BOX supported by the TOP widget AND height_amount and GIVEN height or min height91zTop widget z should support sizing z for width type r5r6z for height type )r�BOXr[�sizingrFr
�PACK�FIXED�addr:r;�upperr1rN�FLOWrG�GIVENrHrOrP�	frozenset)r^re�92top_sizings   r/re�Overlay.sizing�s,��"�*�*����Z�Z�&�&�(�93��?�?�j�o�o�-��|�|�z�)��94�95�6�<�<�(��
�
�!�$�*�*��-D�V�\�\�EW�EW�EY�DZ�[&�&0�o�o�&;�&;�&=�%>�@�"� �	��
�
����
0��{�{�j�(��96�97�6�;�;�'��$�$�$�/�/�Z�=M�=M�*M�QU�Q_�Q_��J�J�v�|�|�,���
�
�!�$�*�*��-D�V�[�[�EV�EV�EX�DY�Z'�'+�'7�'7�'=�'=�'?�&@�B�"� �	��
�
�
�T�%5�%5��9I�9I�%I�T�_�_��z�z�Z�'��98�99�6�;�;�'��$�$�$�/�/�Z�=M�=M�*M�QU�Q_�Q_��J�J�v�|�|�,���
�
�!�$�*�*��-D�V�Z�Z�EU�EU�EW�DX�Y'�'+�'7�'7�'=�'=�'?�&@�B�"� �	��� � r.c�v>�U(a[TU]X5$UR=(d SUR=(d S-nUR=(d SUR100=(d S-nUR[R:Xa&URRSU5upVXS-Xd-4$UR(d�[SURSURR5SUR<SURR5SUR<SUR<S	UR <35eUR[R":XaURnXs-nO�UR[R$:Xa<UR(a+URn['US101-UR-S-5nO�[SURSURR5SUR<SURR5SUR<SUR<S	UR <35eUR[R:Xa!XPRR)U4U5U-4$UR(d�[SURSURR5SUR<SURR5SUR<SUR<S	UR <35eUR[R":XaXPRU-4$UR[R$:Xa;UR (a*U['UR S102-UR-S-54$[SURSURR5SUR<SURR5SUR<SUR<S	UR <35e)Nrr&zRequested FIXED render for z with width_type=�, width_amount=�, height_type=�, height_amount=�103min_width=�
, min_height=rW��?)rY�packrJrKrQrRrFr
rfr[rGr$rirNrOrHrPrk�RELATIVErI�rows)	r^�size�focus�104extra_cols�105extra_rows�colsrx�w_colsr9s	        �r/rv�Overlay.pack�s����106��7�<��,�,��i�i�n�1�����q�9�107��h�h�m�!����(8�q�9�108��?�?�j�o�o�-�������U�3�J�D��$�d�&7�7�7�� � ��-�d�j�j�\�:�"�o�o�3�3�5�6�7 � $� 1� 1�4�5�#�/�/�5�5�7�8�9!�!%�!3�!3� 6��T�^�^�.�/�"�o�o�0�
2��
��?�?�j�.�.�.��&�&�F��&�D�
�_�_�109� 3� 3�
3�����^�^�F��v��|�d�&7�&7�7�#�=�>�D��-�d�j�j�\�:�"�o�o�3�3�5�6�7 � $� 1� 1�4�5�#�/�/�5�5�7�8�9!�!%�!3�!3� 6��T�^�^�.�/�"�o�o�0�
2��
����z���.������&��E�:�Z�G�G�G��!�!��-�d�j�j�\�:�"�o�o�3�3�5�6�7 � $� 1� 1�4�5�#�/�/�5�5�7�8�9!�!%�!3�!3� 6��T�^�^�.�/�"�o�o�0�
2��
����z�/�/�/��+�+�j�8�8�8����z�2�2�2�t�����T�_�_�s�2�T�5G�5G�G�#�M�N�N�N��)�$�*�*��6��/�/�/�/�1�2�3� �-�-�0�1��+�+�1�1�3�4�5�!�/�/�2�����*�+��/�/�,�

.�110�	111r.c��UR=(d SUR=(d S-nUR[R:XaUR112U-$UR[R:Xa9UR(a([URS-UR113-S-5$UR[R:XGaUR=(d SUR=(d S-nUR[R:Xa;UR(a*URRUR4U5U-$UR[R:Xa^[[USUR-S-S-5UR=(d S5nURRU4U5U-$[!SURSU<SURR#5SUR<SURR#5S	UR114<S115UR<SUR<35e)z#Widget rows amount for FLOW sizing.rrWruzRequested rows for z with size zwidth_type=rprqrrrsrt)rQrRrNr
rkrOrwrPrIrfrFrGr[rx�maxrHr$ri)r^ryrz�extra_heightr_s     r/rx�Overlay.rows7s������
�A�$�+�+�*:��;�����z�/�/�/��%�%��4�4����z�2�2�2�t����t����,�t�/A�/A�A�C�G�H�H����z���.� �H�H�M��d�k�k�.>�Q�?�L����*�"2�"2�2�t�7H�7H��z�z����(9�(9�';�U�C�l�R�R����*�"5�"5�5��C��Q��$�*;�*;� ;�c� A�C� G�H�4�>�>�K^�]^�`���z�z����x��7�,�F�F��!�$�*�*��[����$�/�/�/�/�1�2�3� �-�-�0�1��+�+�1�1�3�4�5�!�/�/�2�����*�+��/�/�,�

.�116�	117r.c�f>�0[TU]5EURURURUR118URURURURURURURURS.En[U[R 5$)N�r[r\rCr_r`rarHrPrJrKrQrR)rY�_repr_attrsr[r\rCr_r`rarHrPrJrKrQrRrrUrZ)r^�attrsr9s  �r/r��Overlay._repr_attrsQs����119��g�!�#�120��Z�Z��
�
��Z�Z��Z�Z��k�k��k�k�����/�/��I�I��Z�Z��8�8��k�k�121���u�g�&6�&6�7�7r.c#�# �SUR4v� SUR4v� SUR4v� SUR4v� SUR4v� SUR1224v� SUR4v� SUR4v� S	UR4v� S123UR4v� SUR4v� SUR4v� g7f)NrQrRrCr_r`rarHrPrJrKr��r^s r/�
__rich_repr__�Overlay.__rich_repr__cs�����T�Z�Z�����
�
�%�%��t�z�z�!�!��t�z�z�!�!�����#�#�����#�#��4�>�>�)�)��D�O�O�+�+��d�i�i����t�z�z�!�!��T�X�X�o������#�#�s�CCc�B�[URUR5$�N)r�124align_typerEr�s r/rC�
Overlay.alignqs���d�o�o�t�/@�/@�A�Ar.c�B�[URUR5$r�)rrFrGr�s r/r_�
Overlay.widthus���d�o�o�t�/@�/@�A�Ar.c�B�[URUR5$r�)rrLrMr�s r/r`�Overlay.valign�s���t�/�/��1C�1C�D�Dr.c�B�[URUR5$r�)rrNrOr�s r/ra�Overlay.height�s���t�/�/��1C�1C�D�Dr.c�"�U[R[R[R1;a[U5nO4U[R125:Xa[R126nO[
SU<35eU[R[R[R1;a[U5nO4U[R127:Xa[R128nO[
SU<35e[UU[	U5UUU129UUU[	U5UU	UU
5$)a>130Return a new options tuple for use in this Overlay's .contents mapping.131 132This is the common container API to create options for replacing the133top widget of this Overlay.  It is provided for completeness134but is not necessarily the easiest way to change the overlay parameters.135See also :meth:`.set_overlay_parameters`136zUnknown alignment type z Unknown vertical alignment type )r137�LEFT�CENTER�RIGHTr
rw�138ValueErrorr�TOP�MIDDLE�BOTTOMrA)r�rErFrGrLrMrNrOrHrPrJrKrQrRrCr`s                r/�options�Overlay.options�s���2�%�*�*�e�l�l�E�K�K�@�@��*�%�E�
�:�.�.�
.��'�'�E��6�z�n�E�F�F��6�:�:�v�}�}�f�m�m�D�D��K�(�F�
�J�/�/�
/��(�(�F��?���O�P�P�����z�"��������{�#�����139�	140r.c�p�[U[5(aAUSS:XaUSn[RnO-USS:XaUSn[RnOUnO[U5n[U[5(a)USS:XaUSn[141nOUSS:XaUSn[142n[U[5(aAUSS:XaUSn	[RnOWUSS:XaUSn143[RnO8UnO5[U[[45(d[SU<35e[
U5n[U[5(a)USS:XaUSn144[145nOUSS:XaUSn	[146nUc[RnUc[Rn[U[5up�[U[5unn[U[5unn[!U[5unnU[R"[R1;aSnUR$UR'U
UUUUUUUUUUUU	U14754UR(S'g)	zz148Adjust the overlay size and position parameters.149 150See :class:`__init__() <Overlay>` for a description of the parameters.151rz152fixed leftrzfixed rightz	fixed topzfixed bottomzinvalid valign: N)r8�tupler153r�r�r	rr�r��strr$r
rfrrrrrkr[r��contents)r^rCr_r`rarHrPrJrKrQrR�normalized_align�normalized_valignr�rErFrGrLrMrNrOs                     r/r]�Overlay.set_overlay_parameters�s-��8�e�U�#�#��Q�x�<�'��Q�x��#(�:�:� ��q��]�*��a���#(�;�;� �#(� �$�U�|���e�U�#�#��Q�x�<�'��Q�x��$���q��]�*��a���$���f�e�$�$��a�y�K�'��Q�i��$*�J�J�!����n�,�����$*�M�M�!�$*�!��F�V�S�M�2�2��!1�&��<�=�=�!'�v����f�e�$�$��a�y�N�*�����%�����k�)��Q�i��%���=��O�O�E��>��_�_�F�#2�3C�\�#R� �154�#2�5�,�#G� �155�L�%5�6G��%V�"��]�%5�f�l�%K�"��]��:�+�+�Z�_�_�=�=��J�
�J�J��L�L���������������
�156��
�
�a�r.c�6�URR5$)zReturn selectable from top_w.)r[�157selectabler�s r/r��Overlay.selectable1s���z�z�$�$�&�&r.c	��URUS5nURRUR"U/UR	US5Q76U5$)zPass keypress to top_w.T)rvr[�keypress�158top_w_size�calculate_padding_filler)r^ry�key�	real_sizes    r/r��Overlay.keypress5sM���I�I�d�D�)�	��z�z�"�"��O�O�I�W��(E�(E�i�QU�(V�W��159�	160r.c��UR$)z�161Read-only property returning the child widget in focus for162container widgets.  This default implementation163always returns ``None``, indicating that this widget has no children.164)r[r�s r/rz�
Overlay.focusAs���z�z�r.c��g)z6165Return the top widget position (currently always 1).166rr&r�s r/�focus_position�Overlay.focus_positionJs��167r.c�,�US:wa[SU35eg)zv168Set the widget in focus.  Currently only position 0 is accepted.169 170position -- index of child widget to be made focus171rzEOverlay widget focus_position currently must always be set to 1, not N)�172IndexError)r^�positions  r/r�r�Qs%���q�=��d�em�dn�o�p�p�r.c	�^�"U4SjS[[[R[[1734[45nU"5$)a�174a list-like object similar to::175 176    [(bottom_w, bottom_options)),177     (top_w, top_options)]178 179This object may be used to read or update top and bottom widgets and180top widgets's options, but no widgets may be added or removed.181 182`top_options` takes the form183`(align_type, align_amount, width_type, width_amount, min_width, left,184right, valign_type, valign_amount, height_type, height_amount,185min_height, top, bottom)`186 187bottom_options is always188`('left', None, 'relative', 100, None, 0, 0,189'top', None, 'relative', 100, None, 0, 0)`190which means that bottom widget always covers the full area of the Overlay.191writing a different value for `bottom_options` raises an192:exc:`OverlayError`.193c�>�\rSrSrS194SjrYR195rYRrSSjr	SSjr196S
U4SjjrSSjrSSjr
Srg	)�)Overlay.contents.<locals>.OverlayContentsitc��g�N�r&)�197inner_selfs r/�__len__�1Overlay.contents.<locals>.OverlayContents.__len__}s��r.c��[S5e�Nz'OverlayContents is fixed-sized sequence��	TypeError�r^�indexs  r/�__delitem__�5Overlay.contents.<locals>.OverlayContents.__delitem__����� I�J�Jr.c��[S5er�r�)r^r��values   r/�insert�0Overlay.contents.<locals>.OverlayContents.insert�r�r.c�d>�[SURRSUSUS/ST35$)N�<�(rrz)> for )�reprr9r()r�r^s �r/�__repr__�2Overlay.contents.<locals>.OverlayContents.__repr__�sB����a�198� 4� 4� =� =�>�a��A��PZ�[\�P]�@^�?_�_f�gk�fl�m�n�nr.c3�*# �UH	nSU4v� M g7fr�r&)r��vals  r/r��7Overlay.contents.<locals>.OverlayContents.__rich_repr__�s���%�C���)�O�&�s�c3�<# �[S5H	nXv� M g7fr�)�range)r��idxs  r/�__iter__�2Overlay.contents.<locals>.OverlayContents.__iter__�s��� ��8�C�$�/�)�$�s�r&N)�returnrI)r��int | slicer��typing.NoReturn)r�r�r�z199typing.Anyr�r�)r�r��r�z4Iterator[tuple[str | None, typing.Any] | typing.Any])r�z'Iterator[tuple[Widget, OverlayOptions]])r(r)r*r+r��_contents__getitem__�__getitem__�_contents__setitem__�__setitem__r�r�r�r�r�r-r�s�r/�OverlayContentsr�ts<���
��3�3�K��3�3�K�
K�
K�
o�
$�
*r.r�)rr��typing�Unionr!r"rA)r^r�s` r/r��Overlay.contents[sB���2	*����L�L��L�!8�9�"�$��
�	*�@� � r.c��[U5S:wa[S5eUSURS'USURS'g)Nr�z,Contents length for overlay should be only 2rr)�lenr�r�)r^�new_contentss  r/r�r��s?���|���!��K�L�L�'��?��
�
�a��'��?��
�
�a�r.c���US:XaURUR4$US:Xa�UR[URUR200URURURURURURURURURURUR UR"54$[%SU<35e)Nrr�!Overlay.contents has no position )r\�_DEFAULT_BOTTOM_OPTIONSr[rAr�rErFrGrHrJrKrLrMrNrOrPrQrRr�r�s  r/r��Overlay._contents__getitem__�s����A�:��M�M�4�#?�#?�@�@��A�:��201�202���O�O��%�%��O�O��%�%��N�N��I�I��J�J��$�$��&�&��$�$��&�&��O�O��H�H��K�K���
�&�<�U�I�F�G�Gr.c�x�Uup4US:Xa/X@R203:wa[SUR204<35eX0lO�US:Xa�Uunnnn	n205nnn
nnnnnn[[Xg5[5upg[[X�5[5up�[[X�5[5up�[[UU5[5unnX`lXplX�lX�lX�lX�lX�lUUlX�lX�lUUlUUlX�lUUlO[;SU<35eUR=5 g![[4a.n[SU<35RUR5UeSnAff=f![[4a.n[SU<35RUR5UeSnAff=f)Nzadded content invalid: rzbottom_options must be set to rztop_options is invalid: r�)r�r�r$�with_traceback�
__traceback__r�r\rrrrrrrrr�rErFrGrLrMrNrOrJrKrQrRrHrPr��_invalidate)r^r�r��value_w�
value_options�excr�rErFrGrHrJrKrLrMrNrOrPrQrRs                    r/r��Overlay._contents__setitem__�s���206	o�%*�"�G��A�:�� <� <�<�"�%C�D�D`�D`�Cc�#d�e�e�#�M�
�a�Z�
� "��� �� �����!��!����(7�~�j�7_�am�'n�$�J�'6�~�j�7_�am�'n�$�J�)9�/�+�:e�gs�)t�&�K�)9�/�+�Wd�:e�gs�)t�&�K��(�O� ,��(�O� ,��*��!.��*��!.�D���I��J��D�H� �D�K�&�N�(�D�O��@��	�J�K�K������c�I�&�	o��!8��	�B�C�R�R�SV�Sd�Sd�e�kn�n��	o��0�	�*�
�"�%=�m�=N�#O�P�_�_��%�%�����
�s/�D:�E;�:E8�207)E3�3E8�;F9�)F4�4F9c��[URS5(dgURUS5nUup4URUS5upVpxURR	X5-208U-209XG-210U-21145up�X�:�aUS-212n213X�-X�-4$)z(Return cursor coords from top_w, if any.�get_cursor_coordsNTr)�hasattrr[rvr�r�)r^ryr��maxcol�maxrowrJrKrQrR�x�ys           r/r��Overlay.get_cursor_coords�s���214�t�z�z�#6�7�7���I�I�d�D�)�	�$���#'�#@�#@��D�#Q� ��S��z�z�+�+�V�]�U�-B�F�L�SY�DY�,Z�[����;���215�A��x��� � r.c216��Uup4SnUR[R:XayURR	SUS9upeU(d[S5e[
UURUR[RUSURUR5upxOZ[
UURURURURURURUR5upxU(a][UUR UR"[R$USUR&UR(5up�XI-217U218-219U:aXI-220U-221n222O�UR*[R:XaoURR-U4US9n[UUR UR"[R$USUR&UR(5up�XT:�aXE-223n224OZ[UUR UR"UR*UR.UR0UR&UR(5up�XxX�4$)z1Return (padding left, right, filler top, bottom).Nr&)rzzfixed widget must have a height)rFr
rfr[rvr$rr�rEr�CLIPrJrKrGrHrrLrMrkrQrRrNrxrOrP)r^ryrzr�r�rar_rJrKrQrRs           r/r�� Overlay.calculate_padding_fillers��� ������?�?�j�o�o�-� �J�J�O�O�B�e�O�<�M�E��"�#D�E�E�6������!�!��
�
����	�	��225�226�	�K�D�%�7������!�!�����!�!�����	�	��227�228�	�K�D��5��� � ��"�"�� � ���������	�K�C��|�f�$�v�-����.���
�
�
����
0��Z�Z�_�_�f�Y�e�_�<�F�5��� � ��"�"�� � ���������	�K�C�������5��� � ��"�"�� � ��"�"����������	�K�C��C�'�'r.c���UR[R:XagUupgUR[R:wa&UR[R:XaXb-229U-2304$Xb-231U-232Xt-233U-2344$)z!Return the size to pass to top_w.r&)rFr
rfrN)r^ryrJrKrQrRr�r�s        r/r��Overlay.top_w_sizeOsh���?�?�j�o�o�-������?�?�j�o�o�-�$�2B�2B�j�o�o�2U��M�E�)�+�+��
��%�v�|�f�'<�=�=r.c	�<�URX5nURX25upEpgURRU5nUR	5(aUR5(d[
U5$URRURX4XVU5U5n	[
U	5n	US:dUS:a&U	R[SU5[SU55 US:dUS:a&U	R[SU5[SU55 [X�XF5$)z#Render top_w overlayed on bottom_w.r)
rvr�r\�renderr}rxrr[r��pad_trim_left_right�min�pad_trim_top_bottomr)235r^ryrzr�rJrKrQrR�bottom_c�top_cs236          r/r�Overlay.renderas����I�I�d�*�	�#'�#@�#@��#R� ��S��=�=�'�'�	�2���}�}���h�m�m�o�o�"�8�,�,��237�238�!�!�$�/�/�)�5�v�"V�X]�^����&���!�8�u�q�y��%�%�c�!�T�l�C��5�M�B���7�f�q�j��%�%�c�!�S�k�3�q�&�>�B��U�d�8�8r.c	�,�[URS5(dgURX5nURXv5up�p�Uup�XH:dXLU	-239:�d
XZ:dX]U-240:�agURR	URXxX�U5UUXH-241XZ-242U5$)z0Pass event to top_w, ignore if outside of top_w.�mouse_eventF)r�r[rvr�rr�)r^ry�event�button�col�rowrzr�rJrKrQrRr�r�s              r/r�Overlay.mouse_eventss����t�z�z�=�1�1���I�I�d�*�	�#'�#@�#@��#R� ��S�"����:����.�#�)�s�v�o�?U���z�z�%�%��O�O�I�U��@����J��I��
243�	244r.)rEr�rRr\rOrNrJrPrHrKrQr[rMrLrGrF)NNrrrr)r[r!r\r"rC�~Literal['left', 'center', 'right'] | Align | tuple[Literal['relative', 'fixed left', 'fixed right', WHSettings.RELATIVE], int]r_�dLiteral['pack', WHSettings.PACK] | int | tuple[Literal['relative', WHSettings.RELATIVE], int] | Noner`�Literal['top', 'middle', 'bottom'] | VAlign | tuple[Literal['relative', 'fixed top', 'fixed bottom', WHSettings.RELATIVE], int]rarrHrDrPrDrJrIrKrIrQrIrRrIr��None)r�zfrozenset[Sizing])r&F)ry�(tuple[()] | tuple[int] | tuple[int, int]rz�boolr��tuple[int, int])F)ryz245tuple[int]rzrr�rI)r�zdict[str, typing.Any]r�)r�z0Align | tuple[Literal[WHSettings.RELATIVE], int])r�z�Literal[WHSettings.CLIP, WHSettings.PACK] | int | tuple[Literal[WHSettings.RELATIVE], int] | tuple[Literal[WHSettings.WEIGHT], int | float])r�z1VAlign | tuple[Literal[WHSettings.RELATIVE], int])r�z�int | Literal[WHSettings.FLOW, WHSettings.PACK] | tuple[Literal[WHSettings.RELATIVE], int] | tuple[Literal[WHSettings.WEIGHT], int | float])r�zKLiteral['left', 'center', 'right', 'relative', WHSettings.RELATIVE] | AlignrErDrFz9Literal['clip', 'pack', 'relative', 'given'] | WHSettingsrGrDrLzLLiteral['top', 'middle', 'bottom', 'relative', WHSettings.RELATIVE] | VAlignrMrDrNz9Literal['flow', 'pack', 'relative', 'given'] | WHSettingsrOrDrHrDrPrDrJrIrKrIrQrIrRrIr�rA)rCrr_rr`rrarrHrDrPrDrJrIrKrIrQrIrRrIr�r)r�r)ryrr�r�r�z246str | None)r�r!)r�z247Literal[1])r�rIr�r)r�z@MutableSequence[tuple[TopWidget | BottomWidget, OverlayOptions]])r�z&Sequence[tuple[width, OverlayOptions]]r�r)r��
Literal[0, 1]r��/tuple[TopWidget | BottomWidget, OverlayOptions])r�rr�rr�r)ryrr�ztuple[int, int] | None)ryrrzrr�ztuple[int, int, int, int])ryrrJrIrKrIrQrIrRrIr�r)ryrrzrr�r)ryrrr�rrIrrIrrIrzrr�zbool | None)+r(r)r*r+r,�_selectablerAr248r�r
rwrr�r�rZrervrxr�r��propertyrCr_r`ra�staticmethodr�r]r�r�rzr��setterr�r�r�r�r�r�rrr-�
__classcell__)r9s@r/rUrULs������K�,��j�j���&�&���
���J�J���'�'���
����B!%�!%�����+K)��K)��K)�249
`�K)�t�K)�
`�K)�u�K)� �!K)�"�#K)�$�%K)�&�'K)�(�)K)�*�+K)�,250�-K)�K)�Z9!�z:<��G251�6�G252��G253�254�	G255�G256�R257�48�$$��B��B��B�	9�B��B��E��E��E�	9�E��E��!%�!%�����5258�_�5259� �5260�N�5261�!�	5262�263b�5264�"�
5265�O�5266�"�5267��5268��5269��5270��5271��5272��5273�274�5275��5276�J!%�!%�����'h277�
`�h278�t�h279�
`�h280�u�h281��h282��h283� �!h284�"�#h285�$�%h286�&�'h287�(288�)h289�T'�290291�6�292293��294295�296�	297298������������q��q��8!��8!�t�_�_�+��+�H��H�2999�H�:8��8�?�8�300�	8�t
!�6�
!�301 �
!�J(��J(��J(�302#�	J(�X>��>��>��	>�303�>��
>�3042�>�$9�$305�6�306��307��	308�309�310��
311��312�313�314�315r.rU)r=rr�r)4�316__future__rr�r:�collections.abcr�urwid.canvasrr�urwid.split_reprr�	constantsr	r317rrr
rrrrrrrrr�	containerrr�fillerr�paddingrr=rrr�
TYPE_CHECKINGrr�typing_extensionsr �TypeVarr!r"r$r1r?�318NamedTuplerA�GenericrUr&r.r/�<module>r0s���"�
��+�7�,����� N�/�1�6�6�	���2�)�
�N�N�;�'�	��~�~�n�-��#�;�#�%�]�%�319��V�&�&��"B
320�f�*�,L�f�n�n�]f�ht�]t�Nu�B
321r.
codekingpro/portable-devtools · Team Ai