.TH "KateVarIndent" kde3 "11 Jun 2005" "Version Version 3.4.1" "kate Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KateVarIndent \- This indenter uses document variables to determine when to add/remove indents.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kateautoindent.h>\fP
.PP
Inherits \fBQObject\fP, and \fBKateNormalIndent\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBpairs\fP { \fBParens\fP = 1, \fBBraces\fP = 2, \fBBrackets\fP = 4, \fBAngleBrackets\fP = 8 }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKateVarIndent\fP (KateDocument *doc)"
.br
.ti -1c
.RI "virtual void \fBprocessNewline\fP (\fBKateDocCursor\fP &begin, bool needContinue)"
.br
.ti -1c
.RI "virtual void \fBprocessChar\fP (\fBQChar\fP c)"
.br
.ti -1c
.RI "virtual void \fBprocessLine\fP (\fBKateDocCursor\fP &line)"
.br
.ti -1c
.RI "virtual void \fBprocessSection\fP (\fBKateDocCursor\fP &begin, \fBKateDocCursor\fP &end)"
.br
.ti -1c
.RI "virtual bool \fBcanProcessLine\fP () const "
.br
.ti -1c
.RI "virtual uint \fBmodeNumber\fP () const "
.br
.in -1c
.SH "Detailed Description"
.PP 
This indenter uses document variables to determine when to add/remove indents. 

It attempts to get the following variables from the document:
.IP "\(bu" 2
var-indent-indent-after: A rerular expression which will cause a line to be indented by one unit, if the first non-whitespace-only line above matches.
.IP "\(bu" 2
var-indent-indent: A regular expression, which will cause a matching line to be indented by one unit.
.IP "\(bu" 2
var-indent-unindent: A regular expression which will cause the line to be unindented by one unit if matching.
.IP "\(bu" 2
var-indent-triggerchars: a list of characters that should cause the indentiou to be recalculated immediately when typed.
.IP "\(bu" 2
var-indent-handle-couples: a list of paren sets to handle. Any combination of 'parens' 'braces' and 'brackets'. Each set type is handled the following way: If there are unmatched opening instances on the above line, one indent unit is added, if there are unmatched closing instances on the current line, one indent unit is removed.
.IP "\(bu" 2
var-indent-couple-attribute: When looking for unmatched couple openings/closings, only characters with this attribute is considered. The value must be the attribute name from the syntax xml file, for example 'Symbol'. If it's not specified, attribute 0 is used (usually 'Normal Text').
.PP
.PP
The idea is to provide a somewhat intelligent indentation for perl, php, bash, scheme and in general formats with humble indentation needs. 
.PP
Definition at line 418 of file kateautoindent.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKateVarIndent::pairs\fP"
.PP
Purely for readability, couples we know and love. 
.PP
Definition at line 425 of file kateautoindent.h.
.SH "Member Function Documentation"
.PP 
.SS "void KateVarIndent::processNewline (\fBKateDocCursor\fP & begin, bool needContinue)\fC [virtual]\fP"
.PP
Called every time a newline character is inserted in the document. 
.PP
\fBParameters:\fP
.RS 4
\fIcur\fP The position to start processing. Contains the new cursor position after the indention. 
.br
\fIneedContinue\fP Used to determine whether to calculate a continue indent or not. 
.RE
.PP

.PP
Reimplemented from \fBKateNormalIndent\fP.
.PP
Definition at line 1970 of file kateautoindent.cpp.
.PP
References processLine().
.SS "void KateVarIndent::processChar (\fBQChar\fP c)\fC [virtual]\fP"
.PP
Called every time a character is inserted into the document. 
.PP
\fBParameters:\fP
.RS 4
\fIc\fP character inserted 
.RE
.PP

.PP
Reimplemented from \fBKateNormalIndent\fP.
.PP
Definition at line 1978 of file kateautoindent.cpp.
.PP
References endl(), kdDebug(), and processLine().
.SS "void KateVarIndent::processLine (\fBKateDocCursor\fP & line)\fC [virtual]\fP"
.PP
Aligns/indents the given line to the proper indent position. 
.PP
Reimplemented from \fBKateNormalIndent\fP.
.PP
Definition at line 1994 of file kateautoindent.cpp.
.PP
References endl(), kdDebug(), KateNormalIndent::tabString(), and KateNormalIndent::updateConfig().
.PP
Referenced by processChar(), processNewline(), and processSection().
.SS "void KateVarIndent::processSection (\fBKateDocCursor\fP & begin, \fBKateDocCursor\fP & end)\fC [virtual]\fP"
.PP
Processes a section of text, indenting each line in between. 
.PP
Reimplemented from \fBKateNormalIndent\fP.
.PP
Definition at line 2133 of file kateautoindent.cpp.
.PP
References KateDocCursor::gotoNextLine(), KateTextCursor::line(), and processLine().
.SS "virtual bool KateVarIndent::canProcessLine () const\fC [inline, virtual]\fP"
.PP
Set to true if an actual implementation of 'processLine' is present. 
.PP
This is used to prevent a needless Undo action from being created. 
.PP
Reimplemented from \fBKateNormalIndent\fP.
.PP
Definition at line 441 of file kateautoindent.h.
.SS "virtual uint KateVarIndent::modeNumber () const\fC [inline, virtual]\fP"
.PP
Mode index of this mode. 
.PP
\fBReturns:\fP
.RS 4
modeNumber 
.RE
.PP

.PP
Reimplemented from \fBKateNormalIndent\fP.
.PP
Definition at line 443 of file kateautoindent.h.

.SH "Author"
.PP 
Generated automatically by Doxygen for kate Library from the source code.
