+
     ]i  c                   sZ   ^ RI t ^ RIt^ RIHtHt ^ RIHt ^RIHt ^RI	H
t
 ^ RIHtHtHtHtHtHtHt  ! R R]P&                  ]4      tR	 t ! R
 R]
]P,                  ]4      t ! R R]P                  ]4      t ! R R]P2                  ]4      t]P6                   ! R R]4      4       tR# )    N)_apicbook)Gcf)_macosx)FigureCanvasAgg)_BackendFigureCanvasBaseFigureManagerBaseNavigationToolbar2ResizeEvent	TimerBase_allow_interruptc                   s    ] tR t^tRtRtR# )TimerMacz6Subclass of `.TimerBase` using CFRunLoop timer events. N)__name__
__module____qualname____firstlineno__Z__doc____static_attributes__r       I/usr/lib64/python3.14/site-packages/matplotlib/backends/backend_macosx.pyr   r      s    @r   r   c                 s8    \        R \        P                  4      # )zEA context manager that allows terminating a plot by sending a SIGINT.c                 sJ    \         P                  ! V P                  4       4      # N)r   Zwake_on_fd_writeZfileno)Zrsock   &r   <lambda>Z(_allow_interrupt_macos.<locals>.<lambda>   s    g..u||~>r   )r   r   stopr   r   r   _allow_interrupt_macosr      s    >N Nr   c                   s   a a ] tR t^t oRt]t]P                  ! R 4      t	V 3R lt
V 3R ltR tR tR tRV 3R lltR	 tRR
 ltRtVtV ;t# )FigureCanvasMacZmacosxc                s    \         # r   )FigureManagerMacZclsr   r   r   ZFigureCanvasMac.<lambda>(   s    3Cr   c                sb   < \         SV `  VR 7       RV n        RV n        \	        4       V n        R# ))figureFN)super__init___draw_pending_is_drawingZset_timers)selfr   	__class__   &&r   r    ZFigureCanvasMac.__init__*   s,    '" ur   c                s   < V P                   '       d   R# \        P                  ! V RR7      ;_uu_ 4        \        SV `  4        RRR4       V P                  4        R#   + '       g   i     L"; i)z/Render the figure and update the macosx canvas.NT)r"   )r"   r   Z_setattr_cmr   drawupdate)r$   r%   s   &r   r'   ZFigureCanvasMac.draw1   sG     t66GLN 7 76s   AA/	c                s    \        V R R4      '       g:   \        V RR4      '       g%   RV n        V P                  V P                  4       R# R# R# )r!   Fr"   TN)Zgetattrr!   _single_shot_timer
_draw_idler$   r   r   	draw_idleZFigureCanvasMac.draw_idle;   sF    ou55mU33!%D ##DOO4	 4 6r   c                s   a  V 3R lpS P                  ^ R7      pRVn        VP                  W!V4       S P                  P	                  V4       VP                  4        R# )z/Add a single shot timer with the given callbackc                 sL   < V ! 4        SP                   P                  V4       R # r   )r#   Zremove)callbacktimerr$   r&   r   callback_funcZ9FigureCanvasMac._single_shot_timer.<locals>.callback_funcF   s    JLL&r   )ZintervalTN)Z	new_timerZsingle_shotZadd_callbackr#   ZaddZstart)r$   r-   r/   r.   s   f&  r   r)   Z"FigureCanvasMac._single_shot_timerD   sM    	' * =E:r   c                s    V P                  4       ;_uu_ 4        V P                  '       g    RRR4       R# RV n        V P                  4        RRR4       R#   + '       g   i     R# ; i)z
Draw method for singleshot timer

This draw method can be added to a singleshot timer, which can
accumulate draws while the eventloop is spinning. This method will
then only draw the first time and short-circuit the others.
NF)Z_idle_draw_cntxr!   r'   r+   r   r   r*   ZFigureCanvasMac._draw_idleO   sN     !!##%%% 	 $#
 "'DIIK $###s   AAA)	c                sF   < \         SV `  V4       V P                  4        R # r   )r   blitr(   )r$   Zbboxr%   r&   r   r0   ZFigureCanvasMac.blit_   s    Tr   c                s   V P                   P                  V P                  ,          pW,          pW#,          pV P                   P                  WR R7       \	        RV 4      P                  4        V P                  4        R# )F)ZforwardZresize_eventN)r   ZdpiZdevice_pixel_ratioZset_size_inchesr
   Z_processr,   )r$   ZwidthZheightZscale   &&& r   resizeZFigureCanvasMac.resized   s\    $"9"99##E5#AND)224r   c                s    \        4       ;_uu_ 4        V P                  VR 7       RRR4       R#   + '       g   i     R# ; i))timeoutN)r   Z_start_event_loop)r$   r3   s   &&r   start_event_loopZ FigureCanvasMac.start_event_loopm   s-     $%%""7"3 &%%%s	   0A	)r!   r"   r#   r   )r    )r   r   r   r   Zrequired_interactive_frameworkr   Z
_timer_clsr   ZclasspropertyZmanager_classr    r'   r,   r)   r*   r0   r2   r4   r   __classdictcell____classcell__r%   __classdict__   @@r   r   r      sP      &."J&&'CDM5	 
4 4r   r   c                   s8   a  ] tR t^tt o R tR tR tR tRtV t	R# )NavigationToolbar2Macc           	     s  a \         P                  ! R 4      o\        \        P                  !  w  r#rB\
        P                  P                  Y\        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      \        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      4       \        P                  ! W4       R# )Zimagesc              3   s`   <"   T F#  qf   K  \        SV,          4      R,           x  K%  	  R # 5i)Nz.pdf)str).0Z
image_name	data_path   & r   	<genexpr>1NavigationToolbar2Mac.__init__.<locals>.<genexpr>{   s-      K$/j 7#i*,-66$/s   .!.c              3   s0   "   T F  qf   K  Vx  K  	  R # 5ir   r   )r<   Ztooltips   & r   r?   r@   }   s     Ig''s   
N)r   _get_data_pathZzipr	   Z	toolitemsr   r    Ztuple)r$   canvasZ_ZtooltipsZimage_namesr=   s   &&   @r   r    ZNavigationToolbar2Mac.__init__v   s    ((2	&)+=+G+G&H#[""++E K$/KEE K$/K KEIIEEIII		K
 	##D1r   c                s    V P                   P                  \        V4      \        V4      \        V4      \        V4      4       R # r   )rB   Zset_rubberbandZint)r$   ZeventZx0Zy0Zx1Zy1s   &&&&&&r   draw_rubberbandZ%NavigationToolbar2Mac.draw_rubberband   s*    ""3r7CGSWc"gFr   c                s:    V P                   P                  4        R # r   )rB   remove_rubberbandr+   r   r   rD   Z'NavigationToolbar2Mac.remove_rubberband   s    %%'r   c                s   \         P                  P                  \        P                  R ,          4      p\
        P                  ! RVV P                  P                  4       4      pVf   R# \        P                  R ,          '       d1   \         P                  P                  V4      \        P                  R &   V P                  P                  P                  V4       V# )zsavefig.directoryzSave the figureN)osZpathZ
expandusermplrcParamsr   Zchoose_save_filerB   Zget_default_filenameZdirnamer   Zsavefig)r$   ZargsZ	directoryZfilenames   &*  r   save_figureZ!NavigationToolbar2Mac.save_figure   s    GG&&s||4G'HI	++,=,5,0KK,L,L,NP <<+,,020ICLL,-""8,r   r   N)
r   r   r   r   r    rC   rD   rH   r   r5   )r8   s   @r   r:   r:   t   s     2G( r   r:   c                   sX   a a ] tR t^t o]tR tR tV 3R lt]	R 4       t
R tRtVtV ;t# )r   c                s&   R V n         \        P                  P                  W4       \	        \
        P                  ! R4      4      p\        P                  P                  V4       \        P                  ! WV4       V P                  \        P                  R,          4       V P                  e   V P                  P                  4        \        P                  ! 4       '       d-   V P                  4        V P                   P#                  4        R# R# )Fzimages/matplotlib.pdfzmacosx.window_modeN)_shownr   FigureManagerr    r;   r   rA   Zset_iconr   Z_set_window_moderF   rG   Ztoolbarr(   Zis_interactiveshowrB   r,   )r$   rB   ZnumZ	icon_pathr1   r   r    ZFigureManagerMac.__init__   s    &&t4,,-DEF	&&y1""45cll+?@A<<#LL!IIKKK!!#  r   c                sf    \         P                  ! V 4       V P                  P                  4        R # r   )r   destroyrB   Zflush_eventsr+   r   r   _close_button_pressedZ&FigureManagerMac._close_button_pressed   s    D  "r   c                s   < V P                   P                  '       d7   V P                   P                  P                  4       pVP                  4        KR  \        SV `  4        R # r   )rB   r#   Zpopr   r   rL   )r$   r.   r%   r>   r   rL   ZFigureManagerMac.destroy   s@     kk!!!KK''++-EJJLr   c                s    \        4       ;_uu_ 4        \        P                  ! 4        R R R 4       R #   + '       g   i     R # ; ir   )r   r   rK   r   r   r   start_main_loopZ FigureManagerMac.start_main_loop   s%     $%%LLN &%%%s	   3A	c                s6   V P                   P                  P                  '       d   V P                   P                  4        V P                  '       g   V P                  4        R V n        \        P                  R,          '       d   V P                  4        R# R# )Tzfigure.raise_windowN)	rB   r   Zstaler,   rI   Z_showrF   rG   Z_raiser+   r   r   rK   ZFigureManagerMac.show   s_    ;;###KK!!#{{{JJLDK<<-..KKM /r   )rI   )r   r   r   r   r:   Z_toolbar2_classr    rM   rL   ZclassmethodrN   rK   r   r5   r6   r7   r9   r   r   r      s7     +O$#  
 r   r   c                   s6    ] tR t^t]t]t]P                  t	Rt
R# )_BackendMacr   N)r   r   r   r   r   FigureCanvasr   rJ   rN   Zmainloopr   r   r   r   rO   rO      s    "L$M//Hr   rO   )rE   Z
matplotlibrF   r   r   Zmatplotlib._pylab_helpersr   Z r   Zbackend_aggr   Zmatplotlib.backend_basesr   r   r   r	   r
   r   r   ZTimerr   r   rP   r   r:   rJ   r   ZexportrO   r   r   r   <module>rQ      s    	  " )  (. . .
Aw}}i A
NY4ow';';=M Y4xG668J @)w,,.? )X 
0( 0 0r   