enable grammerly in editor
[roojs1] / docs / symbols / Roo.EventManager.json
1 {
2   "name" : "Roo.EventManager",
3   "augments" : [],
4   "desc" : "Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides \nseveral useful events directly.\nSee {@link Roo.EventObject} for more details on normalized event objects.",
5   "isSingleton" : true,
6   "isStatic" : false,
7   "isBuiltin" : false,
8   "memberOf" : "EventManager",
9   "example" : "",
10   "deprecated" : "",
11   "since" : "",
12   "see" : "",
13   "params" : [],
14   "returns" : [],
15   "config" : [],
16   "methods" : [
17     {
18       "name" : "addListener",
19       "desc" : "Appends an event handler to an element (shorthand for addListener)",
20       "isStatic" : true,
21       "isConstructor" : false,
22       "isPrivate" : false,
23       "memberOf" : "Roo.EventManager",
24       "example" : "",
25       "deprecated" : "",
26       "since" : "",
27       "see" : "",
28       "params" : [
29         {
30           "name" : "element",
31           "type" : "String/HTMLElement",
32           "desc" : "The html element or id to assign the",
33           "isOptional" : false
34         },
35         {
36           "name" : "eventName",
37           "type" : "String",
38           "desc" : "The type of event to listen for",
39           "isOptional" : false
40         },
41         {
42           "name" : "handler",
43           "type" : "Function",
44           "desc" : "The method the event invokes",
45           "isOptional" : false
46         },
47         {
48           "name" : "scope",
49           "type" : "Object",
50           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
51           "isOptional" : false
52         },
53         {
54           "name" : "options",
55           "type" : "Object",
56           "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delegate {String} A simple selector to filter the target or look for a descendant of the target</li>\n<li>stopEvent {Boolean} True to stop the event. That is stop propagation, and prevent the default action.</li>\n<li>preventDefault {Boolean} True to prevent the default action</li>\n<li>stopPropagation {Boolean} True to prevent event propagation</li>\n<li>normalized {Boolean} False to pass a browser event to the handler function instead of an Roo.EventObject</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<div style=\"margin: 5px 20px 20px;\">\nCode:<pre><code>\nel.on('click', this.onClick, this, {\n    single: true,\n    delay: 100,\n    stopEvent : true,\n    forumId: 4\n});</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<p>\nCode:<pre><code>\nel.on({\n    'click' : {\n        fn: this.onClick\n        scope: this,\n        delay: 100\n    },\n    'mouseover' : {\n        fn: this.onMouseOver\n        scope: this\n    },\n    'mouseout' : {\n        fn: this.onMouseOut\n        scope: this\n    }\n});</code></pre>\n<p>\nOr a shorthand syntax:<br>\nCode:<pre><code>\nel.on({\n    'click' : this.onClick,\n    'mouseover' : this.onMouseOver,\n    'mouseout' : this.onMouseOut\n    scope: this\n});</code></pre>",
57           "isOptional" : false
58         }
59       ],
60       "returns" : []
61     },
62     {
63       "name" : "onDocumentReady",
64       "desc" : "Fires when the document is ready (before onload and before images are loaded). Can be \naccessed shorthanded Roo.onReady().",
65       "isStatic" : true,
66       "isConstructor" : false,
67       "isPrivate" : false,
68       "memberOf" : "Roo.EventManager",
69       "example" : "",
70       "deprecated" : "",
71       "since" : "",
72       "see" : "",
73       "params" : [
74         {
75           "name" : "fn",
76           "type" : "Function",
77           "desc" : "The method the event invokes",
78           "isOptional" : false
79         },
80         {
81           "name" : "scope",
82           "type" : "Object",
83           "desc" : "An  object that becomes the scope of the handler",
84           "isOptional" : false
85         },
86         {
87           "name" : "options",
88           "type" : "boolean",
89           "desc" : "",
90           "isOptional" : false
91         }
92       ],
93       "returns" : []
94     },
95     {
96       "name" : "onTextResize",
97       "desc" : "Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.",
98       "isStatic" : true,
99       "isConstructor" : false,
100       "isPrivate" : false,
101       "memberOf" : "Roo.EventManager",
102       "example" : "",
103       "deprecated" : "",
104       "since" : "",
105       "see" : "",
106       "params" : [
107         {
108           "name" : "fn",
109           "type" : "Function",
110           "desc" : "The method the event invokes",
111           "isOptional" : false
112         },
113         {
114           "name" : "scope",
115           "type" : "Object",
116           "desc" : "An object that becomes the scope of the handler",
117           "isOptional" : false
118         },
119         {
120           "name" : "options",
121           "type" : "boolean",
122           "desc" : "",
123           "isOptional" : false
124         }
125       ],
126       "returns" : []
127     },
128     {
129       "name" : "on",
130       "desc" : "Appends an event handler to an element (shorthand for addListener)",
131       "isStatic" : true,
132       "isConstructor" : false,
133       "isPrivate" : false,
134       "memberOf" : "Roo.EventManager",
135       "example" : "",
136       "deprecated" : "",
137       "since" : "",
138       "see" : "",
139       "params" : [
140         {
141           "name" : "element",
142           "type" : "String/HTMLElement",
143           "desc" : "The html element or id to assign the",
144           "isOptional" : false
145         },
146         {
147           "name" : "eventName",
148           "type" : "String",
149           "desc" : "The type of event to listen for",
150           "isOptional" : false
151         },
152         {
153           "name" : "handler",
154           "type" : "Function",
155           "desc" : "The method the event invokes",
156           "isOptional" : false
157         },
158         {
159           "name" : "scope",
160           "type" : "Object",
161           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
162           "isOptional" : false
163         },
164         {
165           "name" : "options",
166           "type" : "Object",
167           "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delegate {String} A simple selector to filter the target or look for a descendant of the target</li>\n<li>stopEvent {Boolean} True to stop the event. That is stop propagation, and prevent the default action.</li>\n<li>preventDefault {Boolean} True to prevent the default action</li>\n<li>stopPropagation {Boolean} True to prevent event propagation</li>\n<li>normalized {Boolean} False to pass a browser event to the handler function instead of an Roo.EventObject</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<div style=\"margin: 5px 20px 20px;\">\nCode:<pre><code>\nel.on('click', this.onClick, this, {\n    single: true,\n    delay: 100,\n    stopEvent : true,\n    forumId: 4\n});</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<p>\nCode:<pre><code>\nel.on({\n    'click' : {\n        fn: this.onClick\n        scope: this,\n        delay: 100\n    },\n    'mouseover' : {\n        fn: this.onMouseOver\n        scope: this\n    },\n    'mouseout' : {\n        fn: this.onMouseOut\n        scope: this\n    }\n});</code></pre>\n<p>\nOr a shorthand syntax:<br>\nCode:<pre><code>\nel.on({\n    'click' : this.onClick,\n    'mouseover' : this.onMouseOver,\n    'mouseout' : this.onMouseOut\n    scope: this\n});</code></pre>",
168           "isOptional" : false
169         }
170       ],
171       "returns" : []
172     },
173     {
174       "name" : "removeResizeListener",
175       "desc" : "Removes the passed window resize listener.",
176       "isStatic" : true,
177       "isConstructor" : false,
178       "isPrivate" : false,
179       "memberOf" : "Roo.EventManager",
180       "example" : "",
181       "deprecated" : "",
182       "since" : "",
183       "see" : "",
184       "params" : [
185         {
186           "name" : "fn",
187           "type" : "Function",
188           "desc" : "The method the event invokes",
189           "isOptional" : false
190         },
191         {
192           "name" : "scope",
193           "type" : "Object",
194           "desc" : "The scope of handler",
195           "isOptional" : false
196         }
197       ],
198       "returns" : []
199     },
200     {
201       "name" : "onWindowResize",
202       "desc" : "Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.",
203       "isStatic" : true,
204       "isConstructor" : false,
205       "isPrivate" : false,
206       "memberOf" : "Roo.EventManager",
207       "example" : "",
208       "deprecated" : "",
209       "since" : "",
210       "see" : "",
211       "params" : [
212         {
213           "name" : "fn",
214           "type" : "Function",
215           "desc" : "The method the event invokes",
216           "isOptional" : false
217         },
218         {
219           "name" : "scope",
220           "type" : "Object",
221           "desc" : "An object that becomes the scope of the handler",
222           "isOptional" : false
223         },
224         {
225           "name" : "options",
226           "type" : "boolean",
227           "desc" : "",
228           "isOptional" : false
229         }
230       ],
231       "returns" : []
232     },
233     {
234       "name" : "wrap",
235       "desc" : "This is no longer needed and is deprecated. Places a simple wrapper around an event handler to override the browser event\nobject with a Roo.EventObject",
236       "isStatic" : true,
237       "isConstructor" : false,
238       "isPrivate" : false,
239       "memberOf" : "Roo.EventManager",
240       "example" : "",
241       "deprecated" : "This has been deprecated: ",
242       "since" : "",
243       "see" : "",
244       "params" : [
245         {
246           "name" : "fn",
247           "type" : "Function",
248           "desc" : "The method the event invokes",
249           "isOptional" : false
250         },
251         {
252           "name" : "scope",
253           "type" : "Object",
254           "desc" : "An object that becomes the scope of the handler",
255           "isOptional" : false
256         },
257         {
258           "name" : "override",
259           "type" : "boolean",
260           "desc" : "If true, the obj passed in becomes\n                            the execution scope of the listener",
261           "isOptional" : false
262         }
263       ],
264       "returns" : [
265         {
266           "name" : "",
267           "type" : "Function",
268           "desc" : "The wrapped function"
269         }
270       ]
271     },
272     {
273       "name" : "removeListener",
274       "desc" : "Removes an event handler",
275       "isStatic" : true,
276       "isConstructor" : false,
277       "isPrivate" : false,
278       "memberOf" : "Roo.EventManager",
279       "example" : "",
280       "deprecated" : "",
281       "since" : "",
282       "see" : "",
283       "params" : [
284         {
285           "name" : "element",
286           "type" : "String/HTMLElement",
287           "desc" : "The id or html element to remove the \n                            event from",
288           "isOptional" : false
289         },
290         {
291           "name" : "eventName",
292           "type" : "String",
293           "desc" : "The type of event",
294           "isOptional" : false
295         },
296         {
297           "name" : "fn",
298           "type" : "Function",
299           "desc" : "",
300           "isOptional" : false
301         }
302       ],
303       "returns" : [
304         {
305           "name" : "",
306           "type" : "Boolean",
307           "desc" : "True if a listener was actually removed"
308         }
309       ]
310     }
311   ],
312   "events" : []
313 }