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