Method | __init__ |
Constructor @param name: clipboard name, can be either "CLIPBOARD" or "PRIMARY", see Gtk.Clipboard for details. |
Method | clear |
Undocumented |
Method | get_parsetree |
Get a parsetree from the clipboard. |
Method | get_text |
No summary |
Method | set_clipboard_data |
Set an item on the clipboard @param clipboard_data: a ClipboardData object |
Method | set_interwikilink |
No summary |
Method | set_pagelink |
No summary |
Method | set_parsetree |
Copy a parsetree to the clipboard. The parsetree can be pasted by the user either as formatted text within zim or as plain text outside zim. The tree can be the full tree for 'page', but also a selection. |
Method | set_text |
No summary |
Method | set_uri |
Copy an uri to the clipboard @param uri: an uri as string, or an object with an attribute uri |
Instance Variable | clipboard |
Undocumented |
Instance Variable | data |
Undocumented |
Method | _clear |
Undocumented |
Method | _get |
Undocumented |
Parameters | |
name | clipboard name, can be either "CLIPBOARD" or "PRIMARY", see Gtk.Clipboard for details. |
Get a parsetree from the clipboard.
Can handle various data types and convert them to ParseTree
objects. So they can be pasted directly in a text buffer.
The 'notebook' and optional 'path' arguments are used to format links relative to the page which is the target for the pasting or drop operation. Otherwise absolute links will be used.
Parameters | |
notebook | a Notebook object |
path | a Path object |
text_format | format to parse pasted text |
Returns | |
a ParseTree or None |
Returns | |
(unicode) text or None | |
Note | |
DO NOT USE THIS METHOD if you can use get_parsetree() instead |
Parameters | |
href | the link as shown in zim, e.g. "wp?foobar" |
url | the expanded url for this interwiki link, e.g. "http://en.wikipedia.org/wiki/foobar" |
Parameters | |
notebook | the Notebook object |
path | the Path object - used to resolve links etc. |
parsetree | the actual ParseTree to be set on the clipboard |
format | the format to use for pasting text, e.g. 'wiki' or 'plain' |
Parameters | |
text | text to set on the clipboard |
Note | |
DO NOT USE THIS METHOD if you can use set_parsetree() instead |