### Example of Setting Word Characters Source: https://scintilla.org/ScintillaDoc.html An example demonstrating how to set custom word characters, excluding the underscore character. ```c SCI_SETWORDCHARS(0, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") ``` -------------------------------- ### Selection Start and End Properties Source: https://scintilla.org/ScintillaDoc.html Allows getting and setting the start and end positions, including virtual space, for each selection. ```APIDOC ## SCI_SETSELECTIONNSTART ### Description Sets the start position (anchor) for a specific selection. ### Method SCI_SETSELECTIONNSTART ### Parameters #### Path Parameters - **selection** (int) - Required - The zero-based index of the selection. - **anchor** (position) - Required - The new start position. ## SCI_GETSELECTIONNSTART ### Description Retrieves the start position (anchor) of a specific selection. ### Method SCI_GETSELECTIONNSTART ### Parameters #### Path Parameters - **selection** (int) - Required - The zero-based index of the selection. ### Returns - **position**: The start position. ## SCI_GETSELECTIONNSTARTVIRTUALSPACE ### Description Retrieves the amount of virtual space at the start position of a specific selection. ### Method SCI_GETSELECTIONNSTARTVIRTUALSPACE ### Parameters #### Path Parameters - **selection** (int) - Required - The zero-based index of the selection. ### Returns - **position**: The amount of virtual space at the start. ## SCI_SETSELECTIONNEND ### Description Sets the end position (caret) for a specific selection. ### Method SCI_SETSELECTIONNEND ### Parameters #### Path Parameters - **selection** (int) - Required - The zero-based index of the selection. - **caret** (position) - Required - The new end position. ## SCI_GETSELECTIONNEND ### Description Retrieves the end position (caret) of a specific selection. ### Method SCI_GETSELECTIONNEND ### Parameters #### Path Parameters - **selection** (int) - Required - The zero-based index of the selection. ### Returns - **position**: The end position. ## SCI_GETSELECTIONNENDVIRTUALSPACE ### Description Retrieves the amount of virtual space at the end position of a specific selection. ### Method SCI_GETSELECTIONNENDVIRTUALSPACE ### Parameters #### Path Parameters - **selection** (int) - Required - The zero-based index of the selection. ### Returns - **position**: The amount of virtual space at the end. ``` -------------------------------- ### Highlighted Indentation Guide Source: https://scintilla.org/ScintillaDoc.html Set and get a specific column to be highlighted as an indentation guide. ```APIDOC ## Highlighted Indentation Guide ### SCI_SETHIGHLIGHTGUIDE(position column) ### SCI_GETHIGHLIGHTGUIDE → position `SCI_SETHIGHLIGHTGUIDE` sets a specific column to be highlighted as an indentation guide. `SCI_GETHIGHLIGHTGUIDE` retrieves the currently highlighted column. ``` -------------------------------- ### Find Indicator Start Position Source: https://scintilla.org/ScintillaDoc.html Use SCI_INDICATORSTART to find the starting position of a range where a specific indicator is applied, beginning the search from a given position. ```c SCI_INDICATORSTART(int indicator, position pos) → position ``` -------------------------------- ### SCI_GETHIGHLIGHTGUIDE Source: https://scintilla.org/ScintillaDoc.html Retrieves the current column set for highlighting indentation guides. ```APIDOC ## SCI_GETHIGHLIGHTGUIDE ### Description Retrieves the current column set for highlighting indentation guides. ### Method SCI_GETHIGHLIGHTGUIDE ### Returns - **position** (integer) - The column number currently set for highlighting. ``` -------------------------------- ### Indentation Guides Source: https://scintilla.org/ScintillaDoc.html Control the display of indentation guides (vertical lines) to assist in code structure visualization. ```APIDOC ## Indentation Guides ### SCI_SETINDENTATIONGUIDES(int indentView) ### SCI_GETINDENTATIONGUIDES → int `SCI_SETINDENTATIONGUIDES` controls the display of indentation guides. `indentView` can be set to enable or disable these guides. ``` -------------------------------- ### SCI_AUTOCPOSSTART Source: https://scintilla.org/ScintillaDoc.html Retrieves the starting position of the autocompletion list in the document. ```APIDOC ## SCI_AUTOCPOSSTART ### Description This returns the value of the current position when `SCI_AUTOCSHOW` started display of the list. ### Method SCI_AUTOCPOSSTART ### Return Value - **position**: The starting position of the autocompletion list. ``` -------------------------------- ### Get Selection Start and End Source: https://scintilla.org/ScintillaDoc.html Retrieve the start and end positions of the current selection, regardless of which is the anchor or caret. ```c SCI_GETSELECTIONSTART → position ``` ```c SCI_GETSELECTIONEND → position ``` -------------------------------- ### SCI_SETHIGHLIGHTGUIDE Source: https://scintilla.org/ScintillaDoc.html Sets the column for highlighting indentation guides when brace highlighting occurs. ```APIDOC ## SCI_SETHIGHLIGHTGUIDE ### Description Sets the column for highlighting indentation guides when brace highlighting occurs. Set `column` to 0 to cancel this highlight. ### Method SCI_SETHIGHLIGHTGUIDE ### Parameters #### Path Parameters - **position** (integer) - Required - The column number to highlight. ``` -------------------------------- ### Margin Options Source: https://scintilla.org/ScintillaDoc.html Set and get general options for margins. ```APIDOC ## SCI_SETMARGINOPTIONS(int marginOptions) ### Description Set general options for margins. ### Method SCI_SETMARGINOPTIONS ### Parameters #### Path Parameters - **marginOptions** (int) - Required - The margin options value. ``` ```APIDOC ## SCI_GETMARGINOPTIONS → int ### Description Get general options for margins. ### Method SCI_GETMARGINOPTIONS ### Response #### Success Response (200) - **return value** (int) - The margin options value. ``` -------------------------------- ### SCI_STARTSTYLING Source: https://scintilla.org/ScintillaDoc.html Prepares the editor for a series of styling operations by setting the starting position for styling. ```APIDOC ## SCI_STARTSTYLING ### Description This prepares for styling by setting the styling position `start` to start at. The unused argument was used in earlier versions but is now ignored. After `SCI_STARTSTYLING`, send multiple `SCI_SETSTYLING` messages for each lexical entity to style or send `SCI_SETSTYLINGEX` to style in blocks. ### Method Message ### Parameters #### Path Parameters - **start** (position) - Required - The starting position for styling. - **unused** (int) - Ignored. ``` -------------------------------- ### Underline Settings Source: https://scintilla.org/ScintillaDoc.html Messages for setting and getting the underline property of a style. ```APIDOC ## Underline Settings ### SCI_STYLESETUNDERLINE(int style, bool underline) #### Description Sets whether the text for a given style should be underlined. `underline` is a boolean (0 for false, 1 for true). The underline is drawn in the foreground color. ### SCI_STYLEGETUNDERLINE(int style) → bool #### Description Retrieves whether the text for a given style is underlined. Returns a boolean value. ``` -------------------------------- ### Get Annotation Visibility Source: https://scintilla.org/ScintillaDoc.html Retrieves the current annotation display mode. ```c SCI_ANNOTATIONGETVISIBLE → int ``` -------------------------------- ### Margin Options Source: https://scintilla.org/ScintillaDoc.html Set or get options for margin behavior, such as sub-line selection. ```APIDOC ## Margin Options ### Description Define margin options by enabling appropriate bit flags. At the moment, only one flag is available `SC_MARGINOPTION_SUBLINESELECT`=1, which controls how wrapped lines are selected when clicking on margin in front of them. If `SC_MARGINOPTION_SUBLINESELECT` is set only sub line of wrapped line is selected, otherwise whole wrapped line is selected. Margin options are set to `SC_MARGINOPTION_NONE`=0 by default. ### Methods - **SCI_SETMARGINOPTIONS(int marginOptions)** - **SCI_GETMARGINOPTIONS → int** ``` -------------------------------- ### Background Color Settings Source: https://scintilla.org/ScintillaDoc.html Messages for setting and getting the background color of a style. ```APIDOC ## Background Color Settings ### SCI_STYLESETBACK(int style, colour back) #### Description Sets the background color for a given style. `back` is a color value. This color is used for the space in each character cell not occupied by the character. ### SCI_STYLEGETBACK(int style) → colour #### Description Retrieves the background color for a given style. Returns a color value. ``` -------------------------------- ### Visibility Setting Source: https://scintilla.org/ScintillaDoc.html Sets and gets whether the text with a given style is visible. ```APIDOC ## Visibility Setting ### Description Sets and gets whether the text with a given style is visible. ### Methods - `SCI_STYLESETVISIBLE(int style, bool visible)` - `SCI_STYLEGETVISIBLE(int style) → bool` ``` -------------------------------- ### Lexer Management Source: https://scintilla.org/ScintillaDoc.html APIs for getting, setting, and retrieving information about the current lexer. ```APIDOC ## SCI_GETLEXER ### Description Retrieves an integer lexer ID for the current lexer. Returns 0 if the lexer only has a name and no ID. ### Method SCI_GETLEXER ### Return Value - int: The lexer ID. ``` ```APIDOC ## SCI_GETLEXERLANGUAGE ### Description Retrieves the name of the current lexer. The lexer must have been set with `SCI_SETILEXER`. ### Method SCI_GETLEXERLANGUAGE ### Parameters #### Path Parameters - `language` (char *) - Output buffer for the NUL-terminated lexer name. ``` ```APIDOC ## SCI_SETILEXER ### Description Sets a lexer using an `ILexer5*` pointer. The lexer can be implemented by the application or a shared library like Lexilla. ### Method SCI_SETILEXER ### Parameters #### Path Parameters - `ilexer` (pointer) - Pointer to the lexer object. ``` -------------------------------- ### SCI_AUTOCGETCANCELATSTART Source: https://scintilla.org/ScintillaDoc.html Retrieves the current setting for cancelling the autocompletion list when the caret is at its starting position. ```APIDOC ## SCI_AUTOCGETCANCELATSTART ### Description Retrieves the current setting for whether the autocompletion list is cancelled when the caret is at its starting position. ### Method SCI_AUTOCGETCANCELATSTART ### Returns - **bool** - `true` if the list cancels at the start, `false` otherwise. ``` -------------------------------- ### Changeable Setting Source: https://scintilla.org/ScintillaDoc.html Sets and gets whether the text with a given style is changeable. ```APIDOC ## Changeable Setting ### Description Sets and gets whether the text with a given style is changeable. ### Methods - `SCI_STYLESETCHANGEABLE(int style, bool changeable)` - `SCI_STYLEGETCHANGEABLE(int style) → bool` ``` -------------------------------- ### Foreground Color Settings Source: https://scintilla.org/ScintillaDoc.html Messages for setting and getting the foreground color of a style. ```APIDOC ## Foreground Color Settings ### SCI_STYLESETFORE(int style, colour fore) #### Description Sets the foreground color for a given style. `fore` is a color value. ### SCI_STYLEGETFORE(int style) → colour #### Description Retrieves the foreground color for a given style. Returns a color value. ``` -------------------------------- ### Get Annotation Lines Source: https://scintilla.org/ScintillaDoc.html Returns the number of lines of annotation text for a given line. ```c SCI_ANNOTATIONGETLINES(line line) → int ``` -------------------------------- ### Font Settings Source: https://scintilla.org/ScintillaDoc.html Messages for setting and getting font properties for a given style. ```APIDOC ## Font Settings ### SCI_STYLESETFONT(int style, const char *fontName) #### Description Sets the font name for a given style. The fontName is a zero-terminated string. Platform-specific decoding and length limits apply. ### SCI_STYLEGETFONT(int style, char *fontName NUL-terminated) → int #### Description Retrieves the font name for a given style. The retrieved name is NUL-terminated. Returns a value indicating success or failure. ``` -------------------------------- ### Get Caret Style Source: https://scintilla.org/ScintillaDoc.html Retrieve the current caret style setting with SCI_GETCARETSTYLE. ```c SCI_GETCARETSTYLE → int ``` -------------------------------- ### Get Caret Sticky Behaviour Source: https://scintilla.org/ScintillaDoc.html Retrieve the current setting for caret sticky behavior with SCI_GETCARETSTICKY. ```c SCI_GETCARETSTICKY → int ``` -------------------------------- ### Character Set Setting Source: https://scintilla.org/ScintillaDoc.html Sets and gets the character set for a given style. ```APIDOC ## Character Set Setting ### Description Sets and gets the character set for a given style. ### Methods - `SCI_STYLESETCHARACTERSET(int style, int characterSet)` - `SCI_STYLEGETCHARACTERSET(int style) → int` ``` -------------------------------- ### Get Word Start Position Source: https://scintilla.org/ScintillaDoc.html Returns the start position of the word at the given position. Set `onlyWordCharacters` to true to stop at the first non-word character. ```c SCI_WORDSTARTPOSITION(position pos, bool onlyWordCharacters) ``` -------------------------------- ### Get Line Selection Positions Source: https://scintilla.org/ScintillaDoc.html Retrieves the start and end positions of the selection within a specific line. ```c SCI_GETLINESELSTARTPOSITION(line line) → position ``` ```c SCI_GETLINESELENDPOSITION(line line) → position ``` -------------------------------- ### Create New Document Source: https://scintilla.org/ScintillaDoc.html Creates a new, empty document with specified initial memory allocation and options. The caller gains ownership and must manage its reference count. Returns a null pointer on failure. ```c SCI_CREATEDOCUMENT(position bytes, int documentOptions) → pointer ``` -------------------------------- ### Start Styling Operation Source: https://scintilla.org/ScintillaDoc.html Prepare Scintilla for a series of styling operations. Call this before using SCI_SETSTYLING or SCI_SETSTYLINGEX. ```c SCI_STARTSTYLING(position start, int unused) ``` -------------------------------- ### SCI_SETMODEVENTMASK / SCI_GETMODEVENTMASK Source: https://scintilla.org/ScintillaDoc.html These messages set and get an event mask that determines which document change events are notified to the container with SCN_MODIFIED and SCEN_CHANGE. For example, a container may decide to see only notifications about changes to text and not styling changes. ```APIDOC ## SCI_SETMODEVENTMASK / SCI_GETMODEVENTMASK ### Description These messages set and get an event mask that determines which document change events are notified to the container with `SCN_MODIFIED` and `SCEN_CHANGE`. For example, a container may decide to see only notifications about changes to text and not styling changes by calling `SCI_SETMODEVENTMASK(SC_MOD_INSERTTEXT|SC_MOD_DELETETEXT)`. The possible notification types are the same as the `modificationType` bit flags used by `SCN_MODIFIED`: `SC_MOD_INSERTTEXT`, `SC_MOD_DELETETEXT`, `SC_MOD_CHANGESTYLE`, `SC_MOD_CHANGEFOLD`, `SC_PERFORMED_USER`, `SC_PERFORMED_UNDO`, `SC_PERFORMED_REDO`, `SC_MULTISTEPUNDOREDO`, `SC_LASTSTEPINUNDOREDO`, `SC_MOD_CHANGEMARKER`, `SC_MOD_BEFOREINSERT`, `SC_MOD_BEFOREDELETE`, `SC_MULTILINEUNDOREDO`, and `SC_MODEVENTMASKALL`. ``` -------------------------------- ### Start Macro Recording Source: https://scintilla.org/ScintillaDoc.html Enables macro recording mode. Actions performed by the user will be reported via SCN_MACRORECORD notifications for the container to record. ```c SCI_STARTRECORD ``` -------------------------------- ### Get Indicator Hover Foreground Color Source: https://scintilla.org/ScintillaDoc.html Use SCI_INDICGETHOVERFORE to get the foreground color of an indicator when it is in its hover state. ```c SCI_INDICGETHOVERFORE(int indicator) → colour ``` -------------------------------- ### Get Indicator Outline Alpha Transparency Source: https://scintilla.org/ScintillaDoc.html Use SCI_INDICGETOUTLINEALPHA to get the alpha transparency value for an indicator's outline. ```c SCI_INDICGETOUTLINEALPHA(int indicator) → int ``` -------------------------------- ### Get Document Options Source: https://scintilla.org/ScintillaDoc.html Retrieves the current document options for the window. This indicates how the document's memory and capabilities are configured. ```c SCI_GETDOCUMENTOPTIONS → int ``` -------------------------------- ### Get Indicator Stroke Width Source: https://scintilla.org/ScintillaDoc.html Use SCI_INDICGETSTROKEWIDTH to get the current stroke width of an indicator. The value returned is in hundredths of a point. ```c SCI_INDICGETSTROKEWIDTH(int indicator) → int ``` -------------------------------- ### Foreground and Background Color Settings Source: https://scintilla.org/ScintillaDoc.html Sets and gets the foreground and background colors for a given style. ```APIDOC ## Foreground and Background Color Settings ### Description Sets and gets the foreground and background colors for a given style. ### Methods - `SCI_STYLESETFORE(int style, colour fore)` - `SCI_STYLEGETFORE(int style) → colour` - `SCI_STYLESETBACK(int style, colour back)` - `SCI_STYLEGETBACK(int style) → colour` ``` -------------------------------- ### Check if Range is Word Source: https://scintilla.org/ScintillaDoc.html Determines if the range between `start` and `end` positions constitutes a word or a set of words. It verifies word start and end transitions. ```c SCI_ISRANGEWORD(position start, position end) ``` -------------------------------- ### SCI_ISRANGEWORD Source: https://scintilla.org/ScintillaDoc.html Checks if a given range of text constitutes a word or a sequence of words. It verifies that the start position is at a word start transition and the end position is at a word end transition. ```APIDOC ## SCI_ISRANGEWORD(position start, position end) → bool ### Description Determines if the range between `start` and `end` is a word or a set of words. ### Method SCI_ISRANGEWORD ### Parameters - **start** (position) - The starting position of the range. - **end** (position) - The ending position of the range. ### Notes This message checks for word start and end transitions. It does not verify if there are spaces within the range. The behavior of the search is influenced by the `onlyWordCharacters` parameter, which is implicitly used in the underlying logic of this check. ``` -------------------------------- ### Technology Settings Source: https://scintilla.org/ScintillaDoc.html Select the underlying graphics technology for rendering. Options range from default GDI to higher-quality DirectWrite APIs, offering different levels of antialiasing and performance. ```APIDOC ## SCI_SETTECHNOLOGY(int technology) ### Description Sets the graphics technology used for drawing. ### Method SCI_SETTECHNOLOGY ### Parameters - **technology** (int) - Description: The technology to use. Options include `SC_TECHNOLOGY_DEFAULT` (0), `SC_TECHNOLOGY_DIRECTWRITE` (1), `SC_TECHNOLOGY_DIRECTWRITERETAIN` (2), `SC_TECHNOLOGY_DIRECTWRITEDC` (3), `SC_TECHNOLOGY_DIRECT_WRITE_1` (4). ``` ```APIDOC ## SCI_GETTECHNOLOGY → int ### Description Retrieves the currently active graphics technology. ### Method SCI_GETTECHNOLOGY ### Returns - **int** - Description: The current graphics technology setting. ``` -------------------------------- ### SCI_POSITIONFROMLINE Source: https://scintilla.org/ScintillaDoc.html This returns the document position that corresponds with the start of the line. If `line` is negative, the position of the line holding the start of the selection is returned. If `line` is greater than the lines in the document, the return value is -1. ```APIDOC ## SCI_POSITIONFROMLINE ### Description Returns the document position corresponding to the start of the specified line. ### Method SCI_POSITIONFROMLINE ### Parameters - **line** (line) - The line number. ### Response - **position** (int) - The document position of the start of the line. Returns -1 if line is greater than the number of lines in the document. Returns the end of the document if line is equal to the number of lines. ``` -------------------------------- ### Set Margin Options Source: https://scintilla.org/ScintillaDoc.html Configures general options for margins, such as alignment or visibility. ```c SCI_SETMARGINOPTIONS(int marginOptions) ``` ```c SCI_GETMARGINOPTIONS → int ``` -------------------------------- ### Margin Type Source: https://scintilla.org/ScintillaDoc.html Set and get the type of a margin. ```APIDOC ## SCI_SETMARGINTYPEN(int margin, int marginType) ### Description Set the type of a margin. Use predefined constants like `SC_MARGIN_SYMBOL` (0), `SC_MARGIN_NUMBER` (1), `SC_MARGIN_TEXT` (4), `SC_MARGIN_RTEXT` (5), `SC_MARGIN_BACK` (2), `SC_MARGIN_FORE` (3), and `SC_MARGIN_COLOUR` (6). ### Method SCI_SETMARGINTYPEN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). - **marginType** (int) - Required - The type of the margin. ``` ```APIDOC ## SCI_GETMARGINTYPEN(int margin) → int ### Description Get the type of a margin. ### Method SCI_GETMARGINTYPEN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). ### Response #### Success Response (200) - **return value** (int) - The type of the margin. ``` -------------------------------- ### Set Styling with Style String Source: https://scintilla.org/ScintillaDoc.html Apply styles to a range of characters on a byte-by-byte basis using a style string. The styling position is advanced after the operation. ```c SCI_SETSTYLINGEX(position length, const char *styles) ``` -------------------------------- ### Move Caret to Line Start Source: https://scintilla.org/ScintillaDoc.html Removes any selection and sets the caret at the beginning of the specified line, scrolling the view if necessary. If the line number is out of bounds, it defaults to the first or last line. ```c SCI_GOTOLINE(line line) ``` -------------------------------- ### Margin Style Source: https://scintilla.org/ScintillaDoc.html Set and get the style for text in a margin. ```APIDOC ## SCI_MARGINSETSTYLE(line line, int style) ### Description Set the style for text in a margin for a specific line. ### Method SCI_MARGINSETSTYLE ### Parameters #### Path Parameters - **line** (line) - Required - The line number. - **style** (int) - Required - The style index. ``` ```APIDOC ## SCI_MARGINGETSTYLE(line line) → int ### Description Get the style for text in a margin for a specific line. ### Method SCI_MARGINGETSTYLE ### Parameters #### Path Parameters - **line** (line) - Required - The line number. ### Response #### Success Response (200) - **return value** (int) - The style index. ``` ```APIDOC ## SCI_MARGINSETSTYLES(line line, const char *styles) ### Description Set multiple styles for text in a margin for a specific line. ### Method SCI_MARGINSETSTYLES ### Parameters #### Path Parameters - **line** (line) - Required - The line number. - **styles** (const char *) - Required - A string of style characters. ``` ```APIDOC ## SCI_MARGINGETSTYLES(line line, char *styles) → int ### Description Get multiple styles for text in a margin for a specific line. ### Method SCI_MARGINGETSTYLES ### Parameters #### Path Parameters - **line** (line) - Required - The line number. - **styles** (char *) - Required - Buffer to store the styles. ### Response #### Success Response (200) - **return value** (int) - The number of characters copied. ``` -------------------------------- ### Create New Scintilla Widget (GTK) Source: https://scintilla.org/ScintillaDoc.html Use this function to create a new Scintilla widget on GTK. The returned pointer can be added to a container and displayed like other widgets. ```c GtkWidget *scintilla_new() ``` -------------------------------- ### Margin Width Source: https://scintilla.org/ScintillaDoc.html Set and get the width of a margin in pixels. ```APIDOC ## SCI_SETMARGINWIDTHN(int margin, int pixelWidth) ### Description Set the width of a margin in pixels. A margin with zero width is invisible. ### Method SCI_SETMARGINWIDTHN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). - **pixelWidth** (int) - Required - The desired width in pixels. ``` ```APIDOC ## SCI_GETMARGINWIDTHN(int margin) → int ### Description Get the width of a margin in pixels. ### Method SCI_GETMARGINWIDTHN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). ### Response #### Success Response (200) - **return value** (int) - The width of the margin in pixels. ``` -------------------------------- ### SCI_GETIDLESTYLING Source: https://scintilla.org/ScintillaDoc.html Retrieves the current idle-time styling configuration. ```APIDOC ## SCI_GETIDLESTYLING ### Description Retrieves the current idle-time styling configuration. ### Method Message ### Returns - **idleStyling** (int) - The current idle styling mode. ``` -------------------------------- ### Indicator Stroke Width Source: https://scintilla.org/ScintillaDoc.html Set and get the stroke width for indicators. ```APIDOC ## SCI_INDICSETSTROKEWIDTH ### Description Sets the stroke width used to draw an indicator in hundredths of a pixel. ### Method SCI_INDICSETSTROKEWIDTH ### Parameters - **indicator** (int) - The indicator index. - **hundredths** (int) - The stroke width in hundredths of a pixel. ## SCI_INDICGETSTROKEWIDTH ### Description Gets the stroke width used to draw an indicator. ### Method SCI_INDICGETSTROKEWIDTH ### Parameters - **indicator** (int) - The indicator index. ### Returns - **int** - The stroke width in hundredths of a pixel. ``` -------------------------------- ### Configure Idle Styling Source: https://scintilla.org/ScintillaDoc.html Control when syntax styling is performed. Options range from no idle styling to styling all text in the background. ```c SCI_SETIDLESTYLING(int idleStyling) ``` ```c SCI_GETIDLESTYLING → int ``` -------------------------------- ### Target Initialization Source: https://scintilla.org/ScintillaDoc.html Functions to easily set the target range based on selection or the entire document. ```APIDOC ## Target Initialization ### Description Functions to easily set the target range based on selection or the entire document. ### Methods - `SCI_TARGETFROMSELECTION` - `SCI_TARGETWHOLEDOCUMENT` ### Notes - `SCI_TARGETFROMSELECTION` sets the target start and end to the start and end positions of the current selection. - `SCI_TARGETWHOLEDOCUMENT` sets the target start to the beginning of the document and the target end to the end of the document. ``` -------------------------------- ### Get Marker Layer Source: https://scintilla.org/ScintillaDoc.html Retrieves the current drawing layer for a marker. ```c SCI_MARKERGETLAYER(int markerNumber) → int ``` -------------------------------- ### Brace Highlighting and Matching Source: https://scintilla.org/ScintillaDoc.html Functions for highlighting matching and non-matching braces, and for finding brace matches. ```APIDOC ## SCI_BRACEHIGHLIGHT ### Description Highlights up to two characters in a 'brace highlighting style' (style number STYLE_BRACELIGHT, 34). Can also highlight the corresponding indent if indent guides are enabled. ### Method Message ### Parameters - **posA** (position) - The position of the first brace. - **posB** (position) - The position of the second brace. ## SCI_BRACEBADLIGHT ### Description Highlights a brace with the 'brace badlighting' style (style STYLE_BRACEBAD, 35) if there is no matching brace. Using `INVALID_POSITION` (-1) removes the highlight. ### Method Message ### Parameters - **pos** (position) - The position of the brace to highlight as bad. ## SCI_BRACEHIGHLIGHTINDICATOR ### Description Uses a specified indicator to highlight matching braces instead of changing their style. ### Method Message ### Parameters - **useSetting** (bool) - Whether to use the indicator. - **indicator** (int) - The indicator number to use. ## SCI_BRACEBADLIGHTINDICATOR ### Description Uses a specified indicator to highlight a non-matching brace instead of changing its style. ### Method Message ### Parameters - **useSetting** (bool) - Whether to use the indicator. - **indicator** (int) - The indicator number to use. ## SCI_BRACEMATCH ### Description Finds the position of a matching brace for the brace at the given `pos`. Handles '(', ')', '[', ']', '{', '}', '<', and '>'. Searches forwards from an opening brace and backwards from a closing brace. Returns -1 if the character at `pos` is not a brace or if no match is found. A match occurs only if the style of the matching brace is the same as the starting brace or beyond the end of styling. Nested braces are handled correctly. `maxReStyle` must currently be 0. ### Method Message ### Parameters - **pos** (position) - The position of one brace. - **maxReStyle** (int) - Currently must be 0, may be used in the future to limit brace search length. ### Returns - position - The position of the matching brace, or -1 if no match is found. ## SCI_BRACEMATCHNEXT ### Description Similar to `SCI_BRACEMATCH`, but the matching search starts at the explicit `startPos` instead of implicitly at `pos ± 1`. ### Method Message ### Parameters - **pos** (position) - The position of one brace. - **startPos** (position) - The explicit position to start the matching search from. ### Returns - position - The position of the matching brace, or -1 if no match is found. ``` -------------------------------- ### Margin Background Color Source: https://scintilla.org/ScintillaDoc.html Set or get the background color of a margin. ```APIDOC ## Margin Background Color ### Description A margin of type `SC_MARGIN_COLOUR` may have its color set with `SCI_SETMARGINBACKN`. ### Methods - **SCI_SETMARGINBACKN(int margin, colour back)** - **SCI_GETMARGINBACKN(int margin) → colour** ``` -------------------------------- ### SCI_CALLTIPSETHLT Source: https://scintilla.org/ScintillaDoc.html Sets a region within the call tip text to be displayed in a highlighted style. `highlightStart` is the zero-based index of the first character to highlight, and `highlightEnd` is the index of the first character after the highlight. ```APIDOC ## SCI_CALLTIPSETHLT ### Description This sets the region of the call tips text to display in a highlighted style. `highlightStart` is the zero-based index into the string of the first character to highlight and `highlightEnd` is the index of the first character after the highlight. `highlightEnd` must be greater than `highlightStart`; `highlightEnd-highlightStart` is the number of characters to highlight. Highlights can extend over line ends if this is required. Unhighlighted text is drawn in a mid grey. Selected text is drawn in a dark blue. The background is white. These can be changed with `SCI_CALLTIPSETBACK`, `SCI_CALLTIPSETFORE`, and `SCI_CALLTIPSETFOREHLT`. ### Method SCI_CALLTIPSETHLT ### Parameters #### Path Parameters - **highlightStart** (position) - The zero-based index of the first character to highlight. - **highlightEnd** (position) - The index of the first character after the highlight. ### Request Example ``` SCI_CALLTIPSETHLT(5, 10) ``` ### Response This message does not return a value. ``` -------------------------------- ### Margin Text Source: https://scintilla.org/ScintillaDoc.html Set and get text for a specific line in a margin. ```APIDOC ## SCI_SETMARGINTEXT(line line, const char *text) ### Description Set text for a specific line in a margin. ### Method SCI_SETMARGINTEXT ### Parameters #### Path Parameters - **line** (line) - Required - The line number. - **text** (const char *) - Required - The text to set. ``` ```APIDOC ## SCI_MARGINGETTEXT(line line, char *text) → int ### Description Get text from a specific line in a margin. ### Method SCI_MARGINGETTEXT ### Parameters #### Path Parameters - **line** (line) - Required - The line number. - **text** (char *) - Required - Buffer to store the text. ### Response #### Success Response (200) - **return value** (int) - The number of characters copied. ``` -------------------------------- ### Check Feature Support Source: https://scintilla.org/ScintillaDoc.html Query whether a specific feature is supported on the current platform. This allows applications to adapt their behavior, for example, by choosing alternative drawing methods when certain features are unavailable. ```c #define SCI_SUPPORTSFEATURE 2501 #define SC_SUPPORTS_TRANSLUCENT_STROKE 3 ``` -------------------------------- ### SCI_CALLTIPPOSSTART Source: https://scintilla.org/ScintillaDoc.html Retrieves or sets the starting position of the call tip. This is the position in the document where the `SCI_CALLTIPSHOW` message initiated the display. ```APIDOC ## SCI_CALLTIPPOSSTART / SCI_CALLTIPSETPOSSTART ### Description This message returns or sets the value of the current position when `SCI_CALLTIPSHOW` started to display the tip. ### Method SCI_CALLTIPPOSSTART (get), SCI_CALLTIPSETPOSSTART (set) ### Parameters #### For SCI_CALLTIPSETPOSSTART: - **posStart** (position) - The position to set as the start of the call tip display. ### Request Example (Set) ``` SCI_CALLTIPSETPOSSTART(50) ``` ### Response (SCI_CALLTIPPOSSTART) #### Success Response (position) - **return value** (position) - The starting position of the call tip. ### Response Example (Get) ``` 50 ``` ``` -------------------------------- ### Margin Background Color Source: https://scintilla.org/ScintillaDoc.html Set and get the background color of a margin. ```APIDOC ## SCI_SETMARGINBACKN(int margin, colour back) ### Description Set the background color of a margin. ### Method SCI_SETMARGINBACKN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). - **back** (colour) - Required - The background color. ``` ```APIDOC ## SCI_GETMARGINBACKN(int margin) → colour ### Description Get the background color of a margin. ### Method SCI_GETMARGINBACKN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). ### Response #### Success Response (200) - **return value** (colour) - The background color of the margin. ``` -------------------------------- ### Phases Drawing Settings Source: https://scintilla.org/ScintillaDoc.html Configure the drawing order for text and its styles. Different phases offer trade-offs between speed and visual completeness, especially for overlapping text elements. ```APIDOC ## SCI_SETPHASESDRAW(int phases) ### Description Sets the drawing phase mode for text rendering. ### Method SCI_SETPHASESDRAW ### Parameters - **phases** (int) - Description: The drawing phase mode. Use `SC_PHASES_ONE` (deprecated), `SC_PHASES_TWO`, or `SC_PHASES_MULTIPLE`. ``` ```APIDOC ## SCI_GETPHASESDRAW → int ### Description Retrieves the current drawing phase mode. ### Method SCI_GETPHASESDRAW ### Returns - **int** - Description: The current drawing phase mode. ``` -------------------------------- ### Margin Cursor Source: https://scintilla.org/ScintillaDoc.html Set and get the cursor displayed when hovering over a margin. ```APIDOC ## SCI_SETMARGINCURSORN(int margin, int cursor) ### Description Set the cursor to be displayed when the mouse is over a margin. ### Method SCI_SETMARGINCURSORN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). - **cursor** (int) - Required - The cursor type. ``` ```APIDOC ## SCI_GETMARGINCURSORN(int margin) → int ### Description Get the cursor displayed when hovering over a margin. ### Method SCI_GETMARGINCURSORN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). ### Response #### Success Response (200) - **return value** (int) - The cursor type. ``` -------------------------------- ### Font Size Settings Source: https://scintilla.org/ScintillaDoc.html Messages for setting and getting font sizes in points or fractional points. ```APIDOC ## Font Size Settings ### SCI_STYLESETSIZE(int style, int sizePoints) #### Description Sets the font size for a given style in points. ### SCI_STYLEGETSIZE(int style) → int #### Description Retrieves the font size for a given style in points. ### SCI_STYLESETSIZEFRACTIONAL(int style, int sizeHundredthPoints) #### Description Sets the font size for a given style in hundredths of a point. Multiply the desired point size by 100 (e.g., 9.4 points is 940). ### SCI_STYLEGETSIZEFRACTIONAL(int style) → int #### Description Retrieves the font size for a given style in hundredths of a point. ``` -------------------------------- ### Margin Mask Source: https://scintilla.org/ScintillaDoc.html Set and get the mask for symbols displayed in a margin. ```APIDOC ## SCI_SETMARGINMASKN(int margin, int mask) ### Description Set the mask for symbols displayed in a margin. The mask is a 32-bit value where each bit corresponds to one of 32 logical symbols. Use constants like `SC_MASK_FOLDERS` and `SC_MASK_HISTORY`. ### Method SCI_SETMARGINMASKN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). - **mask** (int) - Required - The 32-bit mask value. ``` ```APIDOC ## SCI_GETMARGINMASKN(int margin) → int ### Description Get the mask for symbols displayed in a margin. ### Method SCI_GETMARGINMASKN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). ### Response #### Success Response (200) - **return value** (int) - The 32-bit mask value. ``` -------------------------------- ### Set Styling for a Range Source: https://scintilla.org/ScintillaDoc.html Apply a specific style to a given number of characters starting from the current styling position. The styling position is then advanced. ```c SCI_SETSTYLING(position length, int style) ``` -------------------------------- ### Font Boldness Settings Source: https://scintilla.org/ScintillaDoc.html Messages for setting and getting the boldness of a font. ```APIDOC ## Font Boldness Settings ### SCI_STYLESETBOLD(int style, bool bold) #### Description Sets whether the font for a given style is bold. `bold` is a boolean (0 for false, 1 for true). ### SCI_STYLEGETBOLD(int style) → bool #### Description Retrieves whether the font for a given style is bold. Returns a boolean value. ### SCI_STYLESETWEIGHT(int style, int weight) #### Description Sets the font weight for a given style. `weight` is an integer between 1 (very light) and 999 (very heavy). Common values include SC_WEIGHT_NORMAL (400) and SC_WEIGHT_BOLD (700). ### SCI_STYLEGETWEIGHT(int style) → int #### Description Retrieves the font weight for a given style. Returns an integer representing the weight. ``` -------------------------------- ### Font Style Settings (Bold, Italic, Underline) Source: https://scintilla.org/ScintillaDoc.html Sets and gets the bold, italic, and underline properties for a given style. ```APIDOC ## Font Style Settings (Bold, Italic, Underline) ### Description Sets and gets the bold, italic, and underline properties for a given style. ### Methods - `SCI_STYLESETBOLD(int style, bool bold)` - `SCI_STYLEGETBOLD(int style) → bool` - `SCI_STYLESETITALIC(int style, bool italic)` - `SCI_STYLEGETITALIC(int style) → bool` - `SCI_STYLESETUNDERLINE(int style, bool underline)` - `SCI_STYLEGETUNDERLINE(int style) → bool` ``` -------------------------------- ### Font Settings Source: https://scintilla.org/ScintillaDoc.html Sets and gets the font name for a given style. ```APIDOC ## Font Settings ### Description Sets and gets the font name for a given style. ### Methods - `SCI_STYLESETFONT(int style, const char *fontName)` - `SCI_STYLEGETFONT(int style, char *fontName) → int` ``` -------------------------------- ### SCI_GETSELECTIONSTART and SCI_GETSELECTIONEND Source: https://scintilla.org/ScintillaDoc.html Return the start and end of the selection, regardless of which end is the anchor or current position. ```APIDOC ## SCI_GETSELECTIONSTART and SCI_GETSELECTIONEND ### Description These return the start and end of the selection without regard to which end is the current position and which is the anchor. `SCI_GETSELECTIONSTART` returns the smaller of the current position or the anchor position. `SCI_GETSELECTIONEND` returns the larger of the two values. ### Method SCI_GETSELECTIONSTART, SCI_GETSELECTIONEND ### Parameters None ### Response #### Success Response (200) - **position** (position) - The start or end position of the selection. ``` -------------------------------- ### Get Anchor Position Source: https://scintilla.org/ScintillaDoc.html Retrieves the current anchor position of the selection. ```c SCI_GETANCHOR → position ``` -------------------------------- ### Set Document Pointer Source: https://scintilla.org/ScintillaDoc.html Replaces the current document with a new one. This involves detaching the window from the old document, updating reference counts, and attaching the window to the new document. If a null pointer is provided, a new empty document is created. ```c SCI_SETDOCPOINTER(, pointer doc) ``` -------------------------------- ### Basic Cut, Copy, Paste, and Clear Source: https://scintilla.org/ScintillaDoc.html These commands perform the standard tasks of cutting and copying data to the clipboard, pasting from the clipboard into the document, and clearing the document. SCI_CANPASTE returns non-zero if the document isn't read-only and if the selection doesn't contain protected text. ```APIDOC ## Basic Cut, Copy, Paste, and Clear ### Description Performs standard cut, copy, paste, and clear operations. `SCI_CANPASTE` indicates if pasting is possible (document not read-only and selection not protected). ### Commands - `SCI_CUT` - `SCI_COPY` - `SCI_PASTE` - `SCI_CLEAR` - `SCI_CANPASTE` → bool ``` -------------------------------- ### SCI_SETLAYOUTCACHE and SCI_GETLAYOUTCACHE Source: https://scintilla.org/ScintillaDoc.html Sets and gets the mode for caching line layout information. ```APIDOC ## SCI_SETLAYOUTCACHE(int cacheMode) ### Description Sets the mode for caching line layout information. You can set `cacheMode` to one of the symbols: SC_CACHE_NONE, SC_CACHE_CARET, SC_CACHE_PAGE, or SC_CACHE_DOCUMENT. ### Method SCI_SETLAYOUTCACHE ### Parameters #### Path Parameters - **cacheMode** (int) - Required - The layout caching mode. ``` ```APIDOC ## SCI_GETLAYOUTCACHE ### Description Gets the current layout caching mode. ### Method SCI_GETLAYOUTCACHE ### Response #### Success Response (200) - **return value** (int) - The current layout caching mode. ``` -------------------------------- ### Get Annotation Styles Source: https://scintilla.org/ScintillaDoc.html Retrieves the style array for the annotation text on a line. ```c SCI_ANNOTATIONGETSTYLES(line line, char *styles) → int ``` -------------------------------- ### Feature Support Query Source: https://scintilla.org/ScintillaDoc.html Check which features are supported by the current platform and Scintilla configuration. ```APIDOC ## Feature Support Query ### Description Determine if specific features are supported by the current Scintilla implementation and platform. This allows applications to adapt their behavior accordingly. ### Method - `SCI_SUPPORTSFEATURE(int feature) → bool`: Returns true if the specified feature is supported, false otherwise. ### Supported Features - `SC_SUPPORTS_LINE_DRAWS_FINAL` (0): Whether drawing a line draws its final position. (False on Win32 GDI). - `SC_SUPPORTS_PIXEL_DIVISIONS` (1): Are logical pixels larger than physical pixels? (True for macOS Cocoa 'retina' displays). - `SC_SUPPORTS_FRACTIONAL_STROKE_WIDTH` (2): Can lines be drawn with fractional widths (e.g., 1.5 pixels)? - `SC_SUPPORTS_TRANSLUCENT_STROKE` (3): Can translucent lines, polygons, ellipses, and text be drawn? - `SC_SUPPORTS_PIXEL_MODIFICATION` (4): Can individual pixels be modified? (False for character cell platforms like curses). - `SC_SUPPORTS_THREAD_SAFE_MEASURE_WIDTHS` (5): Can text measurement be safely performed concurrently on multiple threads? (True for macOS Cocoa, DirectWrite on Win32, and GTK on X or Wayland). ``` -------------------------------- ### Margin Style Offset Source: https://scintilla.org/ScintillaDoc.html Set and get the style offset for margin text. ```APIDOC ## SCI_SETMARGINSTYLEOFFSET(int style) ### Description Set the style offset for margin text. ### Method SCI_SETMARGINSTYLEOFFSET ### Parameters #### Path Parameters - **style** (int) - Required - The style offset. ``` ```APIDOC ## SCI_MARGINGETSTYLEOFFSET → int ### Description Get the style offset for margin text. ### Method SCI_MARGINGETSTYLEOFFSET ### Response #### Success Response (200) - **return value** (int) - The style offset. ``` -------------------------------- ### Font Size Settings Source: https://scintilla.org/ScintillaDoc.html Sets and gets the font size in points or hundredths of a point for a given style. ```APIDOC ## Font Size Settings ### Description Sets and gets the font size in points or hundredths of a point for a given style. ### Methods - `SCI_STYLESETSIZE(int style, int sizePoints)` - `SCI_STYLEGETSIZE(int style) → int` - `SCI_STYLESETSIZEFRACTIONAL(int style, int sizeHundredthPoints)` - `SCI_STYLEGETSIZEFRACTIONAL(int style) → int` ``` -------------------------------- ### Margin Sensitivity Source: https://scintilla.org/ScintillaDoc.html Set and get whether mouse clicks in a margin are sensitive. ```APIDOC ## SCI_SETMARGINSENSITIVEN(int margin, bool sensitive) ### Description Set whether a mouse click in a margin sends a notification or selects text. ### Method SCI_SETMARGINSENSITIVEN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). - **sensitive** (bool) - Required - True to make clicks sensitive, false otherwise. ``` ```APIDOC ## SCI_GETMARGINSENSITIVEN(int margin) → bool ### Description Get whether mouse clicks in a margin are sensitive. ### Method SCI_GETMARGINSENSITIVEN ### Parameters #### Path Parameters - **margin** (int) - Required - The margin index (0-4). ### Response #### Success Response (200) - **return value** (bool) - True if clicks are sensitive, false otherwise. ``` -------------------------------- ### Set Annotation Styles Source: https://scintilla.org/ScintillaDoc.html Applies individual styles to each character of the annotation text using a byte array. The text must be set before styling. ```c SCI_ANNOTATIONSETSTYLES(line line, const char *styles) ```