QScintilla
2.8.4
|
#include <qsciscintilla.h>
Inherits QsciScintillaBase.
The QsciScintilla class implements a higher level, more Qt-like, API to the Scintilla editor widget.
QsciScintilla implements methods, signals and slots similar to those found in other Qt editor classes. It also provides a higher level interface to features specific to Scintilla such as syntax styling, call tips, auto-indenting and auto-completion than that provided by QsciScintillaBase.
anonymous enum |
This enum defines the different auto-indentation styles.
This enum defines the behavior if an auto-completion list contains a single entry.
AcusNever |
The single entry is not used automatically and the auto-completion list is displayed. |
AcusExplicit |
The single entry is used automatically when auto-completion is explicitly requested (using autoCompleteFromAPIs() or autoCompleteFromDocument()) but not when auto-completion is triggered as the user types. |
AcusAlways |
The single entry is used automatically and the auto-completion list is not displayed. |
This enum defines the different brace matching modes. The character pairs {}, [] and () are treated as braces. The Python lexer will also match a : with the end of the corresponding indented block.
This enum defines the different call tip styles.
This enum defines the different edge modes for long lines.
EdgeNone |
Long lines are not marked. |
EdgeLine |
A vertical line is drawn at the column set by setEdgeColumn(). This is recommended for monospace fonts. |
EdgeBackground |
The background color of characters after the column limit is changed to the color set by setEdgeColor(). This is recommended for proportional fonts. |
This enum defines the different styles for the folding margin.
This enum defines the different indicator styles.
anonymous enum |
This enum defines the different margin types.
This enum defines the different pre-defined marker symbols.
This enum defines the different whitespace visibility modes. When whitespace is visible spaces are displayed as small centred dots and tabs are displayed as light arrows pointing to the right.
This enum defines the different line wrap indentation modes.
WrapIndentFixed |
Wrapped sub-lines are indented by the amount set by setWrapVisualFlags(). |
WrapIndentSame |
Wrapped sub-lines are indented by the same amount as the first sub-line. |
WrapIndentIndented |
Wrapped sub-lines are indented by the same amount as the first sub-line plus one more level of indentation. |
QsciScintilla::QsciScintilla | ( | QWidget * | parent = 0 , |
const char * | name = 0 , |
||
WFlags | f = 0 |
||
) |
Construct an empty QsciScintilla with parent parent, name name, and widget flags f.
virtual QStringList QsciScintilla::apiContext | ( | int | pos, |
int & | context_start, | ||
int & | last_word_start | ||
) | [virtual] |
Returns the API context, which is a list of words, before the position pos in the document. The context can be used by auto-completion and call tips to help to identify which API call the user is referring to. In the default implementation the current lexer determines what characters make up a word, and what characters determine the boundaries of words (ie. the start characters). If there is no current lexer then the context will consist of a single word. On return context_start will contain the position in the document of the start of the context and last_word_start will contain the position in the document of the start of the last word of the context.
void QsciScintilla::annotate | ( | int | line, |
const QString & | text, | ||
int | style | ||
) |
Annotate the line line with the text text using the style number style.
void QsciScintilla::annotate | ( | int | line, |
const QString & | text, | ||
const QsciStyle & | style | ||
) |
Annotate the line line with the text text using the style style.
AnnotationDisplay QsciScintilla::annotationDisplay | ( | ) | const |
Returns the display style for annotations.
void QsciScintilla::clearAnnotations | ( | int | line = -1 | ) |
The annotations on line line are removed. If line is negative then all annotations are removed.
bool QsciScintilla::autoCompletionCaseSensitivity | ( | ) | const |
Returns true if auto-completion lists are case sensitive.
bool QsciScintilla::autoCompletionFillupsEnabled | ( | ) | const |
Returns true if auto-completion fill-up characters are enabled.
bool QsciScintilla::autoCompletionReplaceWord | ( | ) | const |
Returns true if the rest of the word to the right of the current cursor is removed when an item from an auto-completion list is selected.
bool QsciScintilla::autoCompletionShowSingle | ( | ) | const |
Returns true if the only item in an auto-completion list with a single entry is automatically used and the list not displayed. Note that this is deprecated and autoCompletionUseSingle() should be used instead.
AutoCompletionSource QsciScintilla::autoCompletionSource | ( | ) | const [inline] |
Returns the current source for the auto-completion list when it is being displayed automatically as the user types.
int QsciScintilla::autoCompletionThreshold | ( | ) | const [inline] |
Returns the current threshold for the automatic display of the auto-completion list as the user types.
AutoCompletionUseSingle QsciScintilla::autoCompletionUseSingle | ( | ) | const |
Returns the current behavior when an auto-completion list contains a single entry.
bool QsciScintilla::autoIndent | ( | ) | const [inline] |
Returns true if auto-indentation is enabled.
bool QsciScintilla::backspaceUnindents | ( | ) | const |
Returns true if the backspace key unindents a line instead of deleting a character. The default is false.
void QsciScintilla::beginUndoAction | ( | ) |
Mark the beginning of a sequence of actions that can be undone by a single call to undo().
BraceMatch QsciScintilla::braceMatching | ( | ) | const [inline] |
Returns the brace matching mode.
CallTipsPosition QsciScintilla::callTipsPosition | ( | ) | const [inline] |
Returns the current call tip position.
CallTipsStyle QsciScintilla::callTipsStyle | ( | ) | const [inline] |
Returns the current call tip style.
int QsciScintilla::callTipsVisible | ( | ) | const [inline] |
Returns the maximum number of call tips that are displayed.
bool QsciScintilla::caseSensitive | ( | ) | const |
Returns true if the current language lexer is case sensitive. If there is no current lexer then true is returned.
void QsciScintilla::clearFolds | ( | ) |
Clear all current folds, i.e. ensure that all lines are displayed unfolded.
void QsciScintilla::clearIndicatorRange | ( | int | lineFrom, |
int | indexFrom, | ||
int | lineTo, | ||
int | indexTo, | ||
int | indicatorNumber | ||
) |
Clears the range of text with indicator indicatorNumber starting at position indexFrom in line lineFrom and finishing at position indexTo in line lineTo.
void QsciScintilla::clearRegisteredImages | ( | ) |
Clear all registered images.
QColor QsciScintilla::color | ( | ) | const |
Returns the widget's text (ie. foreground) colour.
QValueList<int> QsciScintilla::contractedFolds | ( | ) | const |
Returns a list of the line numbers that have contracted folds. This is typically used to save the fold state of a document.
void QsciScintilla::convertEols | ( | EolMode | mode | ) |
All the lines of the text have their end-of-lines converted to mode mode.
QsciDocument QsciScintilla::document | ( | ) | const [inline] |
Returns the attached document.
void QsciScintilla::endUndoAction | ( | ) |
Mark the end of a sequence of actions that can be undone by a single call to undo().
QColor QsciScintilla::edgeColor | ( | ) | const |
Returns the color of the marker used to show that a line has exceeded the length set by setEdgeColumn().
int QsciScintilla::edgeColumn | ( | ) | const |
Returns the number of the column after which lines are considered to be long.
EdgeMode QsciScintilla::edgeMode | ( | ) | const |
Returns the edge mode which determines how long lines are marked.
void QsciScintilla::setFont | ( | const QFont & | f | ) |
Set the default font. This has no effect if a language lexer has been set.
EolMode QsciScintilla::eolMode | ( | ) | const |
Returns the end-of-line mode.
bool QsciScintilla::eolVisibility | ( | ) | const |
Returns the visibility of end-of-lines.
int QsciScintilla::extraAscent | ( | ) | const |
Returns the extra space added to the height of a line above the baseline of the text.
int QsciScintilla::extraDescent | ( | ) | const |
Returns the extra space added to the height of a line below the baseline of the text.
void QsciScintilla::fillIndicatorRange | ( | int | lineFrom, |
int | indexFrom, | ||
int | lineTo, | ||
int | indexTo, | ||
int | indicatorNumber | ||
) |
Fills the range of text with indicator indicatorNumber starting at position indexFrom in line lineFrom and finishing at position indexTo in line lineTo.
virtual bool QsciScintilla::findFirst | ( | const QString & | expr, |
bool | re, | ||
bool | cs, | ||
bool | wo, | ||
bool | wrap, | ||
bool | forward = true , |
||
int | line = -1 , |
||
int | index = -1 , |
||
bool | show = true , |
||
bool | posix = false |
||
) | [virtual] |
Find the first occurrence of the string expr and return true if expr was found, otherwise returns false. If expr is found it becomes the current selection.
If re is true then expr is interpreted as a regular expression rather than a simple string.
If cs is true then the search is case sensitive.
If wo is true then the search looks for whole word matches only, otherwise it searches for any matching text.
If wrap is true then the search wraps around the end of the text.
If forward is true (the default) then the search is forward from the starting position to the end of the text, otherwise it is backwards to the beginning of the text.
If either line or index are negative (the default) then the search begins from the current cursor position. Otherwise the search begins at position index of line line.
If show is true (the default) then any text found is made visible (ie. it is unfolded).
If posix is true then a regular expression is treated in a more POSIX compatible manner by interpreting bare ( and ) as tagged sections rather than \( and \).
virtual bool QsciScintilla::findFirstInSelection | ( | const QString & | expr, |
bool | re, | ||
bool | cs, | ||
bool | wo, | ||
bool | forward = true , |
||
bool | show = true , |
||
bool | posix = false |
||
) | [virtual] |
Find the first occurrence of the string expr in the current selection and return true if expr was found, otherwise returns false. If expr is found it becomes the current selection. The original selection is restored when a subsequent call to findNext() returns false.
If re is true then expr is interpreted as a regular expression rather than a simple string.
If cs is true then the search is case sensitive.
If wo is true then the search looks for whole word matches only, otherwise it searches for any matching text.
If forward is true (the default) then the search is forward from the start to the end of the selection, otherwise it is backwards from the end to the start of the selection.
If show is true (the default) then any text found is made visible (ie. it is unfolded).
If posix is true then a regular expression is treated in a more POSIX compatible manner by interpreting bare ( and ) as tagged sections rather than \( and \).
virtual bool QsciScintilla::findNext | ( | ) | [virtual] |
Find the next occurence of the string found using findFirst() or findFirstInSelection().
int QsciScintilla::firstVisibleLine | ( | ) | const |
Returns the number of the first visible line.
FoldStyle QsciScintilla::folding | ( | ) | const [inline] |
Returns the current folding style.
void QsciScintilla::getCursorPosition | ( | int * | line, |
int * | index | ||
) | const |
Sets *line and *index to the line and index of the cursor.
void QsciScintilla::getSelection | ( | int * | lineFrom, |
int * | indexFrom, | ||
int * | lineTo, | ||
int * | indexTo | ||
) | const |
If there is a selection, *lineFrom is set to the line number in which the selection begins and *lineTo is set to the line number in which the selection ends. (They could be the same.) *indexFrom is set to the index at which the selection begins within *lineFrom, and *indexTo is set to the index at which the selection ends within *lineTo. If there is no selection, *lineFrom, *indexFrom, *lineTo and *indexTo are all set to -1.
bool QsciScintilla::hasSelectedText | ( | ) | const [inline] |
Returns true if some text is selected.
int QsciScintilla::indentation | ( | int | line | ) | const |
Returns the number of characters that line line is indented by.
bool QsciScintilla::indentationGuides | ( | ) | const |
Returns true if the display of indentation guides is enabled.
bool QsciScintilla::indentationsUseTabs | ( | ) | const |
Returns true if indentations are created using tabs and spaces, rather than just spaces. The default is true.
int QsciScintilla::indentationWidth | ( | ) | const |
Returns the indentation width in characters. The default is 0 which means that the value returned by tabWidth() is actually used.
int QsciScintilla::indicatorDefine | ( | IndicatorStyle | style, |
int | indicatorNumber = -1 |
||
) |
Define a type of indicator using the style style with the indicator number indicatorNumber. If indicatorNumber is -1 then the indicator number is automatically allocated. The indicator number is returned or -1 if too many types of indicator have been defined.
Indicators are used to display additional information over the top of styling. They can be used to show, for example, syntax errors, deprecated names and bad indentation by drawing lines under text or boxes around text.
There may be up to 32 types of indicator defined at a time. The first 8 are normally used by lexers. By default indicator number 0 is a dark green SquiggleIndicator, 1 is a blue TTIndicator, and 2 is a red PlainIndicator.
bool QsciScintilla::indicatorDrawUnder | ( | int | indicatorNumber | ) | const |
Returns true if the indicator indicatorNumber is drawn under the text (i.e. in the background). The default is false.
bool QsciScintilla::isListActive | ( | ) | const |
Returns true if an auto-completion or user defined list is currently active.
bool QsciScintilla::isModified | ( | ) | const |
Returns true if the text has been modified.
bool QsciScintilla::isReadOnly | ( | ) | const |
Returns true if the text edit is read-only.
bool QsciScintilla::isRedoAvailable | ( | ) | const |
Returns true if there is something that can be redone.
bool QsciScintilla::isUndoAvailable | ( | ) | const |
Returns true if there is something that can be undone.
bool QsciScintilla::isUtf8 | ( | ) | const |
Returns true if text is interpreted as being UTF8 encoded. The default is to interpret the text as Latin1 encoded.
bool QsciScintilla::isWordCharacter | ( | char | ch | ) | const |
Returns true if character ch is a valid word character.
int QsciScintilla::lineAt | ( | const QPoint & | point | ) | const |
Returns the line which is at point pixel coordinates or -1 if there is no line at that point.
void QsciScintilla::lineIndexFromPosition | ( | int | position, |
int * | line, | ||
int * | index | ||
) | const |
QScintilla uses the combination of a line number and a character index from the start of that line to specify the position of a character within the text. The underlying Scintilla instead uses a byte index from the start of the text. This will convert the position byte index to the *line line number and *index character index.
int QsciScintilla::lineLength | ( | int | line | ) | const |
Returns the length of line line int bytes or -1 if there is no such line. In order to get the length in characters use text(line).length().
int QsciScintilla::length | ( | ) | const |
QsciLexer* QsciScintilla::lexer | ( | ) | const |
Returns the current language lexer used to style text. If it is 0 then syntax styling is disabled.
bool QsciScintilla::marginLineNumbers | ( | int | margin | ) | const |
Returns true if line numbers are enabled for margin margin.
int QsciScintilla::marginMarkerMask | ( | int | margin | ) | const |
Returns the marker mask of margin margin.
int QsciScintilla::marginOptions | ( | ) | const |
Returns the margin options. The default is MoNone.
bool QsciScintilla::marginSensitivity | ( | int | margin | ) | const |
Returns true if margin margin is sensitive to mouse clicks.
MarginType QsciScintilla::marginType | ( | int | margin | ) | const |
Returns the type of margin margin.
int QsciScintilla::marginWidth | ( | int | margin | ) | const |
Returns the width in pixels of margin margin.
int QsciScintilla::markerDefine | ( | MarkerSymbol | sym, |
int | markerNumber = -1 |
||
) |
Define a type of marker using the symbol sym with the marker number markerNumber. If markerNumber is -1 then the marker number is automatically allocated. The marker number is returned or -1 if too many types of marker have been defined.
Markers are small geometric symbols and characters used, for example, to indicate the current line or, in debuggers, to indicate breakpoints. If a margin has a width of 0 then its markers are not drawn, but their background colours affect the background colour of the corresponding line of text.
There may be up to 32 types of marker defined at a time and each line of text has a set of marker instances associated with it. Markers are drawn according to their numerical identifier. Markers try to move with their text by tracking where the start of their line moves to. For example, when a line is deleted its markers are added to previous line's markers.
Each marker type is identified by a marker number. Each instance of a marker is identified by a marker handle.
int QsciScintilla::markerDefine | ( | char | ch, |
int | markerNumber = -1 |
||
) |
Define a marker using the character ch with the marker number markerNumber. If markerNumber is -1 then the marker number is automatically allocated. The marker number is returned or -1 if too many markers have been defined.
int QsciScintilla::markerDefine | ( | const QPixmap & | pm, |
int | markerNumber = -1 |
||
) |
Define a marker using a copy of the pixmap pm with the marker number markerNumber. If markerNumber is -1 then the marker number is automatically allocated. The marker number is returned or -1 if too many markers have been defined.
int QsciScintilla::markerDefine | ( | const QImage & | im, |
int | markerNumber = -1 |
||
) |
Define a marker using a copy of the image im with the marker number markerNumber. If markerNumber is -1 then the marker number is automatically allocated. The marker number is returned or -1 if too many markers have been defined.
int QsciScintilla::markerAdd | ( | int | linenr, |
int | markerNumber | ||
) |
Add an instance of marker number markerNumber to line number linenr. A handle for the marker is returned which can be used to track the marker's position, or -1 if the markerNumber was invalid.
unsigned QsciScintilla::markersAtLine | ( | int | linenr | ) | const |
Returns the 32 bit mask of marker numbers at line number linenr.
void QsciScintilla::markerDelete | ( | int | linenr, |
int | markerNumber = -1 |
||
) |
Delete all markers with the marker number markerNumber in the line linenr. If markerNumber is -1 then delete all markers from line linenr.
void QsciScintilla::markerDeleteAll | ( | int | markerNumber = -1 | ) |
Delete the all markers with the marker number markerNumber. If markerNumber is -1 then delete all markers.
void QsciScintilla::markerDeleteHandle | ( | int | mhandle | ) |
Delete the the marker instance with the marker handle mhandle.
int QsciScintilla::markerLine | ( | int | mhandle | ) | const |
Return the line number that contains the marker instance with the marker handle mhandle.
int QsciScintilla::markerFindNext | ( | int | linenr, |
unsigned | mask | ||
) | const |
Return the number of the next line to contain at least one marker from a 32 bit mask of markers. linenr is the line number to start the search from. mask is the mask of markers to search for.
int QsciScintilla::markerFindPrevious | ( | int | linenr, |
unsigned | mask | ||
) | const |
Return the number of the previous line to contain at least one marker from a 32 bit mask of markers. linenr is the line number to start the search from. mask is the mask of markers to search for.
bool QsciScintilla::overwriteMode | ( | ) | const |
Returns true if text entered by the user will overwrite existing text.
QColor QsciScintilla::paper | ( | ) | const |
Returns the widget's paper (ie. background) colour.
int QsciScintilla::positionFromLineIndex | ( | int | line, |
int | index | ||
) | const |
QScintilla uses the combination of a line number and a character index from the start of that line to specify the position of a character within the text. The underlying Scintilla instead uses a byte index from the start of the text. This will return the byte index corresponding to the line line number and index character index.
bool QsciScintilla::read | ( | QIODevice * | io | ) |
Reads the current document from the io device and returns true if there was no error.
virtual void QsciScintilla::recolor | ( | int | start = 0 , |
int | end = -1 |
||
) | [virtual] |
Recolours the document between the start and end positions. start defaults to the start of the document and end defaults to the end of the document.
void QsciScintilla::registerImage | ( | int | id, |
const QPixmap & | pm | ||
) |
Register an image pm with ID id. Registered images can be displayed in auto-completion lists.
void QsciScintilla::registerImage | ( | int | id, |
const QImage & | im | ||
) |
Register an image im with ID id. Registered images can be displayed in auto-completion lists.
virtual void QsciScintilla::replace | ( | const QString & | replaceStr | ) | [virtual] |
Replace the current selection, set by a previous call to findFirst(), findFirstInSelection() or findNext(), with replaceStr.
void QsciScintilla::resetFoldMarginColors | ( | ) |
Reset the fold margin colours to their defaults.
void QsciScintilla::resetHotspotBackgroundColor | ( | ) |
Resets the background colour of an active hotspot area to the default.
void QsciScintilla::resetHotspotForegroundColor | ( | ) |
Resets the foreground colour of an active hotspot area to the default.
void QsciScintilla::setFoldMarginColors | ( | const QColor & | fore, |
const QColor & | back | ||
) |
The fold margin may be drawn as a one pixel sized checkerboard pattern of two colours, fore and back.
void QsciScintilla::setAnnotationDisplay | ( | AnnotationDisplay | display | ) |
Set the display style for annotations. The default is AnnotationStandard.
void QsciScintilla::setAutoCompletionFillupsEnabled | ( | bool | enabled | ) |
Enable the use of fill-up characters, either those explicitly set or those set by a lexer. By default, fill-up characters are disabled.
void QsciScintilla::setAutoCompletionFillups | ( | const char * | fillups | ) |
A fill-up character is one that, when entered while an auto-completion list is being displayed, causes the currently selected item from the list to be added to the text followed by the fill-up character. fillups is the set of fill-up characters. If a language lexer has been set then this is ignored and the lexer defines the fill-up characters. The default is that no fill-up characters are set.
void QsciScintilla::setAutoCompletionWordSeparators | ( | const QStringList & | separators | ) |
A word separator is a sequence of characters that, when entered, causes the auto-completion list to be displayed. If a language lexer has been set then this is ignored and the lexer defines the word separators. The default is that no word separators are set.
void QsciScintilla::setCallTipsBackgroundColor | ( | const QColor & | col | ) |
Set the background colour of call tips to col. The default is white.
void QsciScintilla::setCallTipsForegroundColor | ( | const QColor & | col | ) |
Set the foreground colour of call tips to col. The default is mid-gray.
void QsciScintilla::setCallTipsHighlightColor | ( | const QColor & | col | ) |
Set the highlighted colour of call tip text to col. The default is dark blue.
void QsciScintilla::setCallTipsPosition | ( | CallTipsPosition | position | ) |
Set the current call tip position. The default is CallTipsBelowText.
void QsciScintilla::setCallTipsStyle | ( | CallTipsStyle | style | ) |
Set the current call tip style. The default is CallTipsNoContext.
void QsciScintilla::setCallTipsVisible | ( | int | nr | ) |
Set the maximum number of call tips that are displayed to nr. If the maximum number is 0 then all applicable call tips are displayed. If the maximum number is -1 then one call tip will be displayed with up and down arrows that allow the use to scroll through the full list. The default is -1.
void QsciScintilla::setContractedFolds | ( | const QValueList< int > & | folds | ) |
Sets each line in the folds list of line numbers to be a contracted fold. This is typically used to restore the fold state of a document.
void QsciScintilla::setDocument | ( | const QsciDocument & | document | ) |
Attach the document document, replacing the currently attached document.
void QsciScintilla::setEdgeColor | ( | const QColor & | col | ) |
Set the color of the marker used to show that a line has exceeded the length set by setEdgeColumn().
void QsciScintilla::setEdgeColumn | ( | int | colnr | ) |
Set the number of the column after which lines are considered to be long.
void QsciScintilla::setEdgeMode | ( | EdgeMode | mode | ) |
Set the edge mode which determines how long lines are marked.
void QsciScintilla::setFirstVisibleLine | ( | int | linenr | ) |
Set the number of the first visible line to linenr.
void QsciScintilla::setIndicatorDrawUnder | ( | bool | under, |
int | indicatorNumber = -1 |
||
) |
Enables or disables, according to under, if the indicator indicatorNumber is drawn under or over the text (i.e. in the background or foreground). If indicatorNumber is -1 then the state of all indicators is set.
void QsciScintilla::setIndicatorForegroundColor | ( | const QColor & | col, |
int | indicatorNumber = -1 |
||
) |
Set the foreground colour of indicator indicatorNumber to col. If indicatorNumber is -1 then the colour of all indicators is set.
void QsciScintilla::setIndicatorOutlineColor | ( | const QColor & | col, |
int | indicatorNumber = -1 |
||
) |
Set the outline colour of indicator indicatorNumber to col. If indicatorNumber is -1 then the colour of all indicators is set. At the moment only the alpha value of the colour has any affect.
void QsciScintilla::setMarginOptions | ( | int | options | ) |
Set the margin options to options.
void QsciScintilla::setMarginText | ( | int | line, |
const QString & | text, | ||
int | style | ||
) |
Set the margin text of line line with the text text using the style number style.
void QsciScintilla::setMarginText | ( | int | line, |
const QString & | text, | ||
const QsciStyle & | style | ||
) |
Set the margin text of line line with the text text using the style style.
void QsciScintilla::setMarginText | ( | int | line, |
const QValueList< QsciStyledText > & | text | ||
) |
Set the margin text of line line with the list of styled text text.
void QsciScintilla::setMarginType | ( | int | margin, |
MarginType | type | ||
) |
Set the type of margin margin to type type.
void QsciScintilla::clearMarginText | ( | int | line = -1 | ) |
The margin text on line line is removed. If line is negative then all margin text is removed.
void QsciScintilla::setMarkerBackgroundColor | ( | const QColor & | col, |
int | markerNumber = -1 |
||
) |
Set the background colour, including the alpha component, of marker markerNumber to col. If markerNumber is -1 then the colour of all markers is set. The default is white.
void QsciScintilla::setMarkerForegroundColor | ( | const QColor & | col, |
int | markerNumber = -1 |
||
) |
Set the foreground colour of marker markerNumber to col. If markerNumber is -1 then the colour of all markers is set. The default is black.
void QsciScintilla::setMatchedBraceBackgroundColor | ( | const QColor & | col | ) |
Set the background colour used to display matched braces to col. It is ignored if an indicator is being used. The default is white.
void QsciScintilla::setMatchedBraceForegroundColor | ( | const QColor & | col | ) |
Set the foreground colour used to display matched braces to col. It is ignored if an indicator is being used. The default is red.
void QsciScintilla::setMatchedBraceIndicator | ( | int | indicatorNumber | ) |
Set the indicator used to display matched braces to indicatorNumber. The default is not to use an indicator.
void QsciScintilla::resetMatchedBraceIndicator | ( | ) |
Stop using an indicator to display matched braces.
void QsciScintilla::setUnmatchedBraceBackgroundColor | ( | const QColor & | col | ) |
Set the background colour used to display unmatched braces to col. It is ignored if an indicator is being used. The default is white.
void QsciScintilla::setUnmatchedBraceForegroundColor | ( | const QColor & | col | ) |
Set the foreground colour used to display unmatched braces to col. It is ignored if an indicator is being used. The default is blue.
void QsciScintilla::setUnmatchedBraceIndicator | ( | int | indicatorNumber | ) |
Set the indicator used to display unmatched braces to indicatorNumber. The default is not to use an indicator.
void QsciScintilla::resetUnmatchedBraceIndicator | ( | ) |
Stop using an indicator to display unmatched braces.
void QsciScintilla::setWrapVisualFlags | ( | WrapVisualFlag | endFlag, |
WrapVisualFlag | startFlag = WrapFlagNone , |
||
int | indent = 0 |
||
) |
Set the visual flags displayed when a line is wrapped. endFlag determines if and where the flag at the end of a line is displayed. startFlag determines if and where the flag at the start of a line is displayed. indent is the number of characters a wrapped line is indented by. By default no visual flags are displayed.
QString QsciScintilla::selectedText | ( | ) | const |
Returns the selected text or an empty string if there is no currently selected text.
bool QsciScintilla::selectionToEol | ( | ) | const |
Returns whether or not the selection is drawn up to the right hand border.
void QsciScintilla::setHotspotBackgroundColor | ( | const QColor & | col | ) |
Sets the background colour of an active hotspot area to col.
void QsciScintilla::setHotspotForegroundColor | ( | const QColor & | col | ) |
Sets the foreground colour of an active hotspot area to col.
void QsciScintilla::setHotspotUnderline | ( | bool | enable | ) |
Enables or disables, according to enable, the underlining of an active hotspot area. The default is false.
void QsciScintilla::setHotspotWrap | ( | bool | enable | ) |
Enables or disables, according to enable, the wrapping of a hotspot area to following lines. The default is true.
void QsciScintilla::setSelectionToEol | ( | bool | filled | ) |
Sets whether or not the selection is drawn up to the right hand border. filled is set if the selection is drawn to the border.
void QsciScintilla::setExtraAscent | ( | int | extra | ) |
Sets the extra space added to the height of a line above the baseline of the text to extra.
void QsciScintilla::setExtraDescent | ( | int | extra | ) |
Sets the extra space added to the height of a line below the baseline of the text to extra.
void QsciScintilla::setOverwriteMode | ( | bool | overwrite | ) |
Text entered by the user will overwrite existing text if overwrite is true.
void QsciScintilla::setWhitespaceBackgroundColor | ( | const QColor & | col | ) |
Sets the background colour of visible whitespace to col. If col is an invalid color (the default) then the color specified by the current lexer is used.
void QsciScintilla::setWhitespaceForegroundColor | ( | const QColor & | col | ) |
Sets the foreground colour of visible whitespace to col. If col is an invalid color (the default) then the color specified by the current lexer is used.
void QsciScintilla::setWhitespaceSize | ( | int | size | ) |
Sets the size of the dots used to represent visible whitespace.
void QsciScintilla::setWrapIndentMode | ( | WrapIndentMode | mode | ) |
Sets the line wrap indentation mode to mode. The default is WrapIndentFixed.
void QsciScintilla::showUserList | ( | int | id, |
const QStringList & | list | ||
) |
Displays a user defined list which can be interacted with like an auto-completion list. id is an identifier for the list which is passed as an argument to the userListActivated() signal and must be at least 1. list is the text with which the list is populated.
bool QsciScintilla::tabIndents | ( | ) | const |
Returns true if the tab key indents a line instead of inserting a tab character. The default is true.
int QsciScintilla::tabWidth | ( | ) | const |
Returns the tab width in characters. The default is 8.
QString QsciScintilla::text | ( | ) | const |
Returns the text of the current document.
QString QsciScintilla::text | ( | int | line | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the text of line line.
int QsciScintilla::whitespaceSize | ( | ) | const |
Returns the size of the dots used to represent visible whitespace.
WhitespaceVisibility QsciScintilla::whitespaceVisibility | ( | ) | const |
Returns the visibility of whitespace.
QString QsciScintilla::wordAtLineIndex | ( | int | line, |
int | index | ||
) | const |
Returns the word at the line line number and index character index.
const char* QsciScintilla::wordCharacters | ( | ) | const |
Returns the set of valid word character as defined by the current language lexer. If there is no current lexer then the set contains an an underscore, numbers and all upper and lower case alphabetic characters.
WrapMode QsciScintilla::wrapMode | ( | ) | const |
Returns the line wrap mode.
WrapIndentMode QsciScintilla::wrapIndentMode | ( | ) | const |
Returns the line wrap indentation mode.
bool QsciScintilla::write | ( | QIODevice * | io | ) | const |
Writes the current document to the io device and returns true if there was no error.
virtual void QsciScintilla::append | ( | const QString & | text | ) | [virtual, slot] |
Appends the text text to the end of the text edit. Note that the undo/redo history is cleared by this function.
virtual void QsciScintilla::autoCompleteFromAll | ( | ) | [virtual, slot] |
Display an auto-completion list based on any installed APIs, the current contents of the document and the characters immediately to the left of the cursor.
virtual void QsciScintilla::autoCompleteFromAPIs | ( | ) | [virtual, slot] |
Display an auto-completion list based on any installed APIs and the characters immediately to the left of the cursor.
virtual void QsciScintilla::autoCompleteFromDocument | ( | ) | [virtual, slot] |
Display an auto-completion list based on the current contents of the document and the characters immediately to the left of the cursor.
virtual void QsciScintilla::callTip | ( | ) | [virtual, slot] |
Display a call tip based on the the characters immediately to the left of the cursor.
virtual void QsciScintilla::copy | ( | ) | [virtual, slot] |
Copies any selected text to the clipboard.
virtual void QsciScintilla::cut | ( | ) | [virtual, slot] |
virtual void QsciScintilla::foldAll | ( | bool | children = false | ) | [virtual, slot] |
If any lines are currently folded then they are all unfolded. Otherwise all lines are folded. This has the same effect as clicking in the fold margin with the shift and control keys pressed. If children is not set (the default) then only the top level fold points are affected, otherwise the state of all fold points are changed.
virtual void QsciScintilla::foldLine | ( | int | line | ) | [virtual, slot] |
If the line line is folded then it is unfolded. Otherwise it is folded. This has the same effect as clicking in the fold margin.
virtual void QsciScintilla::indent | ( | int | line | ) | [virtual, slot] |
Increases the indentation of line line by an indentation width.
virtual void QsciScintilla::insertAt | ( | const QString & | text, |
int | line, | ||
int | index | ||
) | [virtual, slot] |
Insert the text text in the line line at the position index.
virtual void QsciScintilla::moveToMatchingBrace | ( | ) | [virtual, slot] |
If the cursor is either side of a brace character then move it to the position of the corresponding brace.
virtual void QsciScintilla::paste | ( | ) | [virtual, slot] |
virtual void QsciScintilla::redo | ( | ) | [virtual, slot] |
Redo the last change or sequence of changes.
virtual void QsciScintilla::removeSelectedText | ( | ) | [virtual, slot] |
Removes any selected text.
virtual void QsciScintilla::replaceSelectedText | ( | const QString & | text | ) | [virtual, slot] |
Replaces any selected text with text.
virtual void QsciScintilla::resetSelectionBackgroundColor | ( | ) | [virtual, slot] |
Resets the background colour of selected text to the default.
virtual void QsciScintilla::resetSelectionForegroundColor | ( | ) | [virtual, slot] |
Resets the foreground colour of selected text to the default.
virtual void QsciScintilla::selectAll | ( | bool | select = true | ) | [virtual, slot] |
If select is true (the default) then all the text is selected. If select is false then any currently selected text is deselected.
virtual void QsciScintilla::selectToMatchingBrace | ( | ) | [virtual, slot] |
If the cursor is either side of a brace character then move it to the position of the corresponding brace and select the text between the braces.
virtual void QsciScintilla::setAutoCompletionCaseSensitivity | ( | bool | cs | ) | [virtual, slot] |
If cs is true then auto-completion lists are case sensitive. The default is true. Note that setting a lexer may change the case sensitivity.
virtual void QsciScintilla::setAutoCompletionReplaceWord | ( | bool | replace | ) | [virtual, slot] |
If replace is true then when an item from an auto-completion list is selected, the rest of the word to the right of the current cursor is removed. The default is false.
virtual void QsciScintilla::setAutoCompletionShowSingle | ( | bool | single | ) | [virtual, slot] |
If single is true then when there is only a single entry in an auto-completion list it is automatically used and the list is not displayed. This only has an effect when auto-completion is explicitly requested (using autoCompleteFromAPIs() and autoCompleteFromDocument()) and has no effect when auto-completion is triggered as the user types. The default is false. Note that this is deprecated and setAutoCompletionUseSingle() should be used instead.
virtual void QsciScintilla::setAutoCompletionSource | ( | AutoCompletionSource | source | ) | [virtual, slot] |
Sets the source for the auto-completion list when it is being displayed automatically as the user types to source. The default is AcsNone, ie. it is disabled.
virtual void QsciScintilla::setAutoCompletionThreshold | ( | int | thresh | ) | [virtual, slot] |
Sets the threshold for the automatic display of the auto-completion list as the user types to thresh. The threshold is the number of characters that the user must type before the list is displayed. If the threshold is less than or equal to 0 then the list is disabled. The default is -1.
virtual void QsciScintilla::setAutoCompletionUseSingle | ( | AutoCompletionUseSingle | single | ) | [virtual, slot] |
Sets the behavior of the auto-completion list when it has a single entry. The default is AcusNever.
virtual void QsciScintilla::setAutoIndent | ( | bool | autoindent | ) | [virtual, slot] |
If autoindent is true then auto-indentation is enabled. The default is false.
virtual void QsciScintilla::setBraceMatching | ( | BraceMatch | bm | ) | [virtual, slot] |
Sets the brace matching mode to bm. The default is NoBraceMatching.
virtual void QsciScintilla::setBackspaceUnindents | ( | bool | unindent | ) | [virtual, slot] |
If deindent is true then the backspace key will unindent a line rather then delete a character.
virtual void QsciScintilla::setCaretLineBackgroundColor | ( | const QColor & | col | ) | [virtual, slot] |
Sets the background colour, including the alpha component, of the line containing the caret to col.
virtual void QsciScintilla::setCaretLineVisible | ( | bool | enable | ) | [virtual, slot] |
Enables or disables, according to enable, the background color of the line containing the caret.
virtual void QsciScintilla::setCaretWidth | ( | int | width | ) | [virtual, slot] |
Sets the width of the caret to width pixels. A width of 0 makes the caret invisible.
virtual void QsciScintilla::setColor | ( | const QColor & | c | ) | [virtual, slot] |
The widget's text (ie. foreground) colour is set to c. This has no effect if a language lexer has been set.
virtual void QsciScintilla::setCursorPosition | ( | int | line, |
int | index | ||
) | [virtual, slot] |
Sets the cursor to the line line at the position index.
virtual void QsciScintilla::setEolMode | ( | EolMode | mode | ) | [virtual, slot] |
Sets the end-of-line mode to mode. The default is the platform's natural mode.
virtual void QsciScintilla::setEolVisibility | ( | bool | visible | ) | [virtual, slot] |
If visible is true then end-of-lines are made visible. The default is that they are invisible.
virtual void QsciScintilla::setFolding | ( | FoldStyle | fold, |
int | margin = 2 |
||
) | [virtual, slot] |
Sets the folding style for margin margin to fold. The default style is NoFoldStyle (ie. folding is disabled) and the default margin is 2.
virtual void QsciScintilla::setIndentation | ( | int | line, |
int | indentation | ||
) | [virtual, slot] |
Sets the indentation of line line to indentation characters.
virtual void QsciScintilla::setIndentationGuides | ( | bool | enable | ) | [virtual, slot] |
Enables or disables, according to enable, this display of indentation guides.
virtual void QsciScintilla::setIndentationGuidesBackgroundColor | ( | const QColor & | col | ) | [virtual, slot] |
Set the background colour of indentation guides to col.
virtual void QsciScintilla::setIndentationGuidesForegroundColor | ( | const QColor & | col | ) | [virtual, slot] |
Set the foreground colour of indentation guides to col.
virtual void QsciScintilla::setIndentationsUseTabs | ( | bool | tabs | ) | [virtual, slot] |
If tabs is true then indentations are created using tabs and spaces, rather than just spaces.
virtual void QsciScintilla::setIndentationWidth | ( | int | width | ) | [virtual, slot] |
Sets the indentation width to width characters. If width is 0 then the value returned by tabWidth() is used.
virtual void QsciScintilla::setLexer | ( | QsciLexer * | lexer = 0 | ) | [virtual, slot] |
Sets the specific language lexer used to style text to lex. If lex is 0 then syntax styling is disabled.
virtual void QsciScintilla::setMarginsBackgroundColor | ( | const QColor & | col | ) | [virtual, slot] |
Set the background colour of all margins to col. The default is a gray.
virtual void QsciScintilla::setMarginsForegroundColor | ( | const QColor & | col | ) | [virtual, slot] |
Set the foreground colour of all margins to col. The default is black.
virtual void QsciScintilla::setMarginLineNumbers | ( | int | margin, |
bool | lnrs | ||
) | [virtual, slot] |
Enables or disables, according to lnrs, the display of line numbers in margin margin.
virtual void QsciScintilla::setMarginMarkerMask | ( | int | margin, |
int | mask | ||
) | [virtual, slot] |
Sets the marker mask of margin margin to mask. Only those markers whose bit is set in the mask are displayed in the margin.
virtual void QsciScintilla::setMarginSensitivity | ( | int | margin, |
bool | sens | ||
) | [virtual, slot] |
Enables or disables, according to sens, the sensitivity of margin margin to mouse clicks. If the user clicks in a sensitive margin the marginClicked() signal is emitted.
virtual void QsciScintilla::setMarginWidth | ( | int | margin, |
int | width | ||
) | [virtual, slot] |
Sets the width of margin margin to width pixels. If the width of a margin is 0 then it is not displayed.
virtual void QsciScintilla::setMarginWidth | ( | int | margin, |
const QString & | s | ||
) | [virtual, slot] |
Sets the width of margin margin so that it is wide enough to display s in the current margin font.
virtual void QsciScintilla::setModified | ( | bool | m | ) | [virtual, slot] |
Sets the modified state of the text edit to m. Note that it is only possible to clear the modified state (where m is false). Attempts to set the modified state (where m is true) are ignored.
virtual void QsciScintilla::setPaper | ( | const QColor & | c | ) | [virtual, slot] |
The widget's paper (ie. background) colour is set to c. This has no effect if a language lexer has been set.
virtual void QsciScintilla::setReadOnly | ( | bool | ro | ) | [virtual, slot] |
Sets the read-only state of the text edit to ro.
virtual void QsciScintilla::setSelection | ( | int | lineFrom, |
int | indexFrom, | ||
int | lineTo, | ||
int | indexTo | ||
) | [virtual, slot] |
Sets the selection which starts at position indexFrom in line lineFrom and ends at position indexTo in line lineTo. The cursor is moved to position indexTo in lineTo.
virtual void QsciScintilla::setSelectionBackgroundColor | ( | const QColor & | col | ) | [virtual, slot] |
Sets the background colour, including the alpha component, of selected text to col.
virtual void QsciScintilla::setSelectionForegroundColor | ( | const QColor & | col | ) | [virtual, slot] |
Sets the foreground colour of selected text to col.
virtual void QsciScintilla::setTabIndents | ( | bool | indent | ) | [virtual, slot] |
If indent is true then the tab key will indent a line rather than insert a tab character.
virtual void QsciScintilla::setTabWidth | ( | int | width | ) | [virtual, slot] |
Sets the tab width to width characters.
virtual void QsciScintilla::setText | ( | const QString & | text | ) | [virtual, slot] |
Replaces all of the current text with text. Note that the undo/redo history is cleared by this function.
virtual void QsciScintilla::setUtf8 | ( | bool | cp | ) | [virtual, slot] |
Sets the current text encoding. If cp is true then UTF8 is used, otherwise Latin1 is used.
virtual void QsciScintilla::setWhitespaceVisibility | ( | WhitespaceVisibility | mode | ) | [virtual, slot] |
Sets the visibility of whitespace to mode mode. The default is that whitespace is invisible.
virtual void QsciScintilla::setWrapMode | ( | WrapMode | mode | ) | [virtual, slot] |
Sets the line wrap mode to mode. The default is that lines are not wrapped.
virtual void QsciScintilla::undo | ( | ) | [virtual, slot] |
Undo the last change or sequence of changes.
Scintilla has multiple level undo and redo. It will continue to record undoable actions until memory runs out. Sequences of typing or deleting are compressed into single actions to make it easier to undo and redo at a sensible level of detail. Sequences of actions can be combined into actions that are undone as a unit. These sequences occur between calls to beginUndoAction() and endUndoAction(). These sequences can be nested and only the top level sequences are undone as units.
virtual void QsciScintilla::unindent | ( | int | line | ) | [virtual, slot] |
Decreases the indentation of line line by an indentation width.
virtual void QsciScintilla::zoomIn | ( | int | range | ) | [virtual, slot] |
virtual void QsciScintilla::zoomIn | ( | ) | [virtual, slot] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Zooms in on the text by by making the base font size one point larger and recalculating all font sizes.
virtual void QsciScintilla::zoomOut | ( | int | range | ) | [virtual, slot] |
virtual void QsciScintilla::zoomOut | ( | ) | [virtual, slot] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Zooms out on the text by by making the base font size one point larger and recalculating all font sizes.
virtual void QsciScintilla::zoomTo | ( | int | size | ) | [virtual, slot] |
void QsciScintilla::cursorPositionChanged | ( | int | line, |
int | index | ||
) | [signal] |
This signal is emitted whenever the cursor position changes. line contains the line number and index contains the character index within the line.
void QsciScintilla::copyAvailable | ( | bool | yes | ) | [signal] |
This signal is emitted whenever text is selected or de-selected. yes is true if text has been selected and false if text has been deselected. If yes is true then copy() can be used to copy the selection to the clipboard. If yes is false then copy() does nothing.
void QsciScintilla::indicatorClicked | ( | int | line, |
int | index, | ||
Qt::ButtonState | state | ||
) | [signal] |
This signal is emitted whenever the user clicks on an indicator. line is the number of the line where the user clicked. index is the character index within the line. state is the state of the modifier keys (ShiftButton, ControlButton and AltButton) when the user clicked.
void QsciScintilla::indicatorReleased | ( | int | line, |
int | index, | ||
Qt::ButtonState | state | ||
) | [signal] |
This signal is emitted whenever the user releases the mouse on an indicator. line is the number of the line where the user clicked. index is the character index within the line. state is the state of the modifier keys (ShiftButton, ControlButton and AltButton) when the user released the mouse.
void QsciScintilla::marginClicked | ( | int | margin, |
int | line, | ||
Qt::ButtonState | state | ||
) | [signal] |
This signal is emitted whenever the user clicks on a sensitive margin. margin is the margin. line is the number of the line where the user clicked. state is the state of the modifier keys (ShiftButton, ControlButton and AltButton) when the user clicked.
void QsciScintilla::modificationAttempted | ( | ) | [signal] |
This signal is emitted whenever the user attempts to modify read-only text.
void QsciScintilla::modificationChanged | ( | bool | m | ) | [signal] |
This signal is emitted whenever the modification state of the text changes. m is true if the text has been modified.
void QsciScintilla::selectionChanged | ( | ) | [signal] |
This signal is emitted whenever the selection changes.
void QsciScintilla::userListActivated | ( | int | id, |
const QString & | string | ||
) | [signal] |
This signal is emitted when an item in a user defined list is activated (selected). id is the list identifier. string is the text of the item.