o
    g%                     @   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 	pageSetup)defaultportrait	landscape)valuesT
allow_none)downThenOveroverThenDown)asDisplayedatEnd)	displayedblankdash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)self	worksheetr   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-    r0   Q/var/www/html/api-tag/env/lib/python3.10/site-packages/openpyxl/worksheet/page.py__init__'   s(   
zPrintPageSetup.__init__c                 C      t t| S r   booldictr.   r0   r0   r1   __bool__R      zPrintPageSetup.__bool__c                 C   s
   | j jjS )z 
        Proxy property
        )r   sheet_propertiespageSetUpPrr7   r0   r0   r1   r:   X   s   
zPrintPageSetup.sheet_propertiesc                 C      | j jS r   r:   	fitToPager7   r0   r0   r1   r>   `      zPrintPageSetup.fitToPagec                 C      || j _d S r   r=   r.   valuer0   r0   r1   r>   e      c                 C   r<   r   r:   autoPageBreaksr7   r0   r0   r1   rE   j   r?   zPrintPageSetup.autoPageBreaksc                 C   r@   r   rD   rA   r0   r0   r1   rE   o   rC   c                    s   t  |}d |_|S r   )super	from_treer-   )clsnoder.   	__class__r0   r1   rG   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-   r2   r8   propertyr:   r>   setterrE   classmethodrG   __classcell__r0   r0   rJ   r1   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 printOptionsTr   Nc                 C   s"   || _ || _|| _|| _|| _d S r   )horizontalCenteredverticalCenteredheadings	gridLinesgridLinesSet)r.   rW   rX   rY   rZ   r[   r0   r0   r1   r2      s
   
zPrintOptions.__init__c                 C   r3   r   r4   r7   r0   r0   r1   r8      r9   zPrintOptions.__bool__)NNNNN)rL   rM   rN   rO   rP   r   rW   rX   rY   rZ   r[   r2   r8   r0   r0   r0   r1   rU   {   s    





rU   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
    pageMargins      ?         ?c                 C   s(   || _ || _|| _|| _|| _|| _d S r   )leftrighttopbottomheaderfooter)r.   ra   rb   rc   rd   re   rf   r0   r0   r1   r2      s   
zPageMargins.__init__N)r^   r^   r_   r_   r`   r`   )rL   rM   rN   rO   rP   r   ra   rb   rc   rd   re   rf   r2   r0   r0   r0   r1   r\      s    r\   N)!openpyxl.descriptors.serialisabler   openpyxl.descriptorsr   r   r   r   openpyxl.descriptors.excelr   r   r	   rU   r\   r0   r0   r0   r1   <module>   s   n