Platforms to show: All Mac Windows Linux Cross-Platform
Back to DesktopScintillaControlMBS control.
DesktopScintillaControlMBS.FindColumn(line as Integer, column as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
It treats a multi-byte character as a single column. Column numbers, like lines start at 0.
DesktopScintillaControlMBS.FindIndicatorFlash(start as Integer, ende as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
The indicator remains visible with FindIndicatorShow and fades out after showing for half a second with FindIndicatorFlash. FindIndicatorShow behaves similarly to the OS X TextEdit and Safari applications and is best suited to editing documentation where the search target is often a word. FindIndicatorFlash is similar to Xcode and is suited to editing source code where the match will often be located next to operators which would otherwise be hidden under the indicator's padding.
DesktopScintillaControlMBS.FindIndicatorHide
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
DesktopScintillaControlMBS.FindIndicatorShow(start as Integer, ende as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
The indicator remains visible with FindIndicatorShow and fades out after showing for half a second with FindIndicatorFlash. FindIndicatorShow behaves similarly to the OS X TextEdit and Safari applications and is best suited to editing documentation where the search target is often a word. FindIndicatorFlash is similar to Xcode and is suited to editing source code where the match will often be located next to operators which would otherwise be hidden under the indicator's padding.
DesktopScintillaControlMBS.FindText(searchFlags as Integer, Text as String, byref RangeStart as Integer, byref RangeEnd as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
It does not use or move the current selection. The searchFlags argument controls the search type, which includes regular expression searches.
See kFindOption* constants.
You can search backwards to find the previous occurrence of a search string by setting the end of the search range before the start.
RangeStart and RangeEnd provide the range of positions in the document to search. You can search backwards by setting RangeEnd less than RangeStart. The text parameter holds the search pattern. If your language makes the use of _TextToFind difficult, you should consider using SearchInTarget instead.
The return value is -1 if the search fails or the position of the start of the found text if it succeeds. The RangeStart and RangeEnd parameters of TextToFind are filled in with the start and end positions of the found text.
DesktopScintillaControlMBS.FoldAll(FoldAction as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
Provides a higher-level approach to folding instead of setting expanded flags and showing or hiding individual lines.
An individual fold can be contracted/expanded/toggled with FoldLine(). To affect all child folds as well call FoldChildren().
To affect the entire document call FoldAll(). With kFoldActionToggle the first fold header in the document is examined to decide whether to expand or contract.
DesktopScintillaControlMBS.FoldChildren(Line as Integer, FoldAction as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
Provides a higher-level approach to folding instead of setting expanded flags and showing or hiding individual lines.
An individual fold can be contracted/expanded/toggled with FoldLine(). To affect all child folds as well call FoldChildren().
To affect the entire document call FoldAll(). With kFoldActionToggle the first fold header in the document is examined to decide whether to expand or contract.
DesktopScintillaControlMBS.FoldExpanded(line as Integer) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
The set message has no effect on the visible state of the line or any lines that depend on it. It does change the markers in the folding margin. If you ask for the expansion state of a line that is outside the document, the result is false (0).
If you just want to toggle the fold state of one line and handle all the lines that are dependent on it, it is much easier to use ToggleFold. You would use the FolderExpanded() method to process many folds without updating the display until you had finished. See FoldAll() and Expand() for examples of the use of these methods.
(Read and Write computed property)
DesktopScintillaControlMBS.FoldLevel(line as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
The fold level is a number in the range 0 to kFoldLevelNumberMask (&h0FFF). However, the initial fold level is set to kFoldLevelBase (&h400) to allow unsigned arithmetic on folding levels. There are two addition flag bits. kFoldLevelWhiteFlag indicates that the line is blank and allows it to be treated slightly different then its level may indicate. For example, blank lines should generally not be fold points and will be considered part of the preceding section even though they may have a lesser fold level. kFoldLevelHeaderFlag indicates that the line is a header (fold point). kFoldLevelNone is a default level that may occur before folding.
Use FoldLevel(line) AND kFoldLevelNumberMask to get the fold level of a line. Likewise, use FoldLevel(line) AND kFoldLevelNumber*Flag to get the state of the flags. To set the fold level you must or in the associated flags. For instance, to set the level to thisLevel and mark a line as being a fold point use: FoldLevel(line) = thisLevel OR kFoldLevelHeaderFlag.
This method causes the display to redraw.
(Read and Write computed property)
DesktopScintillaControlMBS.FoldLine(Line as Integer, FoldAction as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
Provides a higher-level approach to folding instead of setting expanded flags and showing or hiding individual lines.
An individual fold can be contracted/expanded/toggled with FoldLine(). To affect all child folds as well call FoldChildren().
To affect the entire document call FoldAll(). With kFoldActionToggle the first fold header in the document is examined to decide whether to expand or contract.
DesktopScintillaControlMBS.FoldParent(line as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
If no line is found, or if the header flags and fold levels are inconsistent, the return value is -1.
DesktopScintillaControlMBS.FormatRange(draw as boolean, range as ScintillaRangeToFormatMBS) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 23.2 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
Printed output shows text styling as on the screen, but it hides all margins except a line number margin. Markers do not appear in a margin but will change line background colour. The selection and caret are hidden.
Different platforms use different display surface ID types to print on. On Windows, these are HDCs., on GTK 3.x cairo_t *, and on Cocoa CGContextRef is used.
For macOS use Integer(g.Handle(Graphics.HandleTypes.CGContextRef)), for windows use Integer(g.Handle(Graphics.HandleTypes.HDC)), for Linux use Integer(g.Handle(Graphics.HandleTypes.CairoContext)) to get the handle.
This call renders a range of text into a device context. If you use this for printing, you will probably want to arrange a page header and footer; Scintilla does not do this for you. Each use of this message renders a range of text into a rectangular area and returns the position in the document of the next character to print.
The draw parameter controls if any output is done. Set this to false if you are paginating.
On Windows, hdc and hdcTarget should both be set to the device context handle of the output device (usually a printer). If you print to a metafile these will not be the same as Windows metafiles (unlike extended metafiles) do not implement the full API for returning information. In this case, set hdcTarget to the screen DC.
Page* properties define the rectangle {0, 0, maxX, maxY} where maxX+1 and maxY+1 are the number of physically printable pixels in x and y.
Area* properties define the rectangle to render the text in (which will, of course, fit within the rectangle defined by Page*).
CharacterRangePosition and CharacterRangeEnd define the start position and maximum position of characters to output. All of each line within this character range is drawn.
On Cocoa, the surface IDs for printing (draw=1) should be the graphics port of the current context (CGContextRef) when the view's drawRect method is called. The Surface IDs are not really used for measurement (draw=0) but can be set to a bitmap context to avoid runtime warnings.
On GTK, the surface IDs to use can be found from the printing context.
CharacterRangePosition and CharacterRangeEnd define the start position and maximum position of characters to output. All of each line within this character range is drawn.
When printing, the most tedious part is always working out what the margins should be to allow for the non-printable area of the paper and printing a header and footer. If you look at the printing code in SciTE, you will find that most of it is taken up with this. The loop that causes Scintilla to render text is quite simple if you strip out all the margin, non-printable area, header and footer code.
DesktopScintillaControlMBS.FormFeed
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Scintilla | MBS Scintilla Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop only |
You can call it directly to perform this action if needed, e.g. from toolbar or menu command.
The items on this page are in the following plugins: MBS Scintilla Plugin.