-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
949 lines (743 loc) · 25.8 KB
/
index.html
File metadata and controls
949 lines (743 loc) · 25.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
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>mfr.lua output formatter</title>
<link rel="stylesheet" href="ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>mfr.lua</h1>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#system">system</a></li>
<li><a href="#color_setters">color setters</a></li>
<li><a href="#prettifyers">prettifyers</a></li>
<li><a href="#showing">showing</a></li>
<li><a href="#settings">settings</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><strong>mfr</strong></li>
</ul>
</div>
<div id="content">
<h1>Module <code>mfr</code></h1>
<p>lua formatter</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#cut_string">cut_string (str, length)</a></td>
<td class="summary">cut string into slices of certain length.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#deepcopy">deepcopy (orig)</a></td>
<td class="summary">recursively copy table.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#belongs">belongs (element, sequence)</a></td>
<td class="summary">check if element belongs to array.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#space_split">space_split (str)</a></td>
<td class="summary">split string by whitespaces.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#split">split (str, separator)</a></td>
<td class="summary">split string by `separator` and return array.</td>
</tr>
</table>
<h2><a href="#system">system</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#execute_system_command">execute_system_command (command)</a></td>
<td class="summary">execute system shell command.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#is_supporting_colors">is_supporting_colors ()</a></td>
<td class="summary">check if terminal supports colors.</td>
</tr>
</table>
<h2><a href="#color_setters">color setters</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#set_bg">set_bg (message, color, is_closed, is_forced)</a></td>
<td class="summary">apply background color to string.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_fg">set_fg (message, color, is_forced)</a></td>
<td class="summary">apply foreground color to string.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_special_style">set_special_style (message, style, is_forced)</a></td>
<td class="summary">apply special style to string.</td>
</tr>
</table>
<h2><a href="#prettifyers">prettifyers</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#clear_screen">clear_screen ()</a></td>
<td class="summary">clear terminal screen.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#prettify_table">prettify_table (ugly_table)</a></td>
<td class="summary">make a good-looking string out of a table.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#pprint">pprint (object)</a></td>
<td class="summary">make a good-looking string out of anything.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#create_frame">create_frame (message, width, pattern)</a></td>
<td class="summary">create frame with message in terminal.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#create_line_borders">create_line_borders (text, length, border)</a></td>
<td class="summary">create line borders.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#create_page_borders">create_page_borders (message, width, pattern)</a></td>
<td class="summary">create page borders.</td>
</tr>
</table>
<h2><a href="#showing">showing</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#describe_fg_colors">describe_fg_colors (is_forced)</a></td>
<td class="summary">send available foreground colors to stdout.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#describe_bg_colors">describe_bg_colors (is_forced)</a></td>
<td class="summary">send available background colors to stdout.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#describe_special_styles">describe_special_styles (is_forced)</a></td>
<td class="summary">send available special styles to stdout.</td>
</tr>
</table>
<h2><a href="#settings">settings</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#set_max_recursion">set_max_recursion (value)</a></td>
<td class="summary">set maximal recursion level.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_max_recursion">get_max_recursion ()</a></td>
<td class="summary">get maximal recursion level.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_tab_representation">set_tab_representation (value)</a></td>
<td class="summary">set tab representation.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_tab_representation">get_tab_representation ()</a></td>
<td class="summary">get tab representation.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "cut_string"></a>
<strong>cut_string (str, length)</strong>
</dt>
<dd>
cut string into slices of certain length.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
string to be sliced
</li>
<li><span class="parameter">length</span>
<span class="types"><span class="type">number</span></span>
slices' length
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
list of slices
</ol>
<h3>Raises:</h3>
if str is not a string
if length is not a number
</dd>
<dt>
<a name = "deepcopy"></a>
<strong>deepcopy (orig)</strong>
</dt>
<dd>
recursively copy table.
note that this is a recursive function.
always check the data you process for safety! if `orig` is a table and is
more nested than mfr._MAX_RECURSION, then `orig` will be copied up to
mfr._MAX_RECURSION nested level without warning.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">orig</span>
<span class="types"><span class="type">any</span></span>
original value. if it is not a table-like object, it is
just returned
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">any</span></span>
copy of orig (same type, as `orig` parameter)
</ol>
</dd>
<dt>
<a name = "belongs"></a>
<strong>belongs (element, sequence)</strong>
</dt>
<dd>
check if element belongs to array.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">element</span>
element to search for
</li>
<li><span class="parameter">sequence</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
array to search in
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if element exists in sequence, otherwise false
</ol>
<h3>Raises:</h3>
if sequence is not a table
</dd>
<dt>
<a name = "space_split"></a>
<strong>space_split (str)</strong>
</dt>
<dd>
split string by whitespaces.
note that this function works faster than `mfr.split` with separator=" ".
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
string to be splitted
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
array of strings
</ol>
</dd>
<dt>
<a name = "split"></a>
<strong>split (str, separator)</strong>
</dt>
<dd>
split string by `separator` and return array.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
text to be splitted by `separator`
</li>
<li><span class="parameter">separator</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
string to split `str` with
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
array of splitted strings.
</ol>
<h3>Raises:</h3>
if str is not a string or separator is not a string and not nil.
</dd>
</dl>
<h2 class="section-header "><a name="system"></a>system</h2>
<dl class="function">
<dt>
<a name = "execute_system_command"></a>
<strong>execute_system_command (command)</strong>
</dt>
<dd>
execute system shell command.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">command</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
command to be sent for execution
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">any</span></span>
shell answer. nil if command returned non-zero exit code
(failed)
</ol>
<h3>Raises:</h3>
if command is not a string
</dd>
<dt>
<a name = "is_supporting_colors"></a>
<strong>is_supporting_colors ()</strong>
</dt>
<dd>
check if terminal supports colors.
<h3>Returns:</h3>
<ol>
<li>
<span class="types"><span class="type">number</span></span>
number of supported colors</li>
<li>
<span class="types"><span class="type">boolean</span></span>
false if colors aren't supported</li>
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="color_setters"></a>color setters</h2>
<dl class="function">
<dt>
<a name = "set_bg"></a>
<strong>set_bg (message, color, is_closed, is_forced)</strong>
</dt>
<dd>
apply background color to string.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
string apply background color to (or table, if
passing all arguments as 1 table). see usage for more
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
background color to be applied to message
</li>
<li><span class="parameter">is_closed</span>
<span class="types"><span class="type">boolean</span></span>
whether style will be disabled with end of message
</li>
<li><span class="parameter">is_forced</span>
<span class="types"><span class="type">boolean</span></span>
whether style will be applied evem if colors are
not supported
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
colorful message
</ol>
<h3>Raises:</h3>
if colors are not supported and is_forced is not true
<h3>See also:</h3>
<ul>
<a href="index.html#describe_bg_colors">mfr.describe_bg_colors</a>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">mfr.<span class="function-name">apply_bg_color</span>(<span class="string">"hello"</span>, <span class="string">"red"</span>)
mfr.<span class="function-name">apply_bg_color</span>{message = <span class="string">"message"</span>, color = <span class="string">"red"</span>, is_closed = <span class="keyword">true</span>,
is_forced = <span class="keyword">false</span>}</pre>
</ul>
</dd>
<dt>
<a name = "set_fg"></a>
<strong>set_fg (message, color, is_forced)</strong>
</dt>
<dd>
apply foreground color to string.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
string apply color to
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
color to be applied to message
</li>
<li><span class="parameter">is_forced</span>
<span class="types"><span class="type">boolean</span></span>
whether style will be applied even if colors are
not supported
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
colorful message
</ol>
<h3>Raises:</h3>
if colors are not supported and is_forced is not true
<h3>See also:</h3>
<ul>
<a href="index.html#describe_fg_colors">mfr.describe_fg_colors</a>
</ul>
</dd>
<dt>
<a name = "set_special_style"></a>
<strong>set_special_style (message, style, is_forced)</strong>
</dt>
<dd>
apply special style to string.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
string apply style to
</li>
<li><span class="parameter">style</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
style to be applied to message
</li>
<li><span class="parameter">is_forced</span>
<span class="types"><span class="type">boolean</span></span>
whether style will be applied even if colors are
not supported
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
styled message
</ol>
<h3>Raises:</h3>
if colors are not supported and is_forced is not true
<h3>See also:</h3>
<ul>
<a href="index.html#describe_special_styles">mfr.describe_special_styles</a>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="prettifyers"></a>prettifyers</h2>
<dl class="function">
<dt>
<a name = "clear_screen"></a>
<strong>clear_screen ()</strong>
</dt>
<dd>
clear terminal screen.
please, use with caution.
</dd>
<dt>
<a name = "prettify_table"></a>
<strong>prettify_table (ugly_table)</strong>
</dt>
<dd>
make a good-looking string out of a table.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ugly_table</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
pretty table ready to be sent to stdout
</ol>
<h3>Raises:</h3>
error if ugly_table is not a table.
<h3>Usage:</h3>
<ul>
<pre class="example">useless_list = {<span class="number">1</span>, <span class="number">2</span>, a = {<span class="string">"text"</span>, <span class="string">"text"</span>}}
pretty_table = mfr.<span class="function-name">prettify_table</span>(useless_list))
<span class="global">io</span>.<span class="function-name">write</span>(pretty_table)</pre>
</ul>
</dd>
<dt>
<a name = "pprint"></a>
<strong>pprint (object)</strong>
</dt>
<dd>
make a good-looking string out of anything.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">object</span>
anything to be pretty-printed
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">perfect_table = {<span class="number">1</span>, <span class="number">2</span>, a = {<span class="string">"text1"</span>, <span class="string">"text2"</span>}}
mfr.<span class="function-name">pprint</span>(perfect_table)</pre>
</ul>
</dd>
<dt>
<a name = "create_frame"></a>
<strong>create_frame (message, width, pattern)</strong>
</dt>
<dd>
create frame with message in terminal.
note that all tabs will be converted to character sequence defined by
`set_tab_representation` - 4 spaces is a default value.
please, note that pattern param is cut, and only its 1st symbol is used.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
text to be displayed
</li>
<li><span class="parameter">width</span>
<span class="types"><span class="type">number</span></span>
width of the frame
</li>
<li><span class="parameter">pattern</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
pattern to be used to create frame
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
framed message
</ol>
<h3>Raises:</h3>
if message is not a string, or width is not a number, or pattern is
not a string
<h3>See also:</h3>
<ul>
<li><a href="index.html#set_tab_representation">mfr.set_tab_representation</a></li>
<li><a href="index.html#create_line_borders">mfr.create_line_borders</a></li>
<li><a href="index.html#create_page_borders">mfr.create_page_borders</a></li>
</ul>
</dd>
<dt>
<a name = "create_line_borders"></a>
<strong>create_line_borders (text, length, border)</strong>
</dt>
<dd>
create line borders.
note that all tabs will be converted to character sequence defined by
`set_tab_representation` - 4 spaces is a default value.
please, note that border param is cut, and only its 1st symbol is used.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">text</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
text to be displayed put inside borders
</li>
<li><span class="parameter">length</span>
<span class="types"><span class="type">number</span></span>
length of the frame
</li>
<li><span class="parameter">border</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
border to put text into
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
bordered text
</ol>
<h3>Raises:</h3>
if text is not a string, or length is not a number, or border is not
a string
<h3>See also:</h3>
<ul>
<li><a href="index.html#set_tab_representation">mfr.set_tab_representation</a></li>
<li><a href="index.html#create_frame">mfr.create_frame</a></li>
<li><a href="index.html#create_page_borders">mfr.create_page_borders</a></li>
</ul>
</dd>
<dt>
<a name = "create_page_borders"></a>
<strong>create_page_borders (message, width, pattern)</strong>
</dt>
<dd>
create page borders.
note that all tabs will be converted to character sequence defined by
`set_tab_representation` - 4 spaces is a default value.
please, note that pattern param is cut, and only its 1st symbol is used.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
message to be displayed put inside borders
</li>
<li><span class="parameter">width</span>
<span class="types"><span class="type">number</span></span>
width of the page
</li>
<li><span class="parameter">pattern</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
border pattern to put message into
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
bordered page of text
</ol>
<h3>Raises:</h3>
if message is not a string
<h3>See also:</h3>
<ul>
<li><a href="index.html#set_tab_representation">mfr.set_tab_representation</a></li>
<li><a href="index.html#create_frame">mfr.create_frame</a></li>
<li><a href="index.html#create_line_borders">mfr.create_line_borders</a></li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="showing"></a>showing</h2>
<dl class="function">
<dt>
<a name = "describe_fg_colors"></a>
<strong>describe_fg_colors (is_forced)</strong>
</dt>
<dd>
send available foreground colors to stdout.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">is_forced</span>
<span class="types"><span class="type">boolean</span></span>
if true, output is provided even if terminal does
not support colors.
</li>
</ul>
<h3>Raises:</h3>
if colors are not supported and is_forced is not true
</dd>
<dt>
<a name = "describe_bg_colors"></a>
<strong>describe_bg_colors (is_forced)</strong>
</dt>
<dd>
send available background colors to stdout.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">is_forced</span>
<span class="types"><span class="type">boolean</span></span>
if true, output is provided even if terminal does
not support colors.
</li>
</ul>
<h3>Raises:</h3>
if colors are not supported and is_forced is not true
</dd>
<dt>
<a name = "describe_special_styles"></a>
<strong>describe_special_styles (is_forced)</strong>
</dt>
<dd>
send available special styles to stdout.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">is_forced</span>
<span class="types"><span class="type">boolean</span></span>
if true, output is provided even if terminal does
not support colors.
</li>
</ul>
<h3>Raises:</h3>
if colors are not supported and is_forced is not true
</dd>
</dl>
<h2 class="section-header "><a name="settings"></a>settings</h2>
<dl class="function">
<dt>
<a name = "set_max_recursion"></a>
<strong>set_max_recursion (value)</strong>
</dt>
<dd>
set maximal recursion level.
for instance, recursion level 7 means that recursive function cannot call
itself more than 7 times.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">value</span>
<span class="types"><span class="type">number</span></span>
new recursion level
</li>
</ul>
<h3>Raises:</h3>
error if value param is not a signed number.
<h3>See also:</h3>
<ul>
<a href="index.html#set_max_recursion">mfr.set_max_recursion</a>
</ul>
</dd>
<dt>
<a name = "get_max_recursion"></a>
<strong>get_max_recursion ()</strong>
</dt>
<dd>
get maximal recursion level.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">number</span></span>
maximal recursion level
</ol>
<h3>See also:</h3>
<ul>
<a href="index.html#set_max_recursion">mfr.set_max_recursion</a>
</ul>
</dd>
<dt>
<a name = "set_tab_representation"></a>
<strong>set_tab_representation (value)</strong>
</dt>
<dd>
set tab representation.
for instance, tab representation " " (default value) means that tab
symbol will be substituted for 4 spaces in functions that need tab to have
stable length.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
new tab representation
</li>
</ul>
<h3>Raises:</h3>
error if value param is not a string.
<h3>See also:</h3>
<ul>
<a href="index.html#get_tab_representation">mfr.get_tab_representation</a>
</ul>
</dd>
<dt>
<a name = "get_tab_representation"></a>
<strong>get_tab_representation ()</strong>
</dt>
<dd>
get tab representation.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
current tab representation
</ol>
<h3>See also:</h3>
<ul>
<a href="index.html#set_tab_representation">mfr.set_tab_representation</a>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-07-18 17:46:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>