Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/prompt_toolkit/layout/__pycache__/layout.cpython-39.pyc
Ðазад
a d�h�6 � @ s� d Z ddlmZ ddlmZmZmZ ddlmZ ddl m Z mZmZm Z mZ ddlmZmZmZ g d�Zeeeee f ZG d d � d �ZG dd� de�Zddddd�dd�ZdS )z Wrapper for the layout. � )�annotations)� Generator�Iterable�Union)�Buffer� )�AnyContainer�ConditionalContainer� Container�Window�to_container)� BufferControl�SearchBufferControl� UIControl)�Layout�InvalidLayoutError�walkc @ s� e Zd ZdZdLdddd�dd�Zd d �dd�Zd d �dd�Zdd �dd�Zddd�dd�Zddd�dd�Z e dd �dd��Zejddd�dd��Ze dd �d d!��Z e jddd�d"d!��Z e dd �d#d$��Ze d%d �d&d'��Zd(d �d)d*�Zd+d �d,d-�Ze d.d �d/d0��Zd d.d1�d2d3�Ze dd �d4d5��Ze dd �d6d7��Zdd �d8d9�Zdd �d:d;�Zdd �d<d=�Zd>d �d?d@�Zd>d �dAdB�Zdd �dCdD�Zdd �dEdF�ZdGdHdI�dJdK�ZdS )Mr 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.) Nr zFocusableElement | None�None)� container�focused_element�returnc C s� t |�| _g | _i | _i | _|d u rnz| j�t| �� �� W qx tyj } zt d�|�W Y d }~qxd }~0 0 n | � |� 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 �e� r"