o
    ϩZh%                     @   sh   d dl mZ d dlmZmZmZmZ d dlmZm	Z	 G dd deZ
G dd deZG dd	 d	eZd
S )    )Serialisable)FloatBoolIntegerNoneSet)UniversalMeasureRelationc                       s\  e Zd ZdZdZeddZeddZeddZ	eddZ
eddZeddZeddZeddZeddZeddZeddZeddZeddZeddZed	dZeddZeddZeddZe Z	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
dddZdd Zedd Z edd Z!e!j"dd Z!edd Z#e#j"dd Z#e$ fddZ%  Z&S )PrintPageSetupz Worksheet print page setup Z	pageSetup)defaultZportraitZ	landscape)valuesT
allow_none)ZdownThenOverZoverThenDown)ZasDisplayedZatEnd)Z	displayedblankdashZNANc                 C   s|   || _ || _|| _|| _|| _|| _|| _|| _|	| _|
| _	|| _
|| _|| _|| _|| _|| _|| _|| _|| _|| _d S N)_parentorientation	paperSizescalefitToHeight
fitToWidthfirstPageNumberuseFirstPageNumberpaperHeight
paperWidth	pageOrderusePrinterDefaultsblackAndWhitedraftcellCommentserrorshorizontalDpiverticalDpicopiesid)selfZ	worksheetr   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$    r&   N/var/www/html/lang_env/lib/python3.10/site-packages/openpyxl/worksheet/page.py__init__'   s(   
zPrintPageSetup.__init__c                 C      t t| S r   booldictr%   r&   r&   r'   __bool__R      zPrintPageSetup.__bool__c                 C   s
   | j jjS )z 
        Proxy property
        )r   sheet_propertiesZpageSetUpPrr-   r&   r&   r'   r0   X   s   
zPrintPageSetup.sheet_propertiesc                 C      | j jS r   r0   	fitToPager-   r&   r&   r'   r3   `      zPrintPageSetup.fitToPagec                 C      || j _d S r   r2   r%   valuer&   r&   r'   r3   e      c                 C   r1   r   r0   autoPageBreaksr-   r&   r&   r'   r:   j   r4   zPrintPageSetup.autoPageBreaksc                 C   r5   r   r9   r6   r&   r&   r'   r:   o   r8   c                    s   t  |}d |_|S r   )super	from_treer$   )clsnoder%   	__class__r&   r'   r<   t   s   zPrintPageSetup.from_tree)NNNNNNNNNNNNNNNNNNNN)'__name__
__module____qualname____doc__tagnamer   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r   r$   r(   r.   propertyr0   r3   setterr:   classmethodr<   __classcell__r&   r&   r?   r'   r	      sp    


















+




r	   c                   @   sb   e Zd ZdZdZeddZeddZeddZeddZ	eddZ
					d
ddZdd	 ZdS )PrintOptionsz Worksheet print options ZprintOptionsTr   Nc                 C   s"   || _ || _|| _|| _|| _d S r   )horizontalCenteredverticalCenteredheadings	gridLinesgridLinesSet)r%   rK   rL   rM   rN   rO   r&   r&   r'   r(      s
   
zPrintOptions.__init__c                 C   r)   r   r*   r-   r&   r&   r'   r.      r/   zPrintOptions.__bool__)NNNNN)rA   rB   rC   rD   rE   r   rK   rL   rM   rN   rO   r(   r.   r&   r&   r&   r'   rJ   {   s    





rJ   c                   @   sF   e Zd ZdZdZe Ze Ze Ze Z	e Z
e Z		d	ddZdS )
PageMarginsz
    Information about page margins for view/print layouts.
    Standard values (in inches)
    left, right = 0.75
    top, bottom = 1
    header, footer = 0.5
    ZpageMargins      ?         ?c                 C   s(   || _ || _|| _|| _|| _|| _d S r   )leftrighttopbottomheaderfooter)r%   rT   rU   rV   rW   rX   rY   r&   r&   r'   r(      s   
zPageMargins.__init__N)rQ   rQ   rR   rR   rS   rS   )rA   rB   rC   rD   rE   r   rT   rU   rV   rW   rX   rY   r(   r&   r&   r&   r'   rP      s    rP   N)Z!openpyxl.descriptors.serialisabler   Zopenpyxl.descriptorsr   r   r   r   Zopenpyxl.descriptors.excelr   r   r	   rJ   rP   r&   r&   r&   r'   <module>   s   n