Mini Shell
3
<�Zcc9 � @ s� d dl Z d dlmZ d dlmZ d dlmZ ddddd d
dgZG dd� de�Z G d
d� de �Z
G dd� de
�ZG dd� de �ZG dd� de �Z
G dd
� d
e �ZG dd � d e �ZdS )� N)�wrap)�_)�
ensure_str�Widget�
TextWidget�SeparatorWidget�EntryWidget�ColumnWidget�CheckboxWidget�CenterWidgetc @ s� e Zd Zddd�Zedd� �Zedd� �Zdd � Zed
d� �Zdd
� Z dd� Z
dd� Zedd� �Zdd� Z
ddd�Zddd�Zdd� ZdS ) r Nc C s0 g | _ |r dd� |jd�D �| _ || _d| _dS )ad Initializes base Widgets buffer.
This class can be subclassed to create customized widgets.
:param max_width: serves as a hint about screen size to write method with default arguments
:type max_width: int
:param default: string containing the default content to fill the buffer with
:type default: string
c S s g | ]}d d� |D ��qS )c S s g | ]}|�qS � r )�.0�cr r �/usr/lib/python3.6/widgets.py�
<listcomp>/ s z.Widget.__init__.<locals>.<listcomp>.<listcomp>r )r
�lr r r r / s z#Widget.__init__.<locals>.<listcomp>�
r N)r r )�_buffer�split�
_max_width�_cursor)�selfZ max_width�defaultr r r �__init__"