a
    õ£Be  ã                   @  s€   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZ dd
lmZ dgZeZddœdd„ZdS )zZ
Dummy layout. Used when somebody creates an `Application` without specifying a
`Layout`.
é    )Úannotations)ÚHTML)ÚKeyBindings)ÚKeyPressEventé   )ÚWindow)ÚFormattedTextControl)ÚD)ÚLayoutÚcreate_dummy_layoutr
   )Úreturnc                  C  sN   t ƒ } |  d¡dddœdd„ƒ}ttdƒ| d�}t|td	d
�d�}t||d�S )z“
    Create a dummy layout for use in an 'Application' that doesn't have a
    layout specified. When ENTER is pressed, the application quits.
    ÚenterÚEÚNone)Úeventr   c                 S  s   | j  ¡  d S )N)ZappÚexit)r   © r   ú^/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/prompt_toolkit/layout/dummy.pyr      s    z"create_dummy_layout.<locals>.enterz<No layout specified. Press <reverse>ENTER</reverse> to quit.)Zkey_bindingsr   )Úmin)ÚcontentÚheight)Ú	containerZfocused_element)r   Úaddr   r   r   r	   r
   )Úkbr   ÚcontrolZwindowr   r   r   r      s    þN)Ú__doc__Ú
__future__r   Zprompt_toolkit.formatted_textr   Zprompt_toolkit.key_bindingr   Z(prompt_toolkit.key_binding.key_processorr   Ú
containersr   Zcontrolsr   Ú	dimensionr	   Zlayoutr
   Ú__all__r   r   r   r   r   r   Ú<module>   s   ÿ