QsciScintilla Class Reference
The
QsciScintilla class implements a higher level, more Qt-like, API to the Scintilla editor widget.
More...
#include <qsciscintilla.h>
Inherits QsciScintillaBase.
List of all members.
Public Types
- enum { AiMaintain = 0x01,
AiOpening = 0x02,
AiClosing = 0x04
}
- enum AutoCompletionSource {
AcsNone,
AcsAll,
AcsDocument,
AcsAPIs
}
- enum BraceMatch { NoBraceMatch,
StrictBraceMatch,
SloppyBraceMatch
}
- enum CallTipsStyle {
CallTipsNone,
CallTipsNoContext,
CallTipsNoAutoCompletionContext,
CallTipsContext
}
- enum EdgeMode { EdgeNone = EDGE_NONE,
EdgeLine = EDGE_LINE,
EdgeBackground = EDGE_BACKGROUND
}
- enum EolMode { EolWindows = SC_EOL_CRLF,
EolUnix = SC_EOL_LF,
EolMac = SC_EOL_CR
}
- enum FoldStyle {
NoFoldStyle,
PlainFoldStyle,
CircledFoldStyle,
BoxedFoldStyle,
CircledTreeFoldStyle,
BoxedTreeFoldStyle
}
- enum MarkerSymbol {
Circle = SC_MARK_CIRCLE,
Rectangle = SC_MARK_ROUNDRECT,
RightTriangle = SC_MARK_ARROW,
SmallRectangle = SC_MARK_SMALLRECT,
RightArrow = SC_MARK_SHORTARROW,
Invisible = SC_MARK_EMPTY,
DownTriangle = SC_MARK_ARROWDOWN,
Minus = SC_MARK_MINUS,
Plus = SC_MARK_PLUS,
VerticalLine = SC_MARK_VLINE,
BottomLeftCorner = SC_MARK_LCORNER,
LeftSideSplitter = SC_MARK_TCORNER,
BoxedPlus = SC_MARK_BOXPLUS,
BoxedPlusConnected = SC_MARK_BOXPLUSCONNECTED,
BoxedMinus = SC_MARK_BOXMINUS,
BoxedMinusConnected = SC_MARK_BOXMINUSCONNECTED,
RoundedBottomLeftCorner = SC_MARK_LCORNERCURVE,
LeftSideRoundedSplitter = SC_MARK_TCORNERCURVE,
CircledPlus = SC_MARK_CIRCLEPLUS,
CircledPlusConnected = SC_MARK_CIRCLEPLUSCONNECTED,
CircledMinus = SC_MARK_CIRCLEMINUS,
CircledMinusConnected = SC_MARK_CIRCLEMINUSCONNECTED,
Background = SC_MARK_BACKGROUND,
ThreeDots = SC_MARK_DOTDOTDOT,
ThreeRightArrows = SC_MARK_ARROWS
}
- enum WhitespaceVisibility { WsInvisible = SCWS_INVISIBLE,
WsVisible = SCWS_VISIBLEALWAYS,
WsVisibleAfterIndent = SCWS_VISIBLEAFTERINDENT
}
- enum WrapMode { WrapNone = SC_WRAP_NONE,
WrapWord = SC_WRAP_WORD,
WrapCharacter = SC_WRAP_CHAR
}
- enum WrapVisualFlag { WrapFlagNone,
WrapFlagByText,
WrapFlagByBorder
}
Public Slots
- virtual void append (const QString &text)
- virtual void autoCompleteFromAll ()
- virtual void autoCompleteFromAPIs ()
- virtual void autoCompleteFromDocument ()
- virtual void callTip ()
- virtual void clear ()
- virtual void copy ()
- virtual void cut ()
- virtual void ensureCursorVisible ()
- virtual void ensureLineVisible (int line)
- virtual void foldAll (bool children=false)
- virtual void foldLine (int line)
- virtual void indent (int line)
- virtual void insert (const QString &text)
- virtual void insertAt (const QString &text, int line, int index)
- virtual void moveToMatchingBrace ()
- virtual void paste ()
- virtual void redo ()
- virtual void removeSelectedText ()
- virtual void resetSelectionBackgroundColor ()
- virtual void resetSelectionForegroundColor ()
- virtual void selectAll (bool select=true)
- virtual void selectToMatchingBrace ()
- virtual void setAutoCompletionCaseSensitivity (bool cs)
- virtual void setAutoCompletionReplaceWord (bool replace)
- virtual void setAutoCompletionShowSingle (bool single)
- virtual void setAutoCompletionSource (AutoCompletionSource source)
- virtual void setAutoCompletionThreshold (int thresh)
- virtual void setAutoIndent (bool autoindent)
- virtual void setBraceMatching (BraceMatch bm)
- virtual void setBackspaceUnindents (bool unindent)
- virtual void setCaretForegroundColor (const QColor &col)
- virtual void setCaretLineBackgroundColor (const QColor &col)
- virtual void setCaretLineVisible (bool enable)
- virtual void setCaretWidth (int width)
- virtual void setColor (const QColor &c)
- virtual void setCursorPosition (int line, int index)
- virtual void setEolMode (EolMode mode)
- virtual void setEolVisibility (bool visible)
- virtual void setFolding (FoldStyle fold, int margin=2)
- virtual void setIndentation (int line, int indentation)
- virtual void setIndentationGuides (bool enable)
- virtual void setIndentationGuidesBackgroundColor (const QColor &col)
- virtual void setIndentationGuidesForegroundColor (const QColor &col)
- virtual void setIndentationsUseTabs (bool tabs)
- virtual void setIndentationWidth (int width)
- virtual void setLexer (QsciLexer *lexer=0)
- virtual void setMarginsBackgroundColor (const QColor &col)
- virtual void setMarginsFont (const QFont &f)
- virtual void setMarginsForegroundColor (const QColor &col)
- virtual void setMarginLineNumbers (int margin, bool lnrs)
- virtual void setMarginMarkerMask (int margin, int mask)
- virtual void setMarginSensitivity (int margin, bool sens)
- virtual void setMarginWidth (int margin, int width)
- virtual void setMarginWidth (int margin, const QString &s)
- virtual void setModified (bool m)
- virtual void setPaper (const QColor &c)
- virtual void setReadOnly (bool ro)
- virtual void setSelection (int lineFrom, int indexFrom, int lineTo, int indexTo)
- virtual void setSelectionBackgroundColor (const QColor &col)
- virtual void setSelectionForegroundColor (const QColor &col)
- virtual void setTabIndents (bool indent)
- virtual void setTabWidth (int width)
- virtual void setText (const QString &text)
- virtual void setUtf8 (bool cp)
- virtual void setWhitespaceVisibility (WhitespaceVisibility mode)
- virtual void setWrapMode (WrapMode mode)
- virtual void undo ()
- virtual void unindent (int line)
- virtual void zoomIn (int range)
- virtual void zoomIn ()
- virtual void zoomOut (int range)
- virtual void zoomOut ()
- virtual void zoomTo (int size)
Signals
Public Member Functions
- QsciScintilla (QWidget *parent=0)
- virtual ~QsciScintilla ()
- virtual QStringList apiContext (int pos, int &context_start, int &last_word_start)
- bool autoCompletionCaseSensitivity () const
- bool autoCompletionFillupsEnabled () const
- bool autoCompletionReplaceWord () const
- bool autoCompletionShowSingle () const
- AutoCompletionSource autoCompletionSource () const
- int autoCompletionThreshold () const
- bool autoIndent () const
- bool backspaceUnindents () const
- void beginUndoAction ()
- BraceMatch braceMatching () const
- CallTipsStyle callTipsStyle () const
- int callTipsVisible () const
- void cancelList ()
- bool caseSensitive () const
- void clearRegisteredImages ()
- QColor color () const
- void convertEols (EolMode mode)
- QsciDocument document () const
- void endUndoAction ()
- QColor edgeColor () const
- int edgeColumn () const
- EdgeMode edgeMode () const
- void setFont (const QFont &f)
- EolMode eolMode () const
- bool eolVisibility () const
- virtual bool findFirst (const QString &expr, bool re, bool cs, bool wo, bool wrap, bool forward=true, int line=-1, int index=-1, bool show=true)
- virtual bool findNext ()
- int firstVisibleLine () const
- FoldStyle folding () const
- void getCursorPosition (int *line, int *index) const
- void getSelection (int *lineFrom, int *indexFrom, int *lineTo, int *indexTo) const
- bool hasSelectedText () const
- int indentation (int line) const
- bool indentationGuides () const
- bool indentationsUseTabs () const
- int indentationWidth () const
- bool isCallTipActive () const
- bool isListActive () const
- bool isModified () const
- bool isReadOnly () const
- bool isRedoAvailable () const
- bool isUndoAvailable () const
- bool isUtf8 () const
- bool isWordCharacter (char ch) const
- int lineAt (const QPoint &pos) const
- void lineIndexFromPosition (int position, int *line, int *index) const
- int lineLength (int line) const
- int lines () const
- int length () const
- QsciLexer * lexer () const
- bool marginLineNumbers (int margin) const
- int marginMarkerMask (int margin) const
- bool marginSensitivity (int margin) const
- int marginWidth (int margin) const
- int markerDefine (MarkerSymbol sym, int mnr=-1)
- int markerDefine (char ch, int mnr=-1)
- int markerDefine (const QPixmap &pm, int mnr=-1)
- int markerAdd (int linenr, int mnr)
- unsigned markersAtLine (int linenr) const
- void markerDelete (int linenr, int mnr=-1)
- void markerDeleteAll (int mnr=-1)
- void markerDeleteHandle (int mhandle)
- int markerLine (int mhandle) const
- int markerFindNext (int linenr, unsigned mask) const
- int markerFindPrevious (int linenr, unsigned mask) const
- QColor paper () const
- int positionFromLineIndex (int line, int index) const
- bool read (QIODevice *io)
- virtual void recolor (int start=0, int end=-1)
- void registerImage (int id, const QPixmap &pm)
- virtual void replace (const QString &replaceStr)
- void resetFoldMarginColors ()
- void setFoldMarginColors (const QColor &fore, const QColor &back)
- void setAutoCompletionFillupsEnabled (bool enabled)
- void setAutoCompletionFillups (const char *fillups)
- void setAutoCompletionWordSeparators (const QStringList &separators)
- void setCallTipsBackgroundColor (const QColor &col)
- void setCallTipsForegroundColor (const QColor &col)
- void setCallTipsHighlightColor (const QColor &col)
- void setCallTipsStyle (CallTipsStyle style)
- void setCallTipsVisible (int nr)
- void setDocument (const QsciDocument &document)
- void setEdgeColor (const QColor &col)
- void setEdgeColumn (int colnr)
- void setEdgeMode (EdgeMode mode)
- void setMarkerBackgroundColor (const QColor &col, int mnr=-1)
- void setMarkerForegroundColor (const QColor &col, int mnr=-1)
- void setMatchedBraceBackgroundColor (const QColor &col)
- void setMatchedBraceForegroundColor (const QColor &col)
- void setUnmatchedBraceBackgroundColor (const QColor &col)
- void setUnmatchedBraceForegroundColor (const QColor &col)
- void setWrapVisualFlags (WrapVisualFlag eflag, WrapVisualFlag sflag=WrapFlagNone, int sindent=0)
- QString selectedText () const
- bool selectionToEol () const
- void setSelectionToEol (bool filled)
- void showUserList (int id, const QStringList &list)
- QsciCommandSet * standardCommands () const
- bool tabIndents () const
- int tabWidth () const
- QString text () const
- QString text (int line) const
- int textHeight (int linenr) const
- WhitespaceVisibility whitespaceVisibility () const
- QString wordAtPoint (const QPoint &point) const
- const char * wordCharacters () const
- WrapMode wrapMode () const
- bool write (QIODevice *io) const
Classes
Detailed Description
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.
Member Enumeration Documentation
This enum defines the different auto-indentation styles.
- Enumerator:
-
| AiMaintain |
A line is automatically indented to match the previous line. |
| AiOpening |
If the language supported by the current lexer has a specific start of block character (e.g. { in C++), then a line that begins with that character is indented as well as the lines that make up the block. It may be logically ored with AiClosing. |
| AiClosing |
If the language supported by the current lexer has a specific end of block character (e.g. } in C++), then a line that begins with that character is indented as well as the lines that make up the block. It may be logically ored with AiOpening. |
This enum defines the different sources for auto-completion lists.
- Enumerator:
-
| AcsNone |
No sources are used, ie. automatic auto-completion is disabled. |
| AcsAll |
The source is all available sources. |
| AcsDocument |
The source is the current document. |
| AcsAPIs |
The source is any installed APIs. |
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.
- Enumerator:
-
| NoBraceMatch |
Brace matching is disabled. |
| StrictBraceMatch |
Brace matching is enabled for a brace immediately before the current position. |
| SloppyBraceMatch |
Brace matching is enabled for a brace immediately before or after the current position. |
This enum defines the different call tip styles.
- Enumerator:
-
| CallTipsNone |
Call tips are disabled. |
| CallTipsNoContext |
Call tips are displayed without a context. A context is any scope (e.g. a C++ namespace or a Python module) prior to the function name. |
| CallTipsNoAutoCompletionContext |
Call tips are displayed with a context only if the user hasn't already implicitly identified the context using autocompletion. Note that this style may not always be able to align the call tip with the text being entered. |
| CallTipsContext |
Call tips are displayed with a context. Note that this style may not always be able to align the call tip with the text being entered. |
This enum defines the different edge modes for long lines.
- Enumerator:
-
| 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 end-of-line modes.
- Enumerator:
-
| EolWindows |
A carriage return/line feed as used on Windows systems. |
| EolUnix |
A line feed as used on Unix systems. |
| EolMac |
A carriage return as used on Mac systems. |
This enum defines the different styles for the folding margin.
- Enumerator:
-
| NoFoldStyle |
Folding is disabled. |
| PlainFoldStyle |
Plain folding style using plus and minus symbols. |
| CircledFoldStyle |
Circled folding style using circled plus and minus symbols. |
| BoxedFoldStyle |
Boxed folding style using boxed plus and minus symbols. |
| CircledTreeFoldStyle |
Circled tree style using a flattened tree with circled plus and minus symbols and rounded corners. |
| BoxedTreeFoldStyle |
Boxed tree style using a flattened tree with boxed plus and minus symbols and right-angled corners. |
This enum defines the different pre-defined marker symbols.
- Enumerator:
-
| Circle |
A circle. |
| Rectangle |
A rectangle. |
| RightTriangle |
A triangle pointing to the right. |
| SmallRectangle |
A smaller rectangle. |
| RightArrow |
An arrow pointing to the right. |
| Invisible |
An invisible marker that allows code to track the movement of lines. |
| DownTriangle |
A triangle pointing down. |
| Minus |
A drawn minus sign. |
| Plus |
A drawn plus sign. |
| VerticalLine |
A vertical line drawn in the background colour. |
| BottomLeftCorner |
A bottom left corner drawn in the background colour. |
| LeftSideSplitter |
A vertical line with a centre right horizontal line drawn in the background colour. |
| BoxedPlus |
A drawn plus sign in a box. |
| BoxedPlusConnected |
A drawn plus sign in a connected box. |
| BoxedMinus |
A drawn minus sign in a box. |
| BoxedMinusConnected |
A drawn minus sign in a connected box. |
| RoundedBottomLeftCorner |
A rounded bottom left corner drawn in the background colour. |
| LeftSideRoundedSplitter |
A vertical line with a centre right curved line drawn in the background colour. |
| CircledPlus |
A drawn plus sign in a circle. |
| CircledPlusConnected |
A drawn plus sign in a connected box. |
| CircledMinus |
A drawn minus sign in a circle. |
| CircledMinusConnected |
A drawn minus sign in a connected circle. |
| Background |
No symbol is drawn but the line of text is drawn with the same background colour. |
| ThreeDots |
Three drawn dots. |
| ThreeRightArrows |
Three drawn arrows pointing right. |
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.
- Enumerator:
-
| WsInvisible |
Whitespace is invisible. |
| WsVisible |
Whitespace is always visible. |
| WsVisibleAfterIndent |
Whitespace is visible after the whitespace used for indentation. |
This enum defines the different line wrap modes.
- Enumerator:
-
| WrapNone |
Lines are not wrapped. |
| WrapWord |
Lines are wrapped at word boundaries. |
| WrapCharacter |
Lines are wrapped at character boundaries. |
This enum defines the different line wrap visual flags.
- Enumerator:
-
| WrapFlagNone |
No wrap flag is displayed. |
| WrapFlagByText |
A wrap flag is displayed by the text. |
| WrapFlagByBorder |
A wrap flag is displayed by the border. |
Constructor & Destructor Documentation
| QsciScintilla::QsciScintilla |
( |
QWidget * |
parent = 0 |
) |
|
| virtual QsciScintilla::~QsciScintilla |
( |
|
) |
[virtual] |
Member Function Documentation
| 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.
| bool QsciScintilla::autoCompletionCaseSensitivity |
( |
|
) |
const |
| bool QsciScintilla::autoCompletionFillupsEnabled |
( |
|
) |
const |
| 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.
- See also:
- setAutoCompletionReplaceWord()
| 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.
- See also:
- setAutoCompletionShowSingle()
Returns the current source for the auto-completion list when it is being displayed automatically as the user types.
- See also:
- setAutoCompletionSource()
| int QsciScintilla::autoCompletionThreshold |
( |
|
) |
const [inline] |
Returns the current threshold for the automatic display of the auto-completion list as the user types.
- See also:
- setAutoCompletionThreshold()
| bool QsciScintilla::autoIndent |
( |
|
) |
const [inline] |
| bool QsciScintilla::backspaceUnindents |
( |
|
) |
const |
| void QsciScintilla::beginUndoAction |
( |
|
) |
|
| BraceMatch QsciScintilla::braceMatching |
( |
|
) |
const [inline] |
| int QsciScintilla::callTipsVisible |
( |
|
) |
const [inline] |
| void QsciScintilla::cancelList |
( |
|
) |
|
Cancel any current auto-completion or user defined list.
| 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::clearRegisteredImages |
( |
|
) |
|
| QColor QsciScintilla::color |
( |
|
) |
const |
Returns the widget's text (ie. foreground) colour.
- See also:
- setColor()
| void QsciScintilla::convertEols |
( |
EolMode |
mode |
) |
|
All the lines of the text have their end-of-lines converted to mode mode.
- See also:
- eolMode(), setEolMode()
| void QsciScintilla::endUndoAction |
( |
|
) |
|
| QColor QsciScintilla::edgeColor |
( |
|
) |
const |
| int QsciScintilla::edgeColumn |
( |
|
) |
const |
Returns the number of the column after which lines are considered to be long.
- See also:
- setEdgeColumn()
| EdgeMode QsciScintilla::edgeMode |
( |
|
) |
const |
Returns the edge mode which determines how long lines are marked.
- See also:
- setEdgeMode()
| 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 |
| bool QsciScintilla::eolVisibility |
( |
|
) |
const |
| 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 | |
|
) |
| | [virtual] |
Find the next 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).
- See also:
- findNext(), replace()
| virtual bool QsciScintilla::findNext |
( |
|
) |
[virtual] |
| int QsciScintilla::firstVisibleLine |
( |
|
) |
const |
Returns the number of the first visible line.
| FoldStyle QsciScintilla::folding |
( |
|
) |
const [inline] |
| void QsciScintilla::getCursorPosition |
( |
int * |
line, |
|
|
int * |
index | |
|
) |
| | const |
| 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.
- See also:
- setSelection()
| bool QsciScintilla::hasSelectedText |
( |
|
) |
const [inline] |
| int QsciScintilla::indentation |
( |
int |
line |
) |
const |
Returns the number of characters that line line is indented by.
- See also:
- setIndentation()
| bool QsciScintilla::indentationGuides |
( |
|
) |
const |
| bool QsciScintilla::indentationsUseTabs |
( |
|
) |
const |
Returns true if indentations are created using tabs and spaces, rather than just spaces. The default is true.
- See also:
- setIndentationsUseTabs()
| int QsciScintilla::indentationWidth |
( |
|
) |
const |
| bool QsciScintilla::isCallTipActive |
( |
|
) |
const |
Returns true if a call tip is currently active.
| bool QsciScintilla::isListActive |
( |
|
) |
const |
Returns true if an auto-completion or user defined list is currently active.
| bool QsciScintilla::isModified |
( |
|
) |
const |
| bool QsciScintilla::isReadOnly |
( |
|
) |
const |
Returns true if the text edit is read-only.
- See also:
- setReadOnly()
| bool QsciScintilla::isRedoAvailable |
( |
|
) |
const |
Returns true if there is something that can be redone.
- See also:
- redo()
| bool QsciScintilla::isUndoAvailable |
( |
|
) |
const |
Returns true if there is something that can be undone.
- See also:
- undo()
| bool QsciScintilla::isUtf8 |
( |
|
) |
const |
Returns true if text is interpreted as being UTF8 encoded. The default is to interpret the text as Latin1 encoded.
- See also:
- setUtf8()
| bool QsciScintilla::isWordCharacter |
( |
char |
ch |
) |
const |
Returns true if character ch is a valid word character.
- See also:
- wordCharacters()
| int QsciScintilla::lineAt |
( |
const QPoint & |
pos |
) |
const |
Returns the line which is at position pos or -1 if there is no line at that position.
| 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.
- See also:
- positionFromLineIndex()
| 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::lines |
( |
|
) |
const |
Returns the number of lines of text.
| int QsciScintilla::length |
( |
|
) |
const |
Returns the length of the text edit's text in bytes. In order to get the length in characters use text().length().
Returns the current language lexer used to style text. If it is 0 then syntax styling is disabled.
- See also:
- setLexer()
| bool QsciScintilla::marginLineNumbers |
( |
int |
margin |
) |
const |
| int QsciScintilla::marginMarkerMask |
( |
int |
margin |
) |
const |
Returns the marker mask of margin margin.
- See also:
- setMarginMask(), QsciMarker, SCI_GETMARGINMASKN
| bool QsciScintilla::marginSensitivity |
( |
int |
margin |
) |
const |
| int QsciScintilla::marginWidth |
( |
int |
margin |
) |
const |
| int QsciScintilla::markerDefine |
( |
MarkerSymbol |
sym, |
|
|
int |
mnr = -1 | |
|
) |
| | |
Define a marker using the symbol sym with the marker number mnr. If mnr is -1 then the marker number is automatically allocated. The marker number is returned or -1 if the marker number was already allocated or too many markers have been defined.
Markers are small geometric symbols and character 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 markers defined and each line of text has a set of these markers 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 is identified by a marker number. Each instance of a marker is identified by a marker handle.
| int QsciScintilla::markerDefine |
( |
char |
ch, |
|
|
int |
mnr = -1 | |
|
) |
| | |
Define a marker using the character ch with the marker number mnr. If mnr is -1 then the marker number is automatically allocated. The marker number is returned or -1 if the marker number was already allocated or too many markers have been defined.
| int QsciScintilla::markerDefine |
( |
const QPixmap & |
pm, |
|
|
int |
mnr = -1 | |
|
) |
| | |
Define a marker using a copy of the pixmap pm with the marker number mnr. If mnr is -1 then the marker number is automatically allocated. The marker number is returned or -1 if the marker number was already allocated or too many markers have been defined.
| int QsciScintilla::markerAdd |
( |
int |
linenr, |
|
|
int |
mnr | |
|
) |
| | |
| unsigned QsciScintilla::markersAtLine |
( |
int |
linenr |
) |
const |
Returns the 32 bit mask of marker numbers at line number linenr.
- See also:
- markerAdd()
| void QsciScintilla::markerDelete |
( |
int |
linenr, |
|
|
int |
mnr = -1 | |
|
) |
| | |
| void QsciScintilla::markerDeleteAll |
( |
int |
mnr = -1 |
) |
|
Delete the all markers with the marker number mnr. If mnr is -1 then delete all markers.
- See also:
- markerAdd(),