2 * Ext JS Library 0.30
\r
3 * Copyright(c) 2006-2009, Ext JS, LLC.
\r
4 * licensing@extjs.com
\r
6 * http://extjs.com/license
\r
10 * @class Ext.air.Clipboard
12 * Allows you to manipulate the native system clipboard and handle various formats.
13 * This class is essentially a passthrough to air.Clipboard.generalClipboard at this
14 * time, but may get more Ext-like functions in the future.
16 * The Clipboard has different types which it can hold:
18 * air.ClipboardFormats.TEXT_FORMAT - air:text
19 * air.ClipboardFormats.HTML_FORMAT - air:html
20 * air.ClipboardFormats.RICH_TEXT_FORMAT - air:rtf
21 * air.ClipboardFormats.URL_FORMAT - air:url
22 * air.ClipboardFormats.FILE_LIST_FORMAT - air:file list
23 * air.ClipboardFormats.BITMAP_FORMAT - air:bitmap
25 Ext.air.Clipboard = function() {
26 var clipboard = air.Clipboard.generalClipboard;
30 * Determine if there is any data in a particular format clipboard.
31 * @param {String} format Use the air.ClipboardFormats CONSTANT or the string value
33 hasData: function(format) {
34 return clipboard.hasFormat(format);
37 * Set the data for a particular format clipboard.
38 * @param {String} format Use the air.ClipboardFormats CONSTANT or the string value
39 * @param {Mixed} data Data to set
41 setData: function(format, data) {
42 clipboard.setData(format, data);
45 * Set the data handler for a particular format clipboard.
46 * @param {String} format Use the air.ClipboardFormats CONSTANT or the string value
47 * @param {Function} fn The function to evaluate when getting the clipboard data
49 setDataHandler: function(format, fn) {
50 clipboard.setDataHandler(format, fn);
53 * Get the data for a particular format.
54 * @param {String} format Use the air.ClipboardFormats CONSTANT or the string value
55 * @param {String} transferMode
57 getData: function(format, transferMode) {
58 clipboard.getData(format, transferMode);
61 * Clear the clipboard for all formats.
67 * Clear the data for a particular format.
68 * @param {String} format Use the air.ClipboardFormats CONSTANT or the string value
70 clearData: function(format) {
71 clipboard.clearData(format);