4 * Documentation - designed to generate HTML+Docbook!?!
8 Roo.doc = Roo.doc || {};
11 * @class Roo.doc.Entry
12 * @extends Roo.bootstrap.Component
13 * Entry Element class - describes a method etc...
14 * @name {String} name of method
15 * @purpose {String} short description of method.
19 * @param {Object} config The config object
24 Roo.mailer.Body = function(config){
25 Roo.mailer.Body.superclass.constructor.call(this, config);
26 //this.el = Roo.get(document.body);
27 var body = Roo.get(document.body);
35 Roo.mailer.Body._calls++;
36 if (Roo.mailer.Body._calls > 1) {
39 // call onRender once... and block next call...?
41 this.onRender = function() { };
45 Roo.mailer.Body._calls = 0;
47 Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component, {
53 getAutoCreate : function(){
76 addxtype : function (tree, cntr)
78 return this.addxtypeChild(tree,cntr);
94 * @class Roo.doc.Example
95 * @extends Roo.bootstrap.Example
96 * Example Element class
97 * @cfg {String} lang (phpcode|programlisting) section type.
102 * Create a new Synopsis
103 * @param {Object} config The config object
106 Roo.mailer.Example = function(config){
107 Roo.mailer.Example.superclass.constructor.call(this, config);
110 Roo.extend(Roo.mailer.Example, Roo.bootstrap.Component, {
116 getAutoCreate : function(){
118 // no colour highlighting in here....
127 html : String.format('{0}',this.code).replace(/\n/g, '<br/>')
149 * @class Roo.doc.Para
150 * @extends Roo.bootstrap.Component
151 * Param Element class
155 * Create a new Paragraph
156 * @param {Object} config The config object
159 Roo.mailer.Para = function(config){
160 Roo.mailer.Para.superclass.constructor.call(this, config);
163 Roo.extend(Roo.mailer.Para, Roo.bootstrap.Component, {
166 getAutoCreate : function(){
168 //?? this is the synopsis type....
170 // this is not very fancy...
178 if (this.parent().is_list) {
205 * @class Roo.doc.Param
206 * @extends Roo.bootstrap.Component
207 * Param Element class
208 * @cfg {bool} is_optional
209 * @cfg {String} type argument type
211 * @cfg {String} desc short description
212 * @cfg {String} defaultvalue default value
216 * @param {Object} config The config object
219 Roo.mailer.Param = function(config){
220 Roo.mailer.Param.superclass.constructor.call(this, config);
223 Roo.extend(Roo.mailer.Param, Roo.bootstrap.Component, {
231 getAutoCreate : function(){
233 //?? this is the synopsis type....
236 if (this.parent().stype == 'parameter') {
247 html : this.type + ' ' + this.name
256 if (this.parent().stype == 'return') {
273 // this is not very fancy...
278 is_optional ? '[' : '',
282 this.defaultvalue == '' ? '' : ' = ',
284 ',' // not really.. but let's do it anyway...
309 * @class Roo.doc.Section
310 * @extends Roo.bootstrap.Component
311 * SectionElement class
312 * @cfg {String} stype (desc|parameter|return|note|example) section type.
315 * Create a new Synopsis
316 * @param {Object} config The config object
319 Roo.mailer.Section = function(config){
320 Roo.mailer.Section.superclass.constructor.call(this, config);
323 Roo.extend(Roo.mailer.Section, Roo.bootstrap.Component, {
328 getAutoCreate : function(){
338 html : this.stype.charAt(0).toUpperCase() + this.stype.slice(1) //ucfirst
342 if (this.stype == 'parameter') {
344 // db package uses variable list here... - it results in dd/dl but the layout is messed up..
347 cls: 'itemizedlist roo-params'
354 getChildContainer : function(build_call)
357 if (this.stype == 'parameter') {
358 return this.el.select('.roo-params',true).first();
375 * @class Roo.doc.Synopsis
376 * @extends Roo.bootstrap.Component
377 * Synopsis Element class
378 * @cfg {String} returntype return value
379 * @cfg {String} name title really..
380 * @cfg {String} stype (function|constant)
383 * Create a new Synopsis
384 * @param {Object} config The config object
387 Roo.mailer.Synopsis = function(config){
388 Roo.mailer.Synopsis.superclass.constructor.call(this, config);
391 Roo.extend(Roo.mailer.Synopsis, Roo.bootstrap.Component, {
398 getAutoCreate : function(){
402 cls : 'refsynopsisdiv',
411 cls : 'funcprototype',
413 this.returntype + ' ',
438 getChildContainer : function(build_call)
442 return this.el.select('.roo-params',true).first();