00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 ::REQUIRES 'fsobjects.cls'
00049
00050 ::REQUIRES 'nodes.cls'
00051
00052 ::REQUIRES 'htmlutil.cls'
00053
00054 ::REQUIRES 'htmlrexxclass.cls'
00055
00056
00057
00058 ::CLASS htmlrexxprogram PUBLIC
00059
00060
00061 ::METHOD xref CLASS
00062
00063
00064
00065
00066
00067
00068
00069 ::METHOD emit CLASS
00070 use arg htmlout, folder, file, globalix
00071
00072 tp = .head_html~new~text
00073 tp~queue('<title>'file~filename'</title>')
00074 tp~queue(.nodes~prodssheet)
00075 tp~queue('<link rel="stylesheet" href="tabs.css">')
00076
00077 tp~queue('</head>')
00078 tp~queue('<body>')
00079
00080
00081 .htmlutil~tabshead(tp, htmlout~topmenu, 'petprograms')
00082
00083 menuq = .queue~new
00084 menuq~queue(.array~of('ooRexx', 'programs_oorexx.html', 'petoorexx'))
00085 menuq~queue(.array~of('rexx', 'programs_rexx.html', 'petrexx'))
00086 menuq~queue(.array~of('all', 'programs_all.html', 'petall' ))
00087 .htmlutil~tabshead(tp, menuq, 'petall')
00088
00089
00090 tp~queue('<h1>'file~document~relpath' File Reference</h2>')
00091 if file~document~isoo
00092 then type = .nodes~rsorex'OORexx'
00093 else type = .nodes~rscrex'Classic Rexx'
00094
00095 tp~queue('<h3>'type'</h3>')
00096
00097 tp~queue('<hr size="1"/>')
00098
00099
00100 if file~document~reqrefs~items > 0
00101 then do
00102 tp~queue('<h2>Required by</h2>')
00103 do r over file~document~reqrefs
00104 tp~queue('<a href = "'r~rdatom~hdocurl'#'r~rdatom~hdocanchor'">'r~rdatom~document~filename'</a><br/>')
00105 end
00106 end
00107
00108 if file~document~proclist~items > 0
00109 then self~featsumm(sortq(file~document~proclist), 'Procedures', tp)
00110
00111
00112 if file~document~procexpose~items > 0
00113 then do
00114 tp~queue('<h2>Exposed variables</h2>')
00115 do r over file~document~procexpose
00116 rq = file~document~procexpose[r]
00117 self~exposesumm(rq, r, tp)
00118
00119 end
00120 end
00121
00122
00123
00124
00125 tp~queue('<h2>Detailed Description</h2>')
00126
00127 blocko = htmlout~noprefix(file~document~getfirstblock)
00128 do i over blocko~text
00129 if i~words = 0
00130 then tp~queue('<br/>')
00131 else tp~queue(i)
00132 end
00133
00134 tp~queue('<hr size="1"/>')
00135
00136 features = file~document~featurelist
00137 nolabels = .false
00138 do i over features
00139 type = ''
00140 visib = ''
00141 parms = ''
00142 exposes = ''
00143 select
00144 when i~type = 'PROC'
00145 then do
00146 parms = i~arglist
00147 exposes = i~exposelist
00148 end
00149 when i~type = 'LABL'
00150 then do
00151 if nolabels
00152 then iterate
00153 end
00154 when i~type = 'CLAS'
00155 then do
00156
00157 .htmlrexxclass~emit(htmlout, i)
00158 nolabels = .true
00159 end
00160 when i~type = 'METH'
00161 then do
00162 iterate
00163 end
00164 when i~type = 'ATTR'
00165 then do
00166 iterate
00167 end
00168 when i~type = 'ROUT'
00169 then do
00170 parms = i~arglist
00171 exposes = i~exposelist
00172 end
00173 when i~type = 'REQU'
00174 then do
00175 nop
00176 end
00177 when i~type = 'OPTS'
00178 then do
00179 nop
00180 end
00181 when i~type = 'CONS'
00182 then do
00183 nop
00184 end
00185 otherwise do
00186 say 'unknown feature' i~type
00187 exit
00188 end
00189 end
00190
00191 tp~queue('<p><a name="'i~hdocanchor'"></a></p>')
00192
00193 tp~queue('<div class="memitem">')
00194 tp~queue('<div class="memproto">')
00195 tp~queue('<table class="memname"><tbody><tr><td class="memname">')
00196
00197 if i~type = 'PROC' & i~rexxname = '--entry_proc'
00198 then src = 'Entry procedure'
00199 else do
00200
00201 clause = i~document~featureclause(i~feature)
00202 src = ''
00203 clauseq = i~document~getsource(clause)
00204 do c over clauseq
00205 if c~right(1) = ','
00206 then c = c~left(c~length-1)
00207 src = src c
00208 end
00209 end
00210
00211 if i~type = 'REQU'
00212 then do
00213 f = globalix~filix[i~rexxname]
00214 parse var src w1 w2 w3
00215 if f <> .nil
00216 then do
00217 src = w1 '<a href="'f~document~hdocurl'">'w2'</a>' w3
00218 end
00219 end
00220
00221 if i~type = 'CLAS'
00222 then do
00223 parse var src w1 w2 rest
00224
00225 tp~queue(i~smallicon'<span class="keywordflow">'w1 '<a class="el" href="'i~hdocurl'#'i~hdocanchor'">'w2'</a>' rest)
00226 end
00227 else tp~queue(i~smallicon src)
00228 tp~queue('</td></tr></tbody></table>')
00229 tp~queue('</div>')
00230
00231 tp~queue('<div class="memdoc">')
00232 tp~queue('<p>')
00233
00234 blocko = htmlout~noprefix(file~document~getprevblock(i~feature))
00235 do b over blocko~text
00236 tp~queue(b'<br/>')
00237 end
00238
00239 .htmlutil~callableexpand(htmlout, i, blocko, tp)
00240
00241 tp~queue('<span class="paramname">Definition at line</span>')
00242 tp~queue('<a class="el" href="'file~document~hsrcurl'#'i~hsrcanchor'">'i~startline'</a> of')
00243 tp~queue('<a class="el" href="'file~document~hsrcurl'">'file~filename'</a><br/>')
00244
00245 tp~queue('</p>')
00246 tp~queue('</div>')
00247 tp~queue('</div>')
00248
00249 end
00250
00251
00252 .htmlutil~trailer(htmlout, tp)
00253
00254 tp~queue('</body></html>')
00255
00256
00257 towrite = htmlout~hdest||file~document~hdocurl
00258 .htmlutil~writepage(tp, towrite)
00259
00260
00261
00262
00263
00264 ::METHOD exposesumm CLASS PRIVATE
00265 use arg rdfeatures, exposedvar, tp
00266
00267 if rdfeatures~items < 1
00268 then return
00269
00270 tp~queue('<table cellspacing="0" cellpadding="0" border="0">')
00271 tp~queue('<tbody>')
00272 tp~queue('<tr>')
00273 tp~queue('<td colspan="2">')
00274 tp~queue('<span class="paramkey">'exposedvar'</span> <span class="paramname">exposed by</span>')
00275 tp~queue('</td>')
00276 tp~queue('</tr>')
00277
00278 do m over rdfeatures
00279
00280 bc = m~document~getanycomment(m~feature)
00281 if bc~text~items > 0
00282 then oneliner = .classfinder~classnames(m~document, bc~text[1])
00283 else oneliner = 'no comment'
00284
00285 returns = ' '
00286
00287 tp~queue('<tr>')
00288 tp~queue('<td class="memItemLeft" valign="top" nowrap="" align="right">')
00289 tp~queue(returns)
00290 tp~queue('</td>')
00291 tp~queue('<td class="memItemRight" valign="bottom">')
00292 tp~queue('<a class="e1" href="'m~hdocurl'#'m~hdocanchor'">'m~rexxname'</a>')
00293 if m~type = 'METH'
00294 then tp~queue('('self~commad(m~arglist)')')
00295 else tp~queue(' ')
00296 tp~queue('</td>')
00297 tp~queue('</tr>')
00298
00299 tp~queue('<tr>')
00300 tp~queue('<td class="mdescLeft"/>')
00301 tp~queue('<td class="mdescRight">')
00302 tp~queue(oneliner)
00303 tp~queue('</td>')
00304 tp~queue('</tr>')
00305 end
00306
00307 tp~queue('</tbody>')
00308 tp~queue('</table>')
00309
00310 ::METHOD commad CLASS PRIVATE
00311
00312 use arg args
00313
00314 if args~words < 2
00315 then return args
00316
00317 coms = ''
00318 do j = 1 to words(args)
00319 arg = args~word(j)
00320 if j <> words(args)
00321 then arg = arg','
00322 coms = coms arg
00323 end
00324 return coms~strip
00325
00326
00327
00328
00329
00330 ::METHOD featsumm CLASS PRIVATE
00331 use arg rdfeatures, title, tp
00332
00333 if rdfeatures~items < 1
00334 then return
00335
00336 tp~queue('<table cellspacing="0" cellpadding="0" border="0">')
00337 tp~queue('<tbody>')
00338 tp~queue('<tr>')
00339 tp~queue('</td>')
00340 tp~queue('</tr>')
00341
00342 tp~queue('<tr>')
00343 tp~queue('<td colspan="2">')
00344 tp~queue('<br/><h2>'title'</h2>')
00345 tp~queue('</td>')
00346 tp~queue('</tr>')
00347
00348 do m over rdfeatures
00349
00350 bc = m~document~getanycomment(m~feature)
00351 if bc~text~items > 0
00352 then oneliner = .classfinder~classnames(m~document, bc~text[1])
00353 else oneliner = 'no comment'
00354
00355 if bc~returns~items > 0
00356 then returns = bc~returns[1]
00357 else returns = ' '
00358
00359 tp~queue('<tr>')
00360 tp~queue('<td class="memItemLeft" valign="top" nowrap="" align="right">')
00361 tp~queue(returns)
00362 tp~queue('</td>')
00363 tp~queue('<td class="memItemRight" valign="bottom">')
00364 tp~queue('<a class="e1" href="'m~hdocurl'#'m~hdocanchor'">'m~rexxname'</a>')
00365 if m~type = 'PROC'
00366 then tp~queue('('self~commad(m~arglist)')')
00367 else tp~queue(' ')
00368 tp~queue('</td>')
00369 tp~queue('</tr>')
00370
00371 tp~queue('<tr>')
00372 tp~queue('<td class="mdescLeft"/>')
00373 tp~queue('<td class="mdescRight">')
00374 tp~queue(oneliner)
00375 tp~queue('</td>')
00376 tp~queue('</tr>')
00377 end
00378
00379 tp~queue('</tbody>')
00380 tp~queue('</table>')
00381