1-- Copyright 2007-2020 Mitchell. See LICENSE. 2-- This is a DUMMY FILE used for making LuaDoc for Views. 3 4--- 5-- A Textadept view object. 6-- Constants are documented in the fields they apply to. 7-- While you can work with individual view instances, it is often useful to work 8-- with just the global one. 9-- Many of these functions and fields are derived from view-specific 10-- functionality of the Scintilla editing component, and additional information 11-- can be found on the 12-- [Scintilla website](https://scintilla.org/ScintillaDoc.html). 13-- Note that with regard to Scintilla-specific functionality, this API is a 14-- _suggestion_, not a hard requirement. All of that functionality also exists 15-- in [`buffer`](), even if undocumented. 16-- Any view fields set on startup (e.g. in *~/.textadept/init.lua*) will be the 17-- default, initial values for all views. 18-- @field additional_caret_fore (number) 19-- The foreground color, in "0xBBGGRR" format, of additional carets. 20-- @field additional_carets_blink (bool) 21-- Allow additional carets to blink. 22-- The default value is `true`. 23-- @field additional_carets_visible (bool) 24-- Display additional carets. 25-- The default value is `true`. 26-- @field additional_sel_alpha (number) 27-- The alpha value, ranging from `0` (transparent) to `255` (opaque), of 28-- additional selections. 29-- The default value is `view.ALPHA_NOALPHA`, for no alpha. 30-- @field additional_sel_back (number, Write-only) 31-- The background color, in "0xBBGGRR" format, of additional selections. 32-- This field has no effect when calling `view:set_sel_back(false, ...)`. 33-- @field additional_sel_fore (number, Write-only) 34-- The foreground color, in "0xBBGGRR" format, of additional selections. 35-- This field has no effect when calling `view:set_sel_fore(false, ...)`. 36-- @field all_lines_visible (bool, Read-only) 37-- Whether or not all lines are visible. 38-- @field annotation_visible (number) 39-- The annotation visibility mode. 40-- 41-- * `view.ANNOTATION_HIDDEN` 42-- Annotations are invisible. 43-- * `view.ANNOTATION_STANDARD` 44-- Draw annotations left-justified with no decoration. 45-- * `view.ANNOTATION_BOXED` 46-- Indent annotations to match the annotated text and outline them with a 47-- box. 48-- * `view.ANNOTATION_INDENTED` 49-- Indent non-decorated annotations to match the annotated text. 50-- 51-- The default value is `view.ANNOTATION_HIDDEN`. 52-- @field auto_c_max_height (number) 53-- The maximum number of items per page to show in autocompletion and user 54-- lists. The default value is `5`. 55-- @field auto_c_max_width (number) 56-- The maximum number of characters per item to show in autocompletion and 57-- user lists. 58-- The default value is `0`, which automatically sizes the width to fit the 59-- longest item. 60-- @field call_tip_fore_hlt (number, Write-only) 61-- A call tip's highlighted text foreground color, in "0xBBGGRR" format. 62-- @field call_tip_pos_start (number, Write-only) 63-- The position at which backspacing beyond it hides a visible call tip. 64-- @field call_tip_position (boolean) 65-- Display a call tip above the current line instead of below it. 66-- The default value is `false`. 67-- @field call_tip_use_style (number) 68-- The pixel width of tab characters in call tips. 69-- When non-zero, also enables the use of style number `view.STYLE_CALLTIP` 70-- instead of `view.STYLE_DEFAULT` for call tip styles. 71-- The default value is `0`. 72-- @field caret_fore (number) 73-- The caret's foreground color, in "0xBBGGRR" format. 74-- @field caret_line_back (number) 75-- The background color, in "0xBBGGRR" format, of the line that contains the 76-- caret. 77-- @field caret_line_back_alpha (number) 78-- The caret line's background alpha value, ranging from `0` (transparent) to 79-- `255` (opaque). 80-- The default value is `view.ALPHA_NOALPHA`, for no alpha. 81-- @field caret_line_frame (number) 82-- The caret line's frame width in pixels. 83-- When non-zero, the line that contains the caret is framed instead of 84-- colored in. The `view.caret_line_back` and `view.caret_line_back_alpha` 85-- properties apply to the frame. 86-- The default value is `0`. 87-- @field caret_line_visible (bool) 88-- Color the background of the line that contains the caret a different color. 89-- The default value is `false`. 90-- @field caret_line_visible_always (bool) 91-- Always show the caret line, even when the view is not in focus. 92-- The default value is `false`, showing the line only when the view is in 93-- focus. 94-- @field caret_period (number) 95-- The time between caret blinks in milliseconds. 96-- A value of `0` stops blinking. 97-- The default value is `500`. 98-- @field caret_style (number) 99-- The caret's visual style. 100-- 101-- * `view.CARETSTYLE_INVISIBLE` 102-- No caret. 103-- * `view.CARETSTYLE_LINE` 104-- A line caret. 105-- * `view.CARETSTYLE_BLOCK` 106-- A block caret. 107-- 108-- Any block setting may be combined with `view.CARETSTYLE_BLOCK_AFTER` via 109-- bitwise OR (`|`) in order to draw the caret after the end of a selection, 110-- as opposed to just inside it. 111-- 112-- The default value is `view.CARETSTYLE_LINE`. 113-- @field caret_width (number) 114-- The line caret's pixel width in insert mode, between `0` and `20`. 115-- The default value is `1`. 116-- @field cursor (number) 117-- The display cursor type. 118-- 119-- * `view.CURSORNORMAL` 120-- The text insert cursor. 121-- * `view.CURSORARROW` 122-- The arrow cursor. 123-- * `view.CURSORWAIT` 124-- The wait cursor. 125-- * `view.CURSORREVERSEARROW` 126-- The reversed arrow cursor. 127-- 128-- The default value is `view.CURSORNORMAL`. 129-- @field edge_color (number) 130-- The color, in "0xBBGGRR" format, of the single edge or background for long 131-- lines according to `view.edge_mode`. 132-- @field edge_column (number) 133-- The column number to mark long lines at. 134-- @field edge_mode (number) 135-- The long line mark mode. 136-- 137-- * `view.EDGE_NONE` 138-- Long lines are not marked. 139-- * `view.EDGE_LINE` 140-- Draw a single vertical line whose color is [`view.edge_color`]() at 141-- column [`view.edge_column`](). 142-- * `view.EDGE_BACKGROUND` 143-- Change the background color of text after column [`view.edge_column`]() 144-- to [`view.edge_color`](). 145-- * `view.EDGE_MULTILINE` 146-- Draw vertical lines whose colors and columns are defined by calls to 147-- [`view:multi_edge_add_line()`](). 148-- @field end_at_last_line (bool) 149-- Disable scrolling past the last line. 150-- The default value is `true`. 151-- @field eol_annotation_visible (number) 152-- The EOL annotation visibility mode. 153-- 154-- * `view.EOLANNOTATION_HIDDEN` 155-- EOL Annotations are invisible. 156-- * `view.EOLANNOTATION_STANDARD` 157-- Draw EOL annotations no decoration. 158-- * `view.EOLANNOTATION_BOXED` 159-- Draw EOL annotations outlined with a box. 160-- 161-- The default value is `view.EOLANNOTATION_HIDDEN`. 162-- @field extra_ascent (number) 163-- The amount of pixel padding above lines. 164-- The default value is `0`. 165-- @field extra_descent (number) 166-- The amount of pixel padding below lines. 167-- The default is `0`. 168-- @field first_visible_line (number) 169-- The line number of the line at the top of the view. 170-- @field fold_display_text_style (number) 171-- The fold display text mode. 172-- 173-- * `view.FOLDDISPLAYTEXT_HIDDEN` 174-- Fold display text is not shown. 175-- * `view.FOLDDISPLAYTEXT_STANDARD` 176-- Fold display text is shown with no decoration. 177-- * `view.FOLDDISPLAYTEXT_BOXED` 178-- Fold display text is shown outlined with a box. 179-- 180-- The default value is `view.FOLDDISPLAYTEXT_HIDDEN`. 181-- @field fold_expanded (table) 182-- Table of flags per line number that indicate whether or not fold points are 183-- expanded for those line numbers. 184-- Setting expanded fold states does not toggle folds; it only updates fold 185-- margin markers. Use [`view.toggle_fold()`]() instead. 186-- @field fold_flags (number, Read-only) 187-- Bit-mask of folding lines to draw in the buffer. 188-- 189-- * `view.FOLDFLAG_LINEBEFORE_EXPANDED` 190-- Draw lines above expanded folds. 191-- * `view.FOLDFLAG_LINEBEFORE_CONTRACTED` 192-- Draw lines above collapsed folds. 193-- * `view.FOLDFLAG_LINEAFTER_EXPANDED` 194-- Draw lines below expanded folds. 195-- * `view.FOLDFLAG_LINEAFTER_CONTRACTED` 196-- Draw lines below collapsed folds. 197-- * `view.FOLDFLAG_LEVELNUMBERS` 198-- Show hexadecimal fold levels in line margins. 199-- This option cannot be combined with `FOLDFLAG_LINESTATE`. 200-- * `view.FOLDFLAG_LINESTATE` 201-- Show line state in line margins. 202-- This option cannot be combined with `FOLDFLAG_LEVELNUMBERS`. 203-- 204-- The default value is `0`. 205-- @field h_scroll_bar (bool) 206-- Display the horizontal scroll bar. 207-- The default value is `true`. 208-- @field highlight_guide (number) 209-- The indentation guide column number to also highlight when highlighting 210-- matching braces, or `0` to stop indentation guide highlighting. 211-- @field idle_styling (number) 212-- The idle styling mode. 213-- This mode has no effect when `view.wrap_mode` is on. 214-- 215-- * `view.IDLESTYLING_NONE` 216-- Style all the currently visible text before displaying it. 217-- * `view.IDLESTYLING_TOVISIBLE` 218-- Style some text before displaying it and then style the rest 219-- incrementally in the background as an idle-time task. 220-- * `view.IDLESTYLING_AFTERVISIBLE` 221-- Style text after the currently visible portion in the background. 222-- * `view.IDLESTYLING_ALL` 223-- Style text both before and after the visible text in the background. 224-- 225-- The default value is `view.IDLESTYLING_NONE`. 226-- @field indentation_guides (number) 227-- The indentation guide drawing mode. 228-- Indentation guides are dotted vertical lines that appear within indentation 229-- whitespace at each level of indentation. 230-- 231-- * `view.IV_NONE` 232-- Does not draw any guides. 233-- * `view.IV_REAL` 234-- Draw guides only within indentation whitespace. 235-- * `view.IV_LOOKFORWARD` 236-- Draw guides beyond the current line up to the next non-empty line's 237-- indentation level, but with an additional level if the previous non-empty 238-- line is a fold point. 239-- * `view.IV_LOOKBOTH` 240-- Draw guides beyond the current line up to either the indentation level of 241-- the previous or next non-empty line, whichever is greater. 242-- 243-- The default value is `view.IV_NONE`. 244-- @field indic_alpha (table) 245-- Table of fill color alpha values, ranging from `0` (transparent) to `255` 246-- (opaque), for indicator numbers from `1` to `32` whose styles are either 247-- `INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`. 248-- The default values are `view.ALPHA_NOALPHA`, for no alpha. 249-- @field indic_fore (table) 250-- Table of foreground colors, in "0xBBGGRR" format, for indicator numbers 251-- from `1` to `32`. 252-- Changing an indicator's foreground color resets that indicator's hover 253-- foreground color. 254-- @field indic_hover_fore (table) 255-- Table of hover foreground colors, in "0xBBGGRR" format, for indicator 256-- numbers from `1` to `32`. 257-- The default values are the respective indicator foreground colors. 258-- @field indic_hover_style (table) 259-- Table of hover styles for indicators numbers from `1` to `32`. An 260-- indicator's hover style drawn when either the cursor hovers over that 261-- indicator or the caret is within that indicator. 262-- The default values are the respective indicator styles. 263-- @field indic_outline_alpha (table) 264-- Table of outline color alpha values, ranging from `0` (transparent) to 265-- `255` (opaque), for indicator numbers from `1` to `32` whose styles are 266-- either `INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`. 267-- The default values are `view.ALPHA_NOALPHA`, for no alpha. 268-- @field indic_style (table) 269-- Table of styles for indicator numbers from `1` to `32`. 270-- 271-- * `view.INDIC_PLAIN` 272-- An underline. 273-- * `view.INDIC_SQUIGGLE` 274-- A squiggly underline 3 pixels in height. 275-- * `view.INDIC_TT` 276-- An underline of small 'T' shapes. 277-- * `view.INDIC_DIAGONAL` 278-- An underline of diagonal hatches. 279-- * `view.INDIC_STRIKE` 280-- Strike out. 281-- * `view.INDIC_HIDDEN` 282-- Invisible. 283-- * `view.INDIC_BOX` 284-- A bounding box. 285-- * `view.INDIC_ROUNDBOX` 286-- A translucent box with rounded corners around the text. Use 287-- [`view.indic_alpha`]() and [`view.indic_outline_alpha`]() to set the 288-- fill and outline transparency, respectively. Their default values are 289-- `30` and `50`. 290-- * `view.INDIC_STRAIGHTBOX` 291-- Similar to `INDIC_ROUNDBOX` but with sharp corners. 292-- * `view.INDIC_DASH` 293-- A dashed underline. 294-- * `view.INDIC_DOTS` 295-- A dotted underline. 296-- * `view.INDIC_SQUIGGLELOW` 297-- A squiggly underline 2 pixels in height. 298-- * `view.INDIC_DOTBOX` 299-- Similar to `INDIC_STRAIGHTBOX` but with a dotted outline. 300-- Translucency alternates between [`view.indic_alpha`]() and 301-- [`view.indic_outline_alpha`]() starting with the top-left pixel. 302-- * `view.INDIC_SQUIGGLEPIXMAP` 303-- Identical to `INDIC_SQUIGGLE` but draws faster by using a pixmap instead 304-- of multiple line segments. 305-- * `view.INDIC_COMPOSITIONTHICK` 306-- A 2-pixel thick underline at the bottom of the line inset by 1 pixel on 307-- on either side. Similar in appearance to the target in Asian language 308-- input composition. 309-- * `view.INDIC_COMPOSITIONTHIN` 310-- A 1-pixel thick underline just before the bottom of the line inset by 1 311-- pixel on either side. Similar in appearance to the non-target ranges in 312-- Asian language input composition. 313-- * `view.INDIC_FULLBOX` 314-- Similar to `INDIC_STRAIGHTBOX` but extends to the top of its line, 315-- potentially touching any similar indicators on the line above. 316-- * `view.INDIC_TEXTFORE` 317-- Changes the color of text to an indicator's foreground color. 318-- * `view.INDIC_POINT` 319-- A triangle below the start of the indicator range. 320-- * `view.INDIC_POINTCHARACTER` 321-- A triangle below the center of the first character of the indicator 322-- range. 323-- * `view.INDIC_GRADIENT` 324-- A box with a vertical gradient from solid on top to transparent on 325-- bottom. 326-- * `view.INDIC_GRADIENTCENTER` 327-- A box with a centered gradient from solid in the middle to transparent on 328-- the top and bottom. 329-- 330-- Use [`_SCINTILLA.next_indic_number()`]() for custom indicators. 331-- Changing an indicator's style resets that indicator's hover style. 332-- @field indic_under (table) 333-- Table of flags that indicate whether or not to draw indicators behind text 334-- instead of over the top of it for indicator numbers from `1` to `32`. 335-- The default values are `false`. 336-- @field line_visible (table, Read-only) 337-- Table of flags per line number that indicate whether or not lines are 338-- visible for those line numbers. 339-- @field lines_on_screen (number, Read-only) 340-- The number of completely visible lines in the view. 341-- It is possible to have a partial line visible at the bottom of the view. 342-- @field margins (number) 343-- The number of margins. 344-- The default value is `5`. 345-- @field margin_back_n (table) 346-- Table of background colors, in "0xBBGGRR" format, of margin numbers from 347-- `1` to `view.margins` (`5` by default). 348-- Only affects margins of type `view.MARGIN_COLOR`. 349-- @field margin_cursor_n (table) 350-- Table of cursor types shown over margin numbers from `1` to 351-- `view.margins` (`5` by default). 352-- 353-- * `view.CURSORARROW` 354-- Normal arrow cursor. 355-- * `view.CURSORREVERSEARROW` 356-- Reversed arrow cursor. 357-- 358-- The default values are `view.CURSORREVERSEARROW`. 359-- @field margin_left (number) 360-- The pixel size of the left margin of the buffer text. 361-- The default value is `1`. 362-- @field margin_mask_n (table) 363-- Table of bit-masks of markers whose symbols marker symbol margins can 364-- display for margin numbers from `1` to `view.margins` (`5` by default). 365-- Bit-masks are 32-bit values whose bits correspond to the 32 available 366-- markers. 367-- The default values are `0`, `view.MASK_FOLDERS`, `0`, `0`, and `0`, for 368-- a line margin and logical marker margin. 369-- @field margin_options (number) 370-- A bit-mask of margin option settings. 371-- 372-- * `view.MARGINOPTION_NONE` 373-- None. 374-- * `view.MARGINOPTION_SUBLINESELECT` 375-- Select only a wrapped line's sub-line (rather than the entire line) when 376-- the line number margin is clicked. 377-- 378-- The default value is `view.MARGINOPTION_NONE`. 379-- @field margin_right (number) 380-- The pixel size of the right margin of the buffer text. 381-- The default value is `1`. 382-- @field margin_sensitive_n (table) 383-- Table of flags that indicate whether or not mouse clicks in margins emit 384-- `MARGIN_CLICK` events for margin numbers from `1` to `view.margins` (`5` 385-- by default). 386-- The default values are `false`. 387-- @field margin_type_n (table) 388-- Table of margin types for margin numbers from `1` to `view.margins` (`5` 389-- by default). 390-- 391-- * `view.MARGIN_SYMBOL` 392-- A marker symbol margin. 393-- * `view.MARGIN_NUMBER` 394-- A line number margin. 395-- * `view.MARGIN_BACK` 396-- A marker symbol margin whose background color matches the default text 397-- background color. 398-- * `view.MARGIN_FORE` 399-- A marker symbol margin whose background color matches the default text 400-- foreground color. 401-- * `view.MARGIN_TEXT` 402-- A text margin. 403-- * `view.MARGIN_RTEXT` 404-- A right-justified text margin. 405-- * `view.MARGIN_COLOR` 406-- A marker symbol margin whose background color is configurable. 407-- 408-- The default value for the first margin is `view.MARGIN_NUMBER`, followed 409-- by `view.MARGIN_SYMBOL` for the rest. 410-- @field margin_width_n (table) 411-- Table of pixel margin widths for margin numbers from `1` to 412-- `view.margins` (`5` by default). 413-- @field marker_alpha (table, Write-only) 414-- Table of alpha values, ranging from `0` (transparent) to `255` (opaque), 415-- of markers drawn in the text area (not the margin) for markers numbers from 416-- `1` to `32`. 417-- The default values are `view.ALPHA_NOALPHA`, for no alpha. 418-- @field marker_back (table, Write-only) 419-- Table of background colors, in "0xBBGGRR" format, of marker numbers from 420-- `1` to `32`. 421-- @field marker_back_selected (table, Write-only) 422-- Table of background colors, in "0xBBGGRR" format, of markers whose folding 423-- blocks are selected for marker numbers from `1` to `32`. 424-- @field marker_fore (table, Write-only) 425-- Table of foreground colors, in "0xBBGGRR" format, of marker numbers from 426-- `1` to `32`. 427-- @field mouse_dwell_time (number) 428-- The number of milliseconds the mouse must idle before generating a 429-- `DWELL_START` event. A time of `view.TIME_FOREVER` will never generate 430-- one. 431-- @field mouse_selection_rectangular_switch (bool) 432-- Whether or not pressing [`view.rectangular_selection_modifier`]() when 433-- selecting text normally with the mouse turns on rectangular selection. 434-- The default value is `false`. 435-- @field multi_edge_column (table, Read-only) 436-- Table of edge column positions per edge column number. 437-- A position of `-1` means no edge column was found. 438-- @field property (table) 439-- Map of key-value string pairs used by lexers. 440-- @field property_expanded (table, Read-only) 441-- Map of key-value string pairs used by lexers with `$()` and `%()` variable 442-- replacement performed in values. 443-- @field property_int (table, Read-only) 444-- Map of key-value pairs used by lexers with values interpreted as numbers, 445-- or `0` if not found. 446-- @field rectangular_selection_modifier (number) 447-- The modifier key used in combination with a mouse drag in order to create a 448-- rectangular selection. 449-- 450-- * `view.MOD_CTRL` 451-- The "Control" modifier key. 452-- * `view.MOD_ALT` 453-- The "Alt" modifier key. 454-- * `view.MOD_SUPER` 455-- The "Super" modifier key, usually defined as the left "Windows" or 456-- "Command" key. 457-- 458-- The default value is `view.MOD_CTRL`. 459-- @field representation (table) 460-- The alternative string representations of characters. 461-- Representations are displayed in the same way control characters are. Use 462-- the empty string for the '\0' character when assigning its representation. 463-- Characters are strings, not numeric codes, and can be multi-byte 464-- characters. 465-- Call [`view.clear_representation()`]() to remove a representation. 466-- @field rgba_image_height (number) 467-- The height of the RGBA image to be defined using 468-- [`view.marker_define_rgba_image()`](). 469-- @field rgba_image_scale (number) 470-- The scale factor in percent of the RGBA image to be defined using 471-- [`view.marker_define_rgba_image()`](). 472-- This is useful on macOS with a retina display where each display unit is 2 473-- pixels: use a factor of `200` so that each image pixel is displayed using a 474-- screen pixel. The default scale, `100`, will stretch each image pixel to 475-- cover 4 screen pixels on a retina display. 476-- @field rgba_image_width (number) 477-- The width of the RGBA image to be defined using 478-- [`view.marker_define_rgba_image()`]() and 479-- [`view.register_rgba_image()`](). 480-- @field scroll_width (number) 481-- The horizontal scrolling pixel width. 482-- For performance, the view does not measure the display width of the buffer 483-- to determine the properties of the horizontal scroll bar, but uses an 484-- assumed width instead. To ensure the width of the currently visible lines 485-- can be scrolled use [`view.scroll_width_tracking`](). 486-- The default value is `2000`. 487-- @field scroll_width_tracking (bool) 488-- Continuously update the horizontal scrolling width to match the maximum 489-- width of a displayed line beyond [`view.scroll_width`](). 490-- The default value is `false`. 491-- @field sel_alpha (number) 492-- The selection's alpha value, ranging from `0` (transparent) to `255` 493-- (opaque). 494-- The default value is `view.ALPHA_NOALPHA`, for no alpha. 495-- @field sel_eol_filled (bool) 496-- Extend the selection to the view's right margin. 497-- The default value is `false`. 498-- @field size (number) 499-- The split resizer's pixel position if the view is a split one. 500-- @field style_back (table) 501-- Table of background colors, in "0xBBGGRR" format, of text for style numbers 502-- from `1` to `256`. 503-- @field style_bold (table) 504-- Table of flags that indicate whether or not text is bold for style numbers 505-- from `1` to `256`. 506-- The default values are `false`. 507-- @field style_case (table) 508-- Table of letter case modes of text for style numbers from `1` to `256`. 509-- 510-- * `view.CASE_MIXED` 511-- Display text in normally. 512-- * `view.CASE_UPPER` 513-- Display text in upper case. 514-- * `view.CASE_LOWER` 515-- Display text in lower case. 516-- * `view.CASE_CAMEL` 517-- Display text in camel case. 518-- 519-- The default values are `view.CASE_MIXED`. 520-- @field style_changeable (table) 521-- Table of flags that indicate whether or not text is changeable for style 522-- numbers from `1` to `256`. 523-- The default values are `true`. 524-- Read-only styles do not allow the caret into the range of text. 525-- @field style_eol_filled (table) 526-- Table of flags that indicate whether or not the background colors of styles 527-- whose characters occur last on lines extend all the way to the view's right 528-- margin for style numbers from `1` to `256`. 529-- The default values are `false`. 530-- @field style_font (table) 531-- Table of string font names of text for style numbers from `1` to `256`. 532-- @field style_fore (table) 533-- Table of foreground colors, in "0xBBGGRR" format, of text for style numbers 534-- from `1` to `256`. 535-- @field style_italic (table) 536-- Table of flags that indicate whether or not text is italic for style 537-- numbers from `1` to `256`. 538-- The default values are `false`. 539-- @field style_size (table) 540-- Table of font sizes of text for style numbers from `1` to `256`. 541-- @field style_underline (table) 542-- Table of flags that indicate whether or not text is underlined for style 543-- numbers from `1` to `256`. 544-- The default values are `false`. 545-- @field style_visible (table) 546-- Table of flags that indicate whether or not text is visible for style 547-- numbers from `1` to `256`. 548-- The default values are `true`. 549-- @field tab_draw_mode (number) 550-- The draw mode of visible tabs. 551-- 552-- * `view.TD_LONGARROW` 553-- An arrow that stretches until the tabstop. 554-- * `view.TD_STRIKEOUT` 555-- A horizontal line that stretches until the tabstop. 556-- 557-- The default value is `view.TD_LONGARROW`. 558-- @field v_scroll_bar (bool) 559-- Display the vertical scroll bar. 560-- The default value is `true`. 561-- @field view_eol (bool) 562-- Display end of line characters. 563-- The default value is `false`. 564-- @field view_ws (number) 565-- The whitespace visibility mode. 566-- 567-- * `view.WS_INVISIBLE` 568-- Whitespace is invisible. 569-- * `view.WS_VISIBLEALWAYS` 570-- Display all space characters as dots and tab characters as arrows. 571-- * `view.WS_VISIBLEAFTERINDENT` 572-- Display only non-indentation spaces and tabs as dots and arrows. 573-- * `view.WS_VISIBLEONLYININDENT` 574-- Display only indentation spaces and tabs as dots and arrows. 575-- 576-- The default value is `view.WS_INVISIBLE`. 577-- @field whitespace_size (number) 578-- The pixel size of the dots that represent space characters when whitespace 579-- is visible. 580-- The default value is `1`. 581-- @field wrap_indent_mode (number) 582-- The wrapped line indent mode. 583-- 584-- * `view.WRAPINDENT_FIXED` 585-- Indent wrapped lines by [`view.wrap_start_indent`](). 586-- * `view.WRAPINDENT_SAME` 587-- Indent wrapped lines the same amount as the first line. 588-- * `view.WRAPINDENT_INDENT` 589-- Indent wrapped lines one more level than the level of the first line. 590-- * `view.WRAPINDENT_DEEPINDENT` 591-- Indent wrapped lines two more levels than the level of the first line. 592-- 593-- The default value is `view.WRAPINDENT_FIXED`. 594-- @field wrap_mode (number) 595-- Long line wrap mode. 596-- 597-- * `view.WRAP_NONE` 598-- Long lines are not wrapped. 599-- * `view.WRAP_WORD` 600-- Wrap long lines at word (and style) boundaries. 601-- * `view.WRAP_CHAR` 602-- Wrap long lines at character boundaries. 603-- * `view.WRAP_WHITESPACE` 604-- Wrap long lines at word boundaries (ignoring style boundaries). 605-- 606-- The default value is `view.WRAP_NONE`. 607-- @field wrap_start_indent (number) 608-- The number of spaces of indentation to display wrapped lines with if 609-- [`view.wrap_indent_mode`]() is `view.WRAPINDENT_FIXED`. 610-- The default value is `0`. 611-- @field wrap_visual_flags (number) 612-- The wrapped line visual flag display mode. 613-- 614-- * `view.WRAPVISUALFLAG_NONE` 615-- No visual flags. 616-- * `view.WRAPVISUALFLAG_END` 617-- Show a visual flag at the end of a wrapped line. 618-- * `view.WRAPVISUALFLAG_START` 619-- Show a visual flag at the beginning of a sub-line. 620-- * `view.WRAPVISUALFLAG_MARGIN` 621-- Show a visual flag in the sub-line's line number margin. 622-- 623-- The default value is `view.WRAPVISUALFLAG_NONE`. 624-- @field wrap_visual_flags_location (number) 625-- The wrapped line visual flag location. 626-- 627-- * `view.WRAPVISUALFLAGLOC_DEFAULT` 628-- Draw a visual flag near the view's right margin. 629-- * `view.WRAPVISUALFLAGLOC_END_BY_TEXT` 630-- Draw a visual flag near text at the end of a wrapped line. 631-- * `view.WRAPVISUALFLAGLOC_START_BY_TEXT` 632-- Draw a visual flag near text at the beginning of a subline. 633-- 634-- The default value is `view.WRAPVISUALFLAGLOC_DEFAULT`. 635-- @field x_offset (number) 636-- The horizontal scroll pixel position. 637-- A value of `0` is the normal position with the first text column visible at 638-- the left of the view. 639-- @field zoom (number) 640-- The number of points to add to the size of all fonts. 641-- Negative values are allowed, down to `-10`. 642-- The default value is `0`. 643-- @field ANNOTATION_BOXED (number, Read-only) 644-- 645-- @field ANNOTATION_HIDDEN (number, Read-only) 646-- 647-- @field ANNOTATION_STANDARD (number, Read-only) 648-- 649-- @field ANNOTATION_INDENTED (number, Read-only) 650-- 651-- @field CARETSTYLE_BLOCK (number, Read-only) 652-- 653-- @field CARETSTYLE_INVISIBLE (number, Read-only) 654-- 655-- @field CARETSTYLE_LINE (number, Read-only) 656-- 657-- @field CARET_EVEN (number, Read-only) 658-- 659-- @field CARET_JUMPS (number, Read-only) 660-- 661-- @field CARET_SLOP (number, Read-only) 662-- 663-- @field CARET_STRICT (number, Read-only) 664-- 665-- @field EDGE_BACKGROUND (number, Read-only) 666-- 667-- @field EDGE_LINE (number, Read-only) 668-- 669-- @field EDGE_MULTILINE (number, Read-only) 670-- 671-- @field EDGE_NONE (number, Read-only) 672-- 673-- @field FOLDACTION_CONTRACT (number, Read-only) 674-- 675-- @field FOLDACTION_EXPAND (number, Read-only) 676-- 677-- @field FOLDACTION_TOGGLE (number, Read-only) 678-- 679-- @field FOLDDISPLAYTEXT_HIDDEN (number, Read-only) 680-- 681-- @field FOLDDISPLAYTEXT_STANDARD (number, Read-only) 682-- 683-- @field FOLDDISPLAYTEXT_BOXED (number, Read-only) 684-- 685-- @field INDIC_BOX (number, Read-only) 686-- 687-- @field INDIC_COMPOSITIONTHICK (number, Read-only) 688-- 689-- @field INDIC_COMPOSITIONTHIN (number, Read-only) 690-- 691-- @field INDIC_DASH (number, Read-only) 692-- 693-- @field INDIC_DIAGONAL (number, Read-only) 694-- 695-- @field INDIC_DOTBOX (number, Read-only) 696-- 697-- @field INDIC_DOTS (number, Read-only) 698-- 699-- @field INDIC_FULLBOX (number, Read-only) 700-- 701-- @field INDIC_GRADIENT (number, Read-only) 702-- 703-- @field INDIC_GRADIENTCENTER (number, Read-only) 704-- 705-- @field INDIC_HIDDEN (number, Read-only) 706-- 707-- @field INDIC_PLAIN (number, Read-only) 708-- 709-- @field INDIC_POINT (number, Read-only) 710-- 711-- @field INDIC_POINTCHARACTER (number, Read-only) 712-- 713-- @field INDIC_ROUNDBOX (number, Read-only) 714-- 715-- @field INDIC_SQUIGGLE (number, Read-only) 716-- 717-- @field INDIC_SQUIGGLELOW (number, Read-only) 718-- 719-- @field INDIC_SQUIGGLEPIXMAP (number, Read-only) 720-- 721-- @field INDIC_STRAIGHTBOX (number, Read-only) 722-- 723-- @field INDIC_STRIKE (number, Read-only) 724-- 725-- @field INDIC_TEXTFORE (number, Read-only) 726-- 727-- @field INDIC_TT (number, Read-only) 728-- 729-- @field MOD_ALT (number, Read-only) 730-- 731-- @field MOD_CTRL (number, Read-only) 732-- 733-- @field MOD_META (number, Read-only) 734-- 735-- @field MOD_SHIFT (number, Read-only) 736-- 737-- @field MOD_SUPER (number, Read-only) 738-- 739-- @field MOUSE_DRAG (number, Read-only) 740-- 741-- @field MOUSE_PRESS (number, Read-only) 742-- 743-- @field MOUSE_RELEASE (number, Read-only) 744-- 745-- @field WS_INVISIBLE (number, Read-only) 746-- 747-- @field WS_VISIBLEAFTERINDENT (number, Read-only) 748-- 749-- @field WS_VISIBLEALWAYS (number, Read-only) 750-- 751-- @field WS_VISIBLEONLYININDENT (number, Read-only) 752-- 753-- @field ALPHA_NOALPHA (number, Read-only) 754-- 755-- @field ALPHA_OPAQUE (number, Read-only) 756-- 757-- @field ALPHA_TRANSPARENT (number, Read-only) 758-- 759-- @field CASE_CAMEL (number, Read-only) 760-- 761-- @field CASE_LOWER (number, Read-only) 762-- 763-- @field CASE_MIXED (number, Read-only) 764-- 765-- @field CASE_UPPER (number, Read-only) 766-- 767-- @field CURSORARROW (number, Read-only) 768-- 769-- @field CURSORNORMAL (number, Read-only) 770-- 771-- @field CURSORREVERSEARROW (number, Read-only) 772-- 773-- @field CURSORWAIT (number, Read-only) 774-- 775-- @field FOLDFLAG_LEVELNUMBERS (number, Read-only) 776-- 777-- @field FOLDFLAG_LINEAFTER_CONTRACTED (number, Read-only) 778-- 779-- @field FOLDFLAG_LINEAFTER_EXPANDED (number, Read-only) 780-- 781-- @field FOLDFLAG_LINEBEFORE_CONTRACTED (number, Read-only) 782-- 783-- @field FOLDFLAG_LINEBEFORE_EXPANDED (number, Read-only) 784-- 785-- @field FOLDFLAG_LINESTATE (number, Read-only) 786-- 787-- @field IV_LOOKBOTH (number, Read-only) 788-- 789-- @field IV_LOOKFORWARD (number, Read-only) 790-- 791-- @field IV_NONE (number, Read-only) 792-- 793-- @field IV_REAL (number, Read-only) 794-- 795-- @field MARGINOPTION_NONE (number, Read-only) 796-- 797-- @field MARGINOPTION_SUBLINESELECT (number, Read-only) 798-- 799-- @field MARGIN_BACK (number, Read-only) 800-- 801-- @field MARGIN_COLOR (number, Read-only) 802-- 803-- @field MARGIN_FORE (number, Read-only) 804-- 805-- @field MARGIN_NUMBER (number, Read-only) 806-- 807-- @field MARGIN_RTEXT (number, Read-only) 808-- 809-- @field MARGIN_SYMBOL (number, Read-only) 810-- 811-- @field MARGIN_TEXT (number, Read-only) 812-- 813-- @field MARK_ARROW (number, Read-only) 814-- 815-- @field MARK_ARROWDOWN (number, Read-only) 816-- 817-- @field MARK_ARROWS (number, Read-only) 818-- 819-- @field MARK_BACKGROUND (number, Read-only) 820-- 821-- @field MARK_BOOKMARK (number, Read-only) 822-- 823-- @field MARK_BOXMINUS (number, Read-only) 824-- 825-- @field MARK_BOXMINUSCONNECTED (number, Read-only) 826-- 827-- @field MARK_BOXPLUS (number, Read-only) 828-- 829-- @field MARK_BOXPLUSCONNECTED (number, Read-only) 830-- 831-- @field MARK_CHARACTER (number, Read-only) 832-- 833-- @field MARK_CIRCLE (number, Read-only) 834-- 835-- @field MARK_CIRCLEMINUS (number, Read-only) 836-- 837-- @field MARK_CIRCLEMINUSCONNECTED (number, Read-only) 838-- 839-- @field MARK_CIRCLEPLUS (number, Read-only) 840-- 841-- @field MARK_CIRCLEPLUSCONNECTED (number, Read-only) 842-- 843-- @field MARK_DOTDOTDOT (number, Read-only) 844-- 845-- @field MARK_EMPTY (number, Read-only) 846-- 847-- @field MARK_FULLRECT (number, Read-only) 848-- 849-- @field MARK_LCORNER (number, Read-only) 850-- 851-- @field MARK_LCORNERCURVE (number, Read-only) 852-- 853-- @field MARK_LEFTRECT (number, Read-only) 854-- 855-- @field MARK_MINUS (number, Read-only) 856-- 857-- @field MARK_PIXMAP (number, Read-only) 858-- 859-- @field MARK_PLUS (number, Read-only) 860-- 861-- @field MARK_RGBAIMAGE (number, Read-only) 862-- 863-- @field MARK_ROUNDRECT (number, Read-only) 864-- 865-- @field MARK_SHORTARROW (number, Read-only) 866-- 867-- @field MARK_SMALLRECT (number, Read-only) 868-- 869-- @field MARK_TCORNER (number, Read-only) 870-- 871-- @field MARK_TCORNERCURVE (number, Read-only) 872-- 873-- @field MARK_UNDERLINE (number, Read-only) 874-- 875-- @field MARK_VERTICALBOOKMARK (number, Read-only) 876-- 877-- @field MARK_VLINE (number, Read-only) 878-- 879-- @field MASK_FOLDERS (number, Read-only) 880-- 881-- @field TD_LONGARROW (number, Read-only) 882-- 883-- @field TD_STRIKEOUT (number, Read-only) 884-- 885-- @field TIME_FOREVER (number, Read-only) 886-- 887-- @field WRAPINDENT_DEEPINDENT (number, Read-only) 888-- 889-- @field WRAPINDENT_FIXED (number, Read-only) 890-- 891-- @field WRAPINDENT_INDENT (number, Read-only) 892-- 893-- @field WRAPINDENT_SAME (number, Read-only) 894-- 895-- @field WRAPVISUALFLAGLOC_DEFAULT (number, Read-only) 896-- 897-- @field WRAPVISUALFLAGLOC_END_BY_TEXT (number, Read-only) 898-- 899-- @field WRAPVISUALFLAGLOC_START_BY_TEXT (number, Read-only) 900-- 901-- @field WRAPVISUALFLAG_END (number, Read-only) 902-- 903-- @field WRAPVISUALFLAG_MARGIN (number, Read-only) 904-- 905-- @field WRAPVISUALFLAG_NONE (number, Read-only) 906-- 907-- @field WRAPVISUALFLAG_START (number, Read-only) 908-- 909-- @field WRAP_CHAR (number, Read-only) 910-- 911-- @field WRAP_NONE (number, Read-only) 912-- 913-- @field WRAP_WHITESPACE (number, Read-only) 914-- 915-- @field WRAP_WORD (number, Read-only) 916-- 917-- @field STYLE_BRACEBAD (number, Read-only) 918-- 919-- @field STYLE_BRACELIGHT (number, Read-only) 920-- 921-- @field STYLE_CALLTIP (number, Read-only) 922-- 923-- @field STYLE_CONTROLCHAR (number, Read-only) 924-- 925-- @field STYLE_DEFAULT (number, Read-only) 926-- 927-- @field STYLE_FOLDDISPLAYTEXT (number, Read-only) 928-- 929-- @field STYLE_INDENTGUIDE (number, Read-only) 930-- 931-- @field STYLE_LINENUMBER (number, Read-only) 932-- 933-- @field STYLE_MAX (number, Read-only) 934-- 935-- @field UPDATE_H_SCROLL (number, Read-only) 936-- 937-- @field UPDATE_V_SCROLL (number, Read-only) 938-- 939-- @field VISIBLE_SLOP (number, Read-only) 940-- 941-- @field VISIBLE_STRICT (number, Read-only) 942-- 943module('view') 944 945--- 946-- The [buffer](#buffer) the view currently contains. (Read-only) 947-- @class table 948-- @name buffer 949local buffer 950 951--- 952-- Highlights the character at position *pos* as an unmatched brace character 953-- using the `'style.bracebad'` style. 954-- Removes highlighting when *pos* is `-1`. 955-- @param view A view. 956-- @param pos The position in *view*'s buffer to highlight, or `-1` to remove 957-- the highlight. 958function brace_bad_light(view, pos) end 959 960--- 961-- Highlights unmatched brace characters with indicator number *indicator*, in 962-- the range of `1` to `32`, instead of the 963-- `view.STYLE_BRACEBAD` style if *use_indicator* is `true`. 964-- @param view A view. 965-- @param use_indicator Whether or not to use an indicator. 966-- @param indicator The indicator number to use. 967function brace_bad_light_indicator(view, use_indicator, indicator) end 968 969--- 970-- Highlights the characters at positions *pos1* and *pos2* as matching braces 971-- using the `'style.bracelight'` style. 972-- If indent guides are enabled, locates the column with `buffer.column` and 973-- sets `view.highlight_guide` in order to highlight the indent guide. 974-- @param view A view. 975-- @param pos1 The first position in *view*'s buffer to highlight. 976-- @param pos2 The second position in *view*'s buffer to highlight. 977function brace_highlight(view, pos1, pos2) end 978 979--- 980-- Highlights matching brace characters with indicator number *indicator*, in 981-- the range of `1` to `32`, instead of the 982-- `view.STYLE_BRACELIGHT` style if *use_indicator* is `true`. 983-- @param view A view. 984-- @param use_indicator Whether or not to use an indicator. 985-- @param indicator The indicator number to use. 986function brace_highlight_indicator(view, use_indicator, indicator) end 987 988--- 989-- Returns whether or not a call tip is visible. 990-- @param view A view. 991-- @return bool 992function call_tip_active(view) end 993 994--- 995-- Removes the displayed call tip from view. 996-- @param view A view. 997function call_tip_cancel(view) end 998 999--- 1000-- Returns a call tip's display position. 1001-- @param view A view. 1002-- @return number 1003function call_tip_pos_start(view) end 1004 1005--- 1006-- Highlights a call tip's text between positions *start_pos* to *end_pos* with 1007-- the color `view.call_tip_fore_hlt`. 1008-- @param view A view. 1009-- @param start_pos The start position in a call tip text to highlight. 1010-- @param end_pos The end position in a call tip text to highlight. 1011function call_tip_set_hlt(view, start_pos, end_pos) end 1012 1013--- 1014-- Displays a call tip at position *pos* with string *text* as the call tip's 1015-- contents. 1016-- Any "\001" or "\002" bytes in *text* are replaced by clickable up or down 1017-- arrow visuals, respectively. These may be used to indicate that a symbol has 1018-- more than one call tip, for example. 1019-- @param view A view. 1020-- @param pos The position in *view*'s buffer to show a call tip at. 1021-- @param text The call tip text to show. 1022function call_tip_show(view, pos, text) end 1023 1024--- 1025-- Clears all images registered using `view.register_image()` and 1026-- `view.register_rgba_image()`. 1027-- @param view A view. 1028function clear_registered_images(view) end 1029 1030--- 1031-- Removes the alternate string representation for character *char* (which may 1032-- be a multi-byte character). 1033-- @param view A view. 1034-- @param char The string character in `buffer.representations` to remove the 1035-- alternate string representation for. 1036function clear_representation(view, char) end 1037 1038--- 1039-- Returns the line number of the next contracted fold point starting from line 1040-- number *line*, or `-1` if none exists. 1041-- @param view A view. 1042-- @param line The line number in *view* to start at. 1043-- @return number 1044function contracted_fold_next(view, line) end 1045 1046--- 1047-- Returns the actual line number of displayed line number *display_line*, 1048-- taking wrapped, annotated, and hidden lines into account. 1049-- If *display_line* is less than or equal to `1`, returns `1`. If 1050-- *display_line* is greater than the number of displayed lines, returns 1051-- `buffer.line_count`. 1052-- @param view A view. 1053-- @param display_line The display line number to use. 1054-- @return number 1055function doc_line_from_visible(view, display_line) end 1056 1057--- 1058-- Ensures line number *line* is visible by expanding any fold points hiding it. 1059-- @param view A view. 1060-- @param line The line number in *view* to ensure visible. 1061function ensure_visible(view, line) end 1062 1063--- 1064-- Ensures line number *line* is visible by expanding any fold points hiding it 1065-- based on the vertical caret policy previously defined in 1066-- `view.set_visible_policy()`. 1067-- @param view A view. 1068-- @param line The line number in *view* to ensure visible. 1069function ensure_visible_enforce_policy(view, line) end 1070 1071--- 1072-- Contracts, expands, or toggles all fold points, depending on *action*. 1073-- When toggling, the state of the first fold point determines whether to 1074-- expand or contract. 1075-- @param view A view. 1076-- @param action The fold action to perform. Valid values are: 1077-- * `view.FOLDACTION_CONTRACT` 1078-- * `view.FOLDACTION_EXPAND` 1079-- * `view.FOLDACTION_TOGGLE` 1080function fold_all(view, action) end 1081 1082--- 1083-- Contracts, expands, or toggles the fold point on line number *line*, as well 1084-- as all of its children, depending on *action*. 1085-- @param view A view. 1086-- @param line The line number in *view* to set the fold states for. 1087-- @param action The fold action to perform. Valid values are: 1088-- * `view.FOLDACTION_CONTRACT` 1089-- * `view.FOLDACTION_EXPAND` 1090-- * `view.FOLDACTION_TOGGLE` 1091function fold_children(view, line, action) end 1092 1093--- 1094-- Contracts, expands, or toggles the fold point on line number *line*, 1095-- depending on *action*. 1096-- @param view A view. 1097-- @param line The line number in *view* to set the fold state for. 1098-- @param action The fold action to perform. Valid values are: 1099-- * `view.FOLDACTION_CONTRACT` 1100-- * `view.FOLDACTION_EXPAND` 1101-- * `view.FOLDACTION_TOGGLE` 1102function fold_line(view, line, action) end 1103 1104--- 1105-- Returns the default fold display text. 1106-- @param view A view. 1107function get_default_fold_display_text(view) end 1108 1109--- 1110-- Hides the range of lines between line numbers *start_line* to *end_line*. 1111-- This has no effect on fold levels or fold flags and the first line cannot be 1112-- hidden. 1113-- @param view A view. 1114-- @param start_line The start line of the range of lines in *view* to hide. 1115-- @param end_line The end line of the range of lines in *view* to hide. 1116function hide_lines(view, start_line, end_line) end 1117 1118--- 1119-- Scrolls the buffer right *columns* columns and down *lines* lines. 1120-- Negative values are allowed. 1121-- @param view A view. 1122-- @param columns The number of columns to scroll horizontally. 1123-- @param lines The number of lines to scroll vertically. 1124function line_scroll(view, columns, lines) end 1125 1126--- 1127-- Scrolls the buffer down one line, keeping the caret visible. 1128-- @param view A view. 1129function line_scroll_down(view) end 1130 1131--- 1132-- Scrolls the buffer up one line, keeping the caret visible. 1133-- @param view A view. 1134function line_scroll_up(view) end 1135 1136--- 1137-- Assigns marker symbol *symbol* to marker number *marker*, in the range of `1` 1138-- to `32`. 1139-- *symbol* is shown in marker symbol margins next to lines marked with 1140-- *marker*. 1141-- @param view A view. 1142-- @param marker The marker number in the range of `1` to `32` to set *symbol* 1143-- for. 1144-- @param symbol The marker symbol: `buffer.MARK_*`. 1145-- @see _SCINTILLA.next_marker_number 1146function marker_define(view, marker, symbol) end 1147 1148--- 1149-- Associates marker number *marker*, in the range of `1` to `32`, with XPM 1150-- image *pixmap*. 1151-- The `view.MARK_PIXMAP` marker symbol must be assigned to *marker*. 1152-- *pixmap* is shown in marker symbol margins next to lines marked with 1153-- *marker*. 1154-- @param view A view. 1155-- @param marker The marker number in the range of `1` to `32` to define 1156-- pixmap *pixmap* for. 1157-- @param pixmap The string pixmap data. 1158function marker_define_pixmap(view, marker, pixmap) end 1159 1160--- 1161-- Associates marker number *marker*, in the range of `1` to `32`, with RGBA 1162-- image *pixels*. 1163-- The dimensions for *pixels* (`view.rgba_image_width` and 1164-- `view.rgba_image_height`) must have already been defined. *pixels* is a 1165-- sequence of 4 byte pixel values (red, blue, green, and alpha) defining the 1166-- image line by line starting at the top-left pixel. 1167-- The `view.MARK_RGBAIMAGE` marker symbol must be assigned to *marker*. 1168-- *pixels* is shown in symbol margins next to lines marked with *marker*. 1169-- @param view A view. 1170-- @param marker The marker number in the range of `1` to `32` to define RGBA 1171-- data *pixels* for. 1172-- @param pixels The string sequence of 4 byte pixel values starting with the 1173-- pixels for the top line, with the leftmost pixel first, then continuing 1174-- with the pixels for subsequent lines. There is no gap between lines for 1175-- alignment reasons. Each pixel consists of, in order, a red byte, a green 1176-- byte, a blue byte and an alpha byte. The color bytes are not premultiplied 1177-- by the alpha value. That is, a fully red pixel that is 25% opaque will be 1178-- `[FF, 00, 00, 3F]`. 1179function marker_define_rgba_image(view, marker, pixels) end 1180 1181--- 1182-- Highlights the margin fold markers for the current fold block if *enabled* is 1183-- `true`. 1184-- @param view A view. 1185-- @param enabled Whether or not to enable highlight. 1186function marker_enable_highlight(view, enabled) end 1187 1188--- 1189-- Returns the symbol assigned to marker number *marker*, in the range of `1` to 1190-- `32`, used in `view.marker_define()`, 1191-- `view.marker_define_pixmap()`, or `view.marker_define_rgba_image()`. 1192-- @param view A view. 1193-- @param marker The marker number in the range of `1` to `32` to get the symbol 1194-- of. 1195-- @return number 1196function marker_symbol_defined(view, marker) end 1197 1198--- 1199-- Adds a new vertical line at column number *column* with color *color*, in 1200-- "0xBBGGRR" format. 1201-- @param view A view. 1202-- @param column The column number to add a vertical line at. 1203-- @param color The color in "0xBBGGRR" format. 1204function multi_edge_add_line(view, column, color) end 1205 1206--- 1207-- Clears all vertical lines created by `view:multi_edge_add_line()`. 1208-- @param view A view. 1209function multi_edge_clear_all(view) end 1210 1211--- 1212-- Registers XPM image *xpm_data* to type number *type* for use in 1213-- autocompletion and user lists. 1214-- @param view A view. 1215-- @param type Integer type to register the image with. 1216-- @param xpm_data The XPM data as described in `view.marker_define_pixmap()`. 1217function register_image(view, type, xpm_data) end 1218 1219--- 1220-- Registers RGBA image *pixels* to type number *type* for use in autocompletion 1221-- and user lists. 1222-- The dimensions for *pixels* (`view.rgba_image_width` and 1223-- `view.rgba_image_height`) must have already been defined. *pixels* is a 1224-- sequence of 4 byte pixel values (red, blue, green, and alpha) defining the 1225-- image line by line starting at the top-left pixel. 1226-- @param view A view. 1227-- @param type Integer type to register the image with. 1228-- @param pixels The RGBA data as described in 1229-- `view.marker_define_rgba_image()`. 1230function register_rgba_image(view, type, pixels) end 1231 1232--- 1233-- Scrolls the caret into view based on the policies previously defined in 1234-- `view.set_x_caret_policy()` and `view.set_y_caret_policy()`. 1235-- @param view A view. 1236-- @see set_x_caret_policy 1237-- @see set_y_caret_policy 1238function scroll_caret(view) end 1239 1240--- 1241-- Scrolls to the end of the buffer without moving the caret. 1242-- @param view A view. 1243function scroll_to_end(view) end 1244 1245--- 1246-- Scrolls to the beginning of the buffer without moving the caret. 1247-- @param view A view. 1248function scroll_to_start(view) end 1249 1250--- 1251-- Scrolls into view the range of text between positions *primary_pos* and 1252-- *secondary_pos*, with priority given to *primary_pos*. 1253-- Similar to `view.scroll_caret()`, but with *primary_pos* instead of 1254-- `buffer.current_pos`. 1255-- This is useful for scrolling search results into view. 1256-- @param view A view. 1257-- @param secondary_pos The secondary range position to scroll into view. 1258-- @param primary_pos The primary range position to scroll into view. 1259function scroll_range(view, secondary_pos, primary_pos) end 1260 1261--- 1262-- Sets the default fold display text to string *text*. 1263-- @param view A view. 1264-- @param text The text to display by default next to folded lines. 1265-- @see toggle_fold_show_text 1266function set_default_fold_display_text(view, text) end 1267 1268--- 1269-- Overrides the fold margin's default color with color *color*, in "0xBBGGRR" 1270-- format, 1271-- if *use_setting* is `true`. 1272-- @param view A view. 1273-- @param use_setting Whether or not to use *color*. 1274-- @param color The color in "0xBBGGRR" format. 1275function set_fold_margin_color(view, use_setting, color) end 1276 1277--- 1278-- Overrides the fold margin's default highlight color with color *color*, in 1279-- "0xBBGGRR" format, if *use_setting* is `true`. 1280-- @param view A view. 1281-- @param use_setting Whether or not to use *color*. 1282-- @param color The color in "0xBBGGRR" format. 1283function set_fold_margin_hi_color(view, use_setting, color) end 1284 1285--- 1286-- Overrides the selection's default background color with color *color*, in 1287-- "0xBBGGRR" format, if *use_setting* is `true`. 1288-- Overwrites any existing `view.additional_sel_back` color. 1289-- @param view A view. 1290-- @param use_setting Whether or not to use *color*. 1291-- @param color The color in "0xBBGGRR" format. 1292function set_sel_back(view, use_setting, color) end 1293 1294--- 1295-- Overrides the selection's default foreground color with color *color*, in 1296-- "0xBBGGRR" format, if *use_setting* is `true`. 1297-- Overwrites any existing `view.additional_sel_fore` color. 1298-- @param view A view. 1299-- @param use_setting Whether or not to use *color*. 1300-- @param color The color in "0xBBGGRR" format. 1301function set_sel_fore(view, use_setting, color) end 1302 1303--- 1304-- Defines scrolling policy bit-mask *policy* as the policy for keeping the 1305-- caret *y* number of lines away from the vertical margins as 1306-- `view.ensure_visible_enforce_policy()` redisplays hidden or folded lines. 1307-- It is similar in operation to `view.set_y_caret_policy()`. 1308-- @param view A view. 1309-- @param policy The combination of `view.VISIBLE_SLOP` and 1310-- `view.VISIBLE_STRICT` policy flags to set. 1311-- @param y The number of lines from the vertical margins to keep the caret. 1312function set_visible_policy(view, policy, y) end 1313 1314--- 1315-- Overrides the background color of whitespace with color *color*, in 1316-- "0xBBGGRR" format, if *use_setting* is `true`. 1317-- @param view A view. 1318-- @param use_setting Whether or not to use *color*. 1319-- @param color The color in "0xBBGGRR" format. 1320function set_whitespace_back(view, use_setting, color) end 1321 1322--- 1323-- Overrides the foreground color of whitespace with color *color*, in 1324-- "0xBBGGRR" format, if *use_setting* is `true`. 1325-- @param use_setting Whether or not to use *color*. 1326-- @param color The color in "0xBBGGRR" format. 1327function set_whitespace_fore(view, use_setting, color) end 1328 1329--- 1330-- Defines scrolling policy bit-mask *policy* as the policy for keeping the 1331-- caret *x* number of pixels away from the horizontal margins. 1332-- @param view A view. 1333-- @param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`, 1334-- `view.CARET_EVEN`, and `view.CARET_JUMPS` policy flags to set. 1335-- @param x The number of pixels from the horizontal margins to keep the caret. 1336function set_x_caret_policy(view, policy, x) end 1337 1338--- 1339-- Defines scrolling policy bit-mask *policy* as the policy for keeping the 1340-- caret *y* number of lines away from the vertical margins. 1341-- @param view A view. 1342-- @param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`, 1343-- `view.CARET_EVEN`, and `view.CARET_JUMPS` policy flags to set. 1344-- @param y The number of lines from the vertical margins to keep the caret. 1345function set_y_caret_policy(view, policy, y) end 1346 1347--- 1348-- Shows the range of lines between line numbers *start_line* to *end_line*. 1349-- This has no effect on fold levels or fold flags and the first line cannot be 1350-- hidden. 1351-- @param view A view. 1352-- @param start_line The start line of the range of lines in *view* to show. 1353-- @param end_line The end line of the range of lines in *view* to show. 1354function show_lines(view, start_line, end_line) end 1355 1356--- 1357-- Reverts all styles to having the same properties as `view.STYLE_DEFAULT`. 1358-- @param view A view. 1359function style_clear_all(view) end 1360 1361--- 1362-- Resets `view.STYLE_DEFAULT` to its initial state. 1363-- @param view A view. 1364function style_reset_default(view) end 1365 1366--- 1367-- Returns the pixel height of line number *line*. 1368-- @param view A view. 1369-- @param line The line number in *view* to get the pixel height of. 1370-- @return number 1371function text_height(view, line) end 1372 1373--- 1374-- Returns the pixel width string *text* would have when styled with style 1375-- number *style_num*, in the range of `1` to `256`. 1376-- @param view A view. 1377-- @param style_num The style number between `1` and `256` to use. 1378-- @param text The text to measure the width of. 1379-- @return number 1380function text_width(view, style_num, text) end 1381 1382--- 1383-- Toggles the fold point on line number *line* between expanded (where all of 1384-- its child lines are displayed) and contracted (where all of its child lines 1385-- are hidden). 1386-- @param view A view. 1387-- @param line The line number in *view* to toggle the fold on. 1388-- @see set_default_fold_display_text 1389function toggle_fold(view, line) end 1390 1391--- 1392-- Toggles a fold point on line number *line* between expanded (where all of 1393-- its child lines are displayed) and contracted (where all of its child lines 1394-- are hidden), and shows string *text* next to that line. 1395-- *text* is drawn with style number `view.STYLE_FOLDDISPLAYTEXT`. 1396-- @param view A view. 1397-- @param line The line number in *view* to toggle the fold on and display 1398-- *text* after. 1399-- @param text The text to display after the line. 1400function toggle_fold_show_text(view, line, text) end 1401 1402--- 1403-- Centers current line in the view. 1404-- @param view A view. 1405function vertical_center_caret(view) end 1406 1407--- 1408-- Returns the displayed line number of actual line number *line*, taking 1409-- wrapped, annotated, and hidden lines into account, or `-1` if *line* is 1410-- outside the range of lines in the buffer. 1411-- Lines can occupy more than one display line if they wrap. 1412-- @param view A view. 1413-- @param line The line number in *view* to use. 1414-- @return number 1415function visible_from_doc_line(view, line) end 1416 1417--- 1418-- Returns the number of wrapped lines needed to fully display line number 1419-- *line*. 1420-- @param view A view. 1421-- @param line The line number in *view* to use. 1422-- @return number 1423function wrap_count(view, line) end 1424 1425--- 1426-- Increases the size of all fonts by one point, up to 20. 1427-- @param view A view. 1428function zoom_in(view) end 1429 1430--- 1431-- Decreases the size of all fonts by one point, down to -10. 1432-- @param view A view. 1433function zoom_out(view) end 1434 1435-- External functions. 1436 1437--- 1438-- Splits the view into top and bottom views (unless *vertical* is `true`), 1439-- focuses the new view, and returns both the old and new views. 1440-- If *vertical* is `false`, splits the view vertically into left and 1441-- right views. 1442-- Emits a `VIEW_NEW` event. 1443-- @param view The view to split. 1444-- @param vertical Optional flag indicating whether or not to split the view 1445-- vertically. The default value is `false`, for horizontal. 1446-- @return old view and new view. 1447-- @see events.VIEW_NEW 1448function split(view, vertical) end 1449 1450--- 1451-- Unsplits the view if possible, returning `true` on success. 1452-- @param view The view to unsplit. 1453-- @return boolean if the view was unsplit or not. 1454function unsplit(view) end 1455 1456--- 1457-- Switches to buffer *buffer* or the buffer *buffer* number of buffers relative 1458-- to the current one. 1459-- Emits `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events. 1460-- @param view The view to switch buffers in. 1461-- @param buffer A buffer or relative buffer number (typically 1 or -1). 1462-- @see _G._BUFFERS 1463-- @see events.BUFFER_BEFORE_SWITCH 1464-- @see events.BUFFER_AFTER_SWITCH 1465function goto_buffer(view, buffer) end 1466 1467--- 1468-- Sets the view's color theme to be string *name*, with the contents of table 1469-- *env* available as global variables. 1470-- User themes override Textadept's default themes when they have the same name. 1471-- If *name* contains slashes, it is assumed to be an absolute path to a theme 1472-- instead of a theme name. 1473-- @param view A view. 1474-- @param name The name or absolute path of a theme to set. 1475-- @param env Optional table of global variables themes can utilize to override 1476-- default settings such as font and size. 1477-- @usage view:set_theme('light', {font = 'Monospace', size = 12}) 1478-- @name set_theme 1479-- @see _G.lexer.colors 1480-- @see _G.lexer.styles 1481function set_theme(view, name, env) end 1482