blob: a48fee299d1cf51eb4ecb373ea37982a1c24bef9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/* ************************************************************************
Copyright: 2008, OETIKER+PARTNER AG
License: GPL
Authors: Tobias Oetiker
$Id: $
* ************************************************************************ */
/**
* Place an instance of this widget into the application root. It will remain
* invisible. I will listen on the 'copy' bus for data to get ready for copying with
* [ctrl]+[c]
*/
qx.Class.define('tr.ui.CopyBuffer', {
extend : qx.ui.form.TextArea,
construct : function() {
this.base(arguments);
this.set({
width : 0,
height : 0,
allowGrowX : false,
allowGrowY : false,
decorator : null
});
qx.event.message.Bus.subscribe('copy', this.__copy, this);
},
members : {
/**
* TODOC
*
* @type member
* @param m {var} TODOC
* @return {void}
*/
__copy : function(m) {
var data = m.getData();
this.info('set: ' + data);
this.setValue(data);
this.selectAll();
}
}
});
|