ó
    Ãu„j/  ã                  ón   • S r SSKJr  SSKJr  SSKJr  SSKJrJ	r	  SSK
Jr  SSKJrJr   " S S	\5      rg
)zO
`ScrollView` is a base class for [Line API](/guide/widgets#line-api) widgets.
é    )Úannotations)ÚRenderableType)ÚEasingFunction)ÚAnimationLevelÚCallbackType)ÚScrollableContainer)ÚRegionÚSizec            
      ó  • \ rS rSrSrSrSr\SS j5       r\SS j5       r	SS jr
SS jrS	 rSS
 jrSS jr S         SS jjrSS jr  SSSSSSSSSS.                     SS jjjrSS jrS S!S jjrSrg)"Ú
ScrollViewé   aŒ  
A base class for a Widget that handles its own scrolling (i.e. doesn't rely
on the compositor to render children).

!!! note

    This is the typically wrong class for making something scrollable. If you want to make something scroll, set its
    `overflow` style to auto or scroll. Or use one of the pre-defined scrolling containers such as [VerticalScroll][textual.containers.VerticalScroll].
TzP
    ScrollView {
        overflow-y: auto;
        overflow-x: auto;
    }
    c                ó   • g)zAlways scrollable.T© ©Úselfs    Ú¡C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\textual/scroll_view.pyÚis_scrollableÚScrollView.is_scrollable#   s   € ð ó    c                ó   • g)zhSince a ScrollView should be a line-api widget, it won't have children,
and therefore isn't a container.Fr   r   s    r   Úis_containerÚScrollView.is_container(   s   € ð r   c                óÂ   • U R                   (       a  X R                  l        [        U5      [        U5      :w  a&  U R	                  U R
                  R                  5        g g ©N)Úshow_horizontal_scrollbarÚhorizontal_scrollbarÚpositionÚroundÚrefreshÚsizeÚregion©r   Ú	old_valueÚ	new_values      r   Úwatch_scroll_xÚScrollView.watch_scroll_x.   sD   € Ø×)×)Ø1:×%Ñ%Ô.Ü�Óœu YÓ/Ó/Ø�L‰L˜Ÿ™×)Ñ)Õ*ð 0r   c                óÂ   • U R                   (       a  X R                  l        [        U5      [        U5      :w  a&  U R	                  U R
                  R                  5        g g r   )Úshow_vertical_scrollbarÚvertical_scrollbarr   r   r   r    r!   r"   s      r   Úwatch_scroll_yÚScrollView.watch_scroll_y4   sD   € Ø×'×'Ø/8×#Ñ#Ô,Ü�Óœu YÓ/Ó/Ø�L‰L˜Ÿ™×)Ñ)Õ*ð 0r   c                ó$   • U R                  5         g r   )Ú_refresh_scrollbarsr   s    r   Úon_mountÚScrollView.on_mount:   s   € Ø× Ñ Õ"r   c                ó.   • U R                   R                  $ )z¿Gets the width of the content area.

Args:
    container: Size of the container (immediate parent) widget.
    viewport: Size of the viewport.

Returns:
    The optimal width of the content.
)Úvirtual_sizeÚwidth)r   Ú	containerÚviewports      r   Úget_content_widthÚScrollView.get_content_width=   s   € ð × Ñ ×&Ñ&Ð&r   c                ó.   • U R                   R                  $ )zëGets the height (number of lines) in the content area.

Args:
    container: Size of the container (immediate parent) widget.
    viewport: Size of the viewport.
    width: Width of renderable.

Returns:
    The height of the content.
)r1   Úheight)r   r3   r4   r2   s       r   Úget_content_heightÚScrollView.get_content_heightI   s   € ð × Ñ ×'Ñ'Ð'r   c                ó�  • U R                   U:g  =n(       a  U R                  5         U(       d  X R                  :w  d  X0R                  :w  ad  U R                  R                  5         Xl         U R                  nXR                  R                  R                  -
  U l	        U R                  U5        U=(       d    U R                  U:g  $ )zòCalled when size is updated.

Args:
    size: New size.
    virtual_size: New virtual size.
    container_size: New container size.
    layout: Perform layout if required.

Returns:
    True if a resize event should be sent, otherwise False.
)Ú_sizeÚ
_set_dirtyr1   Úcontainer_sizeÚ_scrollbar_changesÚclearÚstylesÚgutterÚtotalsÚ_container_sizeÚ_scroll_update)r   r    r1   r>   ÚlayoutÚsize_changeds         r   Ú_size_updatedÚScrollView._size_updatedV   sž   € ð  Ÿ:™:¨Ñ-Ð-ˆ<Õ-Ø�O‰OÔæØ×0Ñ0Ó0Ø×!4Ñ!4Ó4à×#Ñ#×)Ñ)Ô+ØŒJØ×,Ñ,ˆLØ#'¯+©+×*<Ñ*<×*CÑ*CÑ#CˆDÔ Ø×Ñ Ô-à×E˜t×3Ñ3°~ÑEÐEr   c                óP   • SSK Jn  U" U R                   SU R                   35      $ )zfRender the scrollable region (if `render_lines` is not implemented).

Returns:
    Renderable object.
r   )ÚPanelÚ )Ú
rich.panelrK   Úscroll_offsetr(   )r   rK   s     r   ÚrenderÚScrollView.renders   s+   € õ 	%á˜×*Ñ*Ð+¨1¨T×-IÑ-IÐ,JÐKÓLÐLr   NFÚbasic)ÚanimateÚspeedÚdurationÚeasingÚforceÚon_completeÚlevelÚ	immediatec               ó2   • U R                  UUUUUUUUU	S9	  g)a0  Scroll to a given (absolute) coordinate, optionally animating.

Args:
    x: X coordinate (column) to scroll to, or `None` for no change.
    y: Y coordinate (row) to scroll to, or `None` for no change.
    animate: Animate to new scroll position.
    speed: Speed of scroll if `animate` is `True`; or `None` to use `duration`.
    duration: Duration of animation, if `animate` is `True` and `speed` is `None`.
    easing: An easing method for the scrolling animation.
    force: Force scrolling even when prohibited by overflow styling.
    on_complete: A callable to invoke when the animation is finished.
    level: Minimum level required for the animation to take place (inclusive).
    immediate: If `False` the scroll will be deferred until after a screen refresh,
        set to `True` to scroll immediately.
)rR   rS   rT   rU   rV   rW   rX   N)Ú
_scroll_to)r   ÚxÚyrR   rS   rT   rU   rV   rW   rX   rY   s              r   Ú	scroll_toÚScrollView.scroll_to~   s0   € ð< 	�‰ØØØØØØØØ#Øð 	ò 
	
r   c           
     óÎ   • U R                  [        SXR                  R                  -
  [	        U R
                  R                  U R                  R                  5      S5      5        g)z9Refresh a single line.

Args:
    y: Coordinate of line.
r   é   N)r   r	   rN   r]   Úmaxr1   r2   r    )r   r]   s     r   Úrefresh_lineÚScrollView.refresh_line¨   sN   € ð 	�‰ÜØØ×&Ñ&×(Ñ(Ñ(Ü�D×%Ñ%×+Ñ+¨T¯Y©Y¯_©_Ó=Øó	õ	
r   c                óÒ   • [        SXR                  R                  -
  [        U R                  R
                  U R                  R
                  5      U5      nU R                  U5        g)zxRefresh one or more lines.

Args:
    y_start: First line to refresh.
    line_count: Total number of lines to refresh.
r   N)r	   rN   r]   rb   r1   r2   r    r   )r   Úy_startÚ
line_countÚrefresh_regions       r   Úrefresh_linesÚScrollView.refresh_lines·   sR   € ô  ØØ×(Ñ(×*Ñ*Ñ*Ü�×!Ñ!×'Ñ'¨¯©¯©Ó9Øó	
ˆð 	�‰�^Õ$r   )rD   r<   )ÚreturnÚbool)r#   Úfloatr$   rm   rk   ÚNone)r3   r
   r4   r
   rk   Úint)r3   r
   r4   r
   r2   ro   rk   ro   )T)
r    r
   r1   r
   r>   r
   rF   rl   rk   rl   )rk   r   )NN)r\   úfloat | Noner]   rp   rR   rl   rS   rp   rT   rp   rU   zEasingFunction | str | NonerV   rl   rW   zCallbackType | NonerX   r   rY   rl   rk   rn   )r]   ro   rk   rn   )ra   )rf   ro   rg   ro   rk   rn   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚALLOW_MAXIMIZEÚDEFAULT_CSSÚpropertyr   r   r%   r*   r.   r5   r9   rH   rO   r^   rc   ri   Ú__static_attributes__r   r   r   r   r      s>  † ñð €Nð€Kð óó ðð óó ðô
+ô+ò#ô
'ô(ð TXðFØðFØ(,ðFØ>BðFØLPðFà	õFô:Mð Øð(
ð
 Ø"Ø!%Ø.2ØØ+/Ø 'Øñ(
àð(
ð ð(
ð
 ð(
ð ð(
ð ð(
ð ,ð(
ð ð(
ð )ð(
ð ð(
ð ð(
ð 
ö(
ôT
÷%ñ %r   r   N)ru   Ú
__future__r   Úrich.consoler   Útextual._animatorr   Útextual._typesr   r   Útextual.containersr   Útextual.geometryr	   r
   r   r   r   r   Ú<module>r€      s-   ðñõ #å 'å ,ß 7Ý 2ß )ôu%Ð$õ u%r   