KateAutoIndent Class Reference
Provides Auto-Indent functionality for katepart. More...
#include <kateautoindent.h>
Public Member Functions | |
KateAutoIndent (KateDocument *doc) | |
virtual | ~KateAutoIndent () |
void | updateConfig () |
virtual void | processNewline (KateDocCursor &cur, bool needContinue) |
virtual void | processChar (QChar) |
virtual void | processLine (KateDocCursor &) |
virtual void | processSection (KateDocCursor &, KateDocCursor &) |
virtual bool | canProcessLine () |
virtual uint | modeNumber () const |
Static Public Member Functions | |
KateAutoIndent * | createIndenter (KateDocument *doc, uint mode) |
QStringList | listModes () |
QString | modeName (uint mode) |
QString | modeDescription (uint mode) |
uint | modeNumber (const QString &name) |
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 | |
KateDocument * | doc |
uint | tabWidth |
uint | indentWidth |
uchar | commentAttrib |
uchar | doxyCommentAttrib |
uchar | regionAttrib |
uchar | symbolAttrib |
uchar | alertAttrib |
uchar | tagAttrib |
uchar | wordAttrib |
bool | useSpaces |
bool | keepProfile |
Detailed Description
Provides Auto-Indent functionality for katepart.
Definition at line 30 of file kateautoindent.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 81 of file kateautoindent.cpp. Referenced by createIndenter(). |
|
Virtual Destructor for the baseclass.
Definition at line 85 of file kateautoindent.cpp. |
Member Function Documentation
|
Create an indenter.
Definition at line 30 of file kateautoindent.cpp. References KateAutoIndent(). |
|
List all possible modes by name.
Definition at line 40 of file kateautoindent.cpp. References modeDescription(). |
|
Return the mode name given the mode.
Definition at line 51 of file kateautoindent.cpp. Referenced by modeNumber(). |
|
Return the mode description.
Definition at line 61 of file kateautoindent.cpp. Referenced by listModes(). |
|
Maps name -> index.
Definition at line 71 of file kateautoindent.cpp. References modeName(). |
|
Update indenter's configuration (indention width, attributes etc.).
Definition at line 89 of file kateautoindent.cpp. References indentWidth, keepProfile, tabWidth, and useSpaces. |
|
Called every time a newline character is inserted in the document.
Definition at line 253 of file kateautoindent.cpp. References KateTextCursor::col(), KateTextCursor::line(), KateTextCursor::setCol(), tabString(), and tabWidth. |
|
Called every time a character is inserted into the document.
Definition at line 100 of file kateautoindent.h. |
|
Aligns/indents the given line to the proper indent position.
Definition at line 105 of file kateautoindent.h. |
|
Processes a section of text, indenting each line in between.
Definition at line 110 of file kateautoindent.h. |
|
Set to true if an actual implementation of 'processLine' is present. This is used to prevent a needless Undo action from being created. Definition at line 116 of file kateautoindent.h. |
|
Mode index of this mode.
Definition at line 122 of file kateautoindent.h. |
|
Determines if the characters open and close are balanced between
Definition at line 143 of file kateautoindent.cpp. References KateDocCursor::currentAttrib(), KateDocCursor::currentChar(), KateTextCursor::line(), measureIndent(), and KateDocCursor::moveForward(). |
|
Skip all whitespace starting at
Spans lines if
Definition at line 188 of file kateautoindent.cpp. References KateDocCursor::currentAttrib(), KateDocCursor::currentChar(), KateTextCursor::line(), KateDocCursor::moveForward(), and KateTextCursor::setCol(). |
|
Measures the indention of the current textline marked by cur // Produces a string with the proper indentation characters for its length.
Definition at line 224 of file kateautoindent.cpp. References KateTextCursor::col(), keepProfile, KateTextCursor::line(), tabWidth, and useSpaces. Referenced by isBalanced(). |
|
Produces a string with the proper indentation characters for its length.
Definition at line 232 of file kateautoindent.cpp. References tabWidth, and useSpaces. Referenced by processNewline(). |
Member Data Documentation
|
The number of characters simulated for a tab.
Definition at line 168 of file kateautoindent.h. Referenced by measureIndent(), processNewline(), tabString(), and updateConfig(). |
|
The number of characters used when tabs are replaced by spaces.
Definition at line 169 of file kateautoindent.h. Referenced by updateConfig(). |
|
Should we use spaces or tabs to indent.
Definition at line 180 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 181 of file kateautoindent.h. Referenced by measureIndent(), and updateConfig(). |
The documentation for this class was generated from the following files: