KateNormalIndent Class Reference
Provides Auto-Indent functionality for katepart. More...
#include <kateautoindent.h>
Inheritance diagram for KateNormalIndent:


Public Member Functions | |
KateNormalIndent (KateDocument *doc) | |
virtual | ~KateNormalIndent () |
virtual void | updateConfig () |
virtual bool | canProcessNewLine () const |
virtual void | processNewline (KateDocCursor &cur, bool needContinue) |
virtual void | processChar (QChar) |
virtual void | processLine (KateDocCursor &) |
virtual void | processSection (KateDocCursor &, KateDocCursor &) |
virtual bool | canProcessLine () const |
virtual uint | modeNumber () const |
Protected Member Functions | |
bool | isBalanced (KateDocCursor &begin, const KateDocCursor &end, QChar open, QChar close, uint &pos) const |
bool | skipBlanks (KateDocCursor &cur, KateDocCursor &max, bool newline) const |
uint | measureIndent (KateDocCursor &cur) const |
QString | tabString (uint length) const |
Protected Attributes | |
uint | tabWidth |
uint | indentWidth |
uchar | commentAttrib |
uchar | doxyCommentAttrib |
uchar | regionAttrib |
uchar | symbolAttrib |
uchar | alertAttrib |
uchar | tagAttrib |
uchar | wordAttrib |
uchar | keywordAttrib |
uchar | normalAttrib |
uchar | extensionAttrib |
bool | useSpaces |
bool | mixedIndent |
bool | keepProfile |
Detailed Description
Provides Auto-Indent functionality for katepart.
Definition at line 161 of file kateautoindent.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 156 of file kateautoindent.cpp. References KateNormalIndent(). Referenced by KateNormalIndent(). |
|
Virtual Destructor for the baseclass.
Definition at line 160 of file kateautoindent.cpp. |
Member Function Documentation
|
Update indenter's configuration (indention width, attributes etc.).
Reimplemented from KateAutoIndent. Definition at line 164 of file kateautoindent.cpp. References QPtrList::at(), QPtrList::count(), QString::find(), indentWidth, keepProfile, mixedIndent, tabWidth, and useSpaces. Referenced by KateVarIndent::processLine(). |
|
does this indenter support processNewLine
Reimplemented from KateAutoIndent. Definition at line 184 of file kateautoindent.h. |
|
Called every time a newline character is inserted in the document.
Reimplemented from KateAutoIndent. Reimplemented in KateVarIndent. Definition at line 344 of file kateautoindent.cpp. References KateTextCursor::col(), QString::length(), KateTextCursor::line(), processNewline(), and KateTextCursor::setCol(). Referenced by processNewline(). |
|
Called every time a character is inserted into the document.
Reimplemented from KateAutoIndent. Reimplemented in KateVarIndent. Definition at line 198 of file kateautoindent.h. References processChar(). Referenced by processChar(). |
|
Aligns/indents the given line to the proper indent position.
Reimplemented from KateAutoIndent. Reimplemented in KateVarIndent. Definition at line 203 of file kateautoindent.h. References processLine(). Referenced by processLine(). |
|
Processes a section of text, indenting each line in between.
Reimplemented from KateAutoIndent. Reimplemented in KateVarIndent. Definition at line 208 of file kateautoindent.h. References processSection(). Referenced by processSection(). |
|
Set to true if an actual implementation of 'processLine' is present. This is used to prevent a needless Undo action from being created. Reimplemented from KateAutoIndent. Reimplemented in KateVarIndent. Definition at line 214 of file kateautoindent.h. |
|
Mode index of this mode.
Reimplemented from KateAutoIndent. Reimplemented in KateVarIndent. Definition at line 220 of file kateautoindent.h. |
|
Determines if the characters open and close are balanced between
Definition at line 234 of file kateautoindent.cpp. References KateDocCursor::currentAttrib(), KateDocCursor::currentChar(), isBalanced(), QChar::isSpace(), KateTextCursor::line(), measureIndent(), and KateDocCursor::moveForward(). Referenced by isBalanced(). |
|
Skip all whitespace starting at
Spans lines if
Definition at line 279 of file kateautoindent.cpp. References KateDocCursor::currentAttrib(), KateDocCursor::currentChar(), QChar::isNull(), QChar::isSpace(), KateTextCursor::line(), KateDocCursor::moveForward(), KateTextCursor::setCol(), and skipBlanks(). Referenced by skipBlanks(). |
|
Measures the indention of the current textline marked by cur.
Definition at line 315 of file kateautoindent.cpp. References KateTextCursor::col(), KateTextCursor::line(), measureIndent(), mixedIndent, tabWidth, and useSpaces. Referenced by isBalanced(), and measureIndent(). |
|
Produces a string with the proper indentation characters for its length.
Definition at line 323 of file kateautoindent.cpp. References mixedIndent, tabString(), tabWidth, and useSpaces. Referenced by tabString(). |
Member Data Documentation
|
The number of characters simulated for a tab.
Definition at line 263 of file kateautoindent.h. Referenced by measureIndent(), tabString(), and updateConfig(). |
|
The number of characters used when tabs are replaced by spaces.
Definition at line 264 of file kateautoindent.h. Referenced by updateConfig(). |
|
Should we use spaces or tabs to indent.
Definition at line 278 of file kateautoindent.h. Referenced by measureIndent(), tabString(), and updateConfig(). |
|
Optimize indent by mixing spaces and tabs, ala emacs.
Definition at line 279 of file kateautoindent.h. Referenced by measureIndent(), tabString(), and updateConfig(). |
|
Always try to honor the leading whitespace of lines already in the file.
Definition at line 280 of file kateautoindent.h. Referenced by updateConfig(). |
The documentation for this class was generated from the following files: