Package wx :: Class Clipboard
[frames | no frames]

Type Clipboard

object --+    
         |    
    Object --+
             |
            Clipboard


wx.Clipboard represents the system clipboard and provides methods to copy data to it or paste data from it. Normally, you should only use wx.TheClipboard which is a reference to a global wx.Clipboard instance.

Call wx.TheClipboard's Open method to get ownership of the clipboard. If this operation returns True, you now own the clipboard. Call SetData to put data on the clipboard, or GetData to retrieve data from the clipboard. Call Close to close the clipboard and relinquish ownership. You should keep the clipboard open only momentarily.


See Also:

wx.DataObject

Method Summary
Clipboard __init__(self)
  __del__(self)
bool AddData(self, data)
Call this function to add the data object to the clipboard.
  Clear(self)
Clears data from the clipboard object and also the system's clipboard if possible.
  Close(self)
Closes the clipboard.
bool Flush(self)
Flushes the clipboard: this means that the data which is currently on clipboard will stay available even after the application exits, possibly eating memory, otherwise the clipboard will be emptied on exit.
Clipboard Get()
Returns global instance (wxTheClipboard) of the object. (Static method)
bool GetData(self, data)
Call this function to fill data with data on the clipboard, if available in the required format.
bool IsOpened(self)
Query whether the clipboard is opened
bool IsSupported(self, format)
Returns True if the given format is available in the data object(s) on the clipboard.
bool Open(self)
Call this function to open the clipboard before calling SetData and GetData.
bool SetData(self, data)
Set the clipboard data, this is the same as Clear followed by AddData.
  UsePrimarySelection(self, primary)
On platforms supporting it (the X11 based platforms), selects the so called PRIMARY SELECTION as the clipboard as opposed to the normal clipboard, if primary is True.

Property Summary
  thisown: The membership flag

Instance Method Details

AddData(self, data)

Call this function to add the data object to the clipboard. You may call this function repeatedly after having cleared the clipboard. After this function has been called, the clipboard owns the data, so do not delete the data explicitly.

Parameters:
data
           (type=DataObject)

Returns:
bool

See Also:

wx.DataObject

Clear(self)

Clears data from the clipboard object and also the system's clipboard if possible.

Close(self)

Closes the clipboard.

Flush(self)

Flushes the clipboard: this means that the data which is currently on clipboard will stay available even after the application exits, possibly eating memory, otherwise the clipboard will be emptied on exit. Returns False if the operation is unsuccesful for any reason.

Returns:
bool

GetData(self, data)

Call this function to fill data with data on the clipboard, if available in the required format. Returns true on success.

Parameters:
data
           (type=DataObject)

Returns:
bool

IsOpened(self)

Query whether the clipboard is opened

Returns:
bool

IsSupported(self, format)

Returns True if the given format is available in the data object(s) on the clipboard.

Parameters:
format
           (type=DataFormat)

Returns:
bool

Open(self)

Call this function to open the clipboard before calling SetData and GetData. Call Close when you have finished with the clipboard. You should keep the clipboard open for only a very short time. Returns True on success.

Returns:
bool

SetData(self, data)

Set the clipboard data, this is the same as Clear followed by AddData.

Parameters:
data
           (type=DataObject)

Returns:
bool

See Also:

wx.DataObject

UsePrimarySelection(self, primary=True)

On platforms supporting it (the X11 based platforms), selects the so called PRIMARY SELECTION as the clipboard as opposed to the normal clipboard, if primary is True.

Parameters:
primary
           (type=bool)


Static Method Details

Get()

Returns global instance (wxTheClipboard) of the object.

Returns:
Clipboard

Property Details

thisown

The membership flag


Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:55:16 2009 http://epydoc.sf.net