\section{Kate\-Buffer Class Reference}
\label{classKateBuffer}\index{KateBuffer@{KateBuffer}}
The Kate\-Buffer class maintains a collections of lines.  


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

Inheritance diagram for Kate\-Buffer:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{classKateBuffer__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for Kate\-Buffer:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=201pt]{classKateBuffer__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf code\-Folding\-Column\-Update} (unsigned int line\-Nr)\label{classKateBuffer_i0}

\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf code\-Folding\-Updated} ()
\item 
void {\bf tag\-Lines} (int start, int end)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Kate\-Buffer} (Kate\-Document $\ast$doc)
\item 
{\bf $\sim$Kate\-Buffer} ()
\item 
void {\bf edit\-Start} ()
\item 
void {\bf edit\-End} ()
\item 
void {\bf clear} ()
\item 
bool {\bf open\-File} (const {\bf QString} \&m\_\-file)
\item 
bool {\bf loading\-Borked} () const 
\item 
bool {\bf binary} () const 
\item 
bool {\bf can\-Encode} ()
\item 
bool {\bf save\-File} (const {\bf QString} \&m\_\-file)
\item 
{\bf Kate\-Text\-Line::Ptr} {\bf line} (uint i)
\item 
{\bf Kate\-Text\-Line::Ptr} {\bf plain\-Line} (uint i)
\item 
uint {\bf count} () const 
\item 
void {\bf change\-Line} (uint i)
\item 
void {\bf insert\-Line} (uint i, {\bf Kate\-Text\-Line::Ptr} line)
\item 
void {\bf remove\-Line} (uint i)
\item 
uint {\bf count\-Visible} ()\label{classKateBuffer_a16}

\item 
uint {\bf line\-Number} (uint visible\-Line)\label{classKateBuffer_a17}

\item 
uint {\bf line\-Visible\-Number} (uint line)\label{classKateBuffer_a18}

\item 
void {\bf line\-Info} (Kate\-Line\-Info $\ast$info, unsigned int line)\label{classKateBuffer_a19}

\item 
uint {\bf tab\-Width} () const \label{classKateBuffer_a20}

\item 
void {\bf set\-Tab\-Width} (uint w)\label{classKateBuffer_a21}

\item 
void {\bf set\-Highlight} (uint hl\-Mode)
\item 
Kate\-Highlighting $\ast$ {\bf highlight} ()\label{classKateBuffer_a23}

\item 
void {\bf invalidate\-Highlighting} ()
\item 
Kate\-Code\-Folding\-Tree $\ast$ {\bf folding\-Tree} ()\label{classKateBuffer_a25}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static uint {\bf max\-Loaded\-Blocks} ()
\item 
static void {\bf set\-Max\-Loaded\-Blocks} (uint count)
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Kate\-Buf\-Block}\label{classKateBuffer_n0}

\end{CompactItemize}


\subsection{Detailed Description}
The Kate\-Buffer class maintains a collections of lines. 

It allows to maintain state information in a lazy way. It handles swapping out of data using secondary storage.

It is designed to handle large amounts of text-data efficiently with respect to CPU and memory usage.

\begin{Desc}
\item[Author:]Waldo Bastian $<${\tt bastian@kde.org}$>$ 

Christoph Cullmann $<${\tt cullmann@kde.org}$>$ \end{Desc}




Definition at line 341 of file katebuffer.h.

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


Create an empty buffer. 

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


Definition at line 317 of file katebuffer.cpp.

References clear().\index{KateBuffer@{Kate\-Buffer}!~KateBuffer@{$\sim$KateBuffer}}
\index{~KateBuffer@{$\sim$KateBuffer}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Kate\-Buffer::$\sim${\bf Kate\-Buffer} ()}\label{classKateBuffer_a1}


Goodbye buffer. 



Definition at line 344 of file katebuffer.cpp.

References QValue\-Vector::size().

\subsection{Member Function Documentation}
\index{KateBuffer@{Kate\-Buffer}!maxLoadedBlocks@{maxLoadedBlocks}}
\index{maxLoadedBlocks@{maxLoadedBlocks}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static uint Kate\-Buffer::max\-Loaded\-Blocks ()\hspace{0.3cm}{\tt  [inline, static]}}\label{classKateBuffer_e0}


maximal loaded block count 

\begin{Desc}
\item[Returns:]max loaded blocks \end{Desc}


Definition at line 352 of file katebuffer.h.

Referenced by Kate\-Buf\-Block::Kate\-Buf\-Block().\index{KateBuffer@{Kate\-Buffer}!setMaxLoadedBlocks@{setMaxLoadedBlocks}}
\index{setMaxLoadedBlocks@{setMaxLoadedBlocks}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::set\-Max\-Loaded\-Blocks (uint {\em count})\hspace{0.3cm}{\tt  [static]}}\label{classKateBuffer_e1}


modifier for max loaded blocks limit 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em count}]new limit \end{description}
\end{Desc}


Definition at line 79 of file katebuffer.cpp.

References KMAX.\index{KateBuffer@{Kate\-Buffer}!editStart@{editStart}}
\index{editStart@{editStart}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::edit\-Start ()}\label{classKateBuffer_a2}


start some editing action 



Definition at line 355 of file katebuffer.cpp.\index{KateBuffer@{Kate\-Buffer}!editEnd@{editEnd}}
\index{editEnd@{editEnd}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::edit\-End ()}\label{classKateBuffer_a3}


finish some editing action 



Definition at line 368 of file katebuffer.cpp.

References Kate\-Buf\-Block::end\-Line(), and Kate\-Buf\-Block::start\-Line().\index{KateBuffer@{Kate\-Buffer}!clear@{clear}}
\index{clear@{clear}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::clear ()}\label{classKateBuffer_a4}


Clear the buffer. 



Definition at line 450 of file katebuffer.cpp.

References QValue\-Vector::append(), QValue\-Vector::clear(), Kate\-Buf\-Block::lines(), and QValue\-Vector::size().

Referenced by Kate\-Buffer(), and open\-File().\index{KateBuffer@{Kate\-Buffer}!openFile@{openFile}}
\index{openFile@{openFile}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Kate\-Buffer::open\-File (const {\bf QString} \& {\em m\_\-file})}\label{classKateBuffer_a5}


Open a file, use the given filename. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em m\_\-file}]filename to open \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]success \end{Desc}


Definition at line 477 of file katebuffer.cpp.

References QValue\-Vector::append(), QValue\-Vector::clear(), clear(), endl(), Kate\-Buf\-Block::end\-Line(), QValue\-Vector::is\-Empty(), kd\-Debug(), Kate\-Buf\-Block::lines(), and QValue\-Vector::size().\index{KateBuffer@{Kate\-Buffer}!loadingBorked@{loadingBorked}}
\index{loadingBorked@{loadingBorked}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Kate\-Buffer::loading\-Borked () const\hspace{0.3cm}{\tt  [inline]}}\label{classKateBuffer_a6}


was the last loading broken because of not enough tmp disk space ? (will be reseted on successful save of the file, user gets warning if he really wants to do it) 

\begin{Desc}
\item[Returns:]was loading borked? \end{Desc}


Definition at line 447 of file katebuffer.h.\index{KateBuffer@{Kate\-Buffer}!binary@{binary}}
\index{binary@{binary}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Kate\-Buffer::binary () const\hspace{0.3cm}{\tt  [inline]}}\label{classKateBuffer_a7}


is this file a binary? 

\begin{Desc}
\item[Returns:]binary file? \end{Desc}


Definition at line 453 of file katebuffer.h.\index{KateBuffer@{Kate\-Buffer}!canEncode@{canEncode}}
\index{canEncode@{canEncode}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Kate\-Buffer::can\-Encode ()}\label{classKateBuffer_a8}


Can the current codec handle all chars. 

\begin{Desc}
\item[Returns:]chars can be encoded \end{Desc}


Definition at line 559 of file katebuffer.cpp.

References QText\-Codec::can\-Encode(), endl(), kd\-Debug(), QText\-Codec::name(), and plain\-Line().\index{KateBuffer@{Kate\-Buffer}!saveFile@{saveFile}}
\index{saveFile@{saveFile}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Kate\-Buffer::save\-File (const {\bf QString} \& {\em m\_\-file})}\label{classKateBuffer_a9}


Save the buffer to a file, use the given filename + codec + end of line chars (internal use of qtextstream). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em m\_\-file}]filename to save to \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]success \end{Desc}


Definition at line 583 of file katebuffer.cpp.

References QFile::close(), QString::fill(), QFile::open(), plain\-Line(), QText\-Stream::set\-Codec(), and QText\-Stream::set\-Encoding().\index{KateBuffer@{Kate\-Buffer}!line@{line}}
\index{line@{line}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Kate\-Text\-Line::Ptr} Kate\-Buffer::line (uint {\em i})\hspace{0.3cm}{\tt  [inline]}}\label{classKateBuffer_a10}


Return line {\tt i}. 



Definition at line 472 of file katebuffer.h.

References Kate\-Buf\-Block::line(), and Kate\-Buf\-Block::start\-Line().\index{KateBuffer@{Kate\-Buffer}!plainLine@{plainLine}}
\index{plainLine@{plainLine}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Kate\-Text\-Line::Ptr} Kate\-Buffer::plain\-Line (uint {\em i})\hspace{0.3cm}{\tt  [inline]}}\label{classKateBuffer_a11}


Return line {\tt i} without triggering highlighting. 



Definition at line 494 of file katebuffer.h.

References Kate\-Buf\-Block::line(), and Kate\-Buf\-Block::start\-Line().

Referenced by can\-Encode(), and save\-File().\index{KateBuffer@{Kate\-Buffer}!count@{count}}
\index{count@{count}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint Kate\-Buffer::count () const\hspace{0.3cm}{\tt  [inline]}}\label{classKateBuffer_a12}


Return the total number of lines in the buffer. 



Definition at line 506 of file katebuffer.h.\index{KateBuffer@{Kate\-Buffer}!changeLine@{changeLine}}
\index{changeLine@{changeLine}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::change\-Line (uint {\em i})}\label{classKateBuffer_a13}


Mark line {\tt i} as changed ! 



Definition at line 749 of file katebuffer.cpp.

References Kate\-Buf\-Block::mark\-Dirty().\index{KateBuffer@{Kate\-Buffer}!insertLine@{insertLine}}
\index{insertLine@{insertLine}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::insert\-Line (uint {\em i}, {\bf Kate\-Text\-Line::Ptr} {\em line})}\label{classKateBuffer_a14}


Insert {\tt line} in front of line {\tt i}. 



Definition at line 759 of file katebuffer.cpp.

References Kate\-Buf\-Block::insert\-Line(), and Kate\-Buf\-Block::start\-Line().\index{KateBuffer@{Kate\-Buffer}!removeLine@{removeLine}}
\index{removeLine@{removeLine}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::remove\-Line (uint {\em i})}\label{classKateBuffer_a15}


Remove line {\tt i}. 



Definition at line 794 of file katebuffer.cpp.

References QValue\-Vector::begin(), Kate\-Buf\-Block::end\-Line(), QValue\-Vector::erase(), Kate\-Buf\-Block::lines(), Kate\-Buf\-Block::next(), Kate\-Buf\-Block::prev(), Kate\-Buf\-Block::remove\-Line(), Kate\-Buf\-Block::set\-Start\-Line(), and Kate\-Buf\-Block::start\-Line().\index{KateBuffer@{Kate\-Buffer}!setHighlight@{setHighlight}}
\index{setHighlight@{setHighlight}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::set\-Highlight (uint {\em hl\-Mode})}\label{classKateBuffer_a22}


Use {\tt highlight} for highlighting. 

{\tt highlight} may be 0 in which case highlighting will be disabled. 

Definition at line 860 of file katebuffer.cpp.

References invalidate\-Highlighting().\index{KateBuffer@{Kate\-Buffer}!invalidateHighlighting@{invalidateHighlighting}}
\index{invalidateHighlighting@{invalidateHighlighting}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::invalidate\-Highlighting ()}\label{classKateBuffer_a24}


Invalidate highlighting of whole buffer. 



Definition at line 892 of file katebuffer.cpp.

Referenced by set\-Highlight().\index{KateBuffer@{Kate\-Buffer}!codeFoldingUpdated@{codeFoldingUpdated}}
\index{codeFoldingUpdated@{codeFoldingUpdated}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::code\-Folding\-Updated ()\hspace{0.3cm}{\tt  [signal]}}\label{classKateBuffer_l0}


Emittend if codefolding returned with a changed list. 

\index{KateBuffer@{Kate\-Buffer}!tagLines@{tagLines}}
\index{tagLines@{tagLines}!KateBuffer@{Kate\-Buffer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buffer::tag\-Lines (int {\em start}, int {\em end})\hspace{0.3cm}{\tt  [signal]}}\label{classKateBuffer_l1}


Emitted when the highlighting of a certain range has changed. 



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