KTextEditor
#include <highlightinterface.h>
Classes | |
struct | AttributeBlock |
Public Types | |
enum | DefaultStyle { dsNormal, dsKeyword, dsDataType, dsDecVal, dsBaseN, dsFloat, dsChar, dsString, dsComment, dsOthers, dsAlert, dsFunction, dsRegionMarker, dsError } |
Public Member Functions | |
HighlightInterface () | |
virtual | ~HighlightInterface () |
virtual Attribute::Ptr | defaultStyle (const DefaultStyle ds) const =0 |
virtual QStringList | embeddedHighlightingModes () const =0 |
virtual QString | highlightingModeAt (const Cursor &position)=0 |
virtual QList< AttributeBlock > | lineAttributes (const unsigned int line)=0 |
Detailed Description
Highlighting information interface for the Document.
Introduction
The HighlightInterface provides methods to access the Attributes used for highlighting the Document.
Accessing the HighlightInterface
The HighlightInterface is supposed to be an extension interface for a Document, i.e. the Document inherits the interface provided that the used KTextEditor library implements the interface. Use qobject_cast to access the interface:
- See also
- KTextEditor::Document
- Since
- 4.4
Definition at line 64 of file highlightinterface.h.
Member Enumeration Documentation
TODO: Documentation.
Enumerator | |
---|---|
dsNormal | |
dsKeyword | |
dsDataType | |
dsDecVal | |
dsBaseN | |
dsFloat | |
dsChar | |
dsString | |
dsComment | |
dsOthers | |
dsAlert | |
dsFunction | |
dsRegionMarker | |
dsError |
Definition at line 68 of file highlightinterface.h.
Constructor & Destructor Documentation
HighlightInterface::HighlightInterface | ( | ) |
Constructor.
Definition at line 24 of file highlightinterface.cpp.
|
virtual |
Virtual destructor.
Definition at line 28 of file highlightinterface.cpp.
Member Function Documentation
|
pure virtual |
Returns the attribute used for the style ds
.
|
pure virtual |
Get all available highlighting modes for the current document.
Each document can be highlighted using an arbitrary number of highlighting contexts. This method will return the names for each of the used modes.
Example: The "PHP (HTML)" mode includes the highlighting for PHP, HTML, CSS and JavaScript.
- Returns
- Returns a list of embedded highlighting modes for the current Document.
|
pure virtual |
Get the highlight mode used at a given position in the document.
Retrieve the name of the applied highlight mode at a given position
in the current document.
- See also
- highlightingModes()
TODO: I intended to make this const but Kate's implementation needs to call kateTextline which is non-const. Solution?
|
pure virtual |
Get the list of AttributeBlocks for a given line
in the document.
- Returns
- list of AttributeBlocks for given
line
.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.