
                             d Z ddlmZ ddlmZmZ ddlmZ ddlZddlm	Z	 dZ
 G d d	e      Z G d
 d eee            Zy)z'
Clipboard for command line interface.
    )unicode_literals)ABCMetaabstractmethod)with_metaclassN)SelectionType)	ClipboardClipboardDatac                   0    e Zd ZdZdej
                  fdZy)r	   z{
    Text on the clipboard.

    :param text: string
    :param type: :class:`~prompt_toolkit.selection.SelectionType`
     c                     t        |t        j                        sJ |t        j                  t        j
                  t        j                  fv sJ || _        || _        y )N)	
isinstancesixstring_typesr   
CHARACTERSLINESBLOCKtexttype)selfr   r   s      0lib/third_party/prompt_toolkit/clipboard/base.py__init__zClipboardData.__init__   sM    $ 0 011100-2E2E}GZGZ[[[[		    N)__name__
__module____qualname____doc__r   r   r    r   r   r	   r	      s     ]%=%= r   r	   c                   <    e Zd ZdZed        Zd Zd Zed        Zy)r   z
    Abstract baseclass for clipboards.
    (An implementation can be in memory, it can share the X11 or Windows
    keyboard, or can be persistent.)
    c                      y)ze
        Set data to the clipboard.

        :param data: :class:`~.ClipboardData` instance.
        Nr   )r   datas     r   set_datazClipboard.set_data&       r   c                 p    t        |t        j                        sJ | j                  t	        |             y)z?
        Shortcut for setting plain text on clipboard.
        N)r   r   r   r!   r	   )r   r   s     r   set_textzClipboard.set_text.   s+     $ 0 0111mD)*r   c                      y)z7
        For Emacs mode, rotate the kill ring.
        Nr   r   s    r   rotatezClipboard.rotate5   r"   r   c                      y)z(
        Return clipboard data.
        Nr   r&   s    r   get_datazClipboard.get_data:   r"   r   N)	r   r   r   r   r   r!   r$   r'   r)   r   r   r   r   r       s9    
  +
  r   r   )r   
__future__r   abcr   r   r   r   prompt_toolkit.selectionr   __all__objectr	   r   r   r   r   <module>r/      sA    ( '  
 2F w/ r   