3
7ßL]Ò
  ã               @   sL   d Z ddlmZmZmZmZ ddlmZ G dd„ deƒZG dd„ de	ƒZ
dS )	z# A widget for editing Python code. é    )ÚBoolÚEventÚ	InterfaceÚUnicode)ÚKeyPressedEventc               @   sT   e Zd ZdZedƒZeZedƒZe	Z
e	eƒZddd„Zddd„Zd	d
„ Zdd„ ZdS )ÚIPythonEditorz# A widget for editing Python code. FTNc             C   s   dS )z— Loads the contents of the editor.

        Parameters
        ----------
        path : str or None
            The path to the file to load.
        N© )ÚselfÚpathr   r   ú:/tmp/pip-install-5sebvq2j/pyface/pyface/i_python_editor.pyÚload2   s    zIPythonEditor.loadc             C   s   dS )z— Saves the contents of the editor.

        Parameters
        ----------
        path : str or None
            The path to the file to save.
        Nr   )r	   r
   r   r   r   Úsave;   s    zIPythonEditor.savec             C   s   dS )z~ Set the foreground and background colors for a particular style and
        set the font and size to default values.
        Nr   )r	   ÚnÚforeÚbackr   r   r   Ú	set_styleE   s    zIPythonEditor.set_stylec             C   s   dS )zˆ Selects the specified line.

        Parameters
        ----------
        lineno : int
            The line number to select.
        Nr   )r	   Úlinenor   r   r   Úselect_lineJ   s    zIPythonEditor.select_line)N)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Zdirtyr   r
   Zshow_line_numbersr   Úchangedr   Zkey_pressedr   r   r   r   r   r   r   r   r      s   
	

r   c               @   s   e Zd ZdZdd„ ZdS )ÚMPythonEditorz™ The mixin class that contains common code for toolkit specific
    implementations of the IPythonEditor interface.

    Implements: _changed_path()
    c             C   s   | j dk	r| jƒ  dS )z. Called when the path to the file is changed. N)Úcontrolr   )r	   r   r   r   Ú_changed_path[   s    
zMPythonEditor._changed_pathN)r   r   r   r   r   r   r   r   r   r   T   s   r   N)r   Z
traits.apir   r   r   r   Zpyface.key_pressed_eventr   r   Úobjectr   r   r   r   r   Ú<module>   s   <