
    Cj!                       S 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  SSKJr  SSKJr   " S	 S
\5      r " S S\SS9r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      rg')(z
Container widgets for quick styling.

With the exception of `Center` and `Middle` containers will fill all of the space in the parent widget.

    )annotations)ClassVar)BindingBindingType)Layout)
GridLayout)reactive)Widgetc                      \ rS rSrSrSrSrg)	Container   z.Simple container widget, with vertical layout.z
    Container {
        width: 1fr;
        height: 1fr;
        layout: vertical;
        overflow: hidden hidden;
    }
     N__name__
__module____qualname____firstlineno____doc__DEFAULT_CSS__static_attributes__r       d/home/rurouni/.local/share/pipx/venvs/strix-agent/lib/python3.13/site-packages/textual/containers.pyr   r      s    8Kr   r   c                  :  ^  \ rS rSr% SrSrSr\" SSSSS9\" S	S
SSS9\" SSSSS9\" SSSSS9\" SSSSS9\" SSSSS9\" SSSSS9\" SSSSS9\" SSS SS9\" S!S"S#SS9/
rS$\	S%'    S&S&S&SS&S&S&S'.                 S+U 4S( jjjr
\S,U 4S) jj5       rS*rU =r$ )-ScrollableContainer    zNA scrollable container with vertical layout, and auto scrollbars on both axis.Fz
    ScrollableContainer {
        width: 1fr;
        height: 1fr;
        layout: vertical;
        overflow: auto auto;
    }
    up	scroll_upz	Scroll Up)showdownscroll_downzScroll Downleftscroll_leftzScroll Leftrightscroll_rightzScroll Righthomescroll_homezScroll Homeend
scroll_endz
Scroll Endpageuppage_upzPage Uppagedown	page_downz	Page Downzctrl+pageup	page_leftz	Page Leftzctrl+pagedown
page_rightz
Page RightzClassVar[list[BindingType]]BINDINGSN)nameidclassesdisabled	can_focuscan_focus_childrencan_maximizec               \   > [         T	U ]  " UUUUUS.6  Ub  XPl        Ub  X`l        Xpl        g)a  
Construct a scrollable container.

Args:
    *children: Child widgets.
    name: The name of the widget.
    id: The ID of the widget in the DOM.
    classes: The CSS classes for the widget.
    disabled: Whether the widget is disabled or not.
    can_focus: Can this container be focused?
    can_focus_children: Can this container's children be focused?
    can_maximized: Allow this container to maximize? `None` to use default logic.,
r0   r1   r2   r3   N)super__init__r4   r5   r6   )
selfr0   r1   r2   r3   r4   r5   r6   children	__class__s
            r   r:   ScrollableContainer.__init__L   s@    2 		
  &N)&8#(r   c                J   > U R                   c
  [        TU ]  $ U R                   $ N)r6   r9   allow_maximize)r;   r=   s    r   rA   "ScrollableContainer.allow_maximizer   s&    $7))   r   )r4   r5   r6   )r<   r
   r0   
str | Noner1   rC   r2   rC   r3   boolr4   bool | Noner5   rE   r6   rE   returnNone)rF   rD   )r   r   r   r   r   ALLOW_MAXIMIZEr   r   r/   __annotations__r:   propertyrA   r   __classcell__r=   s   @r   r   r       sD   X NK 	k;U;}5A}5AeD}5A|\>)YU;
K5A{KeD|%H-H) &  "!%*.$($)$) $) 	$)
 $) $) $) ($) "$) 
$) $)L ! !r   r   T)r4   c                      \ rS rSrSrSrSrg)Verticaly   z>An expanding container with vertical layout and no scrollbars.z~
    Vertical {
        width: 1fr;
        height: 1fr;
        layout: vertical;
        overflow: hidden hidden;
    }
    r   Nr   r   r   r   rN   rN   y   s    HKr   rN   c                      \ rS rSrSrSrSrg)VerticalGroup   zAA non-expanding container with vertical layout and no scrollbars.z
    VerticalGroup {
        width: 1fr;
        height: auto;
        layout: vertical;
        overflow: hidden hidden;
    }
    r   Nr   r   r   r   rQ   rQ      s    KKr   rQ   c                      \ rS rSrSrSrSrg)VerticalScroll   zJA container with vertical layout and an automatic scrollbar on the Y axis.zp
    VerticalScroll {
        layout: vertical;
        overflow-x: hidden;
        overflow-y: auto;
    }
    r   Nr   r   r   r   rT   rT      s    TKr   rT   c                      \ rS rSrSrSrSrg)
Horizontal   z@An expanding container with horizontal layout and no scrollbars.z
    Horizontal {
        width: 1fr;
        height: 1fr;
        layout: horizontal;
        overflow: hidden hidden;
    }
    r   Nr   r   r   r   rW   rW      s    JKr   rW   c                      \ rS rSrSrSrSrg)HorizontalGroup   zCA non-expanding container with horizontal layout and no scrollbars.z
    HorizontalGroup {
        width: 1fr;
        height: auto;
        layout: horizontal;
        overflow: hidden hidden;
    }
    r   Nr   r   r   r   rZ   rZ      s    MKr   rZ   c                      \ rS rSrSrSrSrg)HorizontalScroll   zLA container with horizontal layout and an automatic scrollbar on the X axis.zt
    HorizontalScroll {
        layout: horizontal;
        overflow-y: hidden;
        overflow-x: auto;
    }
    r   Nr   r   r   r   r]   r]      s    VKr   r]   c                      \ rS rSrSrSrSrg)Center   0A container which aligns children on the X axis.zd
    Center {
        align-horizontal: center;
        width: 1fr;
        height: auto;
    }
    r   Nr   r   r   r   r`   r`          :Kr   r`   c                      \ rS rSrSrSrSrg)Right   rb   zb
    Right {
        align-horizontal: right;
        width: 1fr;
        height: auto;
    }
    r   Nr   r   r   r   re   re      rc   r   re   c                      \ rS rSrSrSrSrg)Middle   z0A container which aligns children on the Y axis.zb
    Middle {
        align-vertical: middle;
        width: auto;
        height: 1fr;
    }
    r   Nr   r   r   r   rh   rh      rc   r   rh   c                      \ rS rSrSrSrSrg)CenterMiddle   z3A container which aligns its children on both axis.ze
    CenterMiddle {
        align: center middle;
        width: 1fr;
        height: 1fr;
    }
    r   Nr   r   r   r   rk   rk      s    =Kr   rk   c                      \ rS rSrSrSrSrg)Grid   zA container with grid layout.zU
    Grid {
        width: 1fr;
        height: 1fr;
        layout: grid;
    }
    r   Nr   r   r   r   rn   rn      s    'Kr   rn   c            	         ^  \ rS rSr% SrSr\" S5      rS\S'   \" SSS9r	S	\S
'   \" SSS9r
S	\S'   \" S5      rS\S'   SSSSSSSSS.                   SU 4S jjjrSS jrSrU =r$ )ItemGridi  z3A container with grid layout and automatic columns.zZ
    ItemGrid {
        width: 1fr;
        height: auto;
        layout: grid;
    }
    Tzreactive[bool]stretch_heightN)layoutzreactive[int | None]min_column_widthmax_column_widthFregular)r0   r1   r2   r3   rt   ru   rr   rv   c               (  > [         T
U ]  " XX#US.6  U R                  [        R                  U5        U R                  [        R
                  U5        U R                  [        R                  U5        U R                  [        R                  U5        g)a  
Construct a ItemGrid.

Args:
    *children: Child widgets.
    name: The name of the widget.
    id: The ID of the widget in the DOM.
    classes: The CSS classes for the widget.
    disabled: Whether the widget is disabled or not.
    stretch_height: Expand the height of widgets to the row height.
    min_column_width: The smallest permitted column width.
    regular: All rows should have the same number of items.
r8   N)r9   r:   set_reactiverq   rr   rt   ru   rv   )r;   r0   r1   r2   r3   rt   ru   rr   rv   r<   r=   s             r   r:   ItemGrid.__init__  su    2 	R8	
 	(11>B(335EF(335EF(**G4r   c                    [        U[        5      (       aE  U R                  Ul        U R                  Ul        U R                  Ul        U R
                  Ul        g g r@   )
isinstancer   rr   rt   ru   rv   )r;   rs   s     r   
pre_layoutItemGrid.pre_layout2  sI    fj))$($7$7F!&*&;&;F#&*&;&;F#!\\FN	 *r   r   )r<   r
   r0   rC   r1   rC   r2   rC   r3   rD   rt   
int | Noneru   r~   rr   rD   rv   rD   rF   rG   )rs   r   rF   rG   )r   r   r   r   r   r   r	   rr   rI   rt   ru   rv   r:   r|   r   rK   rL   s   @r   rq   rq     s    =K &.d^NN3-5d4-H*H-5d4-H*H&uoG^-
  "'+'+#55 5 	5
 5 5 %5 %5 5 5 
5 5B* *r   rq   N)r   
__future__r   typingr   textual.bindingr   r   textual.layoutr   textual.layouts.gridr   textual.reactiver	   textual.widgetr
   r   r   rN   rQ   rT   rW   rZ   r]   r`   re   rh   rk   rn   rq   r   r   r   <module>r      s    #  0 ! + % !
 
V!&D V!r
v 

F 
	( 	
 

f 
	* 		V 		F 		V 		6 		6 	6*v 6*r   