generic_table.anubis
31.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
*Project* The Anubis Project
*Title* Generic table page.
*Copyright* Copyright (c) Alain Prouté 2004.
*Author* Alain Prouté
*Author* Olivier Duvernois
----------------------------------------------------------------------------------------
read tools/basis.anubis
read web/common.anubis
read web/making_a_web_site.anubis
The purpose is to print on a html browser a table from a List($Data) using the function
'generic_table()' describe below.
Note : the explanations are only given for HTML_Item and its components. But they are
also available for HTML_Form and HTML_Element and their components.
A table may have the following look :
+-----+----------+--------+-----------------------+ ...............
| | | | name 3 |
| num | name1 | name2 |-----------+-----------+ columns_name
| | | | name 31 | name 32 |
+-----+----------+--------+-----------+-----------+ ...............
| 1 | data11 | data12 | data131 | data132 | line 1 with background color a
+-----+----------+--------+-----------+-----------+ ...............
| 2 | data21 | data22 | data231 | data232 | line 2 with background color b
+-----+----------+--------+-----------+-----------+ ...............
| 3 | data31 | data32 | data331 | data332 | line 3 with background color a
+-----+----------+--------+-----------+-----------+ ...............
| n | datan1 | datan2 | datan31 | datan32 | line n with background color ?
+-----+----------+--------+-----------+-----------+ ...............
|total| total1 | | | total32 | total line
+-----+----------+--------+-----------+-----------+ ...............
For the total-line, assuming that datax1 to dataxn and datax32 to datan32 are numbers
(Word32, Float or Maybe(Float)).
The columns name are just a List(Item_Row).
The column 'num' is in the case you want to enumerate your data. The existence of this
column depends on the line function.
Lines are given by the function : (RGB color,Word32 num,$Data d) -> Item_Row
where : - (RGB)color is the color of the background of the row (the 'a color' or 'b
color');
- (Word32)num the number of the data (to enumerate).
So, this function must be written something like :
(RGB color, Word32 num,$Data d) |->
row([background_color(color)], // and of course possibly other row-options
[
cell([], (Word32 -> $HTML)(num) )
. ($Data -> List(Cell))d // how data is printed in cells
]).
But, for the above convenient function with no enumeration, you can only write :
(RGB color, $Data d) |->
row([background_color(color)], // and of course possibly other row-options
($Data -> List(Cell))d // how data is printed in cells
).
If you want to sum by column your data, use the following type :
public type Total_Line($Data,$Upplet,$Row):
no_total,
total
(
($Upplet,$Data) -> $Upplet sum_functions,
$Upplet -> $Row print_total_line,
$Upplet initial_value
).
$Row is for HTML_Row($HTML).
$Upplet represents the components of $Data that will be sum.
Example :
with the above sheme table, $Data is something like :
type $Data
data
(
Data1 d1,
Data2 d2
Data3 d3
).
and type Data3:
data3
(
Data31 d31,
Data32 d32
).
So $Upplet will be (Data1,Data32) : sums are wanted for those 2 datum
The function ($Upplet,$Data) -> $Upplet will be written like :
($Upplet u,$Data d) -> if u is (u1,u2) then (u1+d1(d), u2+d32(d3(d)))
(if of course (Data1 + Data1) and (Data32 + Data32) are defined).
- Several columns -
-------------------
If you want to print your data on sevaral columns (i.e. considering the above table
scheme as a column), you must specify the number of columns. You will obtain :
Here is a List($Data) : l = [a,b,c,d,e,f,g,h,i,j,k,l,m];
and f : (RGB,Word32,$Data) -> Item_Row
You want to print this list on 3 columns.
The result will be :
+-----------+-----------+-----------+
| col.names | col.names | col.names |
+-----------+-----------+-----------+
| f(a) | f(f) | f(k) |
+-----------+-----------+-----------+
| f(b) | f(g) | f(l) |
+-----------+-----------+-----------+ Each column is a table as defined
| f(c) | f(h) | f(m) | above.
+-----------+-----------+-----------+
| f(d) | f(i) | |
+-----------+-----------+-----------+
| f(e) | f(j) | |
+-----------+-----------+-----------+
If several columns are required, it's also asked for spaces between two colums.
So use the following type :
public type HowManyColumns:
_1,
several (Word32 col_nb,
Word32 spacer).
- Now the Generic table definition -
------------------------------------
Here is the most customizable generic table. Below, they are some convenience functions.
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color,
Total_Line($Data,$Upplet,HTML_Row(HTML_Off_Form)) total_line
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,Word32,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color,
Total_Line($Data,$Upplet,HTML_Row(HTML_In_Form)) total_line
).
Note :
List(Table_Option) : if you choose 'nude' (i.e. border(0,0,0)), don't forget a
horizontal spacer between the cells contain in the 'line_format' row. If you don't put
any, each data will be closer to the next one.
- Convenience functions -
-------------------------
1/ Table without multicolumns, enumeration and total-line:
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
(RGB,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
(RGB,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color
).
2/ Table with total-line and without multicolumns, enumeration.
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
(RGB,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color,
Total_Line($Data,$Upplet,HTML_Row(HTML_Off_Form)) total_line
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
(RGB,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color,
Total_Line($Data,$Upplet,HTML_Row(HTML_In_Form)) total_line
).
3/ Table with multicolumns, enumeration, but without total
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,Word32,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color
).
4/ Table with multicolumns and without enumeration & total
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color
).
--- That's all for public part. -------------------------------------------------------------------------
When the datum $Data must be presented on several columns, the initial list must be
re-composed : sot the type Print_Table.
type Print_Table($Data):
print_table
(
$Data data,
Word32 num
).
*** Transform List($Data) into List(Print_Table($Data))
define (List(Print_Table($Data)),List($Data))
get_n_elements
(
List($Data) l,
List(Print_Table($Data)) result,
Word32 n,
Word32 ct, // counter
Word32 num
) =
if l is
{
[] then (reverse(result),[]),
[h . t] then
if ct = n
then (reverse([print_table(h,num+1) . result]),t)
else get_n_elements(t,[print_table(h,num+1) . result],n,ct+1,num+1)
}.
define List(List(Print_Table($Data)))
short_lists
(
List($Data) l,
Word32 nb, // number of element of short list
Word32 ct // counter for numbering data (initialized at 0)
) =
if get_n_elements(l,[],nb,1,ct) is (result,unused)
then if unused is
{
[] then [result],
[_ . _] then [result . short_lists(unused,nb,ct+nb)]
}.
- Generic row -
---------------
define (List(HTML_Row($HTML)),$Upplet)
generic_rows
(
List(Print_Table($Data)) lpt,
(RGB,Word32,$Data) -> HTML_Row($HTML) line_format,
RGB a_color,
RGB b_color,
($Upplet,$Data) -> $Upplet do_sum,
List(HTML_Row($HTML)) rows,
$Upplet sum
) =
if lpt is
{
[] then (reverse(rows),sum),
[h . t] then
generic_rows(t,line_format,b_color,a_color,do_sum,
[line_format(a_color,num(h),data(h)) . rows],do_sum(sum,data(h)))
}.
- HTML_In_Form -
----------------
define List(HTML_Cell(HTML_In_Form))
generic_cells
(
List(List(Print_Table($Data))) print_data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) names,
(RGB,Word32,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color,
($Upplet,$Data) -> $Upplet do_sum,
$Upplet -> HTML_Row(HTML_In_Form) total_line,
$Upplet value,
Word32 spacer
) =
if print_data is
{
[] then (List(HTML_Cell(HTML_In_Form))) [],
[h . t] then
if generic_rows(h,line_format,a_color,b_color,do_sum,(List(HTML_Row(HTML_In_Form)))[],value) is
(rows,new_value) then
if t is []
then [cell([top],table(lto,names+rows+[total_line(new_value)]))]
else [
cell([top],table(lto,append(names,rows)))
. if spacer = 0
then generic_cells
(t,lto,names,line_format,a_color,b_color,do_sum,total_line,new_value,spacer)
else [cell([width(spacer)],text([],""))
. generic_cells
(t,lto,names,line_format,a_color,b_color,do_sum,total_line,new_value,spacer)]
]
}.
define Word32
Word32 x / Word32 y
=
if (Maybe((Word32,Word32)))(x/y) is
{
failure then 0,
success(p) then if p is (q,r) then q
}.
define Word32
Word32 x (mod Word32 y)
=
if (Maybe((Word32,Word32)))(x/y) is
{
failure then 0,
success(p) then if p is (q,r) then r
}.
public define HTML_In_Form
generic_table
(
List($Data) l,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) names,
HowManyColumns hm_col,
(RGB,Word32,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color,
Total_Line($Data,$Upplet,HTML_Row(HTML_In_Form)) total_line
) =
table([],
if l is []
then []
else
with nbl = length(l),
[
row([],
if total_line is
{
no_total then
with col_nb = if hm_col is
{
_1 then 1,
several(n,_) then n
},
with spacer = if hm_col is
{
_1 then 0,
several(n,sp) then sp
},
generic_cells
(short_lists(l,truncate_to_Word32(nbl)/col_nb +
if (truncate_to_Word32(nbl) (mod col_nb)) >- 0 then 1 else 0,0),
lto,names,line_format,a_color,b_color,
(One u,$Data d) |-> unique,(One _) |-> row([],[]),unique,spacer),
total(sum_fct,total_line1,init) then
with col_nb = if hm_col is
{
_1 then 1,
several(n,_) then n
},
with spacer = if hm_col is
{
_1 then 0,
several(n,sp) then sp
},
generic_cells
(
short_lists(l,truncate_to_Word32(nbl)/col_nb +
if (truncate_to_Word32(nbl) (mod col_nb)) >- 0 then 1 else 0,0),
lto,names,line_format,a_color,b_color,
sum_fct,total_line1,init,spacer
)
})
]).
- HTML_Off_Form -
----------------
define List(HTML_Cell(HTML_Off_Form))
generic_cells
(
List(List(Print_Table($Data))) print_data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) names,
(RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color,
($Upplet,$Data) -> $Upplet do_sum,
$Upplet -> HTML_Row(HTML_Off_Form) total_line,
$Upplet value,
Word32 spacer
) =
if print_data is
{
[] then (List(HTML_Cell(HTML_Off_Form))) [],
[h . t] then
if generic_rows(h,line_format,a_color,b_color,do_sum,(List(HTML_Row(HTML_Off_Form)))[],value) is
(rows,new_value) then
if t is []
then [cell([top],table(lto,(names+rows+[total_line(new_value)])))]
else [
cell([top],table(lto,append(names,rows)))
. if spacer =0
then generic_cells
(t,lto,names,line_format,a_color,b_color,do_sum,total_line,new_value,spacer)
else [cell([width(spacer)],text([],""))
. generic_cells
(t,lto,names,line_format,a_color,b_color,do_sum,total_line,new_value,spacer)]
]
}.
public define HTML_Off_Form
generic_table
(
List($Data) l,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) names,
HowManyColumns hm_col,
(RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color,
Total_Line($Data,$Upplet,HTML_Row(HTML_Off_Form)) total_line
) =
table([],
with nbl = length(l),
[
row([],
if total_line is
{
no_total then
with col_nb = if hm_col is
{
_1 then 1,
several(n,_) then n
},
with spacer = if hm_col is
{
_1 then 0,
several(n,sp) then sp
},
generic_cells
(
short_lists(l,truncate_to_Word32(nbl)/col_nb +
if (truncate_to_Word32(nbl) (mod col_nb)) >- 0 then 1 else 0,0),
lto,names,line_format,a_color,b_color,
(One u,$Data d) |-> unique,(One _) |-> row([],[]),unique,spacer
),
total(sum_fct,total_line1,init) then
with col_nb = if hm_col is
{
_1 then 1,
several(n,_) then n
},
with spacer = if hm_col is
{
_1 then 0,
several(n,sp) then sp
},
generic_cells
(
short_lists(l,truncate_to_Word32(nbl)/col_nb +
if (truncate_to_Word32(nbl) (mod col_nb)) >- 0 then 1 else 0,0),
lto,names,line_format,a_color,b_color,
sum_fct,total_line1,init,spacer
)
})
]).
- Convenience functions :
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
(RGB,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color
) =
generic_table
(
(List($Data)) data,
(List(Table_Option)) lto,
(List(HTML_Row(HTML_Off_Form))) columns_name,
(HowManyColumns) _1,
((RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Word32 n,$Data d) |-> line_format(r,d),
(RGB) a_color,
(RGB) b_color,
(Total_Line($Data,$Data,HTML_Row(HTML_Off_Form))) no_total
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
(RGB,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color
) =
generic_table
(
(List($Data)) data,
(List(Table_Option)) lto,
(List(HTML_Row(HTML_In_Form))) columns_name,
(HowManyColumns) _1,
((RGB,Word32,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Word32 n,$Data d) |-> line_format(r,d),
(RGB) a_color,
(RGB) b_color,
(Total_Line($Data,$Data,HTML_Row(HTML_In_Form))) no_total
).
2/ Table with total-line and without multicolumns, enumeration.
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
(RGB,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color,
Total_Line($Data,$Upplet,HTML_Row(HTML_Off_Form)) total_line
) =
generic_table
(
(List($Data)) data,
(List(Table_Option)) lto,
(List(HTML_Row(HTML_Off_Form))) columns_name,
(HowManyColumns) _1,
((RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Word32 n,$Data d) |-> line_format(r,d),
(RGB) a_color,
(RGB) b_color,
(Total_Line($Data,$Upplet,(HTML_Row(HTML_Off_Form)))) total_line
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
(RGB,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color,
Total_Line($Data,$Upplet,HTML_Row(HTML_In_Form)) total_line
) =
generic_table
(
(List($Data)) data,
(List(Table_Option)) lto,
(List(HTML_Row(HTML_In_Form))) columns_name,
(HowManyColumns) _1,
((RGB,Word32,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Word32 n,$Data d) |-> line_format(r,d),
(RGB) a_color,
(RGB) b_color,
(Total_Line($Data,$Upplet,(HTML_Row(HTML_In_Form)))) total_line
).
3/ Table with multicolumns, enumeration, but without total
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color
) =
generic_table
(
(List($Data)) data,
(List(Table_Option)) lto,
(List(HTML_Row(HTML_Off_Form))) columns_name,
(HowManyColumns) number_of_columns,
((RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Word32 n,$Data d) |-> line_format(r,n,d),
(RGB) a_color,
(RGB) b_color,
(Total_Line($Data,$Data,(HTML_Row(HTML_Off_Form)))) no_total
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,Word32,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color
) =
generic_table
(
(List($Data)) data,
(List(Table_Option)) lto,
(List(HTML_Row(HTML_In_Form))) columns_name,
(HowManyColumns) number_of_columns,
((RGB,Word32,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Word32 n,$Data d) |-> line_format(r,n,d),
(RGB) a_color,
(RGB) b_color,
(Total_Line($Data,$Data,(HTML_Row(HTML_In_Form)))) no_total
).
4/ Table with multicolumns and without enumeration & total
public define HTML_Off_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_Off_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,$Data) -> HTML_Row(HTML_Off_Form) line_format,
RGB a_color,
RGB b_color
) =
generic_table
(
(List($Data)) data,
(List(Table_Option)) lto,
(List(HTML_Row(HTML_Off_Form))) columns_name,
(HowManyColumns) number_of_columns,
((RGB,Word32,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Word32 n,$Data d) |-> line_format(r,d),
(RGB) a_color,
(RGB) b_color,
(Total_Line($Data,$Data,(HTML_Row(HTML_Off_Form)))) no_total
).
public define HTML_In_Form
generic_table
(
List($Data) data,
List(Table_Option) lto,
List(HTML_Row(HTML_In_Form)) columns_name,
HowManyColumns number_of_columns,
(RGB,$Data) -> HTML_Row(HTML_In_Form) line_format,
RGB a_color,
RGB b_color
) =
generic_table
(
(List($Data)) data,
(List(Table_Option)) lto,
(List(HTML_Row(HTML_In_Form))) columns_name,
(HowManyColumns) number_of_columns,
((RGB,Word32,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Word32 n,$Data d) |-> line_format(r,d),
(RGB) a_color,
(RGB) b_color,
(Total_Line($Data,$Data,(HTML_Row(HTML_In_Form)))) no_total
).