%PDF- %PDF-
Direktori : /snap/core18/current/usr/lib/python3/dist-packages/urwid/__pycache__/ |
Current File : //snap/core18/current/usr/lib/python3/dist-packages/urwid/__pycache__/decoration.cpython-36.pyc |
3 ��dZ�� � @ s� d dl mZmZ d dlmZ d dlmZmZmZm Z m Z mZmZm Z mZmZmZmZmZmZmZmZ d dlmZ d dlmZmZ d dlmZmZmZmZ G dd� de�ZG d d � d ed�e�Z G dd � d e�Z!G dd� ded�e�Z"G dd� de"�Z#G dd� de$�Z%G dd� de�Z&G dd� de$�Z'G dd� de�Z(G dd� de$�Z)G dd� de�Z*G dd� de�Z+d d!� Z,d"d#� Z-d$d%� Z.d&d'� Z/d(d)� Z0d*d+� Z1d,d-� Z2d.d/� Z3d0d1� Z4d2d3� Z5d4d5� Z6e7d6k�r�e6� d7S )8� )�division�print_function)� int_scale)�Widget�WidgetError�BOX�FLOW�LEFT�CENTER�RIGHT�PACK�CLIP�GIVEN�RELATIVE�RELATIVE_100�TOP�MIDDLE�BOTTOM�delegate_to_widget_mixin)�remove_defaults)�CompositeCanvas�SolidCanvas)�Divider�Edit�Text� SolidFillc @ sZ e Zd ZdZdd� Zdd� Zdd� Zdd � Zeee�Z d d� Z ee �Zdd � Zdd� Z dS )�WidgetDecorationa original_widget -- the widget being decorated This is a base class for decoration widgets, widgets that contain one or more widgets and only ever have a single focus. This type of widget will affect the display or behaviour of the original_widget but it is not part of determining a chain of focus. Don't actually do this -- use a WidgetDecoration subclass instead, these are not real widgets: >>> WidgetDecoration(Text(u"hi")) <WidgetDecoration flow widget <Text flow widget 'hi'>> c C s || _ d S )N)�_original_widget)�self�original_widget� r �2/usr/lib/python3/dist-packages/urwid/decoration.py�__init__1 s zWidgetDecoration.__init__c C s | j j� t| j�g S )N)Z_WidgetDecoration__super�_repr_words�reprr )r r r r! r# 3 s zWidgetDecoration._repr_wordsc C s | j S )N)r )r r r r! �_get_original_widget6 s z%WidgetDecoration._get_original_widgetc C s || _ | j� d S )N)r �_invalidate)r r r r r! �_set_original_widget8 s z%WidgetDecoration._set_original_widgetc C s | }xt |d�r|j}qW |S )a� Return the widget without decorations. If there is only one Decoration then this is the same as original_widget. >>> t = Text('hello') >>> wd1 = WidgetDecoration(t) >>> wd2 = WidgetDecoration(wd1) >>> wd3 = WidgetDecoration(wd2) >>> wd3.original_widget is wd2 True >>> wd3.base_widget is t True r )�hasattrr )r �wr r r! �_get_base_widget= s z!WidgetDecoration._get_base_widgetc C s | j j� S )N)r � selectable)r r r r! r+ R s zWidgetDecoration.selectablec C s | j j� S )N)r �sizing)r r r r! r, U s zWidgetDecoration.sizingN)�__name__� __module__�__qualname__�__doc__r"