ó
ÄCõRc           @  s  d  d l  m Z m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l	 Z	 d  d l
 Z d  d l m Z d Z e d k  r³ d  d l Z d  d l Z n  i d d 6d d 6d	 d
 6d d 6Z e j d d
 k rû e	 j d e ƒ n  d Z d Z e e d ƒ r™y d  d l Z Wn e k
 rFe e ƒ ‚ n Xy e j Z Wn e k
 rpe j Z n Xy e j d ƒ Wn e k
 r•n Xn  y d  d l Z e j  Z! Wn e k
 rÑe e ƒ ‚ n Xg  e! j" d ƒ d  D] Z# e$ e# ƒ ^ qæ\ Z% Z& e% d k  p%e% d
 k  o%e& d k  rEe' d e! ƒ e e ƒ ‚ n  d
 e( d „ Z) d „  Z* d f  d „  ƒ  YZ+ e j  d k r‹d „  Z, n e( d „ Z, d  d l- Z- d  d l- m. Z. d  d l/ m0 Z0 m1 Z1 m2 Z2 m3 Z3 m4 Z4 m5 Z5 m6 Z6 d  d l/ m7 Z7 d  d  l/ m8 Z8 d  d! l9 m: Z: d  d" l; m< Z< d  d# l m= Z= m> Z> m? Z? d  d$ l@ mA ZA d  d% lB mC ZC d  d& lD mE ZE mF ZF d  d' lG mH ZH d  d( lI mJ ZJ d  d) l- mK ZK d* ZL d ZM e( d+ „ ZN d, „  ZO d- e6 f d. „  ƒ  YZP d/ e0 f d0 „  ƒ  YZQ d1 e1 f d2 „  ƒ  YZR d3 e2 e jS f d4 „  ƒ  YZT d5 „  ZU d6 „  ZV d7 e7 f d8 „  ƒ  YZW eW ƒ  ZX d9 „  ZY d: „  ZZ d; e j[ f d< „  ƒ  YZ\ d= e3 f d> „  ƒ  YZ] e j^ ƒ  Z_ e j^ ƒ  Z` e j^ ƒ  Za e j^ ƒ  Zb e j^ ƒ  Zc e j^ ƒ  Zd e j^ ƒ  Ze e j^ ƒ  Zf e j^ ƒ  Zg e j^ ƒ  Zh e j^ ƒ  Zi e j^ ƒ  Zj d? „  Zk d@ e jl f dA „  ƒ  YZm i e jn e5 jo 6e jn e5 jp 6e jq e5 jr 6e js e5 jt 6Zu dB e j[ f dC „  ƒ  YZv dD e4 e jw f dE „  ƒ  YZx dF e jw f dG „  ƒ  YZy dH e jz f dI „  ƒ  YZ{ dJ e j| f dK „  ƒ  YZ} ey Z~ e] Z d S(L   iÿÿÿÿ(   t   divisiont   print_functionN(   t   mplDeprecationi   s   Low i   s   Med i   t   Highi   t   Errori   i    s>   The wx and wxagg backends have not been tested with Python 3.xs>   Matplotlib backend_wx and backend_wxagg require wxPython >=2.8sO   Matplotlib backend_wx and backend_wxagg require wxversion, which was not found.t   frozens   2.8t   .i   s"    wxPython version %s was imported.c         C  s7   | t  k r3 | j } t d t | |  | f ƒ n  d  S(   Ns   %s- %s in %s(   t   _DEBUGt	   __class__t   printt   _DEBUG_lvls(   t   stringt   lvlt   ot   cls(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   DEBUG_MSGW   s    	c         C  s(   t  j |  | | ƒ t ƒ  t j ƒ  d S(   sD   Code due to Thomas Heller - published in Python Cookbook (O'Reilley)N(   t	   tracebackt	   print_excR	   t   pdbt   pm(   t   typet   valuet   tb(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   debug_on_error`   s    t   fake_stderrc           B  s   e  Z d  Z d „  Z RS(   s°   Wx does strange things with stderr, as it makes the assumption that there
    is probably no console. This redirects stderr to the console, since we know
    that there is one!c         C  s   t  d | ƒ d  S(   Ns   Stderr: %s
(   R	   (   t   selft   msg(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   writej   s    (   t   __name__t
   __module__t   __doc__R   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR   f   s   s   2.5c         K  s   |  j  | | | � d  S(   N(   t   Bind(   t   actort   eventt   actiont   kw(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   bindt   s    c         C  s0   | d  k	 r | |  | | ƒ n | |  | ƒ d  S(   N(   t   None(   R    R!   R"   t   id(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR$   w   s    (   t   verbose(   t   RendererBaset   GraphicsContextBaset   FigureCanvasBaset   FigureManagerBaset   NavigationToolbar2t   cursorst	   TimerBase(   t   ShowBase(   t   _has_pil(   t   Gcf(   t   Artist(   t   exception_to_strt   is_string_liket   is_writable_file_like(   t   Figure(   t   Path(   t   _process_text_argst   Text(   t   Affine2D(   t   SubplotTool(   t   rcParamsiK   c      
   C  sF   t  j d | d |  d d d t  j t  j Bƒ } | j ƒ  | j ƒ  d S(   sE   
    Signal an error condition -- in a GUI, popup a error dialog
    t   parentt   messaget   captions   Matplotlib backend_wx errort   styleN(   t   wxt   MessageDialogt   OKt   CENTREt	   ShowModalt   DestroyR%   (   R   R=   t   dialog(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   error_msg_wx–   s    

c         C  s+   t  |  ƒ s' d j t t |  ƒ ƒ }  n  |  S(   s6   msg is a return arg from a raise.  Join with new liness   
(   R4   t   joint   mapt   str(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   raise_msg_to_str¢   s    t   TimerWxc           B  sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s  
    Subclass of :class:`backend_bases.TimerBase` that uses WxTimer events.

    Attributes:
    * interval: The time between timer events in milliseconds. Default
        is 1000 ms.
    * single_shot: Boolean flag indicating whether this timer should
        operate as single shot (run once and then stop). Defaults to False.
    * callbacks: Stores list of (func, args) tuples that will be called
        upon timer events. This list can be manipulated directly, or the
        functions add_callback and remove_callback can be used.
    c         O  s]   t  j |  | | Ž | |  _ t j |  j t j ƒ  ƒ |  _ |  j j t j |  j	 |  j ƒ d  S(   N(
   R.   t   __init__R=   RA   t   Timert   NewIdt   _timerR   t	   EVT_TIMERt	   _on_timer(   R   R=   t   argst   kwargs(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   ¶   s    	c         C  s   |  j  j |  j |  j ƒ d  S(   N(   RQ   t   Startt	   _intervalt   _single(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _timer_startÄ   s    c         C  s   |  j  j ƒ  d  S(   N(   RQ   t   Stop(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _timer_stopÇ   s    c         C  s   |  j  ƒ  d  S(   N(   RY   (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _timer_set_intervalÊ   s    c         C  s   |  j  j ƒ  d  S(   N(   RQ   t   start(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _timer_set_single_shotÍ   s    c         G  s   t  j |  ƒ d  S(   N(   R.   RS   (   R   RT   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRS   Ð   s    (	   R   R   R   RN   RY   R[   R\   R^   RS   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRM   ©   s   					t
   RendererWxc           B  sÅ  e  Z d  Z i e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6e j d	 6e j d
 6e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6Z i e j d 6e j d 6e j	 d 6Z
 i e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6Z d „  Z d „  Z d „  Z d „  Z d  „  Z d! „  Z e d" „  ƒ Z d* d# „ Z d$ „  Z e d* d% „ Z d& „  Z d' „  Z d( „  Z  d) „  Z! RS(+   sÎ   
    The renderer handles all the drawing primitives using a graphics
    context instance that controls the colors/styles. It acts as the
    'renderer' instance used by many classes in the hierarchy.
    id   iÈ   i,  i�  iô  iX  i¼  i   i„  t
   ultralightt   lightt   normalt   mediumt   semiboldt   boldt   heavyt	   ultraboldt   blackt   italict   obliquet   Sanst   Romant   Scriptt
   Decorativet   Modernt   Couriert   courierc         C  s�   t  j |  ƒ t d d |  ƒ t j d k  r; t d ƒ ‚ n  | j ƒ  |  _ | j ƒ  |  _	 | |  _
 i  |  _ | |  _ d |  _ d S(   s;   
        Initialise a wxWindows renderer instance.
        s
   __init__()i   s   2.8si   matplotlib no longer supports wxPython < 2.8 for the Wx backend.
You may, however, use the WxAgg backend.N(   R(   RN   R   RA   t   VERSION_STRINGt   RuntimeErrort   GetWidtht   widtht	   GetHeightt   heightt   bitmapt   fontdt   dpiR%   t   gc(   R   Rx   Rz   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN     s    			c         C  s   t  S(   N(   t   True(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   flipy  s    c         C  s   t  S(   N(   R|   (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   offset_text_height  s    c         C  s•   | r |  j  | ƒ } n  |  j d k r6 |  j ƒ  } n	 |  j } | j } |  j | | ƒ } | j | t j ƒ | j	 | ƒ \ } } }	 }
 | | |	 f S(   sl   
        get the width and height in display coords of the string s
        with FontPropertry prop
        N(
   t
   strip_mathR{   R%   t   new_gct   gfx_ctxt   get_wx_fontt   SetFontRA   t   BLACKt   GetFullTextExtent(   R   t   st   propt   ismathR{   R�   t   fontt   wt   ht   descentt   leading(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   get_text_width_height_descent  s     		c         C  s   |  j  |  j f S(   s4   return the canvas width and height in display coords(   Ru   Rw   (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   get_canvas_width_height/  s    c         C  sš   | j  ƒ  } | d  k	 r$ | j } n  | j } | j | k r– | | _ | d  k r^ | j ƒ  q– | j | d |  j | d | d | d | d ƒ n  d  S(   Ni    i   i   i   (   t   get_clip_rectangleR%   t   boundsR�   t   _lastcliprectt	   ResetClipt   ClipRw   (   R   R{   t
   new_boundsR�   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   handle_clip_rectangle3  s    		#c         C  sÈ   |  j  ƒ  } xµ | j | ƒ D]¤ \ } } | t j k rG | j | Œ  q | t j k rf | j | Œ  q | t j k r… | j | Œ  q | t j	 k r¤ | j
 | Œ  q | t j k r | j ƒ  q q W| S(   N(   t
   CreatePatht   iter_segmentsR7   t   MOVETOt   MoveToPointt   LINETOt   AddLineToPointt   CURVE3t   AddQuadCurveToPointt   CURVE4t   AddCurveToPointt	   CLOSEPOLYt   CloseSubpath(   R�   t   patht	   transformt   wxpatht   pointst   code(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   convert_path@  s    c         C  s³   | j  ƒ  |  j | ƒ | j } | t ƒ  j d d ƒ j d |  j ƒ } |  j | | | ƒ } | d  k	 r˜ | j	 t
 j | j | ƒ ƒ ƒ | j | ƒ n | j | ƒ | j ƒ  d  S(   Ng      ð?g      ð¿g        (   t   selectR–   R�   R:   t   scalet	   translateRw   R¨   R%   t   SetBrushRA   t   Brusht   get_wxcolourt   DrawPatht
   StrokePatht   unselect(   R   R{   R£   R¤   t   rgbFaceR�   R¥   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   draw_pathP  s    
	(c         C  sÿ   | j  ƒ  } | d  k r0 | j \ } } } }	 n d } d } |  j } |  j }	 | j ƒ  \ }
 } } t j | t j ƒ } |
 | d f | _	 t
 j | |
 | ƒ } |  j ƒ  } | j ƒ  | j j | t | ƒ t |  j | ƒ t | ƒ t |	 ƒ ƒ | j ƒ  d  S(   Ni    i   (   i    (   R�   R%   R‘   Ru   Rw   t   as_rgba_strt   npt
   fromstringt   uint8t   shapeRA   t   BitmapFromBufferRGBAt   get_gcR©   R�   t
   DrawBitmapt   intR±   (   R   R{   t   xt   yt   imt   bboxt   lt   bRŠ   R‹   t   rowst   colst	   image_strt   image_arrayRx   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt
   draw_image]  s    		
<c	         C  s>  | r |  j  | ƒ } n  t d d |  ƒ | j ƒ  |  j | ƒ | j }	 |  j | | ƒ }
 | j | j ƒ  ƒ } |	 j |
 | ƒ |  j	 | | | ƒ \ } } } t
 | ƒ } t
 | | ƒ } | d k rÛ |	 j | | | ƒ nU | d t j } | t j | ƒ } | t j | ƒ } |	 j | | | | | | ƒ | j ƒ  d  S(   Ns   draw_text()i   g        g     €f@(   R   R   R©   R–   R�   R‚   R®   t   get_rgbRƒ   RŽ   R¼   t   DrawTextt   matht   pit   sint   cost   DrawRotatedTextR±   (   R   R{   R½   R¾   R†   R‡   t   angleRˆ   t   mtextR�   R‰   t   colorRŠ   R‹   t   dt   radst   xot   yo(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   draw_texto  s&     
	c         C  sF   t  d d |  ƒ t |  j |  ƒ |  _ |  j j ƒ  |  j j ƒ  |  j S(   sY   
        Return an instance of a GraphicsContextWx, and sets the current gc copy
        s   new_gc()i   (   R   t   GraphicsContextWxRx   R{   R©   R±   (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR€   ˆ  s
    c         C  s"   |  j  d k s t d ƒ ‚ |  j  S(   s.   
        Fetch the locally cached gc.
        s   gc must be definedN(   R{   R%   t   AssertionError(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRº   ’  s    c   
      C  sÖ   t  d d |  ƒ t | ƒ } | } | j ƒ  } |  j j | ƒ } | d k	 rP | S|  j j | t j ƒ } d } |  j	 | j
 ƒ  ƒ }	 t j t |	 d ƒ | |  j | j ƒ  |  j | j ƒ  t | ƒ } | |  j | <| S(   s`   
        Return a wx font.  Cache instances in a font dictionary for
        efficiency
        s   get_wx_font()i   t    g      à?N(   R   t   hasht   get_nameRy   t   getR%   t	   fontnamesRA   t   ROMANt   points_to_pixelst   get_size_in_pointst   FontR¼   t
   fontanglest	   get_stylet   fontweightst
   get_weightt   False(
   R   R†   R‡   t   keyt   fontpropt   fontnameR‰   t
   wxFontnamet
   wxFacenamet   size(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR‚   ›  s$    	c         C  s   | t  d |  j d S(   sj   
        convert point measures to pixes using dpi and the pixels per
        inch of the display
        g      R@(   t   PIXELS_PER_INCHRz   (   R   R¦   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRß   À  s    N("   R   R   R   RA   t   LIGHTt   NORMALt   BOLDRä   t   ITALICt   SLANTRâ   t   SWISSRÞ   t   SCRIPTt
   DECORATIVEt   MODERNRÝ   RN   R}   R~   RŽ   R�   R–   t   staticmethodR¨   R%   R³   RÇ   Ræ   RÖ   R€   Rº   R‚   Rß   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR_   Ô   sZ   























								
			%R×   c           B  sí   e  Z d  Z i e j d 6e j d 6e j d 6Z i e j d 6e j	 d 6e j
 d 6Z i e j d 6e j d 6e j d 6e j d	 6Z e j ƒ  Z d
 „  Z d „  Z d „  Z d d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s;  
    The graphics context provides the color, line styles, etc...

    This class stores a reference to a wxMemoryDC, and a
    wxGraphicsContext that draws to it.  Creating a wxGraphicsContext
    seems to be fairly heavy, so these objects are cached based on the
    bitmap object that is passed in.

    The base GraphicsContext stores colors as a RGB tuple on the unit
    interval, eg, (0.5, 0.0, 1.0).  wxPython uses an int interval, but
    since wxPython colour management is rather simple, I have not chosen
    to implement a separate colour manager class.
    t   buttt
   projectingt   roundt   bevelt   mitert   solidt   dashedt   dashdott   dottedc         C  sí   t  j |  ƒ t d d |  ƒ |  j j | d ƒ \ } } | d  k rŽ t j ƒ  } | j | ƒ t j	 j
 | ƒ } d  | _ | | f |  j | <n  | |  _ | |  _ | |  _ t j d d t j ƒ |  _ | j |  j ƒ t j |  _ | |  _ d  S(   Ns
   __init__()i   R„   (   NN(   R)   RN   R   t   _cacheRÜ   R%   RA   t   MemoryDCt   SelectObjectt   GraphicsContextt   CreateR’   Rx   t   dcR�   t   Pent   SOLIDt   _pent   SetPent   _stylet   renderer(   R   Rx   R  R  R�   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   ä  s     				c         C  s2   t  j d k r. |  j j |  j ƒ t |  _ n  d S(   sC   
        Select the current bitmap into this wxDC instance
        t   win32N(   t   syst   platformR  R  Rx   R|   t
   IsSelected(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR©   ù  s    c         C  s2   t  j d k r. |  j j t j ƒ t |  _ n  d S(   s?   
        Select a Null bitmasp into this wxDC instance
        R  N(   R  R  R  R  RA   t
   NullBitmapRæ   R  (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR±     s    c         C  sm   t  d d |  ƒ |  j ƒ  t j |  | | ƒ |  j j |  j |  j ƒ  ƒ ƒ |  j j	 |  j ƒ |  j
 ƒ  d S(   sÎ   
        Set the foreground color.  fg can be a matlab format string, a
        html hex color string, an rgb unit tuple, or a float between 0
        and 1.  In the latter case, grayscale is used.
        s   set_foreground()i   N(   R   R©   R)   t   set_foregroundR	  t	   SetColourR®   RÈ   R�   R
  R±   (   R   t   fgt   isRGBA(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR  
  s    
c         C  sj   t  d d |  ƒ |  j ƒ  t j |  | ƒ |  j j |  j |  j ƒ  ƒ ƒ |  j j	 |  j ƒ |  j
 ƒ  d S(   sÎ   
        Set the foreground color.  fg can be a matlab format string, a
        html hex color string, an rgb unit tuple, or a float between 0
        and 1.  In the latter case, grayscale is used.
        s   set_graylevel()i   N(   R   R©   R)   t   set_graylevelR	  R  R®   RÈ   R�   R
  R±   (   R   t   frac(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR    s    
c         C  s¬   t  d d |  ƒ |  j ƒ  | d k r; | d k  r; d } n  t j |  | ƒ t |  j j |  j ƒ ƒ } | d k r{ d } n  |  j j	 | ƒ |  j
 j |  j ƒ |  j ƒ  d S(   s%   
        Set the line width.
        s   set_linewidth()i   i    N(   R   R©   R)   t   set_linewidthR¼   R  Rß   t
   _linewidthR	  t   SetWidthR�   R
  R±   (   R   RŠ   t   lw(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR  *  s    
 	 	c         C  se   t  d d |  ƒ |  j ƒ  t j |  | ƒ |  j j t j |  j ƒ |  j	 j
 |  j ƒ |  j ƒ  d S(   sQ   
        Set the capstyle as a string in ('butt', 'round', 'projecting')
        s   set_capstyle()i   N(   R   R©   R)   t   set_capstyleR	  t   SetCapR×   t   _capdt	   _capstyleR�   R
  R±   (   R   t   cs(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR  8  s    
c         C  se   t  d d |  ƒ |  j ƒ  t j |  | ƒ |  j j t j |  j ƒ |  j	 j
 |  j ƒ |  j ƒ  d S(   sM   
        Set the join style to be one of ('miter', 'round', 'bevel')
        s   set_joinstyle()i   N(   R   R©   R)   t   set_joinstyleR	  t   SetJoinR×   t   _joindt
   _joinstyleR�   R
  R±   (   R   t   js(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR!  C  s    
c         C  s±   t  d d |  ƒ |  j ƒ  t j |  | ƒ y t j | |  _ Wn t k
 r] t j	 |  _ n Xt j
 d k r} |  j d ƒ n  |  j j |  j ƒ |  j j |  j ƒ |  j ƒ  d S(   s1   
        Set the line style to be one of
        s   set_linestyle()i   t	   __WXMSW__N(   R   R©   R)   t   set_linestyleR×   t	   _dashd_wxR  t   KeyErrorRA   t	   LONG_DASHt   PlatformR  R	  t   SetStyleR�   R
  R±   (   R   t   ls(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR'  N  s    
c      
   C  sõ   t  d d |  ƒ t | ƒ d k r} | \ } } } | d 9} | d 9} | d 9} t j d t | ƒ d t | ƒ d t | ƒ ƒ S| \ } } } } | d 9} | d 9} | d 9} | d 9} t j d t | ƒ d t | ƒ d t | ƒ d t | ƒ ƒ Sd	 S(
   s"   return a wx.Colour from RGB formats   get_wx_color()i   i   iÿ   t   redt   greent   bluet   alphaN(   R   t   lenRA   t   ColourR¼   (   R   RÑ   t   rt   gRÂ   t   a(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR®   b  s    


.



N(   R   R   R   RA   t   CAP_BUTTt   CAP_PROJECTINGt	   CAP_ROUNDR  t
   JOIN_BEVELt
   JOIN_MITERt
   JOIN_ROUNDR#  R  t
   SHORT_DASHt   DOT_DASHt   DOTR(  t   weakreft   WeakKeyDictionaryR  RN   R©   R±   R%   R  R  R  R  R!  R'  R®   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR×   È  s,   



									t   FigureCanvasWxc           B  s`  e  Z d  Z i< d e j 6d e j 6d e j 6d e j 6d e j 6d e j	 6d e j
 6d e j 6d	 e j 6d
 e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j 6d e j  6d e j! 6d e j" 6d e j# 6d e j$ 6d  e j% 6d! e j& 6d" e j' 6d# e j( 6d$ e j) 6d% e j* 6d& e j+ 6d' e j, 6d( e j- 6d) e j. 6d* e j/ 6d+ e j0 6d, e j1 6d- e j2 6d e j3 6d e j4 6d e j5 6d e j6 6d e j7 6d e j8 6d e j9 6d e j: 6d e j; 6d e j< 6d e j= 6d e j> 6d e j? 6Z@ d. „  ZA d/ „  ZB de d0 „ ZD d1 „  ZE d2 „  ZF de d3 „ ZG d4 „  ZH d5 „  ZI d6 d7 „ ZJ de d8 „ ZK d9 „  ZL de d: „ ZM eN jO jP ƒ  ZO d; eO d< <d= eO d> <d= eO d? <d@ eO dA <dB eO dC <dD eO dE <dD eO dF <dG eO dH <dI „  ZQ dJ „  ZR eS sndK „  ZT eT ZU n  dL „  ZV dM „  ZW eS s˜dN „  ZX eX ZY n  dO „  ZZ dP „  Z[ dQ „  Z\ dR „  Z] dS „  Z^ dT „  Z_ dU „  Z` dV „  Za dW „  Zb dX „  Zc dY „  Zd dZ „  Ze d[ „  Zf d\ „  Zg d] „  Zh d^ „  Zi d_ „  Zj d` „  Zk da „  Zl db „  Zm dc „  Zn dd „  Zo RS(f   sa  
    The FigureCanvas contains the figure and does event handling.

    In the wxPython backend, it is derived from wxPanel, and (usually) lives
    inside a frame instantiated by a FigureManagerWx. The parent window probably
    implements a wx.Sizer to control the displayed control size - but we give a
    hint as to our preferred minimum size.
    t   controlt   shiftt   altt   leftt   upt   rightt   downt   escapet   f1t   f2t   f3t   f4t   f5t   f6t   f7t   f8t   f9t   f10t   f11t   f12t   scroll_lockt   breakt	   backspacet   entert   insertt   deletet   homet   endt   pageupt   pagedownt   0t   1t   2t   3t   4t   5t   6t   7t   8t   9t   +t   -t   *t   /t   decc   	      C  s  t  j |  | ƒ | j j \ } } } } t t j | ƒ ƒ } t t j | ƒ ƒ } t j j |  | | d t j	 | | ƒ ƒd „  } y t
 |  d ƒ Wn& t k
 r¼ t
 |  d | ƒ |  _ n Xt |  d ƒ sç t
 |  d d „  ƒ |  _ n  t j | | ƒ |  _ t d | | f d	 |  ƒ t |  _ t |  t j |  j ƒ t |  t j |  j ƒ t |  t j |  j ƒ t |  t j |  j ƒ t |  t j |  j ƒ t |  t j |  j  ƒ t |  t j! |  j" ƒ t |  t j# |  j$ ƒ t |  t j% |  j& ƒ t |  t j' |  j( ƒ t |  t j) |  j* ƒ t |  t j+ |  j, ƒ t |  t j- |  j. ƒ t |  t j/ |  j0 ƒ t |  t j1 |  j2 ƒ t |  t j3 |  j4 ƒ t |  t j5 |  j6 ƒ t |  t j7 |  j8 ƒ t |  t j9 |  j: ƒ |  j; t j< ƒ i  |  _= d |  _? d |  _@ d
 |  _A d |  _B d S(   sØ   
        Initialise a FigureWx instance.

        - Initialise the FigureCanvasBase and wxPanel parents.
        - Set event handlers for:
          EVT_SIZE  (Resize event)
          EVT_PAINT (Paint event)
        Rì   c          _  s   t  j d t ƒ d  S(   Ns�   could not find a setinitialsize function for backend_wx; please report your wxpython version=%s to the matplotlib developers list(   t   warningst   warnt   backend_version(   RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt
   do_nothingÐ  s    t   SetInitialSizet   SetBestFittingSizet   IsShownOnScreent	   IsVisiblec          W  s   t  S(   N(   R|   (   RT   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   <lambda>Ü  s    s   __init__() - bitmap w:%d h:%di   g      @g      à?N(C   R*   RN   RÀ   R‘   R¼   RÊ   t   ceilRA   t   Panelt   Sizet   getattrt   AttributeErrorRt  t   hasattrRv  t   EmptyBitmapRx   R   Ræ   t   _isDrawnR$   t   EVT_SIZEt   _onSizet	   EVT_PAINTt   _onPaintt   EVT_ERASE_BACKGROUNDt   _onEraseBackgroundt   EVT_KEY_DOWNt
   _onKeyDownt
   EVT_KEY_UPt   _onKeyUpt   EVT_RIGHT_DOWNt   _onRightButtonDownt   EVT_RIGHT_DCLICKt   _onRightButtonDClickt   EVT_RIGHT_UPt   _onRightButtonUpt   EVT_MOUSEWHEELt   _onMouseWheelt   EVT_LEFT_DOWNt   _onLeftButtonDownt   EVT_LEFT_DCLICKt   _onLeftButtonDClickt   EVT_LEFT_UPt   _onLeftButtonUpt
   EVT_MOTIONt	   _onMotiont   EVT_LEAVE_WINDOWt   _onLeavet   EVT_ENTER_WINDOWt   _onEntert   EVT_IDLEt   _onIdlet   EVT_MIDDLE_DOWNt   _onMiddleButtonDownt   EVT_MIDDLE_DCLICKt   _onMiddleButtonDClickt   EVT_MIDDLE_UPt   _onMiddleButtonUpt   SetBackgroundStylet   BG_STYLE_CUSTOMt   macrosR%   t   _printerDatat   _printerPageDatat   printer_widtht   printer_margin(	   R   R=   R&   t   figureRÁ   RÂ   RŠ   R‹   Rs  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   ½  sP    
(						c         O  s   t  j j |  | | Ž d  S(   N(   RA   Rz  RF   (   R   RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRF     s    c         C  st   t  j ƒ  } | j |  j ƒ t  j j ƒ  sp t  j j ƒ  } | rp t  j j | ƒ t  j j ƒ  t  j j	 ƒ  qp n  d S(   s)   copy bitmap of canvas to system clipboardN(
   RA   t   BitmapDataObjectt	   SetBitmapRx   t   TheClipboardt   IsOpenedt   Opent   SetDatat   Closet   Flush(   R   R!   t   bmp_objt   open_success(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   Copy_to_Clipboard  s    c         C  sW   t  d d |  ƒ t |  _ t |  d ƒ r; |  j j t ƒ n t j t |  j	 ƒ |  _ d S(   s8   
        Delay rendering until the GUI is idle.
        s   draw_idle()i   t
   _idletimerN(
   R   Ræ   R€  R~  Rº  t   Restartt
   IDLE_DELAYRA   t
   FutureCallt   _onDrawIdle(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   draw_idle  s
    	c         O  sQ   t  j ƒ  j ƒ  r+ |  j j t | | Ž n" |  ` |  j sM |  j | | Ž  n  d  S(   N(   RA   t   GetAppt   PendingRº  R»  R¼  R€  t   draw(   R   RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¾  &  s
    	c         C  s[   t  d d |  ƒ t |  j |  j j ƒ |  _ |  j j |  j ƒ t |  _ |  j	 d | ƒ d S(   sŒ   
        Render the figure using RendererWx instance renderer, or using a
        previously defined renderer if none is specified.
        s   draw()i   t   drawDCN(
   R   R_   Rx   R®  Rz   R  RÂ  R|   R€  t   gui_repaint(   R   RÃ  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRÂ  0  s
    	c         O  s   t  |  | | Ž S(   sÖ  
        Creates a new backend-specific subclass of :class:`backend_bases.Timer`.
        This is useful for getting periodic events through the backend's native
        event loop. Implemented only for backends with GUIs.

        optional arguments:

        *interval*
          Timer interval in milliseconds
        *callbacks*
          Sequence of (func, args, kwargs) where func(*args, **kwargs) will
          be executed by the timer every *interval*.
        (   RM   (   R   RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   new_timer;  s    c         C  s   t  j ƒ  d  S(   N(   RA   t   Yield(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   flush_eventsK  s    i    c         C  s«   t  |  d ƒ r t d ƒ ‚ n  t j ƒ  } t j |  d | ƒ} | d k r� | j | d d t ƒt |  t j |  j	 d | ƒn  t j
 ƒ  |  _ |  j j ƒ  | j ƒ  d S(   sb  
        Start an event loop.  This is used to start a blocking event
        loop so that interactive functions, such as ginput and
        waitforbuttonpress, can wait for events.  This should not be
        confused with the main GUI event loop, which is always running
        and has nothing to do with this.

        Call signature::

        start_event_loop(self,timeout=0)

        This call blocks until a callback function triggers
        stop_event_loop() or *timeout* is reached.  If *timeout* is
        <=0, never timeout.

        Raises RuntimeError if event loop is already running.
        t   _event_loops   Event loop already runningR&   i    iè  t   oneShotN(   R~  Rs   RA   RP   RO   RV   R|   R$   RR   t   stop_event_loopt	   EventLoopRÈ  t   RunRZ   (   R   t   timeoutR&   t   timer(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   start_event_loopN  s    c         C  s;   t  |  d ƒ r7 |  j j ƒ  r. |  j j ƒ  n  |  ` n  d S(   sý   
        Stop an event loop.  This is used to stop a blocking event
        loop so that interactive functions, such as ginput and
        waitforbuttonpress, can wait for events.

        Call signature::

        stop_event_loop_default(self)
        RÈ  N(   R~  RÈ  t	   IsRunningt   Exit(   R   R!   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRÊ  m  s    
c         C  së   |  j  ƒ  } |  j ƒ  } | j ƒ  } | j ƒ  g  } g  } d } xŒ t | ƒ D]~ \ } \ } }	 d j g  |	 D] }
 d |
 ^ ql ƒ } | j |	 d ƒ d | | | f } | |	 k r¾ | } n  | j | ƒ qM Wd j | ƒ } | | | f S(   s2   return the wildcard string for the filesave dialogi    t   ;s   *.%ss
   %s (%s)|%st   |(   t   get_default_filetypet   get_supported_filetypes_groupedt   itemst   sortt	   enumerateRI   t   append(   R   t   default_filetypet	   filetypest   sorted_filetypest	   wildcardst
   extensionst   filter_indext   it   namet   extst   extt   ext_listt   wildcard(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _get_imagesave_wildcards}  s     
&	c         C  sk   t  d d |  ƒ |  j ƒ  rg | d k r: t j |  ƒ } n  | j ƒ  | j |  j d d ƒ | j ƒ  n  d S(   s¿   
        Performs update of the displayed image on the GUI canvas, using the
        supplied device context.  If drawDC is None, a ClientDC will be used to
        redraw the image.
        s   gui_repaint()i   i    N(	   R   Rv  R%   RA   t   ClientDCt   BeginDrawingR»   Rx   t
   EndDrawing(   R   RÃ  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRÄ  �  s    
s   Windows bitmapt   bmpt   JPEGt   jpegt   jpgt   PCXt   pcxs   Portable Network Graphicst   pngs   Tagged Image Format Filet   tift   tiffs   X pixmapt   xpmc         O  s0   t  j |  | | | Ž |  j r, |  j ƒ  n  d  S(   N(   R*   t   print_figureR€  RÂ  (   R   t   filenameRT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRô  ¬  s    	c         O  s   |  j  | t j | | Ž S(   N(   t   _print_imageRA   t   BITMAP_TYPE_BMP(   R   Rõ  RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   print_bmp¶  s    c         O  s   |  j  | t j | | Ž S(   N(   Rö  RA   t   BITMAP_TYPE_JPEG(   R   Rõ  RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt
   print_jpegº  s    c         O  s   |  j  | t j | | Ž S(   N(   Rö  RA   t   BITMAP_TYPE_PCX(   R   Rõ  RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   print_pcx¾  s    c         O  s   |  j  | t j | | Ž S(   N(   Rö  RA   t   BITMAP_TYPE_PNG(   R   Rõ  RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   print_pngÁ  s    c         O  s   |  j  | t j | | Ž S(   N(   Rö  RA   t   BITMAP_TYPE_TIF(   R   Rõ  RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt
   print_tiffÅ  s    c         O  s   |  j  | t j | | Ž S(   N(   Rö  RA   t   BITMAP_TYPE_XPM(   R   Rõ  RT   RU   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt	   print_xpmÉ  s    c         O  sÆ  |  j  } |  j j j \ } } } }	 t t j | ƒ ƒ } t t j |	 ƒ ƒ }	 t j | |	 ƒ |  _  t	 |  j  |  j j
 ƒ }
 |
 j ƒ  } |  j j |
 ƒ |  j  } | t j k rð | j d t d ƒ } |  j  j ƒ  } | j t j t | ƒ ƒ n  t | ƒ r4| j | | ƒ s™t d d |  ƒ t d | ƒ ‚ q™ne t | ƒ r™t | t j ƒ sa| j ƒ  } n  | j | | ƒ s™t d d |  ƒ t d | ƒ ‚ q™n  | |  _  |  j r¸|  j ƒ  n  |  j ƒ  d  S(   Nt   qualitys   savefig.jpeg_qualitys   print_figure() file save errori   s   Could not save figure to %s
(   Rx   R®  RÀ   R‘   R¼   RÊ   Ry  RA   R  R_   Rz   R€   RÂ  Rù  RÜ   R<   t   ConvertToImaget	   SetOptiont   IMAGE_OPTION_QUALITYRK   R4   t   SaveFileR   Rs   R5   t
   isinstancet   Imaget
   SaveStreamR€  t   Refresh(   R   Rõ  t   filetypeRT   RU   t
   origBitmapRÁ   RÂ   Ru   Rw   R  R{   t   imaget   jpeg_quality(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRö  Ì  s6    				c         C  sY   t  d d |  ƒ t j |  ƒ } |  j s; |  j d | ƒ n |  j d | ƒ | j ƒ  d S(   s5   
        Called when wxPaintEvt is generated
        s
   _onPaint()i   RÃ  N(   R   RA   t   PaintDCR€  RÂ  RÄ  t   Skip(   R   t   evtRÃ  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR„  ý  s    	c         C  s   d S(   s�   
        Called when window is redrawn; since we are blitting the entire
        image, we can leave this blank to suppress flicker.
        N(    (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR†  
  s    c         C  sÈ   t  d d |  ƒ |  j ƒ  \ |  _ |  _ t j |  j |  j ƒ |  _ t |  _ |  j d k sj |  j d k rn d S|  j	 j
 } |  j | } |  j | } |  j	 j | | ƒ |  j d t ƒ t j |  ƒ d S(   sÍ   
        Called when wxEventSize is generated.

        In this application we attempt to resize to fit the window, so it
        is better to take the performance hit and redraw the whole window.
        s	   _onSize()i   i   Nt   eraseBackground(   R   t   GetClientSizet   _widtht   _heightRA   R  Rx   Ræ   R€  R®  Rz   t   set_size_inchesR  R*   t   resize_event(   R   R  t   dpivalt   wincht   hinch(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR‚    s    	 c         C  sµ   | j  } | |  j k r( |  j | } n< | d k  r^ t | ƒ } | j ƒ  sd | j ƒ  } qd n d  } xJ | j d g | j d g f D]* \ } } | ƒ  rƒ d j | | ƒ } qƒ qƒ W| S(   Ni   RE  t   ctrls   {0}+{1}(	   t	   m_keyCodet   keyvaldt   chrt	   ShiftDownt   lowerR%   t   AltDownt   ControlDownt   format(   R   R  t   keyvalRç   t   metht   prefix(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _get_key,  s    		c         C  s!   | j  ƒ  t j |  d | ƒd S(   s   a GUI idle eventt   guiEventN(   R  R*   t
   idle_event(   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR   B  s    
c         C  s3   |  j  | ƒ } | j ƒ  t j |  | d | ƒd S(   s   Capture key press.R)  N(   R(  R  R*   t   key_press_event(   R   R  Rç   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRˆ  G  s    
c         C  s3   |  j  | ƒ } | j ƒ  t j |  | d | ƒd S(   s   Release key.R)  N(   R(  R  R*   t   key_release_event(   R   R  Rç   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRŠ  M  s    
c         C  sY   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  t j |  | | d d | ƒd S(   s   Start measuring on an axis.i   R)  N(	   t   GetXR®  RÀ   Rw   t   GetYR  t   CaptureMouseR*   t   button_press_event(   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRŒ  T  s
    

c      	   C  s_   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  t j |  | | d d t	 d | ƒd S(   s   Start measuring on an axis.i   t   dblclickR)  N(
   R-  R®  RÀ   Rw   R.  R  R/  R*   R0  R|   (   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRŽ  \  s
    

c         C  sh   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  rH |  j ƒ  n  t j	 |  | | d d | ƒd S(   s   End measuring on an axis.i   R)  N(
   R-  R®  RÀ   Rw   R.  R  t
   HasCapturet   ReleaseMouseR*   t   button_release_event(   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR�  d  s    
 c         C  sY   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  t j |  | | d d | ƒd S(   s   Start measuring on an axis.i   R)  N(	   R-  R®  RÀ   Rw   R.  R  R/  R*   R0  (   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR”  l  s
    

c      	   C  s_   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  t j |  | | d d t	 d | ƒd S(   s   Start measuring on an axis.i   R1  R)  N(
   R-  R®  RÀ   Rw   R.  R  R/  R*   R0  R|   (   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR–  t  s
    

c         C  sh   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  rH |  j ƒ  n  t j	 |  | | d d | ƒd S(   s   End measuring on an axis.i   R)  N(
   R-  R®  RÀ   Rw   R.  R  R2  R3  R*   R4  (   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR˜  |  s    
 c         C  sY   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  t j |  | | d d | ƒd S(   s   Start measuring on an axis.i   R)  N(	   R-  R®  RÀ   Rw   R.  R  R/  R*   R0  (   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¢  †  s
    

c      	   C  s_   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  t j |  | | d d t	 d | ƒd S(   s   Start measuring on an axis.i   R1  R)  N(
   R-  R®  RÀ   Rw   R.  R  R/  R*   R0  R|   (   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¤  Ž  s
    

c         C  sh   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  |  j ƒ  rH |  j ƒ  n  t j	 |  | | d d | ƒd S(   s   End measuring on an axis.i   R)  N(
   R-  R®  RÀ   Rw   R.  R  R2  R3  R*   R4  (   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¦  –  s    
 c         C  sÓ   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  } | j ƒ  } | j ƒ  } | t | ƒ | } | j	 ƒ  t
 j d k r³ t |  d ƒ s‘ t |  _ q³ |  j r§ t |  _ d St |  _ n  t j |  | | | d | ƒd S(   s3   Translate mouse wheel events into matplotlib eventst	   __WXMAC__t   _skipwheeleventNR)  (   R-  R®  RÀ   Rw   R.  t   GetWheelDeltat   GetWheelRotationt   GetLinesPerActiont   floatR  RA   R+  R~  R|   R6  Ræ   R*   t   scroll_event(   R   R  R½   R¾   t   deltat   rotationt   ratet   step(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR’  Ÿ  s    
		c         C  sL   | j  ƒ  } |  j j j | j ƒ  } | j ƒ  t j |  | | d | ƒd S(   s   Start measuring on an axis.R)  N(   R-  R®  RÀ   Rw   R.  R  R*   t   motion_notify_event(   R   R  R½   R¾   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRš  ¾  s    
c         C  s!   | j  ƒ  t j |  d | ƒd S(   s   Mouse has left the window.R)  N(   R  R*   t   leave_notify_event(   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRœ  Æ  s    
c         C  s   t  j |  d | ƒd S(   s   Mouse has entered the window.R)  N(   R*   t   enter_notify_event(   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRž  Ì  s    N(p   R   R   R   RA   t   WXK_CONTROLt	   WXK_SHIFTt   WXK_ALTt   WXK_LEFTt   WXK_UPt	   WXK_RIGHTt   WXK_DOWNt
   WXK_ESCAPEt   WXK_F1t   WXK_F2t   WXK_F3t   WXK_F4t   WXK_F5t   WXK_F6t   WXK_F7t   WXK_F8t   WXK_F9t   WXK_F10t   WXK_F11t   WXK_F12t
   WXK_SCROLLt	   WXK_PAUSEt   WXK_BACKt
   WXK_RETURNt
   WXK_INSERTt
   WXK_DELETEt   WXK_HOMEt   WXK_ENDt	   WXK_PRIORt   WXK_NEXTt
   WXK_PAGEUPt   WXK_PAGEDOWNt   WXK_NUMPAD0t   WXK_NUMPAD1t   WXK_NUMPAD2t   WXK_NUMPAD3t   WXK_NUMPAD4t   WXK_NUMPAD5t   WXK_NUMPAD6t   WXK_NUMPAD7t   WXK_NUMPAD8t   WXK_NUMPAD9t   WXK_NUMPAD_ADDt   WXK_NUMPAD_SUBTRACTt   WXK_NUMPAD_MULTIPLYt   WXK_NUMPAD_DIVIDEt   WXK_NUMPAD_DECIMALt   WXK_NUMPAD_ENTERt   WXK_NUMPAD_UPt   WXK_NUMPAD_RIGHTt   WXK_NUMPAD_DOWNt   WXK_NUMPAD_LEFTt   WXK_NUMPAD_PRIORt   WXK_NUMPAD_NEXTt   WXK_NUMPAD_PAGEUPt   WXK_NUMPAD_PAGEDOWNt   WXK_NUMPAD_HOMEt   WXK_NUMPAD_ENDt   WXK_NUMPAD_INSERTt   WXK_NUMPAD_DELETER  RN   RF   R%   R¹  R¿  R¾  RÂ  RÅ  RÇ  RÏ  RÊ  Ræ  RÄ  R*   RÛ  t   copyRô  Rø  R0   Rú  t	   print_jpgRü  Rþ  R   t	   print_tifR  Rö  R„  R†  R‚  R(  R   Rˆ  RŠ  RŒ  RŽ  R�  R”  R–  R˜  R¢  R¤  R¦  R’  Rš  Rœ  Rž  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRB  t  sæ   


























































	G			
			







	
									1													
							c          C  sD   t  j ƒ  }  |  d k r@ t  j t ƒ }  |  j t ƒ |  t _ n  d S(   sE   
    Creates a wx.App instance if it has not been created sofar.
    N(	   RA   RÀ  R%   t   AppRæ   t   SetExitOnFrameDeleteR|   t   _create_wx_appt   theWxApp(   t   wxapp(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR„  Ù  s
    c          C  sK   t  d d d ƒ t j ƒ  rG t j ƒ  }  |  d k	 rG |  j j ƒ  qG n  d S(   sv   
    This should be overriden in a windowing environment if drawing
    should be done in interactive python mode
    s   draw_if_interactive()i   N(   R   R%   t
   matplotlibt   is_interactiveR1   t
   get_activet   canvasR¿  (   t
   figManager(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   draw_if_interactiveæ  s
    t   Showc           B  s   e  Z d  „  Z RS(   c         C  sB   t  j j ƒ  } | r> t  j ƒ  } | d  k	 r> | j ƒ  q> n  d  S(   N(   RA   R‚  t   IsMainLoopRunningRÀ  R%   t   MainLoop(   R   t   needmainR†  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   mainloopô  s
    (   R   R   R‘  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR�  ó  s   c         O  sE   t  d d d ƒ t ƒ  | j d t ƒ } | | | Ž  } t |  | ƒ S(   s.   
    Create a new figure manager instance
    s   new_figure_manager()i   t   FigureClassN(   R   R%   R„  t   popR6   t   new_figure_manager_given_figure(   t   numRT   RU   R’  t   fig(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   new_figure_managerý  s
    c         C  sA   | } t  |  | ƒ } | j ƒ  } t j ƒ  r= | j j ƒ  n  | S(   sD   
    Create a new figure manager instance for the given figure.
    (   t   FigureFrameWxt   get_figure_managerR‡  Rˆ  t   frameR�  (   R•  R®  R–  Rš  t   figmgr(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR”    s    R˜  c           B  sG   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C  s  t  j d k r t  j } n t  j d d ƒ } | j j \ } } } } t  j j |  d d  d d d | d d | ƒt	 d	 d
 |  ƒ | |  _
 t |  ƒ } |  j | ƒ |  j | ƒ |  _ |  j j t  j | j j | j j ƒ ƒ |  j j ƒ  t  j t  j ƒ |  _ |  j j |  j d
 t  j t  j Bt  j Bƒ |  j | ƒ |  _ |  j d  k	 rÃ|  j j ƒ  |  j j ƒ  \ }	 }
 |  j j ƒ  \ } } |  j j t  j | |
 ƒ ƒ |  j j |  j d t  j t  j Bƒ n  |  j  |  j ƒ |  j! ƒ  |  j j" d ƒ t# |  j | |  ƒ |  _$ t% |  t  j& |  j' ƒ d  S(   NR&  i   R=   R&   iÿÿÿÿt   post   titles	   Figure %ds
   __init__()i   i    i   (   i   i   ((   RA   R+  t   DefaultPositiont   PointRÀ   R‘   t   FrameRN   R%   R   R•  t   StatusBarWxt   SetStatusBart
   get_canvasRŠ  Rt  R{  Ru   Rw   t   SetFocust   BoxSizert   VERTICALt   sizert   Addt   TOPt   LEFTt   EXPANDt   _get_toolbart   toolbart   Realizet   GetSizeTuplet   SetSizet   SetSizert   Fitt
   SetMinSizet   FigureManagerWxR›  R$   t	   EVT_CLOSEt   _onClose(   R   R•  R–  Rœ  RÁ   RÂ   RŠ   R‹   t   statbart   twt   tht   fwt   fh(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN     s6    !	(*&
c         C  s^   t  d d k r% t |  j t ƒ } n5 t  d d k rT t |  j ƒ } | j | ƒ n d  } | S(   NR­  t   classict   toolbar2(   R<   t   NavigationToolbarWxRŠ  R|   t   NavigationToolbar2Wxt   set_status_barR%   (   R   R·  R­  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¬  O  s    c         C  s   t  |  d | ƒ S(   Niÿÿÿÿ(   RB  (   R   R–  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR£  Y  s    c         C  s   t  d d |  ƒ |  j S(   Ns   get_figure_manager()i   (   R   R›  (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR™  \  s    c         C  s>   t  d d |  ƒ |  j j ƒ  |  j j ƒ  t j |  j ƒ d  S(   Ns	   onClose()i   (   R   RŠ  t   close_eventRÊ  R1   t   destroyR•  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¶  `  s    c         C  s   |  j  S(   s=   Override wxFrame::GetToolBar as we don't have managed toolbar(   R­  (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt
   GetToolBarg  s    c         O  s†   y |  j  j |  j j ƒ Wn t k
 r- n Xt j j |  | | Ž |  j d  k	 rc |  j j ƒ  n  t j	 ƒ  } | r‚ | j
 ƒ  n  t S(   N(   RŠ  t   mpl_disconnectR­  t   _idDragR}  RA   R   RF   R%   RÀ  RÆ  R|   (   R   RT   RU   R†  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRF   k  s    (	   R   R   RN   R¬  R£  R™  R¶  RÃ  RF   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR˜    s   	6	
				R´  c           B  sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s�  
    This class contains the FigureCanvas and GUI frame

    It is instantiated by GcfWx whenever a new figure is created. GcfWx is
    responsible for managing multiple instances of FigureManagerWx.

    public attrs

    canvas - a FigureCanvasWx(wx.Panel) instance
    window - a wxFrame instance - http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin_wxframe.html#wxframe
    c           sv   t  d d ˆ  ƒ t j ˆ  | | ƒ | ˆ  _ | ˆ  _ | j ƒ  ˆ  _ ˆ  j ˆ  _ ‡  f d †  } ˆ  j j	 j
 | ƒ d  S(   Ns
   __init__()i   c           s#   ˆ  j  d k r ˆ  j  j ƒ  n  d S(   s8   this will be called whenever the current axes is changedN(   R   R%   t   update(   R–  (   R   (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   notify_axes_changeŽ  s     (   R   R+   RN   Rš  t   windowRÃ  R   R­  RŠ  R®  t   add_axobserver(   R   RŠ  R•  Rš  RÇ  (    (   R   sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   †  s    		c         C  s   |  j  j ƒ  d  S(   N(   Rš  R�  (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   show“  s    c         G  s+   t  d d |  ƒ |  j j ƒ  t j ƒ  d  S(   Ns	   destroy()i   (   R   Rš  RF   RA   t
   WakeUpIdle(   R   RT   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRÂ  –  s    c         C  s   |  j  j ƒ  S(   N(   RÈ  t   GetTitle(   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   get_window_title�  s    c         C  s   |  j  j | ƒ d  S(   N(   RÈ  t   SetTitle(   R   R�  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   set_window_title   s    c         C  s9   |  j  j t j | | ƒ ƒ |  j j ƒ  j |  j ƒ d S(   s   Set the canvas size in pixelsN(   RŠ  Rt  RA   R{  RÈ  t   GetSizerR²  (   R   Ru   Rw   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   resize£  s    (	   R   R   R   RN   RÊ  RÂ  RÍ  RÏ  RÑ  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR´  z  s   					c         C  sr   t  j j t d d ƒ } t  j j t  j j | |  ƒ ƒ } t  j j | ƒ s_ t d | ƒ ‚ n  t j | ƒ } | S(   sü   
    Load a bitmap file from the backends/images subdirectory in which the
    matplotlib library is installed. The filename parameter should not
    contain any path information as this is determined automatically.

    Returns a wx.Bitmap object
    t   datapatht   imagess&   Could not find bitmap file "%s"; dying(	   t   osR£   RI   R<   t   normpatht   existst   IOErrorRA   t   Bitmap(   Rõ  t   basedirt   bmpFilenameRê  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _load_bitmap»  s    	!t   MenuButtonWxc           B  s_   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z RS(
   sä   
    wxPython does not permit a menu to be incorporated directly into a toolbar.
    This class simulates the effect by associating a pop-up menu with a button
    in the toolbar, and managing this as though it were a menu.
    c         C  s  t  j j |  | t d d t  j ƒ| |  _ t  j ƒ  |  _ g  |  _ t  j	 ƒ  |  _
 t  j	 ƒ  |  _ |  j j |  j
 d d t ƒ |  j j |  j d d t ƒ |  j j ƒ  t |  t  j |  j d t ƒt |  t  j |  j d |  j
 ƒt |  t  j |  j d |  j ƒd  S(   Ns   Axes:        R@   t   Alls   Select all axest   Inverts   Invert axes selectedR&   (   RA   t   ButtonRN   t   _NTB_AXISMENU_BUTTONt   BU_EXACTFITt   _toolbart   Menut   _menut   _axisIdRP   t   _allIdt	   _invertIdt   AppendRæ   t   AppendSeparatorR$   t
   EVT_BUTTONt   _onMenuButtont   EVT_MENUt   _handleSelectAllAxest   _handleInvertAxesSelected(   R   R=   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   Ó  s    
		c         C  s   |  j  j ƒ  |  j ƒ  d  S(   N(   Rä  RF   (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRF   å  s    c         C  sP   |  j  ƒ  \ } } |  j ƒ  \ } } |  j |  j | | | d ƒ | j ƒ  d S(   s   Handle menu button pressed.i   N(   t   GetPositionTupleR¯  t   PopupMenuXYRä  R  (   R   R  R½   R¾   RŠ   R‹   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRë  é  s    c         C  sw   t  |  j ƒ d k r d Sx7 t t  |  j ƒ ƒ D]  } |  j j |  j | t ƒ q/ W|  j j |  j ƒ  ƒ | j	 ƒ  d S(   s8   Called when the 'select all axes' menu item is selected.i    N(
   R2  Rå  t   rangeRä  t   CheckR|   Râ  t
   set_activet   getActiveAxesR  (   R   R  Rà  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRí  ñ  s    c         C  s­   t  |  j ƒ d k r d Sxm t t  |  j ƒ ƒ D]V } |  j j |  j | ƒ rk |  j j |  j | t ƒ q/ |  j j |  j | t ƒ q/ W|  j j	 |  j
 ƒ  ƒ | j ƒ  d S(   s0   Called when the invert all menu item is selectedi    N(   R2  Rå  Rñ  Rä  t	   IsCheckedRò  Ræ   R|   Râ  Ró  Rô  R  (   R   R  Rà  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRî  ú  s     c         C  sj   |  j  j | j ƒ  ƒ } | r' t } n t } |  j  j | j ƒ  | ƒ |  j j |  j ƒ  ƒ | j	 ƒ  d S(   s?   Called whenever one of the specific axis menu items is selectedN(
   Rä  Rõ  t   GetIdRæ   R|   Rò  Râ  Ró  Rô  R  (   R   R  t   currentt   new(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _onMenuItemSelected  s    	c         C  s  | t  |  j ƒ k r² xê t t  |  j ƒ d | d d ƒ D]r } t j ƒ  } |  j j | ƒ |  j j | d | d | t ƒ |  j j	 | t ƒ t
 |  t j |  j d | ƒq9 WnP | t  |  j ƒ k  rx% |  j | D] } |  j j | ƒ qÕ W|  j |  |  _ n  |  j j t | ƒ ƒ d S(   s[   Ensures that there are entries for max_axis axes in the menu
        (selected by default).i   s   Axis %ds   Select axis %dR&   N(   R2  Rå  Rñ  RA   RP   RÙ  Rä  Rè  R|   Rò  R$   Rì  Rù  t   DeleteRâ  Ró  (   R   t   maxAxisRà  t   menuId(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt
   updateAxes  s    *!#c         C  sS   g  } xF t  t |  j ƒ ƒ D]/ } |  j j |  j | ƒ r | j | ƒ q q W| S(   s#   Return a list of the selected axes.(   Rñ  R2  Rå  Rä  Rõ  RÙ  (   R   t   activeRà  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRô  "  s
    c         C  sB   d } x  | D] } | d | d 7} q W|  j  d | d  ƒ d S(   s3   Update the list of selected axes in the menu buttonRÙ   s   %d,i   s   Axes: %siÿÿÿÿN(   t   SetLabel(   R   t   lstt   axis_txtt   e(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   updateButtonText*  s    (   R   R   R   RN   RF   Rë  Rí  Rî  Rù  Rý  Rô  R  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRÜ  Í  s   									t   SubplotToolWXc           B  s   e  Z d  „  Z RS(   c         C  s©   t  j j |  d  d d ƒ t d ƒ } t |  d | ƒ } t | d |  ƒ } t  j t  j ƒ } | j	 | d t  j
 t  j Bt  j Bƒ |  j | ƒ |  j ƒ  t | | ƒ } d  S(   Niÿÿÿÿs   Configure subplotsi   i   i   (   i   i   (   RA   R   RN   R%   R6   RB  t   FigureManagerR¥  R¦  R¨  Rª  R©  t   GROWR±  R²  R;   (   R   t	   targetfigt   toolfigRŠ  R›  R§  t   tool(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   <  s    $
(   R   R   RN   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR  ;  s   R¿  c           B  s†   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z RS(   c         C  sK   t  j j |  | j ƒ  d ƒ t j |  | ƒ | |  _ t |  _ d  |  _	 d  S(   Niÿÿÿÿ(
   RA   t   ToolBarRN   t	   GetParentR,   RŠ  R|   t   _idleR%   R·  (   R   RŠ  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   P  s
    		c         C  s   t  | d | ƒ S(   Niÿÿÿÿ(   RB  (   R   Rš  R–  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR£  W  s    c         C  s  t  d d |  ƒ |  j j ƒ  |  _ i  |  _ xØ |  j D]Í \ } } } } | d  k rc |  j ƒ  q5 n  t j	 ƒ  |  j | <| d	 k r² |  j
 |  j | t | d ƒ d | d | ƒn' |  j |  j | t | d ƒ | | ƒ t |  t j t |  | ƒ d |  j | ƒq5 W|  j ƒ  d  S(
   Nt   _init_toolbari   t   Pant   Zooms   .pngt	   shortHelpt   longHelpR&   (   R  R  (   R   RŠ  R  t   _parentt   wx_idst	   toolitemsR%   t   AddSeparatorRA   RP   t   AddCheckToolRÛ  t   AddSimpleToolR$   t   EVT_TOOLR|  R®  (   R   t   textt   tooltip_textt
   image_filet   callback(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR  Z  s    	
 
-c         G  s+   |  j  |  j d t ƒ t j |  | Œ d  S(   NR  (   t
   ToggleToolR  Ræ   R,   t   zoom(   R   RT   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR  p  s    c         G  s+   |  j  |  j d t ƒ t j |  | Œ d  S(   NR  (   R  R  Ræ   R,   t   pan(   R   RT   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR  t  s    c         C  sµ   t  j d  d d ƒ } t d ƒ } |  j | | ƒ } t | d | ƒ } t  j t  j ƒ } | j | d t  j	 t  j
 Bt  j Bƒ | j | ƒ | j ƒ  t |  j j | ƒ } | j ƒ  d  S(   Niÿÿÿÿs   Configure subplotsi   i   i   (   i   i   (   RA   R   R%   R6   R£  R  R¥  R¦  R¨  Rª  R©  R  R±  R²  R;   RŠ  R®  R�  (   R   R  Rš  R  RŠ  R›  R§  R	  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   configure_subplotsx  s    $
c         G  s�  |  j  j ƒ  \ } } } |  j  j ƒ  } t j |  j d d | | t j t j Bƒ } | j | ƒ | j	 ƒ  t j
 k r}| j ƒ  } | j ƒ  } t d | | f d |  ƒ | | j ƒ  }	 t j j | ƒ \ }
 } | j d ƒ rê | d } n  | d k r+|	 | k r+t j d | |	 | f d d ƒ| }	 n  y) |  j  j t j j | | ƒ d |	 ƒWq}t k
 ry} t t | ƒ ƒ q}Xn  d  S(   Ns   Save to fileRÙ   s   Save file dir:%s name:%si   R   i   t   svgt   pdft   pst   epsRð  sD   extension %s did not match the selected image type %s; going with %st
   stackleveli    R$  (   s   svgR"  s   pss   epss   png(   RŠ  Ræ  t   get_default_filenameRA   t
   FileDialogR  t   SAVEt   OVERWRITE_PROMPTt   SetFilterIndexRE   t   ID_OKt   GetDirectoryt   GetFilenameR   t   GetFilterIndexRÔ  R£   t   splitextt
   startswithRp  Rq  Rô  RI   t	   ExceptionRH   RK   (   R   RT   RÛ  Râ  Rß  t   default_filet   dlgt   dirnameRõ  R$  t   basenameRã  R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   save_figureŠ  s,     		 c         C  s'   t  j t | ƒ } |  j j | ƒ d  S(   N(   RA   t   StockCursort   cursordRŠ  t	   SetCursor(   R   t   cursor(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt
   set_cursor¥  s    c         C  s"   y
 |  `  Wn t k
 r n Xd  S(   N(   t   lastrectR}  (   R   R!   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   release©  s     
 c         C  s5   |  j  } t |  _  | r1 |  j j ƒ  t |  _  n  d  S(   N(   R  Ræ   RŠ  RÂ  R|   (   R   RÒ   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   dynamic_update­  s
    		c         C  s�  |  j  } t j | ƒ } | j t j ƒ t j t j d d d ƒ t j ƒ } t j t j d d d ƒ d t j	 ƒ }	 | j
 | ƒ | j |	 ƒ | j ƒ  | j ƒ  |  j  j j j }
 |
 | } |
 | } | | k  rã | | } } n  | | k  rÿ | | } } n  | | } | | } t | ƒ t | ƒ t | ƒ t | ƒ f } y |  j } Wn t k
 r]n X| j | Œ  | |  _ | j | Œ  | j ƒ  d S(   sK   adapted from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189744iÿ   iÈ   i   N(   RŠ  RA   Rç  t   SetLogicalFunctiont   XORR­   R3  t   TRANSPARENTR  R  R¬   R
  t   ResetBoundingBoxRè  R®  RÀ   Rw   R¼   R<  R}  t   DrawRectangleRé  (   R   R!   t   x0t   y0t   x1t   y1RŠ  R  t   wbrusht   wpenRw   RŠ   R‹   t   rectR<  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   draw_rubberband´  s6    	
$'



  

*  	c         C  s   | |  _  d  S(   N(   R·  (   R   R·  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRÀ  Þ  s    c         C  s&   |  j  d  k	 r" |  j  j | ƒ n  d  S(   N(   R·  R%   t   set_function(   R   R†   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   set_messageá  s     c         C  sf   |  j  j d k } |  j  j t |  j  j ƒ d k  } |  j |  j d | ƒ |  j |  j d | ƒ d  S(   Ni    i   t   Backt   Forward(   t   _viewst   _posR2  t	   _elementst
   EnableToolR  (   R   t   can_backwardt   can_forward(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   set_history_buttonsä  s    "(   R   R   RN   R£  R  R  R  R   R6  R;  R=  R>  RK  RÀ  RM  RV  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¿  N  s   											*		R¾  c           B  sì   e  Z e d  „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e j Z d „  Z RS(   c         C  sÔ   t  j j |  | j ƒ  d ƒ t d d |  ƒ | |  _ d  |  _ d  |  _ | j ƒ  |  _	 i |  j
 t 6|  j
 t 6|  j t 6|  j t 6|  j t 6|  j t 6|  j t 6|  j t 6|  _ |  j ƒ  |  j | ƒ |  j ƒ  d  S(   Niÿÿÿÿs
   __init__()i   (   RA   R
  RN   R  R   RŠ  R%   t   _lastControlt   _mouseOnButtonR  t   panxt   _NTB_X_PAN_LEFTt   _NTB_X_PAN_RIGHTt   zoomxt   _NTB_X_ZOOMINt   zoomyt   _NTB_X_ZOOMOUTt   panyt   _NTB_Y_PAN_UPt   _NTB_Y_PAN_DOWNt   _NTB_Y_ZOOMINt   _NTB_Y_ZOOMOUTt   _NTB_BUTTON_HANDLERt   _create_menut   _create_controlsR®  (   R   RŠ  t   can_kill(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   ì  s$    			







c         C  s=   t  d d |  ƒ t |  ƒ |  _ |  j |  j ƒ |  j ƒ  d S(   s’   
        Creates the 'menu' - implemented as a button which opens a
        pop-up menu since wxPython does not allow a menu as a control
        s   _create_menu()i   N(   R   RÜ  Rä  t
   AddControlR  (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRf    s    c         C  s   t  d d |  ƒ |  j t j d d ƒ ƒ |  j t t d ƒ d d ƒ |  j t t d ƒ d d	 ƒ |  j t t d
 ƒ d d ƒ |  j t	 t d ƒ d d ƒ |  j
 ƒ  |  j t t d ƒ d d ƒ |  j t t d ƒ d d ƒ |  j t t d
 ƒ d d ƒ |  j t t d ƒ d d ƒ |  j
 ƒ  |  j t t d ƒ d d ƒ |  j
 ƒ  t |  t j |  j d t ƒt |  t j |  j d t ƒt |  t j |  j d t ƒt |  t j |  j d t	 ƒt |  t j |  j d t ƒt |  t j |  j d t ƒt |  t j |  j d t ƒt |  t j |  j d t ƒt |  t j |  j d t ƒt |  t j |  j d |  j ƒ  ƒ| r†t |  t j |  j d t ƒn  t |  t j  |  j! ƒ d S(   sO   
        Creates the button controls, and links them to event handlers
        s   _create_controls()i   i   s   stock_left.xpmt   Lefts   Scroll lefts   stock_right.xpmt   Rights   Scroll rights   stock_zoom-in.xpms   Zoom ins   Increase X axis magnifications   stock_zoom-out.xpms   Zoom outs   Decrease X axis magnifications   stock_up.xpmt   Ups	   Scroll ups   stock_down.xpmt   Downs   Scroll downs   Increase Y axis magnifications   Decrease Y axis magnifications   stock_save_as.xpmt   Saves   Save plot contents as imagesR&   N("   R   t   SetToolBitmapSizeRA   R{  R  RZ  RÛ  R[  R]  R_  R  Ra  Rb  Rc  Rd  t	   _NTB_SAVER$   R  t   _onLeftScrollt   _onRightScrollt
   _onXZoomInt   _onXZoomOutt   _onUpScrollt   _onDownScrollt
   _onYZoomInt   _onYZoomOutt   _onSavet   EVT_TOOL_ENTERt   _onEnterToolRö  R¶  t
   _NTB_CLOSER‘  R’  (   R   Rh  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRg    sH    











"c         C  sk   t  d d |  ƒ | |  _ | d k rN g  |  j D] } |  j | ^ q/ |  _ n	 g  |  _ |  j j | ƒ d S(   sY   
        ind is a list of index numbers for the axes which are to be made active
        s   set_active()i   N(   R   t   _indR%   t   _axest   _activeRä  R  (   R   t   indRà  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRó  9  s    	)	c         C  s   |  j  S(   s8   Returns the identity of the last toolbar button pressed.(   RW  (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   get_last_controlF  s    c         C  sX   t  d d |  ƒ x! |  j D] } | j j | ƒ q W|  j j ƒ  |  j j d t ƒ d  S(   Ns   panx()i   R  (   R   R  t   xaxisR  RŠ  RÂ  R  Ræ   (   R   t	   directionR6  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRY  J  s
    c         C  sX   t  d d |  ƒ x! |  j D] } | j j | ƒ q W|  j j ƒ  |  j j d t ƒ d  S(   Ns   pany()i   R  (   R   R  t   yaxisR  RŠ  RÂ  R  Ræ   (   R   Rƒ  R6  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR`  R  s
    c         C  sX   t  d d |  ƒ x! |  j D] } | j j | ƒ q W|  j j ƒ  |  j j d t ƒ d  S(   Ns   zoomx()i   R  (   R   R  R‚  R  RŠ  RÂ  R  Ræ   (   R   t   in_outR6  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR\  Y  s
    c         C  sX   t  d d |  ƒ x! |  j D] } | j j | ƒ q W|  j j ƒ  |  j j d t ƒ d  S(   Ns   zoomy()i   R  (   R   R  R„  R  RŠ  RÂ  R  Ræ   (   R   R…  R6  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR^  `  s
    c         C  sB   t  d d |  ƒ |  j j j ƒ  |  _ |  j j t |  j ƒ ƒ d S(   se   
        Update the toolbar menu - e.g., called when a new subplot
        or axes are added
        s   update()i   N(   R   RŠ  R®  t   get_axesR~  Rä  Rý  R2  (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRÆ  g  s    c         C  s   d S(   s.   A NULL event handler - does nothing whatsoeverN(    (   R   RÒ   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _do_nothingp  s    c         C  sN   | j  ƒ  } y |  j | |  _ Wn t k
 r? |  j |  _ n X| j ƒ  d  S(   N(   t   GetSelectionRe  t	   button_fnR)  R‡  R  (   R   R  t   toolId(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR{  u  s    c         C  s   |  j  d ƒ | j ƒ  d  S(   Niÿÿÿÿ(   RY  R  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRq  }  s    c         C  s   |  j  d ƒ | j ƒ  d  S(   Ni   (   RY  R  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRr  �  s    c         C  s   |  j  d ƒ | j ƒ  d  S(   Ni   (   R\  R  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRs  …  s    c         C  s   |  j  d ƒ | j ƒ  d  S(   Niÿÿÿÿ(   R\  R  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRt  ‰  s    c         C  s   |  j  d ƒ | j ƒ  d  S(   Ni   (   R`  R  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRu  �  s    c         C  s   |  j  d ƒ | j ƒ  d  S(   Niÿÿÿÿ(   R`  R  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRv  ‘  s    c         C  s   |  j  d ƒ | j ƒ  d  S(   Ni   (   R^  R  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRw  •  s    c         C  s   |  j  d ƒ | j ƒ  d  S(   Niÿÿÿÿ(   R^  R  (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRx  ™  s    c         C  s   | |  _  d  S(   N(   RX  (   R   t   button(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _onMouseEnterButton�  s    c         C  s   |  j  | k r d  |  _  n  d  S(   N(   RX  R%   (   R   R‹  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   _onMouseLeaveButton   s    c         C  s2   | j  ƒ  d k r d } n d } |  j | ƒ d  S(   Ni    i   iÿÿÿÿ(   R8  R‰  (   R   R  Rƒ  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR’  ¤  s    	c         C  s   |  j  ƒ  j ƒ  d  S(   N(   R  RF   (   R   R  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¶  ­  s    (   R   R   Ræ   RN   Rf  Rg  Ró  R�  RY  R`  R\  R^  RÆ  R‡  R{  Rq  Rr  Rs  Rt  Ru  Rv  Rw  Rx  RŒ  R�  R’  R¿  R6  Ry  R¶  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¾  ë  s2   	
	,																						R¡  c           B  s    e  Z d  Z d „  Z d „  Z RS(   s    
    A status bar is added to _FigureFrame to allow measurements and the
    previously selected scroll function to be displayed as a user
    convenience.
    c         C  s7   t  j j |  | d ƒ |  j d ƒ |  j d d ƒ d  S(   Niÿÿÿÿi   R%   i   (   RA   t	   StatusBarRN   t   SetFieldsCountt   SetStatusText(   R   R=   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   ·  s    c         C  s   |  j  d | d ƒ d  S(   Ns   %si   (   R�  (   R   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRL  ¾  s    (   R   R   R   RN   RL  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR¡  ±  s   	t
   PrintoutWxc           B  s;   e  Z d  Z d d d d „ Z d „  Z d „  Z d „  Z RS(   s›   Simple wrapper around wx Printout class -- all the real work
    here is scaling the matplotlib canvas bitmap to the current
    printer's definition.
    g      @g      à?R‡  c         C  s5   t  j j |  d | ƒ| |  _ | |  _ | |  _ d  S(   NR�  (   RA   t   PrintoutRN   RŠ  Ru   t   margin(   R   RŠ  Ru   R“  R�  (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyRN   Ì  s    		c         C  s
   | d k S(   Ni   (    (   R   t   page(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   HasPageÓ  s    c         C  s   d S(   Ni   (   i   i   i   i   (    (   R   (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   GetPageInfo×  s    c         C  sS  |  j  j ƒ  |  j ƒ  } |  j ƒ  \ } } |  j ƒ  \ } } | j ƒ  \ } } |  j  j ƒ  \ }	 }
 |  j  j j ƒ  } |  j  j j	 } t
 | ƒ | } | |  j  j _	 |  j  j j d ƒ t |  j  j |  j  j j	 ƒ } |  j  j j | ƒ |  j  j j t |  j  j j ƒ  | ƒ ƒ |  j  j j t |  j  j j ƒ  | ƒ ƒ |  j  j ƒ  d } |  j ƒ  rlt
 | ƒ | } n  t |  j | | ƒ } t |  j | | ƒ } |  j | | t
 |	 ƒ } | j | | ƒ | j | | ƒ y | j |  j  j d d ƒ Wn+ y | j |  j  j d ƒ Wq q Xn X|  j  j j | ƒ | |  j  j _	 |  j  j ƒ  t S(   Ns   #FFFFFFg      ð?i    (   i    i    (   RŠ  RÂ  t   GetDCt   GetPPIPrintert   GetPageSizePixelst   GetSizeR¯  R®  t   get_facecolorRz   R:  t   set_facecolorR_   Rx   R  R¼   Rt   t	   SetHeightRv   t	   IsPreviewR“  Ru   t   SetDeviceOrigint   SetUserScaleR»   R|   (   R   R”  R  t   ppwt   ppht   pgwt   pght   dcwt   dcht   grwt   grht   bgcolort   fig_dpit   vscaleR  t
   page_scalet
   top_margint   left_margint
   user_scale(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   OnPrintPageÚ  sF    )) (   R   R   R   RN   R•  R–  R°  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyR‘  Ç  s
   		(€   t
   __future__R    R   R  RÔ  t   os.pathRÊ   t   StringIOR@  Rp  t   numpyRµ   t   matplotlib.cbookR   R   R   R   R
   t   version_infoRq  t   ImportWarningt	   missingwxt   missingwxversionR~  t	   wxversiont   ImportErrort   AlreadyImportedErrort   _wx_ensure_failedR}  t   VersionErrort   ensureMinimalRA   Rr   Rr  t   splitt   nR¼   t   majort   minorR	   R%   R   R   R   R$   R‡  R'   t   matplotlib.backend_basesR(   R)   R*   R+   R,   R-   R.   R/   R0   t   matplotlib._pylab_helpersR1   t   matplotlib.artistR2   R3   R4   R5   t   matplotlib.figureR6   t   matplotlib.pathR7   t   matplotlib.textR8   R9   t   matplotlib.transformsR:   t   matplotlib.widgetsR;   R<   Rí   R¼  RH   RL   RM   R_   R×   Rz  RB  R„  RŒ  R�  RÊ  R—  R”  R   R˜  R´  RP   t   _NTB_AXISMENURà  RZ  R[  R]  R_  Ra  Rb  Rc  Rd  Rp  R|  RÛ  Rß  RÜ  t   CURSOR_HANDt   MOVEt   HANDt   CURSOR_ARROWt   POINTERt   CURSOR_CROSSt   SELECT_REGIONR8  R  R
  R¿  R¾  RŽ  R¡  R’  R‘  t   ToolbarR  (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/backends/backend_wx.pyt   <module>   sÒ   "
2$		4	+ô¬ÿ ÿ g					b3	f�ÆT