
    Q?h3                         S r SrSSKJr  SSKJrJrJrJr  SSK	J
r
  SSKJr   " S S\5      rS	 r\S
:X  a  \" 5         gg)z3.3.0zThis file is a
    )colors)RectDrawingGroupString)Label)Widgetc                   D    \ rS rSrS rS rS rS rS rS r	S r
S	 rS
rg)EventCalendar   c                     SU l         SU l        SU l        SU l        S U l        SU l        / U l        S U l        S U l        S U l	        SU l
        / U l        S U l        S U l        SU l        / U l        / U l        g )Nr   i,        )xywidthheighttimeColWidthtrackRowHeightdata
trackNames	startTimeendTimeday_talksVisible
_startTime_endTime_trackCount
_colWidths_colLeftEdges)selfs    U/var/www/html/env/lib/python3.13/site-packages/reportlab/graphics/widgets/eventcal.py__init__EventCalendar.__init__   s    
  	      c                 
   U R                  U R                  5      U l        [        U R	                  5       5      U l        U R                  5         U R                  /U l        U R                  c|  U R                  SU R
                  -   -  nU/SU R
                  -   -  U l        [        U R
                  5       H.  nU R                  R                  U R                  S   U-   5        M0     gU R                  /U l        U R                  U R                  -
  U R
                  -  n[        U R
                  5       HI  nU R                  R                  U5        U R                  R                  U R                  S   U-   5        MK     g)z4Called at start of draw.  Sets various column widthsN   )getRelevantTalksr   r   lengetAllTracksr   computeStartAndEndTimesr   r    r   r   r   rangeappend)r!   wis      r"   computeSizeEventCalendar.computeSize*   s<   !22499=t0023$$&"ffX$

a$"2"223A cQ(8(8%89DO4++,""))$*<*<R*@1*DE -  $001DOd///43C3CCA4++,&&q)""))$*<*<R*@1*DE -r%   c                    U R                   (       a  U R                   U l        OCU R                   H3  u  pp4pVU R                  c  XPl        M  XPR                  :  d  M-  XPl        M5     U R                  (       a  U R                  U l        gU R                   H<  u  pp4pVU R                  c  XV-   U l        M  XV-   U R                  :  d  M3  XV-   U l        M>     g)z(Work out first and last times to displayN)r   r   r   r   r   )r!   titlespeakertrackIdr   startdurations          r"   r,   %EventCalendar.computeStartAndEndTimes>   s    >>"nnDOCGCUCU?u??*&+O.*/ DV << LLDMCGCUCU?u==($)$4DM'$--7(-(8 DVr%   c                     / nU R                    H$  u  p#pEpgUc  M  XA;  d  M  UR                  U5        M&     UR                  5         U$ )N)r   r.   sort)r!   tracksr4   r5   r6   r   hoursr8   s           r"   r+   EventCalendar.getAllTracksX   sF    ?Cyy;UW5"(MM'* @I 	r%   c                    / nU Hw  nUu  pEpgpUS:w  d   S5       eXpR                   :X  d  M'  U R                  b  X-   U R                  :  d  MH  U R                  b  XR                  ::  d  Mf  UR                  U5        My     U$ )zScans for tracks actually usedr   z2trackId must be None or 1,2,3... zero not allowed!)r   r   r   r.   )
r!   talkListusedtalkr4   r5   r6   r   r=   r8   s
             r"   r)   EventCalendar.getRelevantTalksa   sv    D>B;UW5a<U!UU<hhnn,53C2Vll*0EKK%  r%   c                     U R                   U R                  -
  nXR                  -
  U R                  U R                  -
  -  nU R                  U-   X#-  -
  nU$ )z+Return y-value corresponding to times given)r   r   r   r   r   )r!   theTime
axisHeightproportionUpr   s        r"   	scaleTimeEventCalendar.scaleTimem   sO    [[4#6#66
 ??2t}}t7VWFFZ:#<=r%   c                     [        5       nU R                  X-   5      nU R                  U5      nXv-
  nUc,  U R                  S   n	U R                  U R                  S   -
  n
OU R                  U   n	U R                  U   n
[        5       nUR                  U5        UR                  U	SU
-  -   USU-  -   5        SUl        Xl        Xl	        SUl
        [        XX[        R                  S9nUR                  U5        UR                  U5        U$ )z!Return shapes for a specific talkr'   r         ?c   	fillColor)r   rH   r    r   r   r   setText	setOrigin	boxAnchorr   fontSizer   r   cyanadd)r!   r   r8   r6   textgy_bottomy_topy_heightr   r   labrs                r"   getTalkRectEventCalendar.getTalkRectv   s    G>>)"67y)#?""1%AJJ!33E ""7+AOOG,EgDa#e)mXc(l%:;	
eE	a	c
 r%   c           
         U R                  5         [        5       nUR                  [        U R                  U R
                  U R                  S   U R                  U R                  -
  [        R                  S95        U R                  U R                  S   -   nU R
                  U R                  -   U R                  -
  n[        U R                  5       Hs  nU R                  US-      n[        X#XPR                  [        R                  S9n[        USU-  -   USU-  SS9nUR                  U5        UR                  U5        X%-   nMu     U R                   H2  nUu  pppU R!                  XXS-   U
-   5      nUR                  U5        M4     U$ )	Nr   rN   r'   rK   zTrack %dmiddle)align
)r1   r   rU   r   r   r   r   r   r   r   cornsilkr-   r   yellowr   r   r]   )r!   rW   r   r   trkwidr\   srB   r4   r5   r6   r   r7   r8   s                  r"   drawEventCalendar.draw   sQ   G 	
d4664664??1#5t{{TEXEX7Xdjdsdstu FFT__Q''FFT[[ 4#6#66))*C//#a%(CQ3 3 3v}}MAq3s7{AzC'7xHAEE!HEE!HA + &&D>B;UW5  '4<';QRAEE!H ' r%   )r    r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   N)__name__
__module____qualname____firstlineno__r#   r1   r,   r+   r)   rH   r]   rh   __static_attributes__ r%   r"   r   r      s,     2F(94
Br%   r   c                     [        SS5      n [        5       nSUl        SUl        / SQUl        SUl        U R                  U5        S H@  nU R                  U5      n[        SU-  S	5      R                  U5        [        S
U-  5        MB     g)z3Make a conference event for day 1 of UP Python 2003i     2      )B)z1Keynote: Why design another programming language?zGuido van RossumNr'         "@      ?)zSiena Web Service ArchitecturezMarc-Andre Lemburgr'   r'         %@      ?)zExtreme Programming in PythonzChris Withers   r'   rv   rw   )zPattern Experiences in C++zMark Radford   r'   rv   rw   )z"What is the Type of std::toupper()zGabriel Dos Reis   r'   rv   rw   )z6Linguistic Variables: Clear Thinking with Fuzzy Logic zWalter Banks   r'   rv   rw   )0lunch, short presentations, vendor presentations Nr'         (@       @)zCORBA? Isn't that obsoletezDuncan Grisbyr'   r'         ,@rw   )zPython Design PatternsDuncan Boothrx   r'   r   rw   )z*Inside Security Checks and Safe ExceptionsBrandon Brayry   r'   r   rw   )zStudying at a DistanceCPanel Discussion, Panel to include Alan Lenton & Francis Glassborowrz   r'   r   rw   )zRCoding Standards - Given the ANSI C Standard why do I still need a coding StandardRandy Marquesr{   r'   r   rw   )zRESTful PythonzHamish Lawsonr'   r'         0@rw   )z(Parsing made easier - a radical old ideazAndrew Koenigrx   r'   r   rw   )zC++ & MultimethodszJulian Smithry   r'   r   rw   )zC++ ThreadingzKevlin Henneyrz   r'   r   rw   )zThe Organisation Strikes BackzAlan Griffiths & Sarah Leesr{   r'   r   rw   )Birds of a Feather meetingr}   Nr'        1@r   )zKeynote: In the Spirit of CzGreg ColvinNrx   rt   ru   )z6The Infinite Filing Cabinet - object storage in PythonzJacob Hallenr'   rx   rv   rw   )z>Introduction to Python and Jython for C++ and Java ProgrammerszAlex Martellirx   rx   rv   rw   )z#Template metaprogramming in HaskellzSimon Peyton Jonesry   rx   rv   rw   )zQPlenty People Programming: C++ Programming in a Group, Workshop with a differencezNico Josuttisrz   rx   rv   rw   )z4Design and Implementation of the Boost Graph LibraryzJeremy Siekr{   rx   rv   rw   )r|   r}   Nrx   r~   r   )z5Building GUI Applications with PythonCard and PyCrustz	Andy Toddr'   rx   r   rw   )zIntegrating Python, C and C++r   rx   rx   r   rw   )z!Secrets and Pitfalls of Templatesz$Nicolai Josuttis & David Vandevoordery   rx   r   rw   )zBeing a Mentorr   rz   rx   r   rw   )zThe Embedded C Extensions to CzWillem Wakkerr{   rx   r   rw   )zLightning Talksz
Paul Brianr'   rx   r   rw   )z'Scripting Java Applications with JythonzAnthony Edenrx   rx   r   rw   )z5Metaprogramming and the Boost Metaprogramming LibraryDavid Abrahamsry   rx   r   rw   )z6A Common Vendor ABI for C++ -- GCC's why, what and notz!Nathan Sidwell & Gabriel Dos Reisrz   rx   r   rw   )zThe Timing and Cost of ChoiceszHubert Matthewsr{   rx   r   rw   )r   r}   Nrx   r   r   )z.Keynote: The Cost of C &amp; C++ CompatibilityzAndy KoenigNry   rt   ru   )z4Prying Eyes: Generic Observer Implementations in C++Andrei Alexandrescur'   rx   rv   rw   )z.The Roadmap to Generative Programming With C++zUlrich Eiseneckerrx   rx   rv   rw   )z=Design Patterns in C++ and C# for the Common Language Runtimer   ry   rx   rv   rw   )z@Extreme Hour (XH): (workshop) - Jutta Eckstein and Nico JosuttiszJutta Ecsteinrz   rx   rv   rw   )z.The Lambda Library : Unnamed Functions for C++zJaako Jarvir{   rx   rv   rw   )r|   r}   Nry   r~   r   )zReflective MetaprogrammingzDaveed Vandevoorder'   ry   r   rw   )z7Advanced Template Issues and Solutions (double session)zHerb Sutterrx   ry   r   ry   )z/Concurrent Programming in Java (double session)zAngelika Langerry   ry   r   ry   )z)What can MISRA-C (2nd Edition) do for us?zChris Hillsrz   ry   r   rw   )z(C++ Metaprogramming Concepts and ResultszWalter E Brownr{   ry   r   rw   )z3Binding C++ to Python with the Boost Python Libraryr   r'   ry   r   rw   )zHUsing Aspect Oriented Programming for Enterprise Application IntegrationzArno Schmidmeierrz   ry   r   rw   )zDefective C++zMarc Paternor{   ry   r   rw   )z.Speakers' Banquet & Birds of a Feather meetingr}   Nry   r   r   )z=Keynote: The Internet, Software and Computers - A Report CardzAlan LentonNrz   rt   ru   )zEMulti-Platform Software Development; Lessons from the Boost librarieszBeman Dawesr'   r{   rv   rw   )zThe Stability of the C++ ABIzSteve Clamagerx   r{   rv   rw   )zJGeneric Build Support - A Pragmatic Approach to the Software Build Processr   ry   r{   rv   rw   )z0How to Handle Project Managers: a survival guidez	Barb Byrorz   r{   rv   rw   )zlunch, ACCU AGMr}   Nr{   r~   r   )zESauce: An OO recursive descent parser; its design and implementation.z
Jon Jaggerr'   r{   r   rw   )zKGNIRTS ESAC REWOL -  Bringing the UNIX filters to the C++ iostream library.zJC van Winkelrx   r{   r   rw   )z Pattern Writing: Live and DirectzFrank Buschmann & Kevlin Henneyry   r{   r   g      @)z5The Future of Programming Languages - A Goldfish BowlzFrancis Glassborow and friendsry   r{   r   rw   )zSHoney, I Shrunk the Threads: Compile-time checked multithreaded transactions in C++r   r'   r{   r   rw   )z#Fun and Functionality with FunctorszLois Goldthwaiterx   r{   r   rw   )zAgile Enough?zAlan Griffithsrz   r{   r   rw   )z+Conference Closure: A brief plenary sessionr}   Nr{   r   rK   r'   )pdfzeventcal.%swbzsaved eventcal.%sN)r   r   r   r   r   r   rU   asStringopenwriteprint)dcalformatouts       r"   testr      s     	CA
/CCECE`
CHF CGEE#J jj ]V#T*005!F*+ r%   __main__N)__version____doc__reportlab.libr   reportlab.graphics.shapesr   r   r   r   $reportlab.graphics.charts.textlabelsr   reportlab.graphics.widgetbaser	   r   r   rj   ro   r%   r"   <module>r      sN    	 ! B B 6 0_F _Ht,l ZF r%   