Roo/doc/Example.js
[roojs1] / Roo / doc / Synopsis.js
1 /*
2  * - LGPL
3  *
4  */
5
6 /**
7  * @class Roo.doc.Synopsis
8  * @extends Roo.bootstrap.Component
9  * Synopsis Element class
10  * @cfg {String} returntype return value
11  * @cfg {String} name title really..
12  * @cfg {String} stype (function|constant)
13  * @cfg {String} memberof class name
14  * @cfg {bool} is_static is a static member
15  * 
16  * @constructor
17  * Create a new Synopsis
18  * @param {Object} config The config object
19  */
20
21 Roo.doc.Synopsis = function(config){
22     Roo.doc.Synopsis.superclass.constructor.call(this, config);
23 };
24
25 Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component,  {
26     
27     memberof : '',
28     is_static : false,
29     returntype : '',
30     name: '',
31     stype:   'function',
32      
33     getAutoCreate : function(){
34         
35         var syn = this.items[0]; // hopefully...
36         Roo.log(this.items);
37         
38          
39         var cfg ={
40             tag: 'h5',
41             cls : 'refsynopsisdiv',
42             cn : [
43                 {
44                     cls: 'funcsynopsis',
45                     cn: [
46                         {
47                             tag: 'p',
48                             cn: {
49                                 tag:'code',
50                                 cls : 'funcprototype',
51                                 cn: [
52                                     this.returntype + ' ',
53                                     {
54                                         tag: 'strong',
55                                         cls : this.stype,
56                                         html : this.name
57                                     },
58                                     '(',
59                                     {
60                                         tag: 'span',
61                                         cls : 'roo-params'
62                                     },
63                                     ')'
64                                 ]
65                                 
66                             }
67                         }
68                     ]
69                 }
70                 
71             ]
72         };
73         
74         
75         
76         return cfg;
77     },
78     getChildContainer : function(build_call)
79     {
80          
81         
82         return this.el.select('.roo-params',true).first();
83     }
84     
85     
86     
87     
88    
89 });
90
91  
92
93