#include <kateautoindent.h>
Public Slots | |
virtual void | updateConfig () |
Public Member Functions | |
KateAutoIndent (KateDocument *doc) | |
virtual | ~KateAutoIndent () |
virtual bool | canProcessNewLine () const |
virtual void | processNewline (KateDocCursor &cur, bool needContinue) |
virtual void | processChar (TQChar c) |
virtual void | processLine (KateDocCursor &) |
virtual void | processSection (const KateDocCursor &, const KateDocCursor &) |
virtual bool | canProcessLine () const |
virtual uint | modeNumber () const |
Static Public Member Functions | |
static KateAutoIndent * | createIndenter (KateDocument *doc, uint mode) |
static TQStringList | listModes () |
static TQString | modeName (uint mode) |
static TQString | modeDescription (uint mode) |
static uint | modeNumber (const TQString &name) |
static bool | hasConfigPage (uint mode) |
static IndenterConfigPage * | configPage (TQWidget *parent, uint mode) |
Protected Attributes | |
KateDocument * | doc |
Detailed Description
Provides Auto-Indent functionality for katepart.
This baseclass is a real dummy, does nothing beside remembering the document it belongs too, only to have the object around
Definition at line 70 of file kateautoindent.h.
Constructor & Destructor Documentation
◆ KateAutoIndent()
KateAutoIndent::KateAutoIndent | ( | KateDocument * | doc | ) |
◆ ~KateAutoIndent()
|
virtual |
Virtual Destructor for the baseclass.
Definition at line 154 of file kateautoindent.cpp.
Member Function Documentation
◆ canProcessLine()
|
inlinevirtual |
Set to true if an actual implementation of 'processLine' is present.
This is used to prevent a needless Undo action from being created.
Reimplemented in KateVarIndent, and KateNormalIndent.
Definition at line 179 of file kateautoindent.h.
◆ canProcessNewLine()
|
inlinevirtual |
does this indenter support processNewLine
- Returns
- can you do it?
Reimplemented in KateNormalIndent.
Definition at line 149 of file kateautoindent.h.
◆ configPage()
|
static |
Support for a config page.
- Returns
- config page or 0 if not available.
Definition at line 142 of file kateautoindent.cpp.
◆ createIndenter()
|
static |
Static methods to create and list indention modes.
Create an indenter
- Parameters
-
doc document for the indenter mode indention mode wanted
- Returns
- created autoindention object
Definition at line 38 of file kateautoindent.cpp.
◆ hasConfigPage()
|
static |
Config page support.
- Parameters
-
mode mode index
- Returns
- true, if the indenter
mode
has a configuration page
Definition at line 134 of file kateautoindent.cpp.
◆ listModes()
|
static |
List all possible modes by name.
- Returns
- list of modes
Definition at line 58 of file kateautoindent.cpp.
◆ modeDescription()
|
static |
Return the mode description.
- Parameters
-
mode mode index
- Returns
- mode index
Definition at line 94 of file kateautoindent.cpp.
◆ modeName()
|
static |
Return the mode name given the mode.
- Parameters
-
mode mode index
- Returns
- name for this mode index
Definition at line 74 of file kateautoindent.cpp.
◆ modeNumber() [1/2]
|
inlinevirtual |
Mode index of this mode.
- Returns
- modeNumber
Reimplemented in KateVarIndent, and KateNormalIndent.
Definition at line 185 of file kateautoindent.h.
◆ modeNumber() [2/2]
|
static |
Maps name -> index.
- Parameters
-
name mode name
- Returns
- mode index
Definition at line 114 of file kateautoindent.cpp.
◆ processChar()
|
inlinevirtual |
Called every time a character is inserted into the document.
- Parameters
-
c character inserted
Reimplemented in KateVarIndent, and KateNormalIndent.
Definition at line 163 of file kateautoindent.h.
◆ processLine()
|
inlinevirtual |
Aligns/indents the given line to the proper indent position.
Reimplemented in KateVarIndent, and KateNormalIndent.
Definition at line 168 of file kateautoindent.h.
◆ processNewline()
|
inlinevirtual |
Called every time a newline character is inserted in the document.
- Parameters
-
cur The position to start processing. Contains the new cursor position after the indention. needContinue Used to determine whether to calculate a continue indent or not.
Reimplemented in KateVarIndent, and KateNormalIndent.
Definition at line 157 of file kateautoindent.h.
◆ processSection()
|
inlinevirtual |
Processes a section of text, indenting each line in between.
Reimplemented in KateVarIndent, and KateNormalIndent.
Definition at line 173 of file kateautoindent.h.
◆ updateConfig
|
inlinevirtualslot |
Update indenter's configuration (indention width, attributes etc.)
Definition at line 142 of file kateautoindent.h.
The documentation for this class was generated from the following files: