
k4Vdc           @   s   d  Z  d Z d d l m Z d d l Td d l Td d l m Z m Z m	 Z	 m
 Z
 m Z m Z m Z m Z d d l m Z d d l m Z d d l m Z d	 e f d
     YZ d   Z e d k r e   n  d S(   s   3.3.0s   This file is a
i(   t   colors(   t   *(   t   Linet   Rectt   Polygont   Drawingt   Groupt   Stringt   Circlet   Wedge(   t   Label(   t   Widget(   t	   renderPDFt   EventCalendarc           B   sP   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         C   s   d |  _  d |  _ d |  _ d |  _ d  |  _ d |  _ g  |  _ d  |  _ d  |  _	 d  |  _
 d |  _ g  |  _ d  |  _ d  |  _ d |  _ g  |  _ g  |  _ d  S(   Ni    i,  i   i   (   t   xt   yt   widtht   heightt   Nonet   timeColWidtht   trackRowHeightt   datat
   trackNamest	   startTimet   endTimet   dayt   _talksVisiblet
   _startTimet   _endTimet   _trackCountt
   _colWidthst   _colLeftEdges(   t   self(    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyt   __init__   s"    																c         C   s$  |  j  |  j  |  _ t |  j    |  _ |  j   |  j g |  _ |  j	 d k r |  j d |  j } | g d |  j |  _ x t |  j  D]! } |  j j |  j d |  q Wnk |  j	 g |  _ |  j |  j	 |  j } xB t |  j  D]1 } |  j j |  |  j j |  j d |  q Wd S(   s4   Called at start of draw.  Sets various column widthsi   iN(   t   getRelevantTalksR   R   t   lent   getAllTracksR   t   computeStartAndEndTimesR   R   R   R   R   R   t   ranget   append(   R    t   wt   i(    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyt   computeSize/   s    
"c         C   s   |  j  r |  j  |  _ n\ xY |  j D]N \ } } } } } } |  j d k rU | |  _ q" | |  j k  r" | |  _ q" q" W|  j r |  j |  _ nh xe |  j D]Z \ } } } } } } |  j d k r | | |  _ q | | |  j k r | | |  _ q q Wd S(   s(   Work out first and last times to displayN(   R   R   R   R   R   R   (   R    t   titlet   speakert   trackIdR   t   startt   duration(    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyR%   C   s    	"	"c         C   se   g  } xN |  j  D]C \ } } } } } } | d  k	 r | | k rS | j |  qS q q W| j   | S(   N(   R   R   R'   t   sort(   R    t   tracksR+   R,   R-   R   t   hoursR/   (    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyR$   ]   s    "
c   
      C   s   g  } x | D] } | \ } } } } } }	 | d k sC t  d   | |  j k r |  j d k st | |	 |  j k r |  j d k s | |  j k r | j |  q q q W| S(   s   Scans for tracks actually usedi    s2   trackId must be None or 1,2,3... zero not allowed!N(   t   AssertionErrorR   R   R   R   R'   (
   R    t   talkListt   usedt   talkR+   R,   R-   R   R2   R/   (    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyR"   f   s    "c         C   sD   |  j  |  j } | |  j |  j |  j } |  j | | | } | S(   s+   Return y-value corresponding to times given(   R   R   R   R   R   (   R    t   theTimet
   axisHeightt   proportionUpR   (    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyt	   scaleTimer   s    c         C   s  t    } |  j | |  } |  j |  } | | } | d k re |  j d }	 |  j |  j d }
 n |  j | }	 |  j | }
 t   } | j |  | j |	 d |
 | d |  d | _	 |
 | _ | | _
 d | _ t |	 | |
 | d t j } | j |  | j |  | S(   s!   Return shapes for a specific talki   i    g      ?t   ci   t	   fillColorN(   R   R:   R   R   R   R   R
   t   setTextt	   setOrigint	   boxAnchorR   t   fontSizeR   R    t   cyant   add(   R    R   R/   R-   t   textt   gt   y_bottomt   y_topt   y_heightR   R   t   labt   r(    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyt   getTalkRect{   s(    	
	 				c         C   sk  |  j    t   } | j t |  j |  j |  j d |  j |  j d t	 j
  |  j |  j d } |  j |  j |  j } x t |  j  D] } |  j | d } t | | | |  j d t	 j } t | d | | d | d d } | j |  | j |  | | } q WxV |  j D]K } | \ }	 }
 } } } } |  j | | | |	 d |
  } | j |  qW| S(	   Ni    R<   i   g      ?s   Track %dt   alignt   middles   
(   R*   R   RB   R   R   R   R   R   R   R    t   cornsilkR&   R   t   yellowR   R   RJ   (   R    RD   R   R   t   trkt   widRI   t   sR6   R+   R,   R-   R   R.   R/   (    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyt   draw   s"    
	<!$ (
   t   __name__t
   __module__R!   R*   R%   R$   R"   R:   RJ   RR   (    (    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyR      s   									!c       G   C   sY  t  d d  }  t   } d | _ d | _ d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d gB | _ d | _ |  j |  xC d g D]8 } |  j |  } t	 d | d  j
 |  d | GHqWd S(   s3   Make a conference event for day 1 of UP Python 2003i  i   i2   i   s1   Keynote: Why design another programming language?s   Guido van Rossumi   g      "@g      ?s   Siena Web Service Architectures   Marc-Andre Lemburgg      %@g      ?s   Extreme Programming in Pythons   Chris Withersi   s   Pattern Experiences in C++s   Mark Radfordi   s"   What is the Type of std::toupper()s   Gabriel Dos Reisi   s6   Linguistic Variables: Clear Thinking with Fuzzy Logic s   Walter Banksi   s0   lunch, short presentations, vendor presentationst    g      (@g       @s   CORBA? Isn't that obsoletes   Duncan Grisbyg      ,@s   Python Design Patternss   Duncan Booths*   Inside Security Checks and Safe Exceptionss   Brandon Brays   Studying at a DistancesC   Panel Discussion, Panel to include Alan Lenton & Francis GlassborowsR   Coding Standards - Given the ANSI C Standard why do I still need a coding Standards   Randy Marquess   RESTful Pythons   Hamish Lawsong      0@s(   Parsing made easier - a radical old ideas   Andrew Koenigs   C++ & Multimethodss   Julian Smiths   C++ Threadings   Kevlin Henneys   The Organisation Strikes Backs   Alan Griffiths & Sarah Leess   Birds of a Feather meetingg     1@s   Keynote: In the Spirit of Cs   Greg Colvins6   The Infinite Filing Cabinet - object storage in Pythons   Jacob Hallens>   Introduction to Python and Jython for C++ and Java Programmerss   Alex Martellis#   Template metaprogramming in Haskells   Simon Peyton JonessQ   Plenty People Programming: C++ Programming in a Group, Workshop with a differences   Nico Josuttiss4   Design and Implementation of the Boost Graph Librarys   Jeremy Sieks5   Building GUI Applications with PythonCard and PyCrusts	   Andy Todds   Integrating Python, C and C++s!   Secrets and Pitfalls of Templatess$   Nicolai Josuttis & David Vandevoordes   Being a Mentors   The Embedded C Extensions to Cs   Willem Wakkers   Lightning Talkss
   Paul Brians'   Scripting Java Applications with Jythons   Anthony Edens5   Metaprogramming and the Boost Metaprogramming Librarys   David Abrahamss6   A Common Vendor ABI for C++ -- GCC's why, what and nots!   Nathan Sidwell & Gabriel Dos Reiss   The Timing and Cost of Choicess   Hubert Matthewss.   Keynote: The Cost of C &amp; C++ Compatibilitys   Andy Koenigs4   Prying Eyes: Generic Observer Implementations in C++s   Andrei Alexandrescus.   The Roadmap to Generative Programming With C++s   Ulrich Eiseneckers=   Design Patterns in C++ and C# for the Common Language Runtimes@   Extreme Hour (XH): (workshop) - Jutta Eckstein and Nico Josuttiss   Jutta Ecsteins.   The Lambda Library : Unnamed Functions for C++s   Jaako Jarvis   Reflective Metaprogrammings   Daveed Vandevoordes7   Advanced Template Issues and Solutions (double session)s   Herb Sutters/   Concurrent Programming in Java (double session)s   Angelika Langers)   What can MISRA-C (2nd Edition) do for us?s   Chris Hillss(   C++ Metaprogramming Concepts and Resultss   Walter E Browns3   Binding C++ to Python with the Boost Python LibrarysH   Using Aspect Oriented Programming for Enterprise Application Integrations   Arno Schmidmeiers   Defective C++s   Marc Paternos.   Speakers' Banquet & Birds of a Feather meetings=   Keynote: The Internet, Software and Computers - A Report Cards   Alan LentonsE   Multi-Platform Software Development; Lessons from the Boost librariess   Beman Dawess   The Stability of the C++ ABIs   Steve ClamagesJ   Generic Build Support - A Pragmatic Approach to the Software Build Processs0   How to Handle Project Managers: a survival guides	   Barb Byros   lunch, ACCU AGMsE   Sauce: An OO recursive descent parser; its design and implementation.s
   Jon JaggersK   GNIRTS ESAC REWOL -  Bringing the UNIX filters to the C++ iostream library.s   JC van Winkels    Pattern Writing: Live and Directs   Frank Buschmann & Kevlin Henneyg      @s5   The Future of Programming Languages - A Goldfish Bowls   Francis Glassborow and friendssS   Honey, I Shrunk the Threads: Compile-time checked multithreaded transactions in C++s#   Fun and Functionality with Functorss   Lois Goldthwaites   Agile Enough?s   Alan Griffithss+   Conference Closure: A brief plenary sessiong      ?t   pdfs   eventcal.%st   wbs   saved eventcal.%sN(   s1   Keynote: Why design another programming language?s   Guido van RossumNi   g      "@g      ?(   s   Siena Web Service Architectures   Marc-Andre Lemburgi   i   g      %@g      ?(   s   Extreme Programming in Pythons   Chris Withersi   i   g      %@g      ?(   s   Pattern Experiences in C++s   Mark Radfordi   i   g      %@g      ?(   s"   What is the Type of std::toupper()s   Gabriel Dos Reisi   i   g      %@g      ?(   s6   Linguistic Variables: Clear Thinking with Fuzzy Logic s   Walter Banksi   i   g      %@g      ?(   s0   lunch, short presentations, vendor presentationsRU   Ni   g      (@g       @(   s   CORBA? Isn't that obsoletes   Duncan Grisbyi   i   g      ,@g      ?(   s   Python Design Patternss   Duncan Boothi   i   g      ,@g      ?(   s*   Inside Security Checks and Safe Exceptionss   Brandon Brayi   i   g      ,@g      ?(   s   Studying at a DistancesC   Panel Discussion, Panel to include Alan Lenton & Francis Glassborowi   i   g      ,@g      ?(   sR   Coding Standards - Given the ANSI C Standard why do I still need a coding Standards   Randy Marquesi   i   g      ,@g      ?(   s   RESTful Pythons   Hamish Lawsoni   i   g      0@g      ?(   s(   Parsing made easier - a radical old ideas   Andrew Koenigi   i   g      0@g      ?(   s   C++ & Multimethodss   Julian Smithi   i   g      0@g      ?(   s   C++ Threadings   Kevlin Henneyi   i   g      0@g      ?(   s   The Organisation Strikes Backs   Alan Griffiths & Sarah Leesi   i   g      0@g      ?(   s   Birds of a Feather meetingRU   Ni   g     1@g       @(   s   Keynote: In the Spirit of Cs   Greg ColvinNi   g      "@g      ?(   s6   The Infinite Filing Cabinet - object storage in Pythons   Jacob Halleni   i   g      %@g      ?(   s>   Introduction to Python and Jython for C++ and Java Programmerss   Alex Martellii   i   g      %@g      ?(   s#   Template metaprogramming in Haskells   Simon Peyton Jonesi   i   g      %@g      ?(   sQ   Plenty People Programming: C++ Programming in a Group, Workshop with a differences   Nico Josuttisi   i   g      %@g      ?(   s4   Design and Implementation of the Boost Graph Librarys   Jeremy Sieki   i   g      %@g      ?(   s0   lunch, short presentations, vendor presentationsRU   Ni   g      (@g       @(   s5   Building GUI Applications with PythonCard and PyCrusts	   Andy Toddi   i   g      ,@g      ?(   s   Integrating Python, C and C++s   Duncan Boothi   i   g      ,@g      ?(   s!   Secrets and Pitfalls of Templatess$   Nicolai Josuttis & David Vandevoordei   i   g      ,@g      ?(   s   Being a MentorsC   Panel Discussion, Panel to include Alan Lenton & Francis Glassborowi   i   g      ,@g      ?(   s   The Embedded C Extensions to Cs   Willem Wakkeri   i   g      ,@g      ?(   s   Lightning Talkss
   Paul Briani   i   g      0@g      ?(   s'   Scripting Java Applications with Jythons   Anthony Edeni   i   g      0@g      ?(   s5   Metaprogramming and the Boost Metaprogramming Librarys   David Abrahamsi   i   g      0@g      ?(   s6   A Common Vendor ABI for C++ -- GCC's why, what and nots!   Nathan Sidwell & Gabriel Dos Reisi   i   g      0@g      ?(   s   The Timing and Cost of Choicess   Hubert Matthewsi   i   g      0@g      ?(   s   Birds of a Feather meetingRU   Ni   g     1@g       @(   s.   Keynote: The Cost of C &amp; C++ Compatibilitys   Andy KoenigNi   g      "@g      ?(   s4   Prying Eyes: Generic Observer Implementations in C++s   Andrei Alexandrescui   i   g      %@g      ?(   s.   The Roadmap to Generative Programming With C++s   Ulrich Eiseneckeri   i   g      %@g      ?(   s=   Design Patterns in C++ and C# for the Common Language Runtimes   Brandon Brayi   i   g      %@g      ?(   s@   Extreme Hour (XH): (workshop) - Jutta Eckstein and Nico Josuttiss   Jutta Ecsteini   i   g      %@g      ?(   s.   The Lambda Library : Unnamed Functions for C++s   Jaako Jarvii   i   g      %@g      ?(   s0   lunch, short presentations, vendor presentationsRU   Ni   g      (@g       @(   s   Reflective Metaprogrammings   Daveed Vandevoordei   i   g      ,@g      ?(   s7   Advanced Template Issues and Solutions (double session)s   Herb Sutteri   i   g      ,@i   (   s/   Concurrent Programming in Java (double session)s   Angelika Langeri   i   g      ,@i   (   s)   What can MISRA-C (2nd Edition) do for us?s   Chris Hillsi   i   g      ,@g      ?(   s(   C++ Metaprogramming Concepts and Resultss   Walter E Browni   i   g      ,@g      ?(   s3   Binding C++ to Python with the Boost Python Librarys   David Abrahamsi   i   g      0@g      ?(   sH   Using Aspect Oriented Programming for Enterprise Application Integrations   Arno Schmidmeieri   i   g      0@g      ?(   s   Defective C++s   Marc Paternoi   i   g      0@g      ?(   s.   Speakers' Banquet & Birds of a Feather meetingRU   Ni   g     1@g       @(   s=   Keynote: The Internet, Software and Computers - A Report Cards   Alan LentonNi   g      "@g      ?(   sE   Multi-Platform Software Development; Lessons from the Boost librariess   Beman Dawesi   i   g      %@g      ?(   s   The Stability of the C++ ABIs   Steve Clamagei   i   g      %@g      ?(   sJ   Generic Build Support - A Pragmatic Approach to the Software Build Processs   Randy Marquesi   i   g      %@g      ?(   s0   How to Handle Project Managers: a survival guides	   Barb Byroi   i   g      %@g      ?(   s   lunch, ACCU AGMRU   Ni   g      (@g       @(   sE   Sauce: An OO recursive descent parser; its design and implementation.s
   Jon Jaggeri   i   g      ,@g      ?(   sK   GNIRTS ESAC REWOL -  Bringing the UNIX filters to the C++ iostream library.s   JC van Winkeli   i   g      ,@g      ?(   s    Pattern Writing: Live and Directs   Frank Buschmann & Kevlin Henneyi   i   g      ,@g      @(   s5   The Future of Programming Languages - A Goldfish Bowls   Francis Glassborow and friendsi   i   g      ,@g      ?(   sS   Honey, I Shrunk the Threads: Compile-time checked multithreaded transactions in C++s   Andrei Alexandrescui   i   g      0@g      ?(   s#   Fun and Functionality with Functorss   Lois Goldthwaitei   i   g      0@g      ?(   s   Agile Enough?s   Alan Griffithsi   i   g      0@g      ?(   s+   Conference Closure: A brief plenary sessionRU   Ni   g     1@g      ?(   R   R   R   R   R   R   R   RB   t   asStringt   opent   write(   t   dt   calt   formatt   out(    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyt   test   s    				t   __main__N(   t   __version__t   __doc__t   reportlab.libR    t   reportlab.lib.validatorst   reportlab.lib.attrmapt   reportlab.graphics.shapesR   R   R   R   R   R   R   R	   t$   reportlab.graphics.charts.textlabelsR
   t   reportlab.graphics.widgetbaseR   t   reportlab.graphicsR   R   R_   RS   (    (    (    sq   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/reportlab/graphics/widgets/eventcal.pyt   <module>   s   

:	v