2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
7 * @fileOverview Defines the "virtual" {@link CKEDITOR.eventInfo} class, which
8 * contains the defintions of the event object passed to event listeners.
9 * This file is for documentation purposes only.
13 * (Virtual Class) Do not call this constructor. This class is not really part
15 * @class Virtual class that illustrates the features of the event object to be
16 * passed to event listeners by a {@link CKEDITOR.event} based object.
17 * @name CKEDITOR.eventInfo
20 * var myEvent = new CKEDITOR.eventInfo(); // Error: CKEDITOR.eventInfo is undefined
25 * @name CKEDITOR.eventInfo.prototype.name
29 * someObject.on( 'someEvent', function( event )
31 * alert( <b>event.name</b> ); // "someEvent"
33 * someObject.fire( 'someEvent' );
37 * The object that publishes (sends) the event.
38 * @name CKEDITOR.eventInfo.prototype.sender
42 * someObject.on( 'someEvent', function( event )
44 * alert( <b>event.sender</b> == someObject ); // "true"
46 * someObject.fire( 'someEvent' );
50 * The editor instance that holds the sender. May be the same as sender. May be
51 * null if the sender is not part of an editor instance, like a component
52 * running in standalone mode.
53 * @name CKEDITOR.eventInfo.prototype.editor
55 * @type CKEDITOR.editor
57 * myButton.on( 'someEvent', function( event )
59 * alert( <b>event.editor</b> == myEditor ); // "true"
61 * myButton.fire( 'someEvent', null, <b>myEditor</b> );
65 * Any kind of additional data. Its format and usage is event dependent.
66 * @name CKEDITOR.eventInfo.prototype.data
70 * someObject.on( 'someEvent', function( event )
72 * alert( <b>event.data</b> ); // "Example"
74 * someObject.fire( 'someEvent', <b>'Example'</b> );
78 * Any extra data appended during the listener registration.
79 * @name CKEDITOR.eventInfo.prototype.listenerData
83 * someObject.on( 'someEvent', function( event )
85 * alert( <b>event.listenerData</b> ); // "Example"
87 * , null, <b>'Example'</b> );
91 * Indicates that no further listeners are to be called.
92 * @name CKEDITOR.eventInfo.prototype.stop
95 * someObject.on( 'someEvent', function( event )
97 * <b>event.stop()</b>;
99 * someObject.on( 'someEvent', function( event )
101 * // This one will not be called.
103 * alert( someObject.fire( 'someEvent' ) ); // "false"
107 * Indicates that the event is to be cancelled (if cancelable).
108 * @name CKEDITOR.eventInfo.prototype.cancel
111 * someObject.on( 'someEvent', function( event )
113 * <b>event.cancel()</b>;
115 * someObject.on( 'someEvent', function( event )
117 * // This one will not be called.
119 * alert( someObject.fire( 'someEvent' ) ); // "true"