.TH "KateNormalIndent" kde3 "11 Jun 2005" "Version Version 3.4.1" "kate Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KateNormalIndent \- Provides Auto-Indent functionality for katepart.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kateautoindent.h>\fP
.PP
Inherits \fBKateAutoIndent\fP.
.PP
Inherited by KateCSAndSIndent, KateCSmartIndent, KatePythonIndent, \fBKateVarIndent\fP, and KateXmlIndent.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKateNormalIndent\fP (KateDocument *doc)"
.br
.ti -1c
.RI "virtual \fB~KateNormalIndent\fP ()"
.br
.ti -1c
.RI "virtual void \fBupdateConfig\fP ()"
.br
.ti -1c
.RI "virtual bool \fBcanProcessNewLine\fP () const "
.br
.ti -1c
.RI "virtual void \fBprocessNewline\fP (\fBKateDocCursor\fP &cur, bool needContinue)"
.br
.ti -1c
.RI "virtual void \fBprocessChar\fP (\fBQChar\fP)"
.br
.ti -1c
.RI "virtual void \fBprocessLine\fP (\fBKateDocCursor\fP &)"
.br
.ti -1c
.RI "virtual void \fBprocessSection\fP (\fBKateDocCursor\fP &, \fBKateDocCursor\fP &)"
.br
.ti -1c
.RI "virtual bool \fBcanProcessLine\fP () const "
.br
.ti -1c
.RI "virtual uint \fBmodeNumber\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "bool \fBisBalanced\fP (\fBKateDocCursor\fP &begin, const \fBKateDocCursor\fP &end, \fBQChar\fP open, \fBQChar\fP close, uint &pos) const "
.br
.ti -1c
.RI "bool \fBskipBlanks\fP (\fBKateDocCursor\fP &cur, \fBKateDocCursor\fP &max, bool newline) const "
.br
.ti -1c
.RI "uint \fBmeasureIndent\fP (\fBKateDocCursor\fP &cur) const "
.br
.ti -1c
.RI "\fBQString\fP \fBtabString\fP (uint length) const "
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "uint \fBtabWidth\fP"
.br
.ti -1c
.RI "uint \fBindentWidth\fP"
.br
.ti -1c
.RI "uchar \fBcommentAttrib\fP"
.br
.ti -1c
.RI "uchar \fBdoxyCommentAttrib\fP"
.br
.ti -1c
.RI "uchar \fBregionAttrib\fP"
.br
.ti -1c
.RI "uchar \fBsymbolAttrib\fP"
.br
.ti -1c
.RI "uchar \fBalertAttrib\fP"
.br
.ti -1c
.RI "uchar \fBtagAttrib\fP"
.br
.ti -1c
.RI "uchar \fBwordAttrib\fP"
.br
.ti -1c
.RI "uchar \fBkeywordAttrib\fP"
.br
.ti -1c
.RI "uchar \fBnormalAttrib\fP"
.br
.ti -1c
.RI "uchar \fBextensionAttrib\fP"
.br
.ti -1c
.RI "bool \fBuseSpaces\fP"
.br
.ti -1c
.RI "bool \fBmixedIndent\fP"
.br
.ti -1c
.RI "bool \fBkeepProfile\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Provides Auto-Indent functionality for katepart. 
.PP
Definition at line 161 of file kateautoindent.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KateNormalIndent::KateNormalIndent (KateDocument * doc)"
.PP
Constructor. 
.PP
\fBParameters:\fP
.RS 4
\fIdoc\fP parent document 
.RE
.PP

.PP
Definition at line 156 of file kateautoindent.cpp.
.SS "KateNormalIndent::~\fBKateNormalIndent\fP ()\fC [virtual]\fP"
.PP
Virtual Destructor for the baseclass. 
.PP
Definition at line 160 of file kateautoindent.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KateNormalIndent::updateConfig ()\fC [virtual]\fP"
.PP
Update indenter's configuration (indention width, attributes etc.). 
.PP
Reimplemented from \fBKateAutoIndent\fP.
.PP
Definition at line 164 of file kateautoindent.cpp.
.PP
References QPtrList::at(), QPtrList::count(), QString::find(), indentWidth, keepProfile, mixedIndent, tabWidth, and useSpaces.
.PP
Referenced by KateVarIndent::processLine().
.SS "virtual bool KateNormalIndent::canProcessNewLine () const\fC [inline, virtual]\fP"
.PP
does this indenter support processNewLine 
.PP
\fBReturns:\fP
.RS 4
can you do it? 
.RE
.PP

.PP
Reimplemented from \fBKateAutoIndent\fP.
.PP
Definition at line 184 of file kateautoindent.h.
.SS "void KateNormalIndent::processNewline (\fBKateDocCursor\fP & cur, 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 \fBKateAutoIndent\fP.
.PP
Reimplemented in \fBKateVarIndent\fP.
.PP
Definition at line 344 of file kateautoindent.cpp.
.PP
References QString::length().
.SS "virtual void KateNormalIndent::processChar (\fBQChar\fP)\fC [inline, 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 \fBKateAutoIndent\fP.
.PP
Reimplemented in \fBKateVarIndent\fP.
.PP
Definition at line 198 of file kateautoindent.h.
.SS "virtual void KateNormalIndent::processLine (\fBKateDocCursor\fP &)\fC [inline, virtual]\fP"
.PP
Aligns/indents the given line to the proper indent position. 
.PP
Reimplemented from \fBKateAutoIndent\fP.
.PP
Reimplemented in \fBKateVarIndent\fP.
.PP
Definition at line 203 of file kateautoindent.h.
.SS "virtual void KateNormalIndent::processSection (\fBKateDocCursor\fP &, \fBKateDocCursor\fP &)\fC [inline, virtual]\fP"
.PP
Processes a section of text, indenting each line in between. 
.PP
Reimplemented from \fBKateAutoIndent\fP.
.PP
Reimplemented in \fBKateVarIndent\fP.
.PP
Definition at line 208 of file kateautoindent.h.
.SS "virtual bool KateNormalIndent::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 \fBKateAutoIndent\fP.
.PP
Reimplemented in \fBKateVarIndent\fP.
.PP
Definition at line 214 of file kateautoindent.h.
.SS "virtual uint KateNormalIndent::modeNumber () const\fC [inline, virtual]\fP"
.PP
Mode index of this mode. 
.PP
\fBReturns:\fP
.RS 4
modeNumber 
.RE
.PP

.PP
Reimplemented from \fBKateAutoIndent\fP.
.PP
Reimplemented in \fBKateVarIndent\fP.
.PP
Definition at line 220 of file kateautoindent.h.
.SS "bool KateNormalIndent::isBalanced (\fBKateDocCursor\fP & begin, const \fBKateDocCursor\fP & end, \fBQChar\fP open, \fBQChar\fP close, uint & pos) const\fC [protected]\fP"
.PP
Determines if the characters open and close are balanced between \fCbegin\fP and \fCend\fP Fills in \fCpos\fP with the column position of first opened character if found. 
.PP
\fBParameters:\fP
.RS 4
\fIbegin\fP Beginning cursor position. 
.br
\fIend\fP Ending cursor position where the processing will stop. 
.br
\fIopen\fP The open character. 
.br
\fIclose\fP The closing character which should be matched against \fCopen\fP. 
.br
\fIpos\fP Contains the position of the first \fCopen\fP character in the line. 
.RE
.PP
\fBReturns:\fP
.RS 4
True if \fCopen\fP and \fCclose\fP have an equal number of occurances between \fCbegin\fP and \fCend\fP. False otherwise. 
.RE
.PP

.PP
Definition at line 234 of file kateautoindent.cpp.
.PP
References QChar::isSpace(), and measureIndent().
.SS "bool KateNormalIndent::skipBlanks (\fBKateDocCursor\fP & cur, \fBKateDocCursor\fP & max, bool newline) const\fC [protected]\fP"
.PP
Skip all whitespace starting at \fCcur\fP and ending at \fCmax\fP. 
.PP
Spans lines if \fCnewline\fP is set. \fCcur\fP is set to the current position afterwards.
.PP
\fBParameters:\fP
.RS 4
\fIcur\fP The current cursor position to start from. 
.br
\fImax\fP The furthest cursor position that will be used for processing 
.br
\fInewline\fP Whether we are allowed to span multiple lines when skipping blanks 
.RE
.PP
\fBReturns:\fP
.RS 4
True if \fCcur\fP < \fCmax\fP after processing. False otherwise. 
.RE
.PP

.PP
Definition at line 279 of file kateautoindent.cpp.
.PP
References QChar::isNull(), and QChar::isSpace().
.SS "uint KateNormalIndent::measureIndent (\fBKateDocCursor\fP & cur) const\fC [protected]\fP"
.PP
Measures the indention of the current textline marked by cur. 
.PP
\fBParameters:\fP
.RS 4
\fIcur\fP The cursor position to measure the indent to. 
.RE
.PP
\fBReturns:\fP
.RS 4
The length of the indention in characters. 
.RE
.PP

.PP
Definition at line 315 of file kateautoindent.cpp.
.PP
References mixedIndent, tabWidth, and useSpaces.
.PP
Referenced by isBalanced().
.SS "\fBQString\fP KateNormalIndent::tabString (uint length) const\fC [protected]\fP"
.PP
Produces a string with the proper indentation characters for its length. 
.PP
\fBParameters:\fP
.RS 4
\fIlength\fP The length of the indention in characters. 
.RE
.PP
\fBReturns:\fP
.RS 4
A \fBQString\fP representing \fClength\fP characters (factoring in tabs and spaces) 
.RE
.PP

.PP
Definition at line 323 of file kateautoindent.cpp.
.PP
References mixedIndent, tabWidth, and useSpaces.
.PP
Referenced by KateVarIndent::processLine().
.SH "Member Data Documentation"
.PP 
.SS "uint \fBKateNormalIndent::tabWidth\fP\fC [protected]\fP"
.PP
The number of characters simulated for a tab. 
.PP
Definition at line 263 of file kateautoindent.h.
.PP
Referenced by measureIndent(), tabString(), and updateConfig().
.SS "uint \fBKateNormalIndent::indentWidth\fP\fC [protected]\fP"
.PP
The number of characters used when tabs are replaced by spaces. 
.PP
Definition at line 264 of file kateautoindent.h.
.PP
Referenced by updateConfig().
.SS "bool \fBKateNormalIndent::useSpaces\fP\fC [protected]\fP"
.PP
Should we use spaces or tabs to indent. 
.PP
Definition at line 278 of file kateautoindent.h.
.PP
Referenced by measureIndent(), tabString(), and updateConfig().
.SS "bool \fBKateNormalIndent::mixedIndent\fP\fC [protected]\fP"
.PP
Optimize indent by mixing spaces and tabs, ala emacs. 
.PP
Definition at line 279 of file kateautoindent.h.
.PP
Referenced by measureIndent(), tabString(), and updateConfig().
.SS "bool \fBKateNormalIndent::keepProfile\fP\fC [protected]\fP"
.PP
Always try to honor the leading whitespace of lines already in the file. 
.PP
Definition at line 280 of file kateautoindent.h.
.PP
Referenced by updateConfig().

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