Partial Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs2 / symbols / Roo.EventManager.json
1 {
2   "name" : "Roo.EventManager",
3   "augments" : [
4   ],
5   "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.",
6   "isSingleton" : true,
7   "isStatic" : true,
8   "isBuiltin" : false,
9   "config" : [
10   ],
11   "methods" : [
12     {
13       "name" : "addListener",
14       "desc" : "Appends an event handler to an element (shorthand for addListener)",
15       "isStatic" : true,
16       "isConstructor" : false,
17       "isPrivate" : false,
18       "memberOf" : "Roo.EventManager",
19       "example" : "",
20       "deprecated" : "",
21       "since" : "",
22       "see" : "",
23       "params" : [
24         {
25           "name" : "element",
26           "type" : "String/HTMLElement",
27           "desc" : "The html element or id to assign the",
28           "isOptional" : false
29         },
30         {
31           "name" : "eventName",
32           "type" : "String",
33           "desc" : "The type of event to listen for",
34           "isOptional" : false
35         },
36         {
37           "name" : "handler",
38           "type" : "Function",
39           "desc" : "The method the event invokes",
40           "isOptional" : false
41         },
42         {
43           "name" : "scope",
44           "type" : "Object",
45           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
46           "isOptional" : false
47         },
48         {
49           "name" : "options",
50           "type" : "Object",
51           "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>",
52           "isOptional" : false
53         }
54       ],
55       "returns" : [
56       ]
57     },
58     {
59       "name" : "onDocumentReady",
60       "desc" : "Fires when the document is ready (before onload and before images are loaded). Can be \naccessed shorthanded Roo.onReady().",
61       "isStatic" : true,
62       "isConstructor" : false,
63       "isPrivate" : false,
64       "memberOf" : "Roo.EventManager",
65       "example" : "",
66       "deprecated" : "",
67       "since" : "",
68       "see" : "",
69       "params" : [
70         {
71           "name" : "fn",
72           "type" : "Function",
73           "desc" : "The method the event invokes",
74           "isOptional" : false
75         },
76         {
77           "name" : "scope",
78           "type" : "Object",
79           "desc" : "An  object that becomes the scope of the handler",
80           "isOptional" : false
81         },
82         {
83           "name" : "options",
84           "type" : "boolean",
85           "desc" : "",
86           "isOptional" : false
87         }
88       ],
89       "returns" : [
90       ]
91     },
92     {
93       "name" : "onTextResize",
94       "desc" : "Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.",
95       "isStatic" : true,
96       "isConstructor" : false,
97       "isPrivate" : false,
98       "memberOf" : "Roo.EventManager",
99       "example" : "",
100       "deprecated" : "",
101       "since" : "",
102       "see" : "",
103       "params" : [
104         {
105           "name" : "fn",
106           "type" : "Function",
107           "desc" : "The method the event invokes",
108           "isOptional" : false
109         },
110         {
111           "name" : "scope",
112           "type" : "Object",
113           "desc" : "An object that becomes the scope of the handler",
114           "isOptional" : false
115         },
116         {
117           "name" : "options",
118           "type" : "boolean",
119           "desc" : "",
120           "isOptional" : false
121         }
122       ],
123       "returns" : [
124       ]
125     },
126     {
127       "name" : "on",
128       "desc" : "Appends an event handler to an element (shorthand for addListener)",
129       "isStatic" : true,
130       "isConstructor" : false,
131       "isPrivate" : false,
132       "memberOf" : "Roo.EventManager",
133       "example" : "",
134       "deprecated" : "",
135       "since" : "",
136       "see" : "",
137       "params" : [
138         {
139           "name" : "element",
140           "type" : "String/HTMLElement",
141           "desc" : "The html element or id to assign the",
142           "isOptional" : false
143         },
144         {
145           "name" : "eventName",
146           "type" : "String",
147           "desc" : "The type of event to listen for",
148           "isOptional" : false
149         },
150         {
151           "name" : "handler",
152           "type" : "Function",
153           "desc" : "The method the event invokes",
154           "isOptional" : false
155         },
156         {
157           "name" : "scope",
158           "type" : "Object",
159           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
160           "isOptional" : false
161         },
162         {
163           "name" : "options",
164           "type" : "Object",
165           "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>",
166           "isOptional" : false
167         }
168       ],
169       "returns" : [
170       ]
171     },
172     {
173       "name" : "removeResizeListener",
174       "desc" : "Removes the passed window resize listener.",
175       "isStatic" : true,
176       "isConstructor" : false,
177       "isPrivate" : false,
178       "memberOf" : "Roo.EventManager",
179       "example" : "",
180       "deprecated" : "",
181       "since" : "",
182       "see" : "",
183       "params" : [
184         {
185           "name" : "fn",
186           "type" : "Function",
187           "desc" : "The method the event invokes",
188           "isOptional" : false
189         },
190         {
191           "name" : "scope",
192           "type" : "Object",
193           "desc" : "The scope of handler",
194           "isOptional" : false
195         }
196       ],
197       "returns" : [
198       ]
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     {
235       "name" : "wrap",
236       "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",
237       "isStatic" : true,
238       "isConstructor" : false,
239       "isPrivate" : false,
240       "memberOf" : "Roo.EventManager",
241       "example" : "",
242       "deprecated" : "This has been deprecated: ",
243       "since" : "",
244       "see" : "",
245       "params" : [
246         {
247           "name" : "fn",
248           "type" : "Function",
249           "desc" : "The method the event invokes",
250           "isOptional" : false
251         },
252         {
253           "name" : "scope",
254           "type" : "Object",
255           "desc" : "An object that becomes the scope of the handler",
256           "isOptional" : false
257         },
258         {
259           "name" : "override",
260           "type" : "boolean",
261           "desc" : "If true, the obj passed in becomes\n                            the execution scope of the listener",
262           "isOptional" : false
263         }
264       ],
265       "returns" : [
266         {
267           "name" : "",
268           "type" : "Function",
269           "desc" : "The wrapped function"
270         }
271       ]
272     },
273     {
274       "name" : "removeListener",
275       "desc" : "Removes an event handler",
276       "isStatic" : true,
277       "isConstructor" : false,
278       "isPrivate" : false,
279       "memberOf" : "Roo.EventManager",
280       "example" : "",
281       "deprecated" : "",
282       "since" : "",
283       "see" : "",
284       "params" : [
285         {
286           "name" : "element",
287           "type" : "String/HTMLElement",
288           "desc" : "The id or html element to remove the \n                            event from",
289           "isOptional" : false
290         },
291         {
292           "name" : "eventName",
293           "type" : "String",
294           "desc" : "The type of event",
295           "isOptional" : false
296         },
297         {
298           "name" : "fn",
299           "type" : "Function",
300           "desc" : "",
301           "isOptional" : false
302         }
303       ],
304       "returns" : [
305         {
306           "name" : "",
307           "type" : "Boolean",
308           "desc" : "True if a listener was actually removed"
309         }
310       ]
311     }
312   ],
313   "events" : [
314   ]
315 }