| # kate Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KateAutoIndent Class Reference

Provides Auto-Indent functionality for katepart. More...

`#include <kateautoindent.h>`

Inheritance diagram for KateAutoIndent:

[legend]
List of all members.

## Public Member Functions
| KateAutoIndent (KateDocument *doc)
virtual | ~KateAutoIndent ()
virtual void | updateConfig ()
virtual bool | canProcessNewLine () const
virtual void | processNewline (KateDocCursor &, bool)
virtual void | processChar (QChar)
virtual void | processLine (KateDocCursor &)
virtual void | processSection (KateDocCursor &, KateDocCursor &)
virtual bool | canProcessLine () const
virtual uint | modeNumber () const
## Static Public Member Functions
static KateAutoIndent * | createIndenter (KateDocument *doc, uint mode)
static QStringList | listModes ()
static QString | modeName (uint mode)
static QString | modeDescription (uint mode)
static uint | modeNumber (const QString &name)
## 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 35 of file kateautoindent.h.

## Constructor & Destructor Documentation

KateAutoIndent::KateAutoIndent | ( | KateDocument * | doc | ) |

  | Constructor. Parameters:
  | doc | parent document
Definition at line 120 of file kateautoindent.cpp. Referenced by createIndenter().

KateAutoIndent::~KateAutoIndent | ( |  | ) | `[virtual]`

| Virtual Destructor for the baseclass. Definition at line 124 of file kateautoindent.cpp.

## Member Function Documentation

KateAutoIndent * KateAutoIndent::createIndenter | ( | KateDocument * | doc,
|  | uint | mode
| ) | `[static]`

  | Create an indenter. Parameters:
  | doc | document for the indenter
  | mode | indention mode wanted
Returns: created autoindention object Definition at line 33 of file kateautoindent.cpp. References KateAutoIndent().

QStringList KateAutoIndent::listModes | ( |  | ) | `[static]`

| List all possible modes by name. Returns: list of modes Definition at line 51 of file kateautoindent.cpp. References modeDescription().

QString KateAutoIndent::modeName | ( | uint | mode | ) | `[static]`

  | Return the mode name given the mode. Parameters:
  | mode | mode index
Returns: name for this mode index Definition at line 66 of file kateautoindent.cpp. Referenced by modeNumber().

QString KateAutoIndent::modeDescription | ( | uint | mode | ) | `[static]`

  | Return the mode description. Parameters:
  | mode | mode index
Returns: mode index Definition at line 84 of file kateautoindent.cpp. Referenced by listModes().

uint KateAutoIndent::modeNumber | ( | const QString & | name | ) | `[static]`

  | Maps name -> index. Parameters:
  | name | mode name
Returns: mode index Definition at line 102 of file kateautoindent.cpp. References modeName().

virtual void KateAutoIndent::updateConfig | ( |  | ) | `[inline, virtual]`

| Update indenter's configuration (indention width, attributes etc.). Reimplemented in KateNormalIndent. Definition at line 91 of file kateautoindent.h.

virtual bool KateAutoIndent::canProcessNewLine | ( |  | ) | const`[inline, virtual]`

| does this indenter support processNewLine Returns: can you do it? Reimplemented in KateNormalIndent. Definition at line 97 of file kateautoindent.h.

virtual void KateAutoIndent::processNewline | ( | KateDocCursor & | ,
|  | bool |
| ) | `[inline, virtual]`

  | 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 KateNormalIndent, and KateVarIndent. Definition at line 105 of file kateautoindent.h.

virtual void KateAutoIndent::processChar | ( | QChar |  | ) | `[inline, virtual]`

  | Called every time a character is inserted into the document. Parameters:
  | c | character inserted
Reimplemented in KateNormalIndent, and KateVarIndent. Definition at line 111 of file kateautoindent.h.

virtual void KateAutoIndent::processLine | ( | KateDocCursor & |  | ) | `[inline, virtual]`

| Aligns/indents the given line to the proper indent position. Reimplemented in KateNormalIndent, and KateVarIndent. Definition at line 116 of file kateautoindent.h.

virtual void KateAutoIndent::processSection | ( | KateDocCursor & | ,
|  | KateDocCursor & |
| ) | `[inline, virtual]`

| Processes a section of text, indenting each line in between. Reimplemented in KateNormalIndent, and KateVarIndent. Definition at line 121 of file kateautoindent.h.

virtual bool KateAutoIndent::canProcessLine | ( |  | ) | const`[inline, virtual]`

| 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 KateNormalIndent, and KateVarIndent. Definition at line 127 of file kateautoindent.h.

virtual uint KateAutoIndent::modeNumber | ( |  | ) | const`[inline, virtual]`

| Mode index of this mode. Returns: modeNumber Reimplemented in KateNormalIndent, and KateVarIndent. Definition at line 133 of file kateautoindent.h.

The documentation for this class was generated from the following files:

- kateautoindent.h
- kateautoindent.cpp

This file is part of the documentation for kate Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:36:43 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003