
    tni                    t    d dl mZ d dlmZmZmZmZmZ erddlm	Z	  G d de          Z
 G d d          Zd	S )
    )annotations)TYPE_CHECKINGAnyDict
NamedTupleOptional   )	BaseStylec                  $    e Zd ZU ded<   ded<   dS )CursorOffsetinttopleftN)__name__
__module____qualname____annotations__     Q/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/rich_toolkit/element.pyr   r   	   s"         HHHIIIIIr   r   c                      e Zd ZU i Zded<   ded<   dZded<   	 	 dddZedd            Zedd            Z	ddZ
ddZdS )ElementzDict[Any, Any]metadatar
   styleTbool	focusableNOptional[BaseStyle]Optional[Dict[Any, Any]]c                T    ddl m} d| _        |pi | _        |p	 |            | _        d S )Nr	   )MinimalStyleF)stylesr    
_cancelledr   r   )selfr   r   r    s       r   __init__zElement.__init__   s>    
 	)((((( B,llnn


r   returnr   c                $    t          dd          S )Nr   )r   r   )r   r#   s    r   cursor_offsetzElement.cursor_offset   s    ****r   c                    dS )NFr   r'   s    r   should_show_cursorzElement.should_show_cursor#   s    ur   keystrNonec                    d S )Nr   )r#   r+   s     r   
handle_keyzElement.handle_key'   s    r   c                    d| _         d S )NT)r"   r'   s    r   	on_cancelzElement.on_cancel*   s    r   )NN)r   r   r   r   )r%   r   )r%   r   )r+   r,   r%   r-   )r%   r-   )r   r   r   r   r   r   r$   propertyr(   r*   r/   r1   r   r   r   r   r      s         !H!!!!I &*-1	- 	- 	- 	- 	- + + + X+    X        r   r   N)
__future__r   typingr   r   r   r   r   r!   r
   r   r   r   r   r   <module>r5      s    " " " " " " A A A A A A A A A A A A A A "!!!!!!    :   
         r   