a
    b                     @   s   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 )    )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 u rt  }|| _|| _|| _|| _|| _d S N)r   r   r   r   r   r   )selfr   r   r   r   r   extLst r   d/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/openpyxl/chart/title.py__init__(   s    zTitle.__init__)NNNNNN)__name__
__module____qualname__tagnamer   r   r   r   textr
   r   r   r   r   r   ZgraphicalPropertiesr	   r   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Z	parapropsr   r   
<listcomp>>       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 r   )
isinstancestrr/   superr0   __set__)r   instancevalue	__class__r   r   r4   I   s    
zTitleDescriptor.__set__)r    r!   r"   r   r   r   r4   __classcell__r   r   r7   r   r0   D   s   r0   N)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/   r0   r   r   r   r   <module>   s   	!
