\section{Kate\-Normal\-Indent Class Reference}
\label{classKateNormalIndent}\index{KateNormalIndent@{KateNormalIndent}}
Provides Auto-Indent functionality for katepart.  


{\tt \#include $<$kateautoindent.h$>$}

Inheritance diagram for Kate\-Normal\-Indent:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=66pt]{classKateNormalIndent__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for Kate\-Normal\-Indent:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=66pt]{classKateNormalIndent__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Kate\-Normal\-Indent} (Kate\-Document $\ast$doc)
\item 
virtual {\bf $\sim$Kate\-Normal\-Indent} ()
\item 
virtual void {\bf update\-Config} ()
\item 
virtual bool {\bf can\-Process\-New\-Line} () const 
\item 
virtual void {\bf process\-Newline} ({\bf Kate\-Doc\-Cursor} \&cur, bool need\-Continue)
\item 
virtual void {\bf process\-Char} ({\bf QChar})
\item 
virtual void {\bf process\-Line} ({\bf Kate\-Doc\-Cursor} \&)
\item 
virtual void {\bf process\-Section} ({\bf Kate\-Doc\-Cursor} \&, {\bf Kate\-Doc\-Cursor} \&)
\item 
virtual bool {\bf can\-Process\-Line} () const 
\item 
virtual uint {\bf mode\-Number} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
bool {\bf is\-Balanced} ({\bf Kate\-Doc\-Cursor} \&begin, const {\bf Kate\-Doc\-Cursor} \&end, {\bf QChar} open, {\bf QChar} close, uint \&pos) const 
\item 
bool {\bf skip\-Blanks} ({\bf Kate\-Doc\-Cursor} \&cur, {\bf Kate\-Doc\-Cursor} \&max, bool newline) const 
\item 
uint {\bf measure\-Indent} ({\bf Kate\-Doc\-Cursor} \&cur) const 
\item 
{\bf QString} {\bf tab\-String} (uint length) const 
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
uint {\bf tab\-Width}
\item 
uint {\bf indent\-Width}
\item 
uchar {\bf comment\-Attrib}\label{classKateNormalIndent_p2}

\item 
uchar {\bf doxy\-Comment\-Attrib}\label{classKateNormalIndent_p3}

\item 
uchar {\bf region\-Attrib}\label{classKateNormalIndent_p4}

\item 
uchar {\bf symbol\-Attrib}\label{classKateNormalIndent_p5}

\item 
uchar {\bf alert\-Attrib}\label{classKateNormalIndent_p6}

\item 
uchar {\bf tag\-Attrib}\label{classKateNormalIndent_p7}

\item 
uchar {\bf word\-Attrib}\label{classKateNormalIndent_p8}

\item 
uchar {\bf keyword\-Attrib}\label{classKateNormalIndent_p9}

\item 
uchar {\bf normal\-Attrib}\label{classKateNormalIndent_p10}

\item 
uchar {\bf extension\-Attrib}\label{classKateNormalIndent_p11}

\item 
bool {\bf use\-Spaces}
\item 
bool {\bf mixed\-Indent}
\item 
bool {\bf keep\-Profile}
\end{CompactItemize}


\subsection{Detailed Description}
Provides Auto-Indent functionality for katepart. 



Definition at line 161 of file kateautoindent.h.

\subsection{Constructor \& Destructor Documentation}
\index{KateNormalIndent@{Kate\-Normal\-Indent}!KateNormalIndent@{KateNormalIndent}}
\index{KateNormalIndent@{KateNormalIndent}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Kate\-Normal\-Indent::Kate\-Normal\-Indent (Kate\-Document $\ast$ {\em doc})}\label{classKateNormalIndent_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em doc}]parent document \end{description}
\end{Desc}


Definition at line 156 of file kateautoindent.cpp.\index{KateNormalIndent@{Kate\-Normal\-Indent}!~KateNormalIndent@{$\sim$KateNormalIndent}}
\index{~KateNormalIndent@{$\sim$KateNormalIndent}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Kate\-Normal\-Indent::$\sim${\bf Kate\-Normal\-Indent} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKateNormalIndent_a1}


Virtual Destructor for the baseclass. 



Definition at line 160 of file kateautoindent.cpp.

\subsection{Member Function Documentation}
\index{KateNormalIndent@{Kate\-Normal\-Indent}!updateConfig@{updateConfig}}
\index{updateConfig@{updateConfig}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Normal\-Indent::update\-Config ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKateNormalIndent_a2}


Update indenter's configuration (indention width, attributes etc.). 



Reimplemented from {\bf Kate\-Auto\-Indent} {\rm (p.\,\pageref{classKateAutoIndent_a2})}.

Definition at line 164 of file kateautoindent.cpp.

References QPtr\-List::at(), QPtr\-List::count(), QString::find(), indent\-Width, keep\-Profile, mixed\-Indent, tab\-Width, and use\-Spaces.

Referenced by Kate\-Var\-Indent::process\-Line().\index{KateNormalIndent@{Kate\-Normal\-Indent}!canProcessNewLine@{canProcessNewLine}}
\index{canProcessNewLine@{canProcessNewLine}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool Kate\-Normal\-Indent::can\-Process\-New\-Line () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKateNormalIndent_a3}


does this indenter support process\-New\-Line 

\begin{Desc}
\item[Returns:]can you do it? \end{Desc}


Reimplemented from {\bf Kate\-Auto\-Indent} {\rm (p.\,\pageref{classKateAutoIndent_a3})}.

Definition at line 184 of file kateautoindent.h.\index{KateNormalIndent@{Kate\-Normal\-Indent}!processNewline@{processNewline}}
\index{processNewline@{processNewline}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Normal\-Indent::process\-Newline ({\bf Kate\-Doc\-Cursor} \& {\em cur}, bool {\em need\-Continue})\hspace{0.3cm}{\tt  [virtual]}}\label{classKateNormalIndent_a4}


Called every time a newline character is inserted in the document. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cur}]The position to start processing. Contains the new cursor position after the indention. \item[{\em need\-Continue}]Used to determine whether to calculate a continue indent or not. \end{description}
\end{Desc}


Reimplemented from {\bf Kate\-Auto\-Indent} {\rm (p.\,\pageref{classKateAutoIndent_a4})}.

Reimplemented in {\bf Kate\-Var\-Indent} {\rm (p.\,\pageref{classKateVarIndent_a2})}.

Definition at line 344 of file kateautoindent.cpp.

References QString::length().\index{KateNormalIndent@{Kate\-Normal\-Indent}!processChar@{processChar}}
\index{processChar@{processChar}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void Kate\-Normal\-Indent::process\-Char ({\bf QChar})\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKateNormalIndent_a5}


Called every time a character is inserted into the document. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em c}]character inserted \end{description}
\end{Desc}


Reimplemented from {\bf Kate\-Auto\-Indent} {\rm (p.\,\pageref{classKateAutoIndent_a5})}.

Reimplemented in {\bf Kate\-Var\-Indent} {\rm (p.\,\pageref{classKateVarIndent_a3})}.

Definition at line 198 of file kateautoindent.h.\index{KateNormalIndent@{Kate\-Normal\-Indent}!processLine@{processLine}}
\index{processLine@{processLine}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void Kate\-Normal\-Indent::process\-Line ({\bf Kate\-Doc\-Cursor} \&)\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKateNormalIndent_a6}


Aligns/indents the given line to the proper indent position. 



Reimplemented from {\bf Kate\-Auto\-Indent} {\rm (p.\,\pageref{classKateAutoIndent_a6})}.

Reimplemented in {\bf Kate\-Var\-Indent} {\rm (p.\,\pageref{classKateVarIndent_a4})}.

Definition at line 203 of file kateautoindent.h.\index{KateNormalIndent@{Kate\-Normal\-Indent}!processSection@{processSection}}
\index{processSection@{processSection}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void Kate\-Normal\-Indent::process\-Section ({\bf Kate\-Doc\-Cursor} \&, {\bf Kate\-Doc\-Cursor} \&)\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKateNormalIndent_a7}


Processes a section of text, indenting each line in between. 



Reimplemented from {\bf Kate\-Auto\-Indent} {\rm (p.\,\pageref{classKateAutoIndent_a7})}.

Reimplemented in {\bf Kate\-Var\-Indent} {\rm (p.\,\pageref{classKateVarIndent_a5})}.

Definition at line 208 of file kateautoindent.h.\index{KateNormalIndent@{Kate\-Normal\-Indent}!canProcessLine@{canProcessLine}}
\index{canProcessLine@{canProcessLine}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool Kate\-Normal\-Indent::can\-Process\-Line () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKateNormalIndent_a8}


Set to true if an actual implementation of 'process\-Line' is present. 

This is used to prevent a needless Undo action from being created. 

Reimplemented from {\bf Kate\-Auto\-Indent} {\rm (p.\,\pageref{classKateAutoIndent_a8})}.

Reimplemented in {\bf Kate\-Var\-Indent} {\rm (p.\,\pageref{classKateVarIndent_a6})}.

Definition at line 214 of file kateautoindent.h.\index{KateNormalIndent@{Kate\-Normal\-Indent}!modeNumber@{modeNumber}}
\index{modeNumber@{modeNumber}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual uint Kate\-Normal\-Indent::mode\-Number () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKateNormalIndent_a9}


Mode index of this mode. 

\begin{Desc}
\item[Returns:]mode\-Number \end{Desc}


Reimplemented from {\bf Kate\-Auto\-Indent} {\rm (p.\,\pageref{classKateAutoIndent_a9})}.

Reimplemented in {\bf Kate\-Var\-Indent} {\rm (p.\,\pageref{classKateVarIndent_a7})}.

Definition at line 220 of file kateautoindent.h.\index{KateNormalIndent@{Kate\-Normal\-Indent}!isBalanced@{isBalanced}}
\index{isBalanced@{isBalanced}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Kate\-Normal\-Indent::is\-Balanced ({\bf Kate\-Doc\-Cursor} \& {\em begin}, const {\bf Kate\-Doc\-Cursor} \& {\em end}, {\bf QChar} {\em open}, {\bf QChar} {\em close}, uint \& {\em pos}) const\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_b0}


Determines if the characters open and close are balanced between {\tt begin} and {\tt end} Fills in {\tt pos} with the column position of first opened character if found. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em begin}]Beginning cursor position. \item[{\em end}]Ending cursor position where the processing will stop. \item[{\em open}]The open character. \item[{\em close}]The closing character which should be matched against {\tt open}. \item[{\em pos}]Contains the position of the first {\tt open} character in the line. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if {\tt open} and {\tt close} have an equal number of occurances between {\tt begin} and {\tt end}. False otherwise. \end{Desc}


Definition at line 234 of file kateautoindent.cpp.

References QChar::is\-Space(), and measure\-Indent().\index{KateNormalIndent@{Kate\-Normal\-Indent}!skipBlanks@{skipBlanks}}
\index{skipBlanks@{skipBlanks}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Kate\-Normal\-Indent::skip\-Blanks ({\bf Kate\-Doc\-Cursor} \& {\em cur}, {\bf Kate\-Doc\-Cursor} \& {\em max}, bool {\em newline}) const\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_b1}


Skip all whitespace starting at {\tt cur} and ending at {\tt max}. 

Spans lines if {\tt newline} is set. {\tt cur} is set to the current position afterwards.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cur}]The current cursor position to start from. \item[{\em max}]The furthest cursor position that will be used for processing \item[{\em newline}]Whether we are allowed to span multiple lines when skipping blanks \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if {\tt cur} $<$ {\tt max} after processing. False otherwise. \end{Desc}


Definition at line 279 of file kateautoindent.cpp.

References QChar::is\-Null(), and QChar::is\-Space().\index{KateNormalIndent@{Kate\-Normal\-Indent}!measureIndent@{measureIndent}}
\index{measureIndent@{measureIndent}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint Kate\-Normal\-Indent::measure\-Indent ({\bf Kate\-Doc\-Cursor} \& {\em cur}) const\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_b2}


Measures the indention of the current textline marked by cur. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cur}]The cursor position to measure the indent to. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The length of the indention in characters. \end{Desc}


Definition at line 315 of file kateautoindent.cpp.

References mixed\-Indent, tab\-Width, and use\-Spaces.

Referenced by is\-Balanced().\index{KateNormalIndent@{Kate\-Normal\-Indent}!tabString@{tabString}}
\index{tabString@{tabString}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} Kate\-Normal\-Indent::tab\-String (uint {\em length}) const\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_b3}


Produces a string with the proper indentation characters for its length. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em length}]The length of the indention in characters. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A {\bf QString} representing {\tt length} characters (factoring in tabs and spaces) \end{Desc}


Definition at line 323 of file kateautoindent.cpp.

References mixed\-Indent, tab\-Width, and use\-Spaces.

Referenced by Kate\-Var\-Indent::process\-Line().

\subsection{Member Data Documentation}
\index{KateNormalIndent@{Kate\-Normal\-Indent}!tabWidth@{tabWidth}}
\index{tabWidth@{tabWidth}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint {\bf Kate\-Normal\-Indent::tab\-Width}\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_p0}


The number of characters simulated for a tab. 



Definition at line 263 of file kateautoindent.h.

Referenced by measure\-Indent(), tab\-String(), and update\-Config().\index{KateNormalIndent@{Kate\-Normal\-Indent}!indentWidth@{indentWidth}}
\index{indentWidth@{indentWidth}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint {\bf Kate\-Normal\-Indent::indent\-Width}\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_p1}


The number of characters used when tabs are replaced by spaces. 



Definition at line 264 of file kateautoindent.h.

Referenced by update\-Config().\index{KateNormalIndent@{Kate\-Normal\-Indent}!useSpaces@{useSpaces}}
\index{useSpaces@{useSpaces}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Kate\-Normal\-Indent::use\-Spaces}\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_p12}


Should we use spaces or tabs to indent. 



Definition at line 278 of file kateautoindent.h.

Referenced by measure\-Indent(), tab\-String(), and update\-Config().\index{KateNormalIndent@{Kate\-Normal\-Indent}!mixedIndent@{mixedIndent}}
\index{mixedIndent@{mixedIndent}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Kate\-Normal\-Indent::mixed\-Indent}\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_p13}


Optimize indent by mixing spaces and tabs, ala emacs. 



Definition at line 279 of file kateautoindent.h.

Referenced by measure\-Indent(), tab\-String(), and update\-Config().\index{KateNormalIndent@{Kate\-Normal\-Indent}!keepProfile@{keepProfile}}
\index{keepProfile@{keepProfile}!KateNormalIndent@{Kate\-Normal\-Indent}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Kate\-Normal\-Indent::keep\-Profile}\hspace{0.3cm}{\tt  [protected]}}\label{classKateNormalIndent_p14}


Always try to honor the leading whitespace of lines already in the file. 



Definition at line 280 of file kateautoindent.h.

Referenced by update\-Config().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kateautoindent.h\item 
kateautoindent.cpp\end{CompactItemize}
