Fix #6893 - fix roo docs
[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   "config" : [
25     {
26       "name" : "listeners",
27       "type" : "Object",
28       "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>",
29       "memberOf" : "Roo.util.Observable",
30       "optvals" : []
31     }
32   ],
33   "methods" : [
34     {
35       "name" : "purgeListeners",
36       "desc" : "Removes all listeners for this object",
37       "isStatic" : false,
38       "isConstructor" : false,
39       "isPrivate" : false,
40       "memberOf" : "Roo.util.Observable",
41       "example" : "",
42       "deprecated" : "",
43       "since" : "",
44       "see" : "",
45       "params" : [],
46       "returns" : []
47     },
48     {
49       "name" : "on",
50       "desc" : "Appends an event handler to this element (shorthand for addListener)",
51       "isStatic" : false,
52       "isConstructor" : false,
53       "isPrivate" : false,
54       "memberOf" : "Roo.util.Observable",
55       "example" : "",
56       "deprecated" : "",
57       "since" : "",
58       "see" : "",
59       "params" : [
60         {
61           "name" : "eventName",
62           "type" : "String",
63           "desc" : "The type of event to listen for",
64           "isOptional" : false
65         },
66         {
67           "name" : "handler",
68           "type" : "Function",
69           "desc" : "The method the event invokes",
70           "isOptional" : false
71         },
72         {
73           "name" : "scope",
74           "type" : "Object",
75           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
76           "isOptional" : false
77         },
78         {
79           "name" : "options",
80           "type" : "Object",
81           "desc" : "(optional)",
82           "isOptional" : false
83         }
84       ],
85       "returns" : []
86     },
87     {
88       "name" : "un",
89       "desc" : "Removes a listener (shorthand for removeListener)",
90       "isStatic" : false,
91       "isConstructor" : false,
92       "isPrivate" : false,
93       "memberOf" : "Roo.util.Observable",
94       "example" : "",
95       "deprecated" : "",
96       "since" : "",
97       "see" : "",
98       "params" : [
99         {
100           "name" : "eventName",
101           "type" : "String",
102           "desc" : "The type of event to listen for",
103           "isOptional" : false
104         },
105         {
106           "name" : "handler",
107           "type" : "Function",
108           "desc" : "The handler to remove",
109           "isOptional" : false
110         },
111         {
112           "name" : "scope",
113           "type" : "Object",
114           "desc" : "(optional) The scope (this object) for the handler",
115           "isOptional" : false
116         }
117       ],
118       "returns" : []
119     },
120     {
121       "name" : "addEvents",
122       "desc" : "Used to define events on this Observable",
123       "isStatic" : false,
124       "isConstructor" : false,
125       "isPrivate" : false,
126       "memberOf" : "Roo.util.Observable",
127       "example" : "",
128       "deprecated" : "",
129       "since" : "",
130       "see" : "",
131       "params" : [
132         {
133           "name" : "object",
134           "type" : "Object",
135           "desc" : "The object with the events defined",
136           "isOptional" : false
137         }
138       ],
139       "returns" : []
140     },
141     {
142       "name" : "releaseCapture",
143       "desc" : "Removes <b>all</b> added captures from the Observable.",
144       "isStatic" : true,
145       "isConstructor" : false,
146       "isPrivate" : false,
147       "memberOf" : "Roo.util.Observable",
148       "example" : "",
149       "deprecated" : "",
150       "since" : "",
151       "see" : "",
152       "params" : [
153         {
154           "name" : "o",
155           "type" : "Observable",
156           "desc" : "The Observable to release",
157           "isOptional" : false
158         }
159       ],
160       "returns" : []
161     },
162     {
163       "name" : "removeListener",
164       "desc" : "Removes a listener",
165       "isStatic" : false,
166       "isConstructor" : false,
167       "isPrivate" : false,
168       "memberOf" : "Roo.util.Observable",
169       "example" : "",
170       "deprecated" : "",
171       "since" : "",
172       "see" : "",
173       "params" : [
174         {
175           "name" : "eventName",
176           "type" : "String",
177           "desc" : "The type of event to listen for",
178           "isOptional" : false
179         },
180         {
181           "name" : "handler",
182           "type" : "Function",
183           "desc" : "The handler to remove",
184           "isOptional" : false
185         },
186         {
187           "name" : "scope",
188           "type" : "Object",
189           "desc" : "(optional) The scope (this object) for the handler",
190           "isOptional" : false
191         }
192       ],
193       "returns" : []
194     },
195     {
196       "name" : "fireEvent",
197       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
198       "isStatic" : false,
199       "isConstructor" : false,
200       "isPrivate" : false,
201       "memberOf" : "Roo.util.Observable",
202       "example" : "",
203       "deprecated" : "",
204       "since" : "",
205       "see" : "",
206       "params" : [
207         {
208           "name" : "eventName",
209           "type" : "String",
210           "desc" : "",
211           "isOptional" : false
212         },
213         {
214           "name" : "args",
215           "type" : "Object...",
216           "desc" : "Variable number of parameters are passed to handlers",
217           "isOptional" : false
218         }
219       ],
220       "returns" : [
221         {
222           "name" : "",
223           "type" : "Boolean",
224           "desc" : "returns false if any of the handlers return false otherwise it returns true"
225         }
226       ]
227     },
228     {
229       "name" : "hasListener",
230       "desc" : "Checks to see if this object has any listeners for a specified event",
231       "isStatic" : false,
232       "isConstructor" : false,
233       "isPrivate" : false,
234       "memberOf" : "Roo.util.Observable",
235       "example" : "",
236       "deprecated" : "",
237       "since" : "",
238       "see" : "",
239       "params" : [
240         {
241           "name" : "eventName",
242           "type" : "String",
243           "desc" : "The name of the event to check for",
244           "isOptional" : false
245         }
246       ],
247       "returns" : [
248         {
249           "name" : "",
250           "type" : "Boolean",
251           "desc" : "True if the event is being listened for, else false"
252         }
253       ]
254     },
255     {
256       "name" : "capture",
257       "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.",
258       "isStatic" : true,
259       "isConstructor" : false,
260       "isPrivate" : false,
261       "memberOf" : "Roo.util.Observable",
262       "example" : "",
263       "deprecated" : "",
264       "since" : "",
265       "see" : "",
266       "params" : [
267         {
268           "name" : "o",
269           "type" : "Observable",
270           "desc" : "The Observable to capture",
271           "isOptional" : false
272         },
273         {
274           "name" : "fn",
275           "type" : "Function",
276           "desc" : "The function to call",
277           "isOptional" : false
278         },
279         {
280           "name" : "scope",
281           "type" : "Object",
282           "desc" : "(optional) The scope (this object) for the fn",
283           "isOptional" : false
284         }
285       ],
286       "returns" : []
287     },
288     {
289       "name" : "addListener",
290       "desc" : "Appends an event handler to this component",
291       "isStatic" : false,
292       "isConstructor" : false,
293       "isPrivate" : false,
294       "memberOf" : "Roo.util.Observable",
295       "example" : "",
296       "deprecated" : "",
297       "since" : "",
298       "see" : "",
299       "params" : [
300         {
301           "name" : "eventName",
302           "type" : "String",
303           "desc" : "The type of event to listen for",
304           "isOptional" : false
305         },
306         {
307           "name" : "handler",
308           "type" : "Function",
309           "desc" : "The method the event invokes",
310           "isOptional" : false
311         },
312         {
313           "name" : "scope",
314           "type" : "Object",
315           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
316           "isOptional" : false
317         },
318         {
319           "name" : "options",
320           "type" : "Object",
321           "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>",
322           "isOptional" : false
323         }
324       ],
325       "returns" : []
326     }
327   ],
328   "events" : []
329 }