B
    P\                 @   s   d dl mZ d dlmZ d dlmZ d dlmZmZ d dl	m
Z
 d dlmZ ddlmZmZ dd	lmZ dd
lmZ d dlmZmZmZmZmZ G dd deZdd ZG dd deZdS )    )absolute_import)
basestring)Serialisable)TypedAlias)ExtensionList)
NestedBool   )TextRichText)Layout)GraphicalProperties)	ParagraphRegularTextRun	LineBreakParagraphPropertiesCharacterPropertiesc               @   s|   e Zd ZdZeeddZedZee	ddZ
eddZeeddZedZeeddZedZeeddZdZdd
dZd	S )TitletitleT)expected_type
allow_nonetx)r   spPrtxPr)r   layoutoverlayr   r   Nc             C   s0   |d krt  }|| _|| _|| _|| _|| _d S )N)r
   r   r   r   r   r   )selfr   r   r   r   r   extLst r   3lib/python3.7/site-packages/openpyxl/chart/title.py__init__+   s    zTitle.__init__)NNNNNN)__name__
__module____qualname__Ztagnamer   r
   r   r   textr   r   r   r   r   r   ZgraphicalPropertiesr   r   Zbodyr   r   Z__elements__r    r   r   r   r   r      s"   
     r   c                s:   t  }t  t  _ fdd| dD }||jj_|S )Nc                s    g | ]}t t|d g dqS ))t)rZpPr)r   r   ).0s)	parapropsr   r   
<listcomp>A   s    ztitle_maker.<locals>.<listcomp>
)r   r   r   ZdefRPrsplitr   ZrichZ
paragraphs)r$   r   Zparasr   )r)   r   title_maker=   s    
r-   c                   s$   e Zd ZeZdZ fddZ  ZS )TitleDescriptorTc                s(   t |trt|}tt| || d S )N)
isinstancer   r-   superr.   __set__)r   instancevalue)	__class__r   r   r1   L   s    
zTitleDescriptor.__set__)r!   r"   r#   r   r   r   r1   __classcell__r   r   )r4   r   r.   G   s   r.   N)Z
__future__r   Zopenpyxl.compatr   Z!openpyxl.descriptors.serialisabler   Zopenpyxl.descriptorsr   r   Zopenpyxl.descriptors.excelr   Zopenpyxl.descriptors.nestedr   r$   r
   r   r   r   Zshapesr   Zopenpyxl.drawing.textr   r   r   r   r   r   r-   r.   r   r   r   r   <module>   s   	!
