QCodeEdit
2.2
|
Interface for language definition. More...
Public Types | |
enum | CollapseFlag { None = 0x00000000, Collapsible = 0x10000000, Collapsed = 0x20000000, Closure = 0x40000000, CloseMask = 0x00fff000, OpenMask = 0x00000fff } |
Collapse state of a line. More... | |
Public Member Functions | |
Q_DECLARE_FLAGS (CollapseState, CollapseFlag) | |
QLanguageDefinition () | |
Empty constructor. | |
virtual | ~QLanguageDefinition () |
Empty destructor. | |
virtual QString | language () const =0 |
virtual QStringList | extensions () const =0 |
virtual int | tokenize (QDocument *d, int line, int count) |
Entry point for syntax highlighting. | |
virtual QString | singleLineComment () const |
Return the string starting a single line comment, if any offered by the language. | |
virtual QString | defaultLineMark () const |
Let language specify which line mark should be toggled by left clicking a line mark panel. | |
virtual void | match (QDocumentCursor &c) |
Brace matching entry point. | |
virtual void | clearMatches (QDocument *d) |
Brace matching entry point. | |
virtual QString | indent (const QDocumentCursor &c) |
Return the indent to use when inserting a line at a given cursor position. | |
virtual bool | unindent (const QDocumentCursor &c, const QString &ktxt) |
Determines whether the given key event at the given position should cause unindent to happen. | |
virtual void | expand (QDocument *d, int line) |
Expand a collapsed block at a given line. | |
virtual void | collapse (QDocument *d, int line) |
Collapse a text block at a given line. | |
virtual int | blockFlags (QDocument *d, int line, int depth=0) const |
Compute the collapse state of a line. | |
Interface for language definition.
This class is meant to be subclassed, see
A language definition is a wrapper that creates interfaces for a given file extension from internally handled data (XML files in the case of QGenericDefinition)
Collapse state of a line.
|
pure virtual |
Implemented in QNFADefinition.
|
pure virtual |
Implemented in QNFADefinition.