Skip to content

Commit 8ebe44c

Browse files
committed
Polished
1 parent 55f5041 commit 8ebe44c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+446
-91
lines changed
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
{r}←level CollectAplObjects__(lists ref parms collect);type;i;obj;html
1+
{r}←level CollectAplObjects__(lists ref parms collect);i;html;names;k;name;captions
22
r←⍬
3+
ReportRefs ref
34
html←''
4-
:For type :In lists.(fns opr scripts variables)
5-
:For i :In ⍳⍴type
6-
obj←i⊃type
7-
html,←level CollectFnsAndOprAndScriptsAndVars ref obj parms i collect
8-
:EndFor
5+
captions←'Functions:' 'Operators:' 'Scripts:' 'Variables:'
6+
:For i :In ⍳≢lists.(fns opr scripts variables)
7+
:If ~0∊⍴names←i⊃lists.(fns opr scripts variables)
8+
html,←⊂'<p class="type">',(i⊃captions),'</p>'
9+
:For k :In ⍳⍴names
10+
name←k⊃names
11+
html,←level CollectFnsAndOprAndScriptsAndVars ref name parms k collect
12+
:EndFor
13+
:EndIf
914
:EndFor
15+
html,←⊂'<div id="',(GetBookmark_ID parms),'"></div>'
16+
IncrementBookMarkCounter parms
1017
r←WriteHTML html
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
r←level CollectFnsAndOpr(ref name parms collect i);body;no;caption
1+
r←level CollectFnsAndOpr(ref name parms collect i);body;no;caption;target
22
r←''
33
:If ¯3≠≡body←(⎕UCS 13)A.Split ref.⎕VR name
44
body←ExchangeHtmlSpecialChars body
5-
r,←⊂'<div class="code_block" ',(collect MakeID(⍕ref),'.',name),'>'
5+
r,←⊂'<div class="bookmarktarget" ',(collect MakeID(⍕ref),'.',name),'>'
6+
r,←⊂'<div id="',(GetBookmark_ID parms),'" class="code_block">'
67
caption←MakeBreadCrumb collect.remove RemoveLevels⍕ref
7-
r,←⊂'<p class="caption">',(⍕i),'. ',caption,'.',name,'</p>'
8+
r,←⊂'<button title="Hide" class="accordion expanded">Hide</button>'
9+
target←'bookmark_',¯5↑'00000',⍕parms.bookmarkCounter-1
10+
r,←⊂'<button title="Brings previous object to the top" onClick="jump2bookmark(''',target,''')">Previous</button>'
11+
target←'bookmark_',¯5↑'00000',⍕parms.bookmarkCounter+1
12+
r,←⊂'<button title="Brings next object to the top" onClick="jump2bookmark(''',target,''')">Next</button>'
13+
r,←⊂'<p class="caption">',(⍕i),'. ',caption,'.',name,' (',(⍕¯1+≢body),' lines)</p>'
14+
r,←⊂'<div class="accordion-content">'
815
(1⊃body)←'<pre><code>',1⊃body
916
r,←body,⊂'</code></pre>'
10-
r,←⊂'</div>'
17+
r,←'</div>' '</div>' '</div>'
18+
IncrementBookMarkCounter parms
1119
:EndIf
1220
⍝Done
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
r←level CollectScript(ref name parms collect i);body;no;caption
1+
r←level CollectScript(ref name parms collect i);body;no;caption;target
22
r←''
33
:If 2=≡body←ref.⎕SRC ref.⍎name
44
body←(,¨'<>&')⎕R'\&lt;' '\&gt;' '\&amp;'⍠('Greedy' 0)⊣body
55
no←⍕2+level
6-
r,←⊂'<div ',(collect MakeID(⍕ref),'.',name),'>'
6+
r,←⊂'<div class="bookmarktarget" ',(collect MakeID(⍕ref),'.',name),'>'
7+
r,←⊂'<div id="',(GetBookmark_ID parms),'" class="code_block">'
78
caption←MakeBreadCrumb collect.remove RemoveLevels⍕ref
8-
r,←⊂'<p class="caption">',(⍕i),'. ',caption,'.',name,'</p>'
9-
r,←⊂'</div>'
9+
r,←⊂'<button title="Hide" class="accordion expanded">Hide</button>'
10+
target←'bookmark_',¯5↑'00000',⍕parms.bookmarkCounter-1
11+
r,←⊂'<button title="Brings previous object to the top" onClick="jump2bookmark(''',target,''')">Previous</button>'
12+
target←'bookmark_',¯5↑'00000',⍕parms.bookmarkCounter+1
13+
r,←⊂'<button title="Brings next object to the top" onClick="jump2bookmark(''',target,''')">Next</button>'
14+
r,←⊂'<p class="caption">',(⍕i),'. ',caption,'.',name,' (',(⍕≢body),' lines)</p>'
15+
r,←⊂'<div class="accordion-content">'
1016
body←({(3+⍴,⍕⍵){⍺↑'[',(⍕⍵),']'}¨¯1+⍳⍵}⍴body),¨body
1117
(1⊃body)←'<pre><code>',1⊃body
1218
r,←body,⊂'</code></pre>'
19+
r,←'</div>' '</div>' '</div>'
20+
IncrementBookMarkCounter parms
1321
:EndIf
1422
⍝Done

APLSource/CodeBrowser-11/CreateHtml-41.function

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
filename←CreateHtml parms;ns;collect;WriteHTML;info
2-
ns←⎕NS''
3-
ns.html←''
1+
filename←CreateHtml parms;collect;WriteHTML;info
2+
parms.bookmarkCounter←1
43
WriteHTML←parms.tno∘{0∊⍴⍵:r←⍬ ⋄ 'append'A.WriteUtf8File ⍺(,A.Nest,⍵)}
54
WriteHTML WriteHeader parms
65
WriteHTML⊂'<h1>',(ExchangeHtmlSpecialChars parms.caption),'</h1>'
@@ -16,15 +15,18 @@
1615
:EndIf
1716
collect←⎕NS''
1817
collect.namespaces←⍬
19-
collect.remove←¯1+⌊/{+/'.'=⍵}¨namespaces
18+
collect.remove←⌊/{+/'.'=⍵}¨namespaces
2019
:If parms.recursive
2120
collect.hasMainMenu←AddMainMenu parms collect
2221
:Else
2322
collect.hasMainMenu←0
2423
:EndIf
24+
WriteHTML'<div id="',(GetBookmark_ID parms),'"></div>'
25+
parms.bookmarkCounter+←1
2526
1 CollectAplObjects parms collect
2627
WriteHTML AddFooter parms
2728
WriteHTML AddParameters parms
29+
WriteHTML InjectJavaScriptLate ⍬
2830
WriteHTML('</body>' '</html>')
2931
filename←parms.filename
3032
⎕NUNTIE parms.tno

APLSource/CodeBrowser-11/CreateParms-41.function

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@
5050
r.viewInBrowser←0
5151
r.showParms←0
5252
r.version←{(1⊃⍵),' ',(2⊃⍵),' from ',(3⊃⍵)}Version
53-
r.⎕FX'r←∆List' 'r←{⍵,[1.5]⍎¨⍵}↓⎕nl 2'
53+
r.⎕FX'r←∆List' 'r←{⍵,[1.5]⍎¨⍵}↓⎕nl 2' 'r←(~(r[;1]~¨'' '')∊''tno'' ''refs'' ''bookmarkCounter'')⌿r'
5454
⍝Done

APLSource/CodeBrowser-11/CreateToc-41.function

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@
3535
:EndIf
3636
html,←(~flag)/⊂'</nav>'
3737
:EndIf
38+
⍝ Collapsible: html,←⊂'</div>'
3839
{}WriteHTML html
3940
⍝Done

APLSource/CodeBrowser-11/GUI-7/CopyGuiToParms-291.function

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
n.∆Parms.recursive←n.recursive.State
77
n.∆Parms.processGuiInstances←n.processGuiInstances.State
88
n.∆Parms.filename←n.filename.Text
9-
n.∆Parms.cssfilename←n.cssFilename.Text
9+
n.∆Parms.cssfilename←MassageCssFilename n.cssFilename.Text
10+
n.∆Parms.linkcssfile←n.linkCssFile.State
1011
n.∆Parms.lang←n.lang.Text
1112
n.∆Parms.showParms←n.showParms.State
1213
n.∆Parms.viewInBrowser←n.viewInBrowser.State

APLSource/CodeBrowser-11/GUI-7/CreateCssFilename-241.function

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,14 @@
2929
n.selectDirCssFile.onSelect←'OnBrowseForCssFile'
3030
n.selectDirCssFile.Posn[2]←n.TabCtrl.Size[2]-n.∆hgap+n.selectDirCssFile.Size[2]
3131
n.cssFilename.Size[2]-←2+n.selectDirCssFile.Size[2]
32+
33+
∆←⊂'Button'
34+
∆,←⊂'Style' 'Check'
35+
∆,←⊂'Caption' 'Link the CSS file rather than emebedd'
36+
∆,←⊂'Posn'((n.∆vgap+⊃↑+⌿⊃n.cssFilename.(Posn Size)),n.∆hgap)
37+
∆,←⊂'FontObj'n.∆APL_Font
38+
∆,←⊂'TipObj'n.∆Tip
39+
∆,←⊂'Tip'('Linking can be very useful for changing the CSS')
40+
∆,←⊂'Attach'('Top' 'Left' 'Top' 'Left')
41+
n.linkCssFile←⍎'linkCssFile'parent.⎕WC ∆
3242
⍝Done

APLSource/CodeBrowser-11/GUI-7/CreateForm-41.function

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
n←CreateForm n;∆;ref;∆Form
22
∆←⊂'Form'
33
∆,←⊂'Caption'({(1⊃⍵),' version ',(2⊃⍵),' from ',(3⊃⍵)}##.Version)
4-
∆,←⊂'Size'(⍬ ⍬)
54
∆,←⊂'Coord' 'Pixel'
65
∆,←⊂'Posn'(300 280)
7-
∆,←⊂'Size'(525 900)
6+
∆,←⊂'Size'(565 900)
87
n.∆Form←⍎'gui'⎕WC ∆
98

109
ref←⍎'SB'n.∆Form.⎕WC⊂'Statusbar'

APLSource/CodeBrowser-11/GUI-7/CreateGUI-1c1.function

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
n.Cancel.onSelect←1
1010
n.∆Form.n←n
1111
2 ⎕NQ n.Scan'Select'
12+
n.namespaces.SelText←2⍴1+⍴,n.namespaces.Text
1213
⎕NQ n.namespaces'GotFocus'
1314
⍝Done

0 commit comments

Comments
 (0)