a
    §ˆcg  ã                   @   sJ   d Z ddlZddlmZ ddlmZ G dd„ dejƒZG dd„ deƒZdS )	zFA `wx.Timer` subclass that invokes a specified callback periodically.
é    N)ÚInstance)Ú	BaseTimerc                       s$   e Zd Z‡ fdd„Zdd„ Z‡  ZS )ÚCallbackTimerc                    s   t ƒ  ¡  || _d S ©N)ÚsuperÚ__init__Útimer)Úselfr   ©Ú	__class__© ú[/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/ui/wx/timer/timer.pyr      s    
zCallbackTimer.__init__c                 C   s   | j  ¡  t ¡  d¡ d S )NT)r   ZperformÚwxZGetAppÚYield©r	   r   r   r   ÚNotify   s    
zCallbackTimer.Notify)Ú__name__Ú
__module__Ú__qualname__r   r   Ú__classcell__r   r   r
   r   r      s   r   c                   @   s2   e Zd ZdZeejƒZdd„ Zdd„ Z	dd„ Z
dS )	ÚPyfaceTimerz, Abstract base class for Wx toolkit timers. c                 C   s   | j  t| jd ƒ¡ d S )Niè  )Ú_timerZStartÚintÚintervalr   r   r   r   Ú_start$   s    zPyfaceTimer._startc                 C   s   | j  ¡  d S r   )r   ZStopr   r   r   r   Ú_stop'   s    zPyfaceTimer._stopc                 C   s   t | ƒS r   )r   r   r   r   r   Z__timer_default*   s    zPyfaceTimer.__timer_defaultN)r   r   r   Ú__doc__r   r   ÚTimerr   r   r   Z_PyfaceTimer__timer_defaultr   r   r   r   r      s
   
r   )	r   r   Z
traits.apir   Zpyface.timer.i_timerr   r   r   r   r   r   r   r   Ú<module>
   s
   
