sync
[roojs1] / docs / symbols / Roo.Document.json
1 {
2   "name" : "Roo.Document",
3   "augments" : [
4     "Roo.util.Observable"
5   ],
6   "desc" : "This is a convience class to wrap up the main document loading code.. , rather than adding Roo.onReady(......)",
7   "isSingleton" : false,
8   "isStatic" : false,
9   "isBuiltin" : false,
10   "memberOf" : "Document",
11   "example" : "",
12   "deprecated" : "",
13   "since" : "",
14   "see" : "",
15   "params" : [
16     {
17       "name" : "config",
18       "type" : "Object",
19       "desc" : "the methods and properties of the 'base' class for the application.\n\n Generic Page handler - implement this to start your app..\n\neg.\n MyProject = new Roo.Document({\n        events : {\n            'load' : true // your events..\n        },\n        listeners : {\n            'ready' : function() {\n                // fired on Roo.onReady()\n            }\n        }",
20       "isOptional" : false
21     }
22   ],
23   "returns" : [],
24   "throws" : "",
25   "requires" : "",
26   "config" : [
27     {
28       "name" : "listeners",
29       "type" : "Object",
30       "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n    listeners :  { \n       'click' : function(e) {\n           ..... \n        } ,\n        .... \n    } \n  </code></pre>",
31       "memberOf" : "Roo.util.Observable"
32     }
33   ],
34   "methods" : [
35     {
36       "name" : "purgeListeners",
37       "type" : "function",
38       "desc" : "Removes all listeners for this object",
39       "sig" : "()\n{\n\n}",
40       "static" : false,
41       "memberOf" : "Roo.util.Observable",
42       "isStatic" : false,
43       "isConstructor" : false,
44       "isPrivate" : false,
45       "example" : "",
46       "deprecated" : "",
47       "since" : "",
48       "see" : "",
49       "exceptions" : "",
50       "requires" : "",
51       "params" : [],
52       "returns" : []
53     },
54     {
55       "name" : "on",
56       "type" : "function",
57       "desc" : "Appends an event handler to this element (shorthand for addListener)",
58       "sig" : "(eventName, handler, scope, options)",
59       "static" : false,
60       "memberOf" : "Roo.util.Observable",
61       "isStatic" : false,
62       "isConstructor" : false,
63       "isPrivate" : false,
64       "example" : "",
65       "deprecated" : "",
66       "since" : "",
67       "see" : "",
68       "exceptions" : "",
69       "requires" : "",
70       "params" : [
71         {
72           "name" : "eventName",
73           "type" : "String",
74           "desc" : "The type of event to listen for",
75           "isOptional" : false
76         },
77         {
78           "name" : "handler",
79           "type" : "Function",
80           "desc" : "The method the event invokes",
81           "isOptional" : false
82         },
83         {
84           "name" : "scope",
85           "type" : "Object",
86           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
87           "isOptional" : false
88         },
89         {
90           "name" : "options",
91           "type" : "Object",
92           "desc" : "(optional)",
93           "isOptional" : false
94         }
95       ],
96       "returns" : []
97     },
98     {
99       "name" : "un",
100       "type" : "function",
101       "desc" : "Removes a listener (shorthand for removeListener)",
102       "sig" : "(eventName, handler, scope)",
103       "static" : false,
104       "memberOf" : "Roo.util.Observable",
105       "isStatic" : false,
106       "isConstructor" : false,
107       "isPrivate" : false,
108       "example" : "",
109       "deprecated" : "",
110       "since" : "",
111       "see" : "",
112       "exceptions" : "",
113       "requires" : "",
114       "params" : [
115         {
116           "name" : "eventName",
117           "type" : "String",
118           "desc" : "The type of event to listen for",
119           "isOptional" : false
120         },
121         {
122           "name" : "handler",
123           "type" : "Function",
124           "desc" : "The handler to remove",
125           "isOptional" : false
126         },
127         {
128           "name" : "scope",
129           "type" : "Object",
130           "desc" : "(optional) The scope (this object) for the handler",
131           "isOptional" : false
132         }
133       ],
134       "returns" : []
135     },
136     {
137       "name" : "addEvents",
138       "type" : "function",
139       "desc" : "Used to define events on this Observable",
140       "sig" : "(object)",
141       "static" : false,
142       "memberOf" : "Roo.util.Observable",
143       "isStatic" : false,
144       "isConstructor" : false,
145       "isPrivate" : false,
146       "example" : "",
147       "deprecated" : "",
148       "since" : "",
149       "see" : "",
150       "exceptions" : "",
151       "requires" : "",
152       "params" : [
153         {
154           "name" : "object",
155           "type" : "Object",
156           "desc" : "The object with the events defined",
157           "isOptional" : false
158         }
159       ],
160       "returns" : []
161     },
162     {
163       "name" : "releaseCapture",
164       "type" : "function",
165       "desc" : "Removes <b>all</b> added captures from the Observable.",
166       "sig" : "(o)",
167       "static" : true,
168       "memberOf" : "Roo.util.Observable",
169       "isStatic" : true,
170       "isConstructor" : false,
171       "isPrivate" : false,
172       "example" : "",
173       "deprecated" : "",
174       "since" : "",
175       "see" : "",
176       "exceptions" : "",
177       "requires" : "",
178       "params" : [
179         {
180           "name" : "o",
181           "type" : "Observable",
182           "desc" : "The Observable to release",
183           "isOptional" : false
184         }
185       ],
186       "returns" : []
187     },
188     {
189       "name" : "removeListener",
190       "type" : "function",
191       "desc" : "Removes a listener",
192       "sig" : "(eventName, handler, scope)",
193       "static" : false,
194       "memberOf" : "Roo.util.Observable",
195       "isStatic" : false,
196       "isConstructor" : false,
197       "isPrivate" : false,
198       "example" : "",
199       "deprecated" : "",
200       "since" : "",
201       "see" : "",
202       "exceptions" : "",
203       "requires" : "",
204       "params" : [
205         {
206           "name" : "eventName",
207           "type" : "String",
208           "desc" : "The type of event to listen for",
209           "isOptional" : false
210         },
211         {
212           "name" : "handler",
213           "type" : "Function",
214           "desc" : "The handler to remove",
215           "isOptional" : false
216         },
217         {
218           "name" : "scope",
219           "type" : "Object",
220           "desc" : "(optional) The scope (this object) for the handler",
221           "isOptional" : false
222         }
223       ],
224       "returns" : []
225     },
226     {
227       "name" : "fireEvent",
228       "type" : "function",
229       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
230       "sig" : "(eventName, args)",
231       "static" : false,
232       "memberOf" : "Roo.util.Observable",
233       "isStatic" : false,
234       "isConstructor" : false,
235       "isPrivate" : false,
236       "example" : "",
237       "deprecated" : "",
238       "since" : "",
239       "see" : "",
240       "exceptions" : "",
241       "requires" : "",
242       "params" : [
243         {
244           "name" : "eventName",
245           "type" : "String",
246           "desc" : "",
247           "isOptional" : false
248         },
249         {
250           "name" : "args",
251           "type" : "Object...",
252           "desc" : "Variable number of parameters are passed to handlers",
253           "isOptional" : false
254         }
255       ],
256       "returns" : [
257         {
258           "name" : "",
259           "type" : "Boolean",
260           "desc" : "returns false if any of the handlers return false otherwise it returns true"
261         }
262       ]
263     },
264     {
265       "name" : "hasListener",
266       "type" : "function",
267       "desc" : "Checks to see if this object has any listeners for a specified event",
268       "sig" : "(eventName)",
269       "static" : false,
270       "memberOf" : "Roo.util.Observable",
271       "isStatic" : false,
272       "isConstructor" : false,
273       "isPrivate" : false,
274       "example" : "",
275       "deprecated" : "",
276       "since" : "",
277       "see" : "",
278       "exceptions" : "",
279       "requires" : "",
280       "params" : [
281         {
282           "name" : "eventName",
283           "type" : "String",
284           "desc" : "The name of the event to check for",
285           "isOptional" : false
286         }
287       ],
288       "returns" : [
289         {
290           "name" : "",
291           "type" : "Boolean",
292           "desc" : "True if the event is being listened for, else false"
293         }
294       ]
295     },
296     {
297       "name" : "capture",
298       "type" : "function",
299       "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
300       "sig" : "(o, fn, scope)",
301       "static" : true,
302       "memberOf" : "Roo.util.Observable",
303       "isStatic" : true,
304       "isConstructor" : false,
305       "isPrivate" : false,
306       "example" : "",
307       "deprecated" : "",
308       "since" : "",
309       "see" : "",
310       "exceptions" : "",
311       "requires" : "",
312       "params" : [
313         {
314           "name" : "o",
315           "type" : "Observable",
316           "desc" : "The Observable to capture",
317           "isOptional" : false
318         },
319         {
320           "name" : "fn",
321           "type" : "Function",
322           "desc" : "The function to call",
323           "isOptional" : false
324         },
325         {
326           "name" : "scope",
327           "type" : "Object",
328           "desc" : "(optional) The scope (this object) for the fn",
329           "isOptional" : false
330         }
331       ],
332       "returns" : []
333     },
334     {
335       "name" : "addListener",
336       "type" : "function",
337       "desc" : "Appends an event handler to this component",
338       "sig" : "(eventName, handler, scope, options)",
339       "static" : false,
340       "memberOf" : "Roo.util.Observable",
341       "isStatic" : false,
342       "isConstructor" : false,
343       "isPrivate" : false,
344       "example" : "",
345       "deprecated" : "",
346       "since" : "",
347       "see" : "",
348       "exceptions" : "",
349       "requires" : "",
350       "params" : [
351         {
352           "name" : "eventName",
353           "type" : "String",
354           "desc" : "The type of event to listen for",
355           "isOptional" : false
356         },
357         {
358           "name" : "handler",
359           "type" : "Function",
360           "desc" : "The method the event invokes",
361           "isOptional" : false
362         },
363         {
364           "name" : "scope",
365           "type" : "Object",
366           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
367           "isOptional" : false
368         },
369         {
370           "name" : "options",
371           "type" : "Object",
372           "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>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)\n\t\t<pre><code>\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n    \t\tdelay: 100,\n    \t\tforumId: 4\n\t\t});\n\t\t</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<pre><code>\n\t\tel.on({\n\t\t\t'click': {\n        \t\tfn: this.onClick,\n        \t\tscope: this,\n        \t\tdelay: 100\n    \t\t}, \n    \t\t'mouseover': {\n        \t\tfn: this.onMouseOver,\n        \t\tscope: this\n    \t\t},\n    \t\t'mouseout': {\n        \t\tfn: this.onMouseOut,\n        \t\tscope: this\n    \t\t}\n\t\t});\n\t\t</code></pre>\n<p>\nOr a shorthand syntax which passes the same scope object to all handlers:\n     \t<pre><code>\n\t\tel.on({\n\t\t\t'click': this.onClick,\n    \t\t'mouseover': this.onMouseOver,\n    \t\t'mouseout': this.onMouseOut,\n    \t\tscope: this\n\t\t});\n\t\t</code></pre>",
373           "isOptional" : false
374         }
375       ],
376       "returns" : []
377     }
378   ],
379   "events" : []
380 }