| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/prompt_toolkit/layout/__pycache__/ |
Upload File : |
�
�Ïc�6 � �� � d Z ddlmZmZmZmZmZmZ ddlm Z ddl
mZmZm
Z
mZmZ ddlmZmZmZ g d�Zeee eef Z G d� d � � Z G d
� de� � Zdd
e
dedee
fd�ZdS )z
Wrapper for the layout.
� )�Dict� Generator�Iterable�List�Optional�Union)�Buffer� )�AnyContainer�ConditionalContainer� Container�Window�to_container)�
BufferControl�SearchBufferControl� UIControl)�Layout�InvalidLayoutError�walkc � � e Zd ZdZ d#dedee ddfd�Zdefd�Z de
eddf fd�Zde
e fd �Zd
eddfd�Zd
edefd�Zedefd
�� � Zej deddfd�� � Zedefd�� � Zej d
eddfd�� � Zedefd�� � Zedee fd�� � Zde
e fd�Zdee fd�Zedee fd�� � Zdedee fd�Zedefd�� � Z edefd�� � Z!d$d�Z"d$d�Z#d$d�Z$de
e% fd�Z&de
e% fd�Z'd$d �Z(d$d!�Z)de%dee% fd"�Z*dS )%r aL
The layout for a prompt_toolkit
:class:`~prompt_toolkit.application.Application`.
This also keeps track of which user control is focused.
:param container: The "root" container for the layout.
:param focused_element: element to be focused initially. (Can be anything
the `focus` function accepts.)
N� container�focused_element�returnc �N � t |� � | _ g | _ i | _ i | _ |�] | j � t
| � � � � � � � n7# t $ r}t d� � |�d }~ww xY w| �
|� � g | _ d S )Nz>Invalid layout. The layout does not contain any Window object.)r r �_stack�search_links�_child_to_parent�append�next�find_all_windows�
StopIterationr �focus�visible_windows)�selfr r �es �>/usr/lib/python3/dist-packages/prompt_toolkit/layout/layout.py�__init__zLayout.__init__% s� � � &�i�0�0���$&��� GI���
=?����"�
���"�"�4��(=�(=�(?�(?�#@�#@�A�A�A�A�� �
�
�
�(�T�� �������
����
�J�J��'�'�'� .0����s �9A'