aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/.view.luadoc
blob: c5e4742610f67288a6a2fbb34a7febe189faf545 (plain)
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
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
-- Copyright 2007-2022 Mitchell. See LICENSE.
-- This is a DUMMY FILE used for making LuaDoc for Views.

---
-- A Textadept view object.
-- Constants are documented in the fields they apply to.
-- While you can work with individual view instances, it is often useful to work with just the
-- global one.
-- Many of these functions and fields are derived from view-specific functionality of the
-- Scintilla editing component, and additional information can be found on the [Scintilla
-- website](https://scintilla.org/ScintillaDoc.html). Note that with regard to Scintilla-specific
-- functionality, this API is a _suggestion_, not a hard requirement. All of that functionality
-- also exists in [`buffer`](), even if undocumented.
-- Any view fields set on startup (e.g. in *~/.textadept/init.lua*) will be the default,
-- initial values for all views.
-- @field additional_carets_blink (bool)
--   Allow additional carets to blink.
--   The default value is `true`.
-- @field additional_carets_visible (bool)
--   Display additional carets.
--   The default value is `true`.
-- @field all_lines_visible (bool, Read-only)
--   Whether or not all lines are visible.
-- @field annotation_visible (number)
--   The annotation visibility mode.
--
--   * `view.ANNOTATION_HIDDEN`
--     Annotations are invisible.
--   * `view.ANNOTATION_STANDARD`
--     Draw annotations left-justified with no decoration.
--   * `view.ANNOTATION_BOXED`
--     Indent annotations to match the annotated text and outline them with a box.
--   * `view.ANNOTATION_INDENTED`
--     Indent non-decorated annotations to match the annotated text.
--
--   The default value is `view.ANNOTATION_HIDDEN`.
-- @field auto_c_max_height (number)
--   The maximum number of items per page to show in autocompletion and user lists.
--   The default value is `5`.
-- @field auto_c_max_width (number)
--   The maximum number of characters per item to show in autocompletion and user lists.
--   The default value is `0`, which automatically sizes the width to fit the longest item.
-- @field call_tip_fore_hlt (number, Write-only)
--   A call tip's highlighted text foreground color, in "0xBBGGRR" format.
-- @field call_tip_pos_start (number, Write-only)
--   The position at which backspacing beyond it hides a visible call tip.
-- @field call_tip_position (boolean)
--   Display a call tip above the current line instead of below it.
--   The default value is `false`.
-- @field call_tip_use_style (number)
--   The pixel width of tab characters in call tips.
--   When non-zero, also enables the use of style number `view.STYLE_CALLTIP` instead of
--   `view.STYLE_DEFAULT` for call tip styles.
--   The default value is `0`.
-- @field caret_line_frame (number)
--   The caret line's frame width in pixels.
--   When non-zero, the line that contains the caret is framed instead of colored in. The
--   `view.caret_line_back` and `view.caret_line_back_alpha` properties apply to the frame.
--   The default value is `0`.
-- @field caret_line_highlight_subline (boolean)
--   Color the background of the subline that contains the caret a different color, rather than
--   the whole line.
--   The defalt value is `false`.
-- @field caret_line_layer (number)
--   The caret line layer mode.
--
--   * `view.LAYER_BASE`
--     Draw the caret line opaquely on the background.
--   * `view.LAYER_UNDER_TEXT`
--     Draw the caret line translucently under text.
--   * `view.LAYER_OVER_TEXT`
--     Draw the caret line translucently over text.
--
--   The default value is `view.LAYER_BASE`.
-- @field caret_line_visible (bool)
--   Color the background of the line that contains the caret a different color.
--   The default value is `false`.
-- @field caret_line_visible_always (bool)
--   Always show the caret line, even when the view is not in focus.
--   The default value is `false`, showing the line only when the view is in focus.
-- @field caret_period (number)
--   The time between caret blinks in milliseconds.
--   A value of `0` stops blinking.
--   The default value is `500`.
-- @field caret_style (number)
--   The caret's visual style.
--
--   * `view.CARETSTYLE_INVISIBLE`
--     No caret.
--   * `view.CARETSTYLE_LINE`
--     A line caret.
--   * `view.CARETSTYLE_BLOCK`
--     A block caret.
--
--   Any block setting may be combined with `view.CARETSTYLE_BLOCK_AFTER` via bitwise OR (`|`)
--   in order to draw the caret after the end of a selection, as opposed to just inside it.
--
--   The default value is `view.CARETSTYLE_LINE`.
-- @field caret_width (number)
--   The line caret's pixel width in insert mode, between `0` and `20`.
--   The default value is `1`.
-- @field cursor (number)
--   The display cursor type.
--
--   * `view.CURSORNORMAL`
--     The text insert cursor.
--   * `view.CURSORARROW`
--     The arrow cursor.
--   * `view.CURSORWAIT`
--     The wait cursor.
--   * `view.CURSORREVERSEARROW`
--     The reversed arrow cursor.
--
--   The default value is `view.CURSORNORMAL`.
-- @field edge_color (number)
--   The color, in "0xBBGGRR" format, of the single edge or background for long lines according
--   to `view.edge_mode`.
-- @field edge_column (number)
--   The column number to mark long lines at.
-- @field edge_mode (number)
--   The long line mark mode.
--
--   * `view.EDGE_NONE`
--     Long lines are not marked.
--   * `view.EDGE_LINE`
--     Draw a single vertical line whose color is [`view.edge_color`]() at column
--     [`view.edge_column`]().
--   * `view.EDGE_BACKGROUND`
--     Change the background color of text after column [`view.edge_column`]() to
--     [`view.edge_color`]().
--   * `view.EDGE_MULTILINE`
--     Draw vertical lines whose colors and columns are defined by calls to
--     [`view:multi_edge_add_line()`]().
-- @field element_allows_translucent (table)
--   Table of flags for UI element identifiers that indicate whether or not an element supports
--   translucent colors.
--   See [`view.element_color`]() for element identifiers.
-- @field element_base_color (table, read-only)
--   Table of default colors on "0xAABBGGRR" format for UI element identifiers.
--   If the alpha byte is omitted, it is assumed to be `0xFF` (opaque).
--   See [`view.element_color`]() for element identifiers.
-- @field element_color (table)
--   Table of colors in "0xAABBGGRR" format for UI element identifiers.
--   If the alpha byte is omitted, it is assumed to be `0xFF` (opaque).
--
--   * `view.ELEMENT_SELECTION_TEXT`
--     The main selection's text color.
--   * `view.ELEMENT_SELECTION_BACK`
--     The main selection's background color.
--   * `view.ELEMENT_SELECTION_ADDITIONAL_TEXT`
--     The text color of additional selections.
--   * `view.ELEMENT_SELECTION_ADDITIONAL_BACK`
--     The background color of additional selections.
--   * `view.ELEMENT_SELECTION_SECONDARY_TEXT`
--     The text color of selections when another window contains the primary selection.
--     This is only available on Linux.
--   * `view.ELEMENT_SELECTION_SECONDARY_BACK`
--     The background color of selections when another window contains the primary selection.
--     This is only available on Linux.
--   * `view.ELEMENT_SELECTION_INACTIVE_TEXT`
--     The text color of selections when another window has focus.
--   * `view.ELEMENT_SELECTION_INACTIVE_BACK`
--     The background color of selections when another window has focus.
--   * `view.ELEMENT_CARET`
--     The main selection's caret color.
--   * `view.ELEMENT_CARET_ADDITIONAL`
--     The caret color of additional selections.
--   * `view.ELEMENT_CARET_LINE_BACK`
--     The background color of the line that contains the caret.
--   * `view.ELEMENT_WHITE_SPACE`
--     The color of visible whitespace.
--   * `view.ELEMENT_WHITE_SPACE_BACK`
--     The background color of visible whitespace.
--   * `view.ELEMENT_FOLD_LINE`
--     The color of fold lines.
--   * `view.ELEMENT_HIDDEN_LINE`
--     The color of lines shown in place of hidden lines.
-- @field element_is_set (table)
--   Table of flags for UI element identifiers that indicate whether or not a color has been
--   manually set.
--   See [`view.element_color`]() for element identifiers.
-- @field end_at_last_line (bool)
--   Disable scrolling past the last line.
--   The default value is `true`.
-- @field eol_annotation_visible (number)
--   The EOL annotation visibility mode.
--
--   * `view.EOLANNOTATION_HIDDEN`
--     EOL Annotations are invisible.
--   * `view.EOLANNOTATION_STANDARD`
--     Draw EOL annotations no decoration.
--   * `view.EOLANNOTATION_BOXED`
--     Draw EOL annotations outlined with a box.
--   * `view.EOLANNOTATION_STADIUM`
--     Draw EOL annotations outline with curved ends.
--   * `view.EOLANNOTATION_FLAT_CIRCLE`
--     Draw EOL annotations outline with a flat left end and curved right end.
--   * `view.EOLANNOTATION_ANGLE_CIRCLE`
--     Draw EOL annotations outline with an angled left end and curved right end.
--   * `view.EOLANNOTATION_CIRCLE_FLAT`
--     Draw EOL annotations outline with a curved left end and flat right end.
--   * `view.EOLANNOTATION_FLATS`
--     Draw EOL annotations outline with a flat ends.
--   * `view.EOLANNOTATION_ANGLE_FLAT`
--     Draw EOL annotations outline with an angled left end and flat right end.
--   * `view.EOLANNOTATION_CIRCLE_ANGLE`
--     Draw EOL annotations outline with a curved left end and angled right end.
--   * `view.EOLANNOTATION_FLAT_ANGLE`
--     Draw EOL annotations outline with a flat left end and angled right end.
--   * `view.EOLANNOTATION_ANGLES`
--     Draw EOL annotations outline with angled ends.
--
--   All annotations are drawn with the same shape. The default value is
--   `view.EOLANNOTATION_HIDDEN`.
-- @field extra_ascent (number)
--   The amount of pixel padding above lines.
--   The default value is `0`.
-- @field extra_descent (number)
--   The amount of pixel padding below lines.
--   The default is `0`.
-- @field first_visible_line (number)
--   The line number of the line at the top of the view.
-- @field fold_display_text_style (number)
--   The fold display text mode.
--
--   * `view.FOLDDISPLAYTEXT_HIDDEN`
--     Fold display text is not shown.
--   * `view.FOLDDISPLAYTEXT_STANDARD`
--     Fold display text is shown with no decoration.
--   * `view.FOLDDISPLAYTEXT_BOXED`
--     Fold display text is shown outlined with a box.
--
--   The default value is `view.FOLDDISPLAYTEXT_HIDDEN`.
-- @field fold_expanded (table)
--   Table of flags per line number that indicate whether or not fold points are expanded for
--   those line numbers.
--   Setting expanded fold states does not toggle folds; it only updates fold margin markers. Use
--   [`view.toggle_fold()`]() instead.
-- @field fold_flags (number, Read-only)
--   Bit-mask of folding lines to draw in the buffer.
--
--   * `view.FOLDFLAG_NONE`
--     Do not draw folding lines.
--   * `view.FOLDFLAG_LINEBEFORE_EXPANDED`
--     Draw lines above expanded folds.
--   * `view.FOLDFLAG_LINEBEFORE_CONTRACTED`
--     Draw lines above collapsed folds.
--   * `view.FOLDFLAG_LINEAFTER_EXPANDED`
--     Draw lines below expanded folds.
--   * `view.FOLDFLAG_LINEAFTER_CONTRACTED`
--     Draw lines below collapsed folds.
--   * `view.FOLDFLAG_LEVELNUMBERS`
--     Show hexadecimal fold levels in line margins.
--     This option cannot be combined with `FOLDFLAG_LINESTATE`.
--   * `view.FOLDFLAG_LINESTATE`
--     Show line state in line margins.
--     This option cannot be combined with `FOLDFLAG_LEVELNUMBERS`.
--
--   The default value is `view.FOLDFLAG_NONE`.
-- @field h_scroll_bar (bool)
--   Display the horizontal scroll bar.
--   The default value is `true`.
-- @field highlight_guide (number)
--   The indentation guide column number to also highlight when highlighting matching braces,
--   or `0` to stop indentation guide highlighting.
-- @field idle_styling (number)
--   The idle styling mode.
--   This mode has no effect when `view.wrap_mode` is on.
--
--   * `view.IDLESTYLING_NONE`
--     Style all the currently visible text before displaying it.
--   * `view.IDLESTYLING_TOVISIBLE`
--     Style some text before displaying it and then style the rest incrementally in the
--     background as an idle-time task.
--   * `view.IDLESTYLING_AFTERVISIBLE`
--     Style text after the currently visible portion in the background.
--   * `view.IDLESTYLING_ALL`
--     Style text both before and after the visible text in the background.
--
--   The default value is `view.IDLESTYLING_NONE`.
-- @field indentation_guides (number)
--   The indentation guide drawing mode.
--   Indentation guides are dotted vertical lines that appear within indentation whitespace at
--   each level of indentation.
--
--   * `view.IV_NONE`
--     Does not draw any guides.
--   * `view.IV_REAL`
--     Draw guides only within indentation whitespace.
--   * `view.IV_LOOKFORWARD`
--     Draw guides beyond the current line up to the next non-empty line's indentation level,
--     but with an additional level if the previous non-empty line is a fold point.
--   * `view.IV_LOOKBOTH`
--     Draw guides beyond the current line up to either the indentation level of the previous
--     or next non-empty line, whichever is greater.
--
--   The default value is `view.IV_NONE`.
-- @field indic_alpha (table)
--   Table of fill color alpha values, ranging from `0` (transparent) to `255` (opaque),
--   for indicator numbers from `1` to `32` whose styles are either `INDIC_ROUNDBOX`,
--   `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.
--   The default values are `view.ALPHA_NOALPHA`, for no alpha.
-- @field indic_fore (table)
--   Table of foreground colors, in "0xBBGGRR" format, for indicator numbers from `1` to `32`.
--   Changing an indicator's foreground color resets that indicator's hover foreground color.
-- @field indic_hover_fore (table)
--   Table of hover foreground colors, in "0xBBGGRR" format, for indicator numbers from `1` to
--   `32`.
--   The default values are the respective indicator foreground colors.
-- @field indic_hover_style (table)
--   Table of hover styles for indicators numbers from `1` to `32`.
--   An indicator's hover style drawn when either the cursor hovers over that indicator or the
--   caret is within that indicator.
--   The default values are the respective indicator styles.
-- @field indic_outline_alpha (table)
--   Table of outline color alpha values, ranging from `0` (transparent) to `255` (opaque),
--   for indicator numbers from `1` to `32` whose styles are either `INDIC_ROUNDBOX`,
--   `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.
--   The default values are `view.ALPHA_NOALPHA`, for no alpha.
-- @field indic_stroke_width (table)
--   Table of stroke widths in hundredths of a pixel for indicator numbers from `1` to `32`
--   whose styles are either `INDIC_PLAIN`, `INDIC_SQUIGGLE`, `INDIC_TT`, `INDIC_DIAGONAL`,
--   `INDIC_STRIKE`, `INDIC_BOX`, `INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, `INDIC_FULLBOX`,
--   `INDIC_DASH`, `INDIC_DOTS`,  or `INDIC_SQUIGGLELOW`.
--   The default values are `100`, or 1 pixel.
-- @field indic_style (table)
--   Table of styles for indicator numbers from `1` to `32`.
--
--   * `view.INDIC_PLAIN`
--     An underline.
--   * `view.INDIC_SQUIGGLE`
--     A squiggly underline 3 pixels in height.
--   * `view.INDIC_TT`
--     An underline of small 'T' shapes.
--   * `view.INDIC_DIAGONAL`
--     An underline of diagonal hatches.
--   * `view.INDIC_STRIKE`
--     Strike out.
--   * `view.INDIC_HIDDEN`
--     Invisible.
--   * `view.INDIC_BOX`
--     A bounding box.
--   * `view.INDIC_ROUNDBOX`
--     A translucent box with rounded corners around the text. Use [`view.indic_alpha`]() and
--     [`view.indic_outline_alpha`]() to set the fill and outline transparency, respectively.
--     Their default values are `30` and `50`.
--   * `view.INDIC_STRAIGHTBOX`
--     Similar to `INDIC_ROUNDBOX` but with sharp corners.
--   * `view.INDIC_DASH`
--     A dashed underline.
--   * `view.INDIC_DOTS`
--     A dotted underline.
--   * `view.INDIC_SQUIGGLELOW`
--     A squiggly underline 2 pixels in height.
--   * `view.INDIC_DOTBOX`
--     Similar to `INDIC_STRAIGHTBOX` but with a dotted outline.
--     Translucency alternates between [`view.indic_alpha`]() and [`view.indic_outline_alpha`]()
--     starting with the top-left pixel.
--   * `view.INDIC_SQUIGGLEPIXMAP`
--     Identical to `INDIC_SQUIGGLE` but draws faster by using a pixmap instead of multiple
--     line segments.
--   * `view.INDIC_COMPOSITIONTHICK`
--     A 2-pixel thick underline at the bottom of the line inset by 1 pixel on on either
--     side. Similar in appearance to the target in Asian language input composition.
--   * `view.INDIC_COMPOSITIONTHIN`
--     A 1-pixel thick underline just before the bottom of the line inset by 1 pixel on either
--     side. Similar in appearance to the non-target ranges in Asian language input composition.
--   * `view.INDIC_FULLBOX`
--     Similar to `INDIC_STRAIGHTBOX` but extends to the top of its line, potentially touching
--     any similar indicators on the line above.
--   * `view.INDIC_TEXTFORE`
--     Changes the color of text to an indicator's foreground color.
--   * `view.INDIC_POINT`
--     A triangle below the start of the indicator range.
--   * `view.INDIC_POINTCHARACTER`
--     A triangle below the center of the first character of the indicator
--     range.
--   * `view.INDIC_GRADIENT`
--     A box with a vertical gradient from solid on top to transparent on bottom.
--   * `view.INDIC_GRADIENTCENTER`
--     A box with a centered gradient from solid in the middle to transparent on the top
--     and bottom.
--
--   Use [`_SCINTILLA.next_indic_number()`]() for custom indicators.
--   Changing an indicator's style resets that indicator's hover style.
-- @field indic_under (table)
--   Table of flags that indicate whether or not to draw indicators behind text instead of over
--   the top of it for indicator numbers from `1` to `32`.
--   The default values are `false`.
-- @field line_visible (table, Read-only)
--   Table of flags per line number that indicate whether or not lines are visible for those
--   line numbers.
-- @field lines_on_screen (number, Read-only)
--   The number of completely visible lines in the view.
--   It is possible to have a partial line visible at the bottom of the view.
-- @field margins (number)
--   The number of margins.
--   The default value is `5`.
-- @field margin_back_n (table)
--   Table of background colors, in "0xBBGGRR" format, of margin numbers from `1` to `view.margins`
--   (`5` by default).
--   Only affects margins of type `view.MARGIN_COLOR`.
-- @field margin_cursor_n (table)
--   Table of cursor types shown over margin numbers from `1` to `view.margins` (`5` by default).
--
--   * `view.CURSORARROW`
--     Normal arrow cursor.
--   * `view.CURSORREVERSEARROW`
--     Reversed arrow cursor.
--
--   The default values are `view.CURSORREVERSEARROW`.
-- @field margin_left (number)
--   The pixel size of the left margin of the buffer text.
--   The default value is `1`.
-- @field margin_mask_n (table)
--   Table of bit-masks of markers whose symbols marker symbol margins can display for margin
--   numbers from `1` to `view.margins` (`5` by default).
--   Bit-masks are 32-bit values whose bits correspond to the 32 available markers.
--   The default values are `0`, `view.MASK_FOLDERS`, `0`, `0`, and `0`, for a line margin and
--   logical marker margin.
-- @field margin_options (number)
--   A bit-mask of margin option settings.
--
--   * `view.MARGINOPTION_NONE`
--     None.
--   * `view.MARGINOPTION_SUBLINESELECT`
--     Select only a wrapped line's sub-line (rather than the entire line) when the line number
--     margin is clicked.
--
--   The default value is `view.MARGINOPTION_NONE`.
-- @field margin_right (number)
--   The pixel size of the right margin of the buffer text.
--   The default value is `1`.
-- @field margin_sensitive_n (table)
--   Table of flags that indicate whether or not mouse clicks in margins emit `MARGIN_CLICK`
--   events for margin numbers from `1` to `view.margins` (`5` by default).
--   The default values are `false`.
-- @field margin_type_n (table)
--   Table of margin types for margin numbers from `1` to `view.margins` (`5` by default).
--
--   * `view.MARGIN_SYMBOL`
--     A marker symbol margin.
--   * `view.MARGIN_NUMBER`
--     A line number margin.
--   * `view.MARGIN_BACK`
--     A marker symbol margin whose background color matches the default text background color.
--   * `view.MARGIN_FORE`
--     A marker symbol margin whose background color matches the default text foreground color.
--   * `view.MARGIN_TEXT`
--     A text margin.
--   * `view.MARGIN_RTEXT`
--     A right-justified text margin.
--   * `view.MARGIN_COLOR`
--     A marker symbol margin whose background color is configurable.
--
--   The default value for the first margin is `view.MARGIN_NUMBER`, followed by
--   `view.MARGIN_SYMBOL` for the rest.
-- @field margin_width_n (table)
--   Table of pixel margin widths for margin numbers from `1` to `view.margins` (`5` by default).
-- @field marker_alpha (table, Write-only)
--   Table of alpha values, ranging from `0` (transparent) to `255` (opaque), of markers drawn
--   in the text area (not the margin) for markers numbers from `1` to `32`.
--   The default values are `view.ALPHA_NOALPHA`, for no alpha.
-- @field marker_back (table, Write-only)
--   Table of background colors, in "0xBBGGRR" format, of marker numbers from `1` to `32`.
-- @field marker_back_translucent (table, Write-only)
--   Table of background colors, in "0xAABBGGRR" format, of marker numbers from `1` to `32`.
-- @field marker_back_selected (table, Write-only)
--   Table of background colors, in "0xBBGGRR" format, of markers whose folding blocks are
--   selected for marker numbers from `1` to `32`.
-- @field marker_back_selected_translucent (table, Write-only)
--   Table of background colors, in "0xAABBGGRR" format, of markers whose folding blocks are
--   selected for marker numbers from `1` to `32`.
-- @field marker_fore (table, Write-only)
--   Table of foreground colors, in "0xBBGGRR" format, of marker numbers from `1` to `32`.
-- @field marker_fore_translucent (table, Write-only)
--   Table of foreground colors, in "0xAABBGGRR" format, of marker numbers from `1` to `32`.
-- @field marker_layer (table)
--   Table of layer modes for drawing markers in the text area (not the margin) for marker
--   numbers from `1` to `32`.
--
--   * `view.LAYER_BASE`
--     Draw markers opaquely on the background.
--   * `view.LAYER_UNDER_TEXT`
--     Draw markers translucently under text.
--   * `view.LAYER_OVER_TEXT`
--     Draw markers translucently over text.
--
--   The default values are `view.LAYER_BASE`.
-- @field marker_stroke_width (table, Write-only)
--   Table of stroke widths in hundredths of a pixel for marker numbers from `1` to `32`.
--   The default values are `100`, or 1 pixel.
-- @field mouse_dwell_time (number)
--   The number of milliseconds the mouse must idle before generating a `DWELL_START` event. A
--   time of `view.TIME_FOREVER` will never generate one.
-- @field mouse_selection_rectangular_switch (bool)
--   Whether or not pressing [`view.rectangular_selection_modifier`]() when selecting text
--   normally with the mouse turns on rectangular selection.
--   The default value is `false`.
-- @field multi_edge_column (table, Read-only)
--   Table of edge column positions per edge column number.
--   A position of `-1` means no edge column was found.
-- @field property (table)
--   Map of key-value string pairs used by lexers.
-- @field property_int (table, Read-only)
--   Map of key-value pairs used by lexers with values interpreted as numbers, or `0` if not found.
-- @field rectangular_selection_modifier (number)
--   The modifier key used in combination with a mouse drag in order to create a rectangular
--   selection.
--
--   * `view.MOD_CTRL`
--     The "Control" modifier key.
--   * `view.MOD_ALT`
--     The "Alt" modifier key.
--   * `view.MOD_SUPER`
--     The "Super" modifier key, usually defined as the left "Windows" or
--     "Command" key.
--
--   The default value is `view.MOD_CTRL`.
-- @field representation (table)
--   The alternative string representations of characters.
--   Representations are displayed in the same way control characters are. Use the empty
--   string for the '\0' character when assigning its representation. Characters are strings,
--   not numeric codes, and can be multi-byte characters.
--   Call [`view.clear_representation()`]() to remove a representation.
-- @field representation_appearance (table)
--   Map of characters to their string representation's appearance.
--
--   * `view.REPRESENTATION_PLAIN`
--     Draw the representation with no decoration.
--   * `view.REPRESENTATION_BLOB`
--     Draw the representation within a rounded rectangle and an inverted color.
--   * `view.REPRESENTATION_COLOR`
--     Draw the representation using the color set in [`view.representation_color`]().
--
--   The default values are `view.REPRESENTATION_BLOB`.
-- @field representation_color (table)
--   Map of characters to their string representation's color in "0xBBGGRR" format.
-- @field rgba_image_height (number)
--   The height of the RGBA image to be defined using [`view.marker_define_rgba_image()`]().
-- @field rgba_image_scale (number)
--   The scale factor in percent of the RGBA image to be defined using
--   [`view.marker_define_rgba_image()`]().
--   This is useful on macOS with a retina display where each display unit is 2 pixels: use a
--   factor of `200` so that each image pixel is displayed using a screen pixel.
--   The default scale, `100`, will stretch each image pixel to cover 4 screen pixels on a
--   retina display.
-- @field rgba_image_width (number)
--   The width of the RGBA image to be defined using [`view.marker_define_rgba_image()`]() and
--   [`view.register_rgba_image()`]().
-- @field scroll_width (number)
--   The horizontal scrolling pixel width.
--   For performance, the view does not measure the display width of the buffer to determine
--   the properties of the horizontal scroll bar, but uses an assumed width instead. To ensure
--   the width of the currently visible lines can be scrolled use [`view.scroll_width_tracking`]().
--   The default value is `2000`.
-- @field scroll_width_tracking (bool)
--   Continuously update the horizontal scrolling width to match the maximum width of a displayed
--   line beyond [`view.scroll_width`]().
--   The default value is `false`.
-- @field sel_alpha (number)
--   The selection's alpha value, ranging from `0` (transparent) to `255` (opaque).
--   The default value is `view.ALPHA_NOALPHA`, for no alpha.
-- @field sel_eol_filled (bool)
--   Extend the selection to the view's right margin.
--   The default value is `false`.
-- @field selection_layer (number)
--   The layer mode for drawing selections.
--
--   * `view.LAYER_BASE`
--     Draw selections opaquely on the background.
--   * `view.LAYER_UNDER_TEXT`
--     Draw selections translucently under text.
--   * `view.LAYER_OVER_TEXT`
--     Draw selections translucently over text.
--
--   The default value is `view.LAYER_BASE`.
-- @field size (number)
--   The split resizer's pixel position if the view is a split one.
-- @field style_back (table)
--   Table of background colors, in "0xBBGGRR" format, of text for style numbers from `1` to `256`.
-- @field style_bold (table)
--   Table of flags that indicate whether or not text is bold for style numbers from `1` to `256`.
--   The default values are `false`.
-- @field style_case (table)
--   Table of letter case modes of text for style numbers from `1` to `256`.
--
--   * `view.CASE_MIXED`
--     Display text in normally.
--   * `view.CASE_UPPER`
--     Display text in upper case.
--   * `view.CASE_LOWER`
--     Display text in lower case.
--   * `view.CASE_CAMEL`
--     Display text in camel case.
--
--   The default values are `view.CASE_MIXED`.
-- @field style_changeable (table)
--   Table of flags that indicate whether or not text is changeable for style numbers from `1`
--   to `256`.
--   The default values are `true`.
--   Read-only styles do not allow the caret into the range of text.
-- @field style_eol_filled (table)
--   Table of flags that indicate whether or not the background colors of styles whose characters
--   occur last on lines extend all the way to the view's right margin for style numbers from
--   `1` to `256`.
--   The default values are `false`.
-- @field style_font (table)
--   Table of string font names of text for style numbers from `1` to `256`.
-- @field style_fore (table)
--   Table of foreground colors, in "0xBBGGRR" format, of text for style numbers from `1` to `256`.
-- @field style_italic (table)
--   Table of flags that indicate whether or not text is italic for style numbers from `1` to
--   `256`.
--   The default values are `false`.
-- @field style_size (table)
--   Table of font sizes of text for style numbers from `1` to `256`.
-- @field style_underline (table)
--   Table of flags that indicate whether or not text is underlined for style numbers from `1`
--   to `256`.
--   The default values are `false`.
-- @field style_visible (table)
--   Table of flags that indicate whether or not text is visible for style numbers from `1` to
--   `256`.
--   The default values are `true`.
-- @field tab_draw_mode (number)
--   The draw mode of visible tabs.
--
--   * `view.TD_LONGARROW`
--     An arrow that stretches until the tabstop.
--   * `view.TD_STRIKEOUT`
--     A horizontal line that stretches until the tabstop.
--
--   The default value is `view.TD_LONGARROW`.
-- @field v_scroll_bar (bool)
--   Display the vertical scroll bar.
--   The default value is `true`.
-- @field view_eol (bool)
--   Display end of line characters.
--   The default value is `false`.
-- @field view_ws (number)
--   The whitespace visibility mode.
--
--   * `view.WS_INVISIBLE`
--     Whitespace is invisible.
--   * `view.WS_VISIBLEALWAYS`
--     Display all space characters as dots and tab characters as arrows.
--   * `view.WS_VISIBLEAFTERINDENT`
--     Display only non-indentation spaces and tabs as dots and arrows.
--   * `view.WS_VISIBLEONLYININDENT`
--     Display only indentation spaces and tabs as dots and arrows.
--
--   The default value is `view.WS_INVISIBLE`.
-- @field whitespace_size (number)
--   The pixel size of the dots that represent space characters when whitespace is visible.
--   The default value is `1`.
-- @field wrap_indent_mode (number)
--   The wrapped line indent mode.
--
--   * `view.WRAPINDENT_FIXED`
--     Indent wrapped lines by [`view.wrap_start_indent`]().
--   * `view.WRAPINDENT_SAME`
--     Indent wrapped lines the same amount as the first line.
--   * `view.WRAPINDENT_INDENT`
--     Indent wrapped lines one more level than the level of the first line.
--   * `view.WRAPINDENT_DEEPINDENT`
--     Indent wrapped lines two more levels than the level of the first line.
--
--   The default value is `view.WRAPINDENT_FIXED`.
-- @field wrap_mode (number)
--   Long line wrap mode.
--
--   * `view.WRAP_NONE`
--     Long lines are not wrapped.
--   * `view.WRAP_WORD`
--     Wrap long lines at word (and style) boundaries.
--   * `view.WRAP_CHAR`
--     Wrap long lines at character boundaries.
--   * `view.WRAP_WHITESPACE`
--     Wrap long lines at word boundaries (ignoring style boundaries).
--
--   The default value is `view.WRAP_NONE`.
-- @field wrap_start_indent (number)
--   The number of spaces of indentation to display wrapped lines with if
--   [`view.wrap_indent_mode`]() is `view.WRAPINDENT_FIXED`.
--   The default value is `0`.
-- @field wrap_visual_flags (number)
--   The wrapped line visual flag display mode.
--
--   * `view.WRAPVISUALFLAG_NONE`
--     No visual flags.
--   * `view.WRAPVISUALFLAG_END`
--     Show a visual flag at the end of a wrapped line.
--   * `view.WRAPVISUALFLAG_START`
--     Show a visual flag at the beginning of a sub-line.
--   * `view.WRAPVISUALFLAG_MARGIN`
--     Show a visual flag in the sub-line's line number margin.
--
--   The default value is `view.WRAPVISUALFLAG_NONE`.
-- @field wrap_visual_flags_location (number)
--   The wrapped line visual flag location.
--
--   * `view.WRAPVISUALFLAGLOC_DEFAULT`
--     Draw a visual flag near the view's right margin.
--   * `view.WRAPVISUALFLAGLOC_END_BY_TEXT`
--     Draw a visual flag near text at the end of a wrapped line.
--   * `view.WRAPVISUALFLAGLOC_START_BY_TEXT`
--     Draw a visual flag near text at the beginning of a subline.
--
--   The default value is `view.WRAPVISUALFLAGLOC_DEFAULT`.
-- @field x_offset (number)
--   The horizontal scroll pixel position.
--   A value of `0` is the normal position with the first text column visible at the left of
--   the view.
-- @field zoom (number)
--   The number of points to add to the size of all fonts.
--   Negative values are allowed, down to `-10`.
--   The default value is `0`.
-- @field ANNOTATION_BOXED (number, Read-only)
--
-- @field ANNOTATION_HIDDEN (number, Read-only)
--
-- @field ANNOTATION_STANDARD (number, Read-only)
--
-- @field ANNOTATION_INDENTED (number, Read-only)
--
-- @field CARETSTYLE_BLOCK (number, Read-only)
--
-- @field CARETSTYLE_INVISIBLE (number, Read-only)
--
-- @field CARETSTYLE_LINE (number, Read-only)
--
-- @field CARET_EVEN (number, Read-only)
--
-- @field CARET_JUMPS (number, Read-only)
--
-- @field CARET_SLOP (number, Read-only)
--
-- @field CARET_STRICT (number, Read-only)
--
-- @field EDGE_BACKGROUND (number, Read-only)
--
-- @field EDGE_LINE (number, Read-only)
--
-- @field EDGE_MULTILINE (number, Read-only)
--
-- @field EDGE_NONE (number, Read-only)
--
-- @field ELEMENT_SELECTION_TEXT (number, Read-only)
--
-- @field ELEMENT_SELECTION_BACK (number, Read-only)
--
-- @field ELEMENT_SELECTION_ADDITIONAL_TEXT (number, Read-only)
--
-- @field ELEMENT_SELECTION_ADDITIONAL_BACK (number, Read-only)
--
-- @field ELEMENT_SELECTION_SECONDARY_TEXT (number, Read-only)
--
-- @field ELEMENT_SELECTION_SECONDARY_BACK (number, Read-only)
--
-- @field ELEMENT_SELECTION_INACTIVE_TEXT (number, Read-only)
--
-- @field ELEMENT_SELECTION_INACTIVE_BACK (number, Read-only)
--
-- @field ELEMENT_CARET (number, Read-only)
--
-- @field ELEMENT_CARET_ADDITIONAL (number, Read-only)
--
-- @field ELEMENT_CARET_LINE_BACK (number, Read-only)
--
-- @field ELEMENT_WHITE_SPACE (number, Read-only)
--
-- @field ELEMENT_WHITE_SPACE_BACK (number, Read-only)
--
-- @field FOLDACTION_CONTRACT (number, Read-only)
--
-- @field FOLDACTION_EXPAND (number, Read-only)
--
-- @field FOLDACTION_TOGGLE (number, Read-only)
--
-- @field FOLDDISPLAYTEXT_HIDDEN (number, Read-only)
--
-- @field FOLDDISPLAYTEXT_STANDARD (number, Read-only)
--
-- @field FOLDDISPLAYTEXT_BOXED (number, Read-only)
--
-- @field INDIC_BOX (number, Read-only)
--
-- @field INDIC_COMPOSITIONTHICK (number, Read-only)
--
-- @field INDIC_COMPOSITIONTHIN (number, Read-only)
--
-- @field INDIC_DASH (number, Read-only)
--
-- @field INDIC_DIAGONAL (number, Read-only)
--
-- @field INDIC_DOTBOX (number, Read-only)
--
-- @field INDIC_DOTS (number, Read-only)
--
-- @field INDIC_FULLBOX (number, Read-only)
--
-- @field INDIC_GRADIENT (number, Read-only)
--
-- @field INDIC_GRADIENTCENTER (number, Read-only)
--
-- @field INDIC_HIDDEN (number, Read-only)
--
-- @field INDIC_PLAIN (number, Read-only)
--
-- @field INDIC_POINT (number, Read-only)
--
-- @field INDIC_POINTCHARACTER (number, Read-only)
--
-- @field INDIC_ROUNDBOX (number, Read-only)
--
-- @field INDIC_SQUIGGLE (number, Read-only)
--
-- @field INDIC_SQUIGGLELOW (number, Read-only)
--
-- @field INDIC_SQUIGGLEPIXMAP (number, Read-only)
--
-- @field INDIC_STRAIGHTBOX (number, Read-only)
--
-- @field INDIC_STRIKE (number, Read-only)
--
-- @field INDIC_TEXTFORE (number, Read-only)
--
-- @field INDIC_TT (number, Read-only)
--
-- @field MOD_ALT (number, Read-only)
--
-- @field MOD_CTRL (number, Read-only)
--
-- @field MOD_META (number, Read-only)
--
-- @field MOD_SHIFT (number, Read-only)
--
-- @field MOD_SUPER (number, Read-only)
--
-- @field MOUSE_DRAG (number, Read-only)
--
-- @field MOUSE_PRESS (number, Read-only)
--
-- @field MOUSE_RELEASE (number, Read-only)
--
-- @field WS_INVISIBLE (number, Read-only)
--
-- @field WS_VISIBLEAFTERINDENT (number, Read-only)
--
-- @field WS_VISIBLEALWAYS (number, Read-only)
--
-- @field WS_VISIBLEONLYININDENT (number, Read-only)
--
-- @field ALPHA_NOALPHA (number, Read-only)
--
-- @field ALPHA_OPAQUE (number, Read-only)
--
-- @field ALPHA_TRANSPARENT (number, Read-only)
--
-- @field CASE_CAMEL (number, Read-only)
--
-- @field CASE_LOWER (number, Read-only)
--
-- @field CASE_MIXED (number, Read-only)
--
-- @field CASE_UPPER (number, Read-only)
--
-- @field CURSORARROW (number, Read-only)
--
-- @field CURSORNORMAL (number, Read-only)
--
-- @field CURSORREVERSEARROW (number, Read-only)
--
-- @field CURSORWAIT (number, Read-only)
--
-- @field FOLDFLAG_LEVELNUMBERS (number, Read-only)
--
-- @field FOLDFLAG_LINEAFTER_CONTRACTED (number, Read-only)
--
-- @field FOLDFLAG_LINEAFTER_EXPANDED (number, Read-only)
--
-- @field FOLDFLAG_LINEBEFORE_CONTRACTED (number, Read-only)
--
-- @field FOLDFLAG_LINEBEFORE_EXPANDED (number, Read-only)
--
-- @field FOLDFLAG_LINESTATE (number, Read-only)
--
-- @field IV_LOOKBOTH (number, Read-only)
--
-- @field IV_LOOKFORWARD (number, Read-only)
--
-- @field IV_NONE (number, Read-only)
--
-- @field IV_REAL (number, Read-only)
--
-- @field MARGINOPTION_NONE (number, Read-only)
--
-- @field MARGINOPTION_SUBLINESELECT (number, Read-only)
--
-- @field MARGIN_BACK (number, Read-only)
--
-- @field MARGIN_COLOR (number, Read-only)
--
-- @field MARGIN_FORE (number, Read-only)
--
-- @field MARGIN_NUMBER (number, Read-only)
--
-- @field MARGIN_RTEXT (number, Read-only)
--
-- @field MARGIN_SYMBOL (number, Read-only)
--
-- @field MARGIN_TEXT (number, Read-only)
--
-- @field MARK_ARROW (number, Read-only)
--
-- @field MARK_ARROWDOWN (number, Read-only)
--
-- @field MARK_ARROWS (number, Read-only)
--
-- @field MARK_BACKGROUND (number, Read-only)
--
-- @field MARK_BOOKMARK (number, Read-only)
--
-- @field MARK_BOXMINUS (number, Read-only)
--
-- @field MARK_BOXMINUSCONNECTED (number, Read-only)
--
-- @field MARK_BOXPLUS (number, Read-only)
--
-- @field MARK_BOXPLUSCONNECTED (number, Read-only)
--
-- @field MARK_CHARACTER (number, Read-only)
--
-- @field MARK_CIRCLE (number, Read-only)
--
-- @field MARK_CIRCLEMINUS (number, Read-only)
--
-- @field MARK_CIRCLEMINUSCONNECTED (number, Read-only)
--
-- @field MARK_CIRCLEPLUS (number, Read-only)
--
-- @field MARK_CIRCLEPLUSCONNECTED (number, Read-only)
--
-- @field MARK_DOTDOTDOT (number, Read-only)
--
-- @field MARK_EMPTY (number, Read-only)
--
-- @field MARK_FULLRECT (number, Read-only)
--
-- @field MARK_LCORNER (number, Read-only)
--
-- @field MARK_LCORNERCURVE (number, Read-only)
--
-- @field MARK_LEFTRECT (number, Read-only)
--
-- @field MARK_MINUS (number, Read-only)
--
-- @field MARK_PIXMAP (number, Read-only)
--
-- @field MARK_PLUS (number, Read-only)
--
-- @field MARK_RGBAIMAGE (number, Read-only)
--
-- @field MARK_ROUNDRECT (number, Read-only)
--
-- @field MARK_SHORTARROW (number, Read-only)
--
-- @field MARK_SMALLRECT (number, Read-only)
--
-- @field MARK_TCORNER (number, Read-only)
--
-- @field MARK_TCORNERCURVE (number, Read-only)
--
-- @field MARK_UNDERLINE (number, Read-only)
--
-- @field MARK_VERTICALBOOKMARK (number, Read-only)
--
-- @field MARK_VLINE (number, Read-only)
--
-- @field MASK_FOLDERS (number, Read-only)
--
-- @field TD_LONGARROW (number, Read-only)
--
-- @field TD_STRIKEOUT (number, Read-only)
--
-- @field TIME_FOREVER (number, Read-only)
--
-- @field WRAPINDENT_DEEPINDENT (number, Read-only)
--
-- @field WRAPINDENT_FIXED (number, Read-only)
--
-- @field WRAPINDENT_INDENT (number, Read-only)
--
-- @field WRAPINDENT_SAME (number, Read-only)
--
-- @field WRAPVISUALFLAGLOC_DEFAULT (number, Read-only)
--
-- @field WRAPVISUALFLAGLOC_END_BY_TEXT (number, Read-only)
--
-- @field WRAPVISUALFLAGLOC_START_BY_TEXT (number, Read-only)
--
-- @field WRAPVISUALFLAG_END (number, Read-only)
--
-- @field WRAPVISUALFLAG_MARGIN (number, Read-only)
--
-- @field WRAPVISUALFLAG_NONE (number, Read-only)
--
-- @field WRAPVISUALFLAG_START (number, Read-only)
--
-- @field WRAP_CHAR (number, Read-only)
--
-- @field WRAP_NONE (number, Read-only)
--
-- @field WRAP_WHITESPACE (number, Read-only)
--
-- @field WRAP_WORD (number, Read-only)
--
-- @field STYLE_BRACEBAD (number, Read-only)
--
-- @field STYLE_BRACELIGHT (number, Read-only)
--
-- @field STYLE_CALLTIP (number, Read-only)
--
-- @field STYLE_CONTROLCHAR (number, Read-only)
--
-- @field STYLE_DEFAULT (number, Read-only)
--
-- @field STYLE_FOLDDISPLAYTEXT (number, Read-only)
--
-- @field STYLE_INDENTGUIDE (number, Read-only)
--
-- @field STYLE_LINENUMBER (number, Read-only)
--
-- @field STYLE_MAX (number, Read-only)
--
-- @field UPDATE_H_SCROLL (number, Read-only)
--
-- @field UPDATE_NONE (number, Read-only)
--
-- @field UPDATE_V_SCROLL (number, Read-only)
--
-- @field VISIBLE_SLOP (number, Read-only)
--
-- @field VISIBLE_STRICT (number, Read-only)
--
module('view')

---
-- The [buffer](#buffer) the view currently contains. (Read-only)
-- @class table
-- @name buffer
local buffer

---
-- Highlights the character at position *pos* as an unmatched brace character using the
-- `'style.bracebad'` style.
-- Removes highlighting when *pos* is `-1`.
-- @param view A view.
-- @param pos The position in *view*'s buffer to highlight, or `-1` to remove the highlight.
function brace_bad_light(view, pos) end

---
-- Highlights unmatched brace characters with indicator number *indicator*, in the range of
-- `1` to `32`, instead of the `view.STYLE_BRACEBAD` style if *use_indicator* is `true`.
-- @param view A view.
-- @param use_indicator Whether or not to use an indicator.
-- @param indicator The indicator number to use.
function brace_bad_light_indicator(view, use_indicator, indicator) end

---
-- Highlights the characters at positions *pos1* and *pos2* as matching braces using the
-- `'style.bracelight'` style.
-- If indent guides are enabled, locates the column with `buffer.column` and sets
-- `view.highlight_guide` in order to highlight the indent guide.
-- @param view A view.
-- @param pos1 The first position in *view*'s buffer to highlight.
-- @param pos2 The second position in *view*'s buffer to highlight.
function brace_highlight(view, pos1, pos2) end

---
-- Highlights matching brace characters with indicator number *indicator*, in the range of `1`
-- to `32`, instead of the `view.STYLE_BRACELIGHT` style if *use_indicator* is `true`.
-- @param view A view.
-- @param use_indicator Whether or not to use an indicator.
-- @param indicator The indicator number to use.
function brace_highlight_indicator(view, use_indicator, indicator) end

---
-- Returns whether or not a call tip is visible.
-- @param view A view.
-- @return bool
function call_tip_active(view) end

---
-- Removes the displayed call tip from view.
-- @param view A view.
function call_tip_cancel(view) end

---
-- Returns a call tip's display position.
-- @param view A view.
-- @return number
function call_tip_pos_start(view) end

---
-- Highlights a call tip's text between positions *start_pos* to *end_pos* with the color
-- `view.call_tip_fore_hlt`.
-- @param view A view.
-- @param start_pos The start position in a call tip text to highlight.
-- @param end_pos The end position in a call tip text to highlight.
function call_tip_set_hlt(view, start_pos, end_pos) end

---
-- Displays a call tip at position *pos* with string *text* as the call tip's contents.
-- Any "\001" or "\002" bytes in *text* are replaced by clickable up or down arrow visuals,
-- respectively. These may be used to indicate that a symbol has more than one call tip,
-- for example.
-- @param view A view.
-- @param pos The position in *view*'s buffer to show a call tip at.
-- @param text The call tip text to show.
function call_tip_show(view, pos, text) end

---
-- Clears all images registered using `view.register_image()` and `view.register_rgba_image()`.
-- @param view A view.
function clear_registered_images(view) end

---
-- Removes the alternate string representation for character *char* (which may be a multi-byte
-- character).
-- @param view A view.
-- @param char The string character in `buffer.representations` to remove the alternate string
--   representation for.
function clear_representation(view, char) end

---
-- Removes all alternate string representations of characters.
-- @param view A view.
function clear_all_representations(view) end

---
-- Returns the line number of the next contracted fold point starting from line number *line*,
-- or `-1` if none exists.
-- @param view A view.
-- @param line The line number in *view* to start at.
-- @return number
function contracted_fold_next(view, line) end

---
-- Returns the actual line number of displayed line number *display_line*, taking wrapped,
-- annotated, and hidden lines into account.
-- If *display_line* is less than or equal to `1`, returns `1`. If *display_line* is greater
-- than the number of displayed lines, returns `buffer.line_count`.
-- @param view A view.
-- @param display_line The display line number to use.
-- @return number
function doc_line_from_visible(view, display_line) end

---
-- Ensures line number *line* is visible by expanding any fold points hiding it.
-- @param view A view.
-- @param line The line number in *view* to ensure visible.
function ensure_visible(view, line) end

---
-- Ensures line number *line* is visible by expanding any fold points hiding it based on the
-- vertical caret policy previously defined in `view.set_visible_policy()`.
-- @param view A view.
-- @param line The line number in *view* to ensure visible.
function ensure_visible_enforce_policy(view, line) end

---
-- Contracts, expands, or toggles all fold points, depending on *action*.
-- When toggling, the state of the first fold point determines whether to expand or contract.
-- @param view A view.
-- @param action The fold action to perform. Valid values are:
--   * `view.FOLDACTION_CONTRACT`
--   * `view.FOLDACTION_EXPAND`
--   * `view.FOLDACTION_TOGGLE`
function fold_all(view, action) end

---
-- Contracts, expands, or toggles the fold point on line number *line*, as well as all of its
-- children, depending on *action*.
-- @param view A view.
-- @param line The line number in *view* to set the fold states for.
-- @param action The fold action to perform. Valid values are:
--   * `view.FOLDACTION_CONTRACT`
--   * `view.FOLDACTION_EXPAND`
--   * `view.FOLDACTION_TOGGLE`
function fold_children(view, line, action) end

---
-- Contracts, expands, or toggles the fold point on line number *line*, depending on *action*.
-- @param view A view.
-- @param line The line number in *view* to set the fold state for.
-- @param action The fold action to perform. Valid values are:
--   * `view.FOLDACTION_CONTRACT`
--   * `view.FOLDACTION_EXPAND`
--   * `view.FOLDACTION_TOGGLE`
function fold_line(view, line, action) end

---
-- Returns the default fold display text.
-- @param view A view.
function get_default_fold_display_text(view) end

---
-- Hides the range of lines between line numbers *start_line* to *end_line*.
-- This has no effect on fold levels or fold flags.
-- @param view A view.
-- @param start_line The start line of the range of lines in *view* to hide.
-- @param end_line The end line of the range of lines in *view* to hide.
function hide_lines(view, start_line, end_line) end

---
-- Scrolls the buffer right *columns* columns and down *lines* lines.
-- Negative values are allowed.
-- @param view A view.
-- @param columns The number of columns to scroll horizontally.
-- @param lines The number of lines to scroll vertically.
function line_scroll(view, columns, lines) end

---
-- Scrolls the buffer down one line, keeping the caret visible.
-- @param view A view.
function line_scroll_down(view) end

---
-- Scrolls the buffer up one line, keeping the caret visible.
-- @param view A view.
function line_scroll_up(view) end

---
-- Assigns marker symbol *symbol* to marker number *marker*, in the range of `1` to `32`.
-- *symbol* is shown in marker symbol margins next to lines marked with *marker*.
-- @param view A view.
-- @param marker The marker number in the range of `1` to `32` to set *symbol* for.
-- @param symbol The marker symbol: `buffer.MARK_*`.
-- @see _SCINTILLA.next_marker_number
function marker_define(view, marker, symbol) end

---
-- Associates marker number *marker*, in the range of `1` to `32`, with XPM image *pixmap*.
-- The `view.MARK_PIXMAP` marker symbol must be assigned to *marker*. *pixmap* is shown in
-- marker symbol margins next to lines marked with *marker*.
-- @param view A view.
-- @param marker The marker number in the range of `1` to `32` to define pixmap *pixmap* for.
-- @param pixmap The string pixmap data.
function marker_define_pixmap(view, marker, pixmap) end

---
-- Associates marker number *marker*, in the range of `1` to `32`, with RGBA image *pixels*.
-- The dimensions for *pixels* (`view.rgba_image_width` and `view.rgba_image_height`) must
-- have already been defined. *pixels* is a sequence of 4 byte pixel values (red, blue, green,
-- and alpha) defining the image line by line starting at the top-left pixel.
-- The `view.MARK_RGBAIMAGE` marker symbol must be assigned to *marker*. *pixels* is shown in
-- symbol margins next to lines marked with *marker*.
-- @param view A view.
-- @param marker The marker number in the range of `1` to `32` to define RGBA data *pixels* for.
-- @param pixels The string sequence of 4 byte pixel values starting with the pixels for the
--   top line, with the leftmost pixel first, then continuing with the pixels for subsequent
--   lines. There is no gap between lines for alignment reasons. Each pixel consists of, in
--   order, a red byte, a green byte, a blue byte and an alpha byte. The color bytes are not
--   premultiplied by the alpha value. That is, a fully red pixel that is 25% opaque will be
--   `[FF, 00, 00, 3F]`.
function marker_define_rgba_image(view, marker, pixels) end

---
-- Highlights the margin fold markers for the current fold block if *enabled* is `true`.
-- @param view A view.
-- @param enabled Whether or not to enable highlight.
function marker_enable_highlight(view, enabled) end

---
-- Returns the symbol assigned to marker number *marker*, in the range of `1` to `32`, used in
-- `view.marker_define()`,
-- `view.marker_define_pixmap()`, or `view.marker_define_rgba_image()`.
-- @param view A view.
-- @param marker The marker number in the range of `1` to `32` to get the symbol of.
-- @return number
function marker_symbol_defined(view, marker) end

---
-- Adds a new vertical line at column number *column* with color *color*, in "0xBBGGRR" format.
-- @param view A view.
-- @param column The column number to add a vertical line at.
-- @param color The color in "0xBBGGRR" format.
function multi_edge_add_line(view, column, color) end

---
-- Clears all vertical lines created by `view:multi_edge_add_line()`.
-- @param view A view.
function multi_edge_clear_all(view) end

---
-- Registers XPM image *xpm_data* to type number *type* for use in autocompletion and user lists.
-- @param view A view.
-- @param type Integer type to register the image with.
-- @param xpm_data The XPM data as described in `view.marker_define_pixmap()`.
function register_image(view, type, xpm_data) end

---
-- Registers RGBA image *pixels* to type number *type* for use in autocompletion and user lists.
-- The dimensions for *pixels* (`view.rgba_image_width` and `view.rgba_image_height`) must
-- have already been defined. *pixels* is a sequence of 4 byte pixel values (red, blue, green,
-- and alpha) defining the image line by line starting at the top-left pixel.
-- @param view A view.
-- @param type Integer type to register the image with.
-- @param pixels The RGBA data as described in `view.marker_define_rgba_image()`.
function register_rgba_image(view, type, pixels) end

---
-- Resets the color of UI element *element* to its default color.
-- @param element One of the UI elements specified in [`view.element_color`]().
-- @see element_color
function reset_element_color(view, element) end

---
-- Scrolls the caret into view based on the policies previously defined in
-- `view.set_x_caret_policy()` and `view.set_y_caret_policy()`.
-- @param view A view.
-- @see set_x_caret_policy
-- @see set_y_caret_policy
function scroll_caret(view) end

---
-- Scrolls to the end of the buffer without moving the caret.
-- @param view A view.
function scroll_to_end(view) end

---
-- Scrolls to the beginning of the buffer without moving the caret.
-- @param view A view.
function scroll_to_start(view) end

---
-- Scrolls into view the range of text between positions *primary_pos* and *secondary_pos*,
-- with priority given to *primary_pos*.
-- Similar to `view.scroll_caret()`, but with *primary_pos* instead of `buffer.current_pos`.
-- This is useful for scrolling search results into view.
-- @param view A view.
-- @param secondary_pos The secondary range position to scroll into view.
-- @param primary_pos The primary range position to scroll into view.
function scroll_range(view, secondary_pos, primary_pos) end

---
-- Sets the default fold display text to string *text*.
-- @param view A view.
-- @param text The text to display by default next to folded lines.
-- @see toggle_fold_show_text
function set_default_fold_display_text(view, text) end

---
-- Overrides the fold margin's default color with color *color*, in "0xBBGGRR" format, if
-- *use_setting* is `true`.
-- @param view A view.
-- @param use_setting Whether or not to use *color*.
-- @param color The color in "0xBBGGRR" format.
function set_fold_margin_color(view, use_setting, color) end

---
-- Overrides the fold margin's default highlight color with color *color*, in "0xBBGGRR" format,
-- if *use_setting* is `true`.
-- @param view A view.
-- @param use_setting Whether or not to use *color*.
-- @param color The color in "0xBBGGRR" format.
function set_fold_margin_hi_color(view, use_setting, color) end

---
-- Defines scrolling policy bit-mask *policy* as the policy for keeping the caret *y* number
-- of lines away from the vertical margins as `view.ensure_visible_enforce_policy()` redisplays
-- hidden or folded lines.
-- It is similar in operation to `view.set_y_caret_policy()`.
-- @param view A view.
-- @param policy The combination of `view.VISIBLE_SLOP` and `view.VISIBLE_STRICT` policy flags
--   to set.
-- @param y The number of lines from the vertical margins to keep the caret.
function set_visible_policy(view, policy, y) end

---
-- Overrides the background color of whitespace with color *color*, in "0xBBGGRR" format,
-- if *use_setting* is `true`.
-- @param view A view.
-- @param use_setting Whether or not to use *color*.
-- @param color The color in "0xBBGGRR" format.
function set_whitespace_back(view, use_setting, color) end

---
-- Overrides the foreground color of whitespace with color *color*, in "0xBBGGRR" format,
-- if *use_setting* is `true`.
-- @param use_setting Whether or not to use *color*.
-- @param color The color in "0xBBGGRR" format.
function set_whitespace_fore(view, use_setting, color) end

---
-- Defines scrolling policy bit-mask *policy* as the policy for keeping the caret *x* number
-- of pixels away from the horizontal margins.
-- @param view A view.
-- @param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`, `view.CARET_EVEN`,
--   and `view.CARET_JUMPS` policy flags to set.
-- @param x The number of pixels from the horizontal margins to keep the caret.
function set_x_caret_policy(view, policy, x) end

---
-- Defines scrolling policy bit-mask *policy* as the policy for keeping the caret *y* number
-- of lines away from the vertical margins.
-- @param view A view.
-- @param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`, `view.CARET_EVEN`,
--   and `view.CARET_JUMPS` policy flags to set.
-- @param y The number of lines from the vertical margins to keep the caret.
function set_y_caret_policy(view, policy, y) end

---
-- Shows the range of lines between line numbers *start_line* to *end_line*.
-- This has no effect on fold levels or fold flags and the first line cannot be hidden.
-- @param view A view.
-- @param start_line The start line of the range of lines in *view* to show.
-- @param end_line The end line of the range of lines in *view* to show.
function show_lines(view, start_line, end_line) end

---
-- Reverts all styles to having the same properties as `view.STYLE_DEFAULT`.
-- @param view A view.
function style_clear_all(view) end

---
-- Resets `view.STYLE_DEFAULT` to its initial state.
-- @param view A view.
function style_reset_default(view) end

---
-- Returns the pixel height of line number *line*.
-- @param view A view.
-- @param line The line number in *view* to get the pixel height of.
-- @return number
function text_height(view, line) end

---
-- Returns the pixel width string *text* would have when styled with style number *style_num*,
-- in the range of `1` to `256`.
-- @param view A view.
-- @param style_num The style number between `1` and `256` to use.
-- @param text The text to measure the width of.
-- @return number
function text_width(view, style_num, text) end

---
-- Toggles the fold point on line number *line* between expanded (where all of its child lines
-- are displayed) and contracted (where all of its child lines are hidden).
-- @param view A view.
-- @param line The line number in *view* to toggle the fold on.
-- @see set_default_fold_display_text
function toggle_fold(view, line) end

---
-- Toggles a fold point on line number *line* between expanded (where all of its child lines are
-- displayed) and contracted (where all of its child lines are hidden), and shows string *text*
-- next to that line.
-- *text* is drawn with style number `view.STYLE_FOLDDISPLAYTEXT`.
-- @param view A view.
-- @param line The line number in *view* to toggle the fold on and display *text* after.
-- @param text The text to display after the line.
function toggle_fold_show_text(view, line, text) end

---
-- Centers current line in the view.
-- @param view A view.
function vertical_center_caret(view) end

---
-- Returns the displayed line number of actual line number *line*, taking wrapped, annotated,
-- and hidden lines into account, or `-1` if *line* is outside the range of lines in the buffer.
-- Lines can occupy more than one display line if they wrap.
-- @param view A view.
-- @param line The line number in *view* to use.
-- @return number
function visible_from_doc_line(view, line) end

---
-- Returns the number of wrapped lines needed to fully display line number *line*.
-- @param view A view.
-- @param line The line number in *view* to use.
-- @return number
function wrap_count(view, line) end

---
-- Increases the size of all fonts by one point, up to 20.
-- @param view A view.
function zoom_in(view) end

---
-- Decreases the size of all fonts by one point, down to -10.
-- @param view A view.
function zoom_out(view) end

-- External functions.

---
-- Splits the view into top and bottom views (unless *vertical* is `true`), focuses the new view,
-- and returns both the old and new views.
-- If *vertical* is `false`, splits the view vertically into left and right views.
-- Emits a `VIEW_NEW` event.
-- @param view The view to split.
-- @param vertical Optional flag indicating whether or not to split the view vertically. The
--   default value is `false`, for horizontal.
-- @return old view and new view.
-- @see events.VIEW_NEW
function split(view, vertical) end

---
-- Unsplits the view if possible, returning `true` on success.
-- @param view The view to unsplit.
-- @return boolean if the view was unsplit or not.
function unsplit(view) end

---
-- Switches to buffer *buffer* or the buffer *buffer* number of buffers relative to the
-- current one.
-- Emits `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events.
-- @param view The view to switch buffers in.
-- @param buffer A buffer or relative buffer number (typically 1 or -1).
-- @see _G._BUFFERS
-- @see events.BUFFER_BEFORE_SWITCH
-- @see events.BUFFER_AFTER_SWITCH
function goto_buffer(view, buffer) end

---
-- Sets the view's color theme to be string *name*, with the contents of table *env* available
-- as global variables.
-- User themes override Textadept's default themes when they have the same name. If *name*
-- contains slashes, it is assumed to be an absolute path to a theme instead of a theme name.
-- @param view A view.
-- @param name The name or absolute path of a theme to set.
-- @param env Optional table of global variables themes can utilize to override default settings
--   such as font and size.
-- @usage view:set_theme('light', {font = 'Monospace', size = 12})
-- @name set_theme
-- @see _G.lexer.colors
-- @see _G.lexer.styles
function set_theme(view, name, env) end