
    kf3                         d Z dZddlmZ ddlmZmZmZmZ ddl	m
Z
 ddlmZ  G d de          Zd	 Zed
k    r e             dS dS )z3.3.0zThis file is a
    )colors)RectDrawingGroupString)Label)Widgetc                   >    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	S )
EventCalendarc                     d| _         d| _        d| _        d| _        d | _        d| _        g | _        d | _        d | _        d | _	        d| _
        g | _        d | _        d | _        d| _        g | _        g | _        d S )Nr   i,        )xywidthheighttimeColWidthtrackRowHeightdata
trackNames	startTimeendTimeday_talksVisible
_startTime_endTime_trackCount
_colWidths_colLeftEdges)selfs    c/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/reportlab/graphics/widgets/eventcal.py__init__zEventCalendar.__init__   s    
  	      c                    |                      | j                  | _        t          |                                           | _        |                                  | j        g| _        | j	        f| j
        d| j        z   z  }|gd| j        z   z  | _        t          | j                  D ]*}| j                            | j        d         |z              +dS | j	        g| _        | j
        | j	        z
  | j        z  }t          | j                  D ]D}| j                            |           | j                            | j        d         |z              EdS )z4Called at start of draw.  Sets various column widthsN   )getRelevantTalksr   r   lengetAllTracksr   computeStartAndEndTimesr   r   r   r   r   rangeappend)r    wis      r!   computeSizezEventCalendar.computeSize*   sa   !2249==t002233$$&&&"fX$
a$"223A cQ(8%89DO4+,, F F"))$*<R*@1*DEEEEF F  $01DOd//43CCA4+,, F F&&q)))"))$*<R*@1*DEEEEF Fr#   c                 2   | j         r| j         | _        n2| j        D ]*\  }}}}}}| j        || _        || j        k     r|| _        +| j        r| j        | _        dS | j        D ]3\  }}}}}}| j        ||z   | _        ||z   | j        k    r
||z   | _        4dS )z(Work out first and last times to displayN)r   r   r   r   r   )r    titlespeakertrackIdr   startdurations          r!   r*   z%EventCalendar.computeStartAndEndTimes>   s    > 		0"nDOOCGCU 0 0?#uh?*&+DOOt..*/< 	9 LDMMMCGCU 9 9?#uh=($)H$4DMMx'$-77(-(89 9r#   c                     g }| j         D ]$\  }}}}}}|||vr|                    |           %|                                 |S )N)r   r,   sort)r    tracksr1   r2   r3   r   hoursr5   s           r!   r)   zEventCalendar.getAllTracksX   s[    ?Cy 	+ 	+;UGWc5("&((MM'***r#   c                     g }|D ]b}|\  }}}}}}	|dk    s
J d            || j         k    r<| j        ||	z   | j        k    r'| j        || j        k    r|                    |           c|S )zScans for tracks actually usedr   z2trackId must be None or 1,2,3... zero not allowed!)r   r   r   r,   )
r    talkListusedtalkr1   r2   r3   r   r9   r5   s
             r!   r'   zEventCalendar.getRelevantTalksa   s     	& 	&D>B;UGWc5(a<<<!U<<<dhn,583C2V2Vl*0E0EKK%%%r#   c                 x    | j         | j        z
  }|| j        z
  | j        | j        z
  z  }| j        |z   ||z  z
  }|S )z+Return y-value corresponding to times given)r   r   r   r   r   )r    theTime
axisHeightproportionUpr   s        r!   	scaleTimezEventCalendar.scaleTimem   sF    [4#66
 4?2t}t7VWFZ:#<=r#   c                 V   t                      }|                     ||z             }|                     |          }||z
  }|#| j        d         }	| j        | j        d         z
  }
n| j        |         }	| j        |         }
t                      }|                    |           |                    |	d|
z  z   |d|z  z              d|_        |
|_        ||_	        d|_
        t          |	||
|t          j                  }|                    |           |                    |           |S )z!Return shapes for a specific talkNr%   r         ?c   	fillColor)r   rB   r   r   r   r   setText	setOrigin	boxAnchorr   fontSizer   r   cyanadd)r    r   r5   r3   textgy_bottomy_topy_heightr   r   labrs                r!   getTalkRectzEventCalendar.getTalkRectv   s   GG>>)h"677y))8#?"1%AJ!33EE "7+AOG,EggDa#e)mXc(l%:;;;	
HeXEEE	a	c


 r#   c           	         |                                   t                      }|                    t          | j        | j        | j        d         | j        | j        z
  t          j
                             | j        | j        d         z   }| j        | j        z   | j        z
  }t          | j                  D ]}| j        |dz            }t          |||| j        t          j                  }t          |d|z  z   |d|z  d          }|                    |           |                    |           ||z   }| j        D ]>}|\  }	}
}}}}|                     ||||	dz   |
z             }|                    |           ?|S )	Nr   rG   r%   rD   zTrack %dmiddle)align
)r/   r   rN   r   r   r   r   r   r   r   cornsilkr+   r   yellowr   r   rV   )r    rP   r   r   trkwidrU   sr=   r1   r2   r3   r   r4   r5   s                  r!   drawzEventCalendar.draw   sy   GG 	
d46464?1#5t{TEX7Xdjdstttuuu FT_Q''FT[ 4#66)** 	 	C/#a%(CQ3 3v}MMMAq3s7{AzC'7xHHHAEE!HHHEE!HHHCAA& 	 	D>B;UGWc5(  '54<';QRRAEE!HHHH r#   N)__name__
__module____qualname__r"   r/   r*   r)   r'   rB   rV   r`    r#   r!   r   r      s             2F F F(9 9 94  
 
 
    B    r#   r   c                  L   t          dd          } t                      }d|_        d|_        g d|_        d|_        |                     |           dD ]O}|                     |          }t          d|z  d	          	                    |           t          d
|z             PdS )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%   rk   rl   )zPattern Experiences in C++zMark Radford   r%   rk   rl   )z"What is the Type of std::toupper()zGabriel Dos Reis   r%   rk   rl   )z6Linguistic Variables: Clear Thinking with Fuzzy Logic zWalter Banks   r%   rk   rl   )0lunch, short presentations, vendor presentations Nr%         (@       @)zCORBA? Isn't that obsoletezDuncan Grisbyr%   r%         ,@rl   )zPython Design PatternsDuncan Boothrm   r%   ru   rl   )z*Inside Security Checks and Safe ExceptionsBrandon Brayrn   r%   ru   rl   )zStudying at a DistanceCPanel Discussion, Panel to include Alan Lenton & Francis Glassborowro   r%   ru   rl   )zRCoding Standards - Given the ANSI C Standard why do I still need a coding StandardRandy Marquesrp   r%   ru   rl   )zRESTful PythonzHamish Lawsonr%   r%         0@rl   )z(Parsing made easier - a radical old ideazAndrew Koenigrm   r%   rz   rl   )zC++ & MultimethodszJulian Smithrn   r%   rz   rl   )zC++ ThreadingzKevlin Henneyro   r%   rz   rl   )zThe Organisation Strikes BackzAlan Griffiths & Sarah Leesrp   r%   rz   rl   )Birds of a Feather meetingrr   Nr%        1@rt   )zKeynote: In the Spirit of CzGreg ColvinNrm   ri   rj   )z6The Infinite Filing Cabinet - object storage in PythonzJacob Hallenr%   rm   rk   rl   )z>Introduction to Python and Jython for C++ and Java ProgrammerszAlex Martellirm   rm   rk   rl   )z#Template metaprogramming in HaskellzSimon Peyton Jonesrn   rm   rk   rl   )zQPlenty People Programming: C++ Programming in a Group, Workshop with a differencezNico Josuttisro   rm   rk   rl   )z4Design and Implementation of the Boost Graph LibraryzJeremy Siekrp   rm   rk   rl   )rq   rr   Nrm   rs   rt   )z5Building GUI Applications with PythonCard and PyCrustz	Andy Toddr%   rm   ru   rl   )zIntegrating Python, C and C++rv   rm   rm   ru   rl   )z!Secrets and Pitfalls of Templatesz$Nicolai Josuttis & David Vandevoordern   rm   ru   rl   )zBeing a Mentorrx   ro   rm   ru   rl   )zThe Embedded C Extensions to CzWillem Wakkerrp   rm   ru   rl   )zLightning Talksz
Paul Brianr%   rm   rz   rl   )z'Scripting Java Applications with JythonzAnthony Edenrm   rm   rz   rl   )z5Metaprogramming and the Boost Metaprogramming LibraryDavid Abrahamsrn   rm   rz   rl   )z6A Common Vendor ABI for C++ -- GCC's why, what and notz!Nathan Sidwell & Gabriel Dos Reisro   rm   rz   rl   )zThe Timing and Cost of ChoiceszHubert Matthewsrp   rm   rz   rl   )r{   rr   Nrm   r|   rt   )z.Keynote: The Cost of C &amp; C++ CompatibilityzAndy KoenigNrn   ri   rj   )z4Prying Eyes: Generic Observer Implementations in C++Andrei Alexandrescur%   rm   rk   rl   )z.The Roadmap to Generative Programming With C++zUlrich Eiseneckerrm   rm   rk   rl   )z=Design Patterns in C++ and C# for the Common Language Runtimerw   rn   rm   rk   rl   )z@Extreme Hour (XH): (workshop) - Jutta Eckstein and Nico JosuttiszJutta Ecsteinro   rm   rk   rl   )z.The Lambda Library : Unnamed Functions for C++zJaako Jarvirp   rm   rk   rl   )rq   rr   Nrn   rs   rt   )zReflective MetaprogrammingzDaveed Vandevoorder%   rn   ru   rl   )z7Advanced Template Issues and Solutions (double session)zHerb Sutterrm   rn   ru   rn   )z/Concurrent Programming in Java (double session)zAngelika Langerrn   rn   ru   rn   )z)What can MISRA-C (2nd Edition) do for us?zChris Hillsro   rn   ru   rl   )z(C++ Metaprogramming Concepts and ResultszWalter E Brownrp   rn   ru   rl   )z3Binding C++ to Python with the Boost Python Libraryr}   r%   rn   rz   rl   )zHUsing Aspect Oriented Programming for Enterprise Application IntegrationzArno Schmidmeierro   rn   rz   rl   )zDefective C++zMarc Paternorp   rn   rz   rl   )z.Speakers' Banquet & Birds of a Feather meetingrr   Nrn   r|   rt   )z=Keynote: The Internet, Software and Computers - A Report CardzAlan LentonNro   ri   rj   )zEMulti-Platform Software Development; Lessons from the Boost librarieszBeman Dawesr%   rp   rk   rl   )zThe Stability of the C++ ABIzSteve Clamagerm   rp   rk   rl   )zJGeneric Build Support - A Pragmatic Approach to the Software Build Processry   rn   rp   rk   rl   )z0How to Handle Project Managers: a survival guidez	Barb Byroro   rp   rk   rl   )zlunch, ACCU AGMrr   Nrp   rs   rt   )zESauce: An OO recursive descent parser; its design and implementation.z
Jon Jaggerr%   rp   ru   rl   )zKGNIRTS ESAC REWOL -  Bringing the UNIX filters to the C++ iostream library.zJC van Winkelrm   rp   ru   rl   )z Pattern Writing: Live and DirectzFrank Buschmann & Kevlin Henneyrn   rp   ru   g      @)z5The Future of Programming Languages - A Goldfish BowlzFrancis Glassborow and friendsrn   rp   ru   rl   )zSHoney, I Shrunk the Threads: Compile-time checked multithreaded transactions in C++r~   r%   rp   rz   rl   )z#Fun and Functionality with FunctorszLois Goldthwaiterm   rp   rz   rl   )zAgile Enough?zAlan Griffithsro   rp   rz   rl   )z+Conference Closure: A brief plenary sessionrr   Nrp   r|   rD   r%   )pdfzeventcal.%swbzsaved eventcal.%sN)r   r   r   r   r   r   rN   asStringopenwriteprint)dcalformatouts       r!   testr      s     	CA
//CCECE`
 `
 `
CHF CGEE#JJJ  , ,jj  ]V#T**00555!F*++++, ,r#   __main__N)__version____doc__reportlab.libr   reportlab.graphics.shapesr   r   r   r   $reportlab.graphics.charts.textlabelsr   reportlab.graphics.widgetbaser	   r   r   ra   rd   r#   r!   <module>r      s    	 !           B B B B B B B B B B B B 6 6 6 6 6 6 0 0 0 0 0 0_ _ _ _ _F _ _ _Ht, t, t,l ZDFFFFF r#   