.TH "KateTextLine" kde3 "11 Jun 2005" "Version Version 3.4.1" "kate Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KateTextLine \- The KateTextLine represents a line of text.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <katetextline.h>\fP
.PP
Inherits \fBKShared\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef \fBKSharedPtr\fP< \fBKateTextLine\fP > \fBPtr\fP"
.br
.ti -1c
.RI "enum \fBFlags\fP { \fBflagNoOtherData\fP =  0x1, \fBflagHlContinue\fP =  0x2, \fBflagAutoWrapped\fP =  0x4, \fBflagFoldingColumnsOutdated\fP = 0x8 }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKateTextLine\fP ()"
.br
.ti -1c
.RI "\fB~KateTextLine\fP ()"
.br
.ti -1c
.RI "void \fBsetFoldingColumnsOutdated\fP (bool set)"
.br
.ti -1c
.RI "bool \fBfoldingColumnsOutdated\fP ()"
.br
.ti -1c
.RI "uint \fBlength\fP () const "
.br
.ti -1c
.RI "bool \fBhlLineContinue\fP () const "
.br
.ti -1c
.RI "bool \fBisAutoWrapped\fP () const "
.br
.ti -1c
.RI "int \fBfirstChar\fP () const "
.br
.ti -1c
.RI "int \fBlastChar\fP () const "
.br
.ti -1c
.RI "int \fBnextNonSpaceChar\fP (uint pos) const "
.br
.ti -1c
.RI "int \fBpreviousNonSpaceChar\fP (uint pos) const "
.br
.ti -1c
.RI "\fBQChar\fP \fBgetChar\fP (uint pos) const "
.br
.ti -1c
.RI "const \fBQChar\fP * \fBtext\fP () const "
.br
.ti -1c
.RI "uchar * \fBattributes\fP () const "
.br
.ti -1c
.RI "const \fBQString\fP & \fBstring\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBstring\fP (uint startCol, uint length) const "
.br
.ti -1c
.RI "void \fBstringAsHtml\fP (uint startCol, uint length, \fBKateRenderer\fP *renderer, \fBQTextStream\fP *outputStream) const "
.br
.ti -1c
.RI "void \fBstringAsHtml\fP (\fBKateRenderer\fP *renderer, \fBQTextStream\fP *outputStream) const "
.br
.ti -1c
.RI "const \fBQChar\fP * \fBfirstNonSpace\fP () const "
.br
.ti -1c
.RI "uint \fBindentDepth\fP (uint tabwidth) const "
.br
.ti -1c
.RI "int \fBcursorX\fP (uint pos, uint tabChars) const "
.br
.ti -1c
.RI "uint \fBlengthWithTabs\fP (uint tabChars) const "
.br
.ti -1c
.RI "bool \fBstringAtPos\fP (uint pos, const \fBQString\fP &match) const "
.br
.ti -1c
.RI "bool \fBstartingWith\fP (const \fBQString\fP &match) const "
.br
.ti -1c
.RI "bool \fBendingWith\fP (const \fBQString\fP &match) const "
.br
.ti -1c
.RI "bool \fBsearchText\fP (uint startCol, const \fBQString\fP &text, uint *foundAtCol, uint *matchLen, bool casesensitive=true, bool backwards=false)"
.br
.ti -1c
.RI "bool \fBsearchText\fP (uint startCol, const \fBQRegExp\fP &regexp, uint *foundAtCol, uint *matchLen, bool backwards=false)"
.br
.ti -1c
.RI "uchar \fBattribute\fP (uint pos) const "
.br
.ti -1c
.RI "const \fBQMemArray\fP< short > & \fBctxArray\fP () const "
.br
.ti -1c
.RI "const \fBQMemArray\fP< uint > & \fBfoldingListArray\fP () const "
.br
.ti -1c
.RI "const \fBQMemArray\fP< unsigned short > & \fBindentationDepthArray\fP () const "
.br
.ti -1c
.RI "void \fBinsertText\fP (uint pos, uint insLen, const \fBQChar\fP *insText, uchar *insAttribs=0)"
.br
.ti -1c
.RI "void \fBremoveText\fP (uint pos, uint delLen)"
.br
.ti -1c
.RI "void \fBtruncate\fP (uint newLen)"
.br
.ti -1c
.RI "void \fBsetHlLineContinue\fP (bool cont)"
.br
.ti -1c
.RI "void \fBsetAutoWrapped\fP (bool wrapped)"
.br
.ti -1c
.RI "void \fBsetContext\fP (\fBQMemArray\fP< short > &val)"
.br
.ti -1c
.RI "void \fBsetFoldingList\fP (\fBQMemArray\fP< uint > &val)"
.br
.ti -1c
.RI "void \fBsetIndentationDepth\fP (\fBQMemArray\fP< unsigned short > &val)"
.br
.ti -1c
.RI "uint \fBdumpSize\fP (bool withHighlighting) const "
.br
.ti -1c
.RI "char * \fBdump\fP (char *buf, bool withHighlighting) const "
.br
.ti -1c
.RI "char * \fBrestore\fP (char *buf)"
.br
.in -1c
.SH "Detailed Description"
.PP 
The KateTextLine represents a line of text. 

A text line that contains the text, an attribute for each character, an attribute for the free space behind the last character and a context number for the syntax highlight. The attribute stores the index to a table that contains fonts and colors and also if a character is selected. 
.PP
Definition at line 41 of file katetextline.h.
.SH "Member Typedef Documentation"
.PP 
.SS "typedef \fBKSharedPtr\fP<\fBKateTextLine\fP> \fBKateTextLine::Ptr\fP"
.PP
Define a Shared-Pointer type. 
.PP
Definition at line 47 of file katetextline.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKateTextLine::Flags\fP"
.PP
Used Flags. 
.PP
Definition at line 53 of file katetextline.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KateTextLine::KateTextLine ()"
.PP
Constructor Creates an empty text line with given attribute and syntax highlight context. 
.PP
Definition at line 31 of file katetextline.cpp.
.SS "KateTextLine::~\fBKateTextLine\fP ()"
.PP
Destructor. 
.PP
Definition at line 36 of file katetextline.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KateTextLine::setFoldingColumnsOutdated (bool set)\fC [inline]\fP"
.PP
Set the flag that only positions have changed, not folding region begins/ends themselve. 
.PP
Definition at line 81 of file katetextline.h.
.SS "bool KateTextLine::foldingColumnsOutdated ()\fC [inline]\fP"
.PP
folding columns outdated ? 
.PP
\fBReturns:\fP
.RS 4
folding columns outdated? 
.RE
.PP

.PP
Definition at line 88 of file katetextline.h.
.SS "uint KateTextLine::length () const\fC [inline]\fP"
.PP
Returns the length. 
.PP
\fBReturns:\fP
.RS 4
length of text in line 
.RE
.PP

.PP
Definition at line 95 of file katetextline.h.
.PP
References QString::length().
.SS "bool KateTextLine::hlLineContinue () const\fC [inline]\fP"
.PP
has the line the hl continue flag set 
.PP
\fBReturns:\fP
.RS 4
hl continue set? 
.RE
.PP

.PP
Definition at line 101 of file katetextline.h.
.SS "bool KateTextLine::isAutoWrapped () const\fC [inline]\fP"
.PP
was this line automagically wrapped 
.PP
\fBReturns:\fP
.RS 4
line auto-wrapped 
.RE
.PP

.PP
Definition at line 107 of file katetextline.h.
.SS "int KateTextLine::firstChar () const"
.PP
Returns the position of the first non-whitespace character. 
.PP
\fBReturns:\fP
.RS 4
position of first non-whitespace char or -1 if there is none 
.RE
.PP

.PP
Definition at line 136 of file katetextline.cpp.
.PP
References nextNonSpaceChar().
.PP
Referenced by firstNonSpace().
.SS "int KateTextLine::lastChar () const"
.PP
Returns the position of the last non-whitespace character. 
.PP
\fBReturns:\fP
.RS 4
position of last non-whitespace char or -1 if there is none 
.RE
.PP

.PP
Definition at line 141 of file katetextline.cpp.
.PP
References QString::length(), and previousNonSpaceChar().
.SS "int KateTextLine::nextNonSpaceChar (uint pos) const"
.PP
Find the position of the next char that is not a space. 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP Column of the character which is examined first. 
.RE
.PP
\fBReturns:\fP
.RS 4
True if the specified or a following character is not a space Otherwise false. 
.RE
.PP

.PP
Definition at line 111 of file katetextline.cpp.
.PP
References QString::length().
.PP
Referenced by firstChar().
.SS "int KateTextLine::previousNonSpaceChar (uint pos) const"
.PP
Find the position of the previous char that is not a space. 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP Column of the character which is examined first. 
.RE
.PP
\fBReturns:\fP
.RS 4
The position of the first none-whitespace character preceeding pos, or -1 if none is found. 
.RE
.PP

.PP
Definition at line 122 of file katetextline.cpp.
.PP
References QString::length().
.PP
Referenced by lastChar().
.SS "\fBQChar\fP KateTextLine::getChar (uint pos) const\fC [inline]\fP"
.PP
Gets the char at the given position. 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP position 
.RE
.PP
\fBReturns:\fP
.RS 4
character at the given position or QChar::null if position is beyond the length of the string 
.RE
.PP

.PP
Definition at line 143 of file katetextline.h.
.PP
Referenced by stringAsHtml().
.SS "const \fBQChar\fP* KateTextLine::text () const\fC [inline]\fP"
.PP
Gets the text as a unicode representation. 
.PP
\fBReturns:\fP
.RS 4
text of this line as \fBQChar\fP array 
.RE
.PP

.PP
Definition at line 149 of file katetextline.h.
.PP
References QString::unicode().
.PP
Referenced by searchText().
.SS "uchar* KateTextLine::attributes () const\fC [inline]\fP"
.PP
Highlighting array The size of this is \fBstring()\fP.\fBlength()\fP. 
.PP
This contains the index for the attributes (so you can only have a maximum of 2^8 different highlighting styles in a document)
.PP
To turn this into actual attributes (bold, green, etc), you need to feed these values into KRenderer::attributes
.PP
e.g: m_renderer->attributes(attributes[3]);
.PP
\fBReturns:\fP
.RS 4
hl-attributes array 
.RE
.PP

.PP
Definition at line 165 of file katetextline.h.
.PP
References QMemArray::data().
.SS "const \fBQString\fP& KateTextLine::string () const\fC [inline]\fP"
.PP
Gets a \fBQString\fP. 
.PP
\fBReturns:\fP
.RS 4
text of line as \fBQString\fP reference 
.RE
.PP

.PP
Definition at line 171 of file katetextline.h.
.SS "\fBQString\fP KateTextLine::string (uint startCol, uint length) const\fC [inline]\fP"
.PP
Gets a substring. 
.PP
\fBParameters:\fP
.RS 4
\fIstartCol\fP start column of substring 
.br
\fIlength\fP length of substring 
.RE
.PP
\fBReturns:\fP
.RS 4
wanted substring 
.RE
.PP

.PP
Definition at line 179 of file katetextline.h.
.PP
References QString::mid().
.SS "void KateTextLine::stringAsHtml (uint startCol, uint length, \fBKateRenderer\fP * renderer, \fBQTextStream\fP * outputStream) const"
.PP
Gets a substring in valid-xml html. 
.PP
Example: '<b>const</b> b = <i>34</i>' It won't contain 
.PP
or <body> or <html> or anything like that.
.PP
\fBParameters:\fP
.RS 4
\fIstartCol\fP start column of substring 
.br
\fIlength\fP length of substring 
.br
\fIrenderer\fP The katerenderer. This will have the schema information that describes how to render the attributes. 
.br
\fIoutputStream\fP A stream to write the html to 
.RE
.PP

.PP
Definition at line 411 of file katetextline.cpp.
.PP
References attribute(), KateAttribute::bold(), QStyleSheet::escape(), getChar(), KateAttribute::italic(), QString::number(), QColor::rgb(), and KateAttribute::textColor().
.PP
Referenced by stringAsHtml().
.SS "void KateTextLine::stringAsHtml (\fBKateRenderer\fP * renderer, \fBQTextStream\fP * outputStream) const\fC [inline]\fP"
.PP
Gets the string a valid-xml html. 
.PP
Overloaded version of stringAsHtml
.PP
\fBParameters:\fP
.RS 4
\fIrenderer\fP The katerenderer. This will have the schema information that describes how to render the attributes. 
.br
\fIoutputStream\fP A stream to write the html to 
.RE
.PP

.PP
Definition at line 205 of file katetextline.h.
.PP
References QString::length(), and stringAsHtml().
.SS "const \fBQChar\fP * KateTextLine::firstNonSpace () const"
.PP
Gets a null terminated pointer to first non space char. 
.PP
\fBReturns:\fP
.RS 4
array of QChars starting at first non-whitespace char 
.RE
.PP

.PP
Definition at line 146 of file katetextline.cpp.
.PP
References firstChar(), and QString::unicode().
.SS "uint KateTextLine::indentDepth (uint tabwidth) const"
.PP
indentation depth of this line 
.PP
\fBParameters:\fP
.RS 4
\fItabwidth\fP width of the tabulators 
.RE
.PP
\fBReturns:\fP
.RS 4
indentation width 
.RE
.PP

.PP
Definition at line 152 of file katetextline.cpp.
.PP
References QString::length().
.SS "int KateTextLine::cursorX (uint pos, uint tabChars) const"
.PP
Returns the x position of the cursor at the given position, which depends on the number of tab characters. 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP position in chars 
.br
\fItabChars\fP tabulator width in chars 
.RE
.PP
\fBReturns:\fP
.RS 4
position with tabulators calculated 
.RE
.PP

.PP
Definition at line 209 of file katetextline.cpp.
.PP
References QString::length().
.SS "uint KateTextLine::lengthWithTabs (uint tabChars) const"
.PP
Returns the text length with tabs calced in. 
.PP
\fBParameters:\fP
.RS 4
\fItabChars\fP tabulator width in chars 
.RE
.PP
\fBReturns:\fP
.RS 4
text length 
.RE
.PP

.PP
Definition at line 225 of file katetextline.cpp.
.PP
References QString::length().
.SS "bool KateTextLine::stringAtPos (uint pos, const \fBQString\fP & match) const"
.PP
Can we find the given string at the given position. 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP startpostion of given string 
.br
\fImatch\fP string to match at given pos 
.RE
.PP
\fBReturns:\fP
.RS 4
did the string match? 
.RE
.PP

.PP
Definition at line 172 of file katetextline.cpp.
.PP
References QString::length().
.SS "bool KateTextLine::startingWith (const \fBQString\fP & match) const"
.PP
Is the line starting with the given string. 
.PP
\fBParameters:\fP
.RS 4
\fImatch\fP string to test 
.RE
.PP
\fBReturns:\fP
.RS 4
does line start with given string? 
.RE
.PP

.PP
Definition at line 184 of file katetextline.cpp.
.PP
References QString::length().
.SS "bool KateTextLine::endingWith (const \fBQString\fP & match) const"
.PP
Is the line ending with the given string. 
.PP
\fBParameters:\fP
.RS 4
\fImatch\fP string to test 
.RE
.PP
\fBReturns:\fP
.RS 4
does the line end with given string? 
.RE
.PP

.PP
Definition at line 196 of file katetextline.cpp.
.PP
References QString::length().
.SS "bool KateTextLine::searchText (uint startCol, const \fBQString\fP & text, uint * foundAtCol, uint * matchLen, bool casesensitive = \fCtrue\fP, bool backwards = \fCfalse\fP)"
.PP
search given string 
.PP
\fBParameters:\fP
.RS 4
\fIstartCol\fP column to start search 
.br
\fItext\fP string to search for 
.br
\fIfoundAtCol\fP column where text was found 
.br
\fImatchLen\fP length of matching 
.br
\fIcasesensitive\fP should search be case-sensitive 
.br
\fIbackwards\fP search backwards? 
.RE
.PP
\fBReturns:\fP
.RS 4
string found? 
.RE
.PP

.PP
Definition at line 240 of file katetextline.cpp.
.PP
References QString::find(), QString::findRev(), QString::length(), and text().
.SS "bool KateTextLine::searchText (uint startCol, const \fBQRegExp\fP & regexp, uint * foundAtCol, uint * matchLen, bool backwards = \fCfalse\fP)"
.PP
search given regexp 
.PP
\fBParameters:\fP
.RS 4
\fIstartCol\fP column to start search 
.br
\fIregexp\fP regex to search for 
.br
\fIfoundAtCol\fP column where text was found 
.br
\fImatchLen\fP length of matching 
.br
\fIbackwards\fP search backwards? 
.RE
.PP
\fBReturns:\fP
.RS 4
regexp found? 
.RE
.PP

.PP
Definition at line 271 of file katetextline.cpp.
.PP
References QString::length().
.SS "uchar KateTextLine::attribute (uint pos) const\fC [inline]\fP"
.PP
Gets the attribute at the given position use KRenderer::attributes to get the KTextAttribute for this. 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP position of attribute requested 
.RE
.PP
\fBReturns:\fP
.RS 4
value of attribute 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBattributes\fP 
.RE
.PP

.PP
Definition at line 295 of file katetextline.h.
.PP
References QMemArray::size().
.PP
Referenced by stringAsHtml().
.SS "const \fBQMemArray\fP<short>& KateTextLine::ctxArray () const\fC [inline]\fP"
.PP
context stack 
.PP
\fBReturns:\fP
.RS 4
context stack 
.RE
.PP

.PP
Definition at line 305 of file katetextline.h.
.SS "const \fBQMemArray\fP<uint>& KateTextLine::foldingListArray () const\fC [inline]\fP"
.PP
folding list 
.PP
\fBReturns:\fP
.RS 4
folding array 
.RE
.PP

.PP
Definition at line 311 of file katetextline.h.
.SS "const \fBQMemArray\fP<unsigned short>& KateTextLine::indentationDepthArray () const\fC [inline]\fP"
.PP
indentation stack 
.PP
\fBReturns:\fP
.RS 4
indentation array 
.RE
.PP

.PP
Definition at line 317 of file katetextline.h.
.SS "void KateTextLine::insertText (uint pos, uint insLen, const \fBQChar\fP * insText, uchar * insAttribs = \fC0\fP)"
.PP
insert text into line 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP insert position 
.br
\fIinsLen\fP insert length 
.br
\fIinsText\fP text to insert 
.br
\fIinsAttribs\fP attributes for the insert text 
.RE
.PP

.PP
Definition at line 40 of file katetextline.cpp.
.PP
References QString::insert(), QString::length(), and QMemArray::resize().
.SS "void KateTextLine::removeText (uint pos, uint delLen)"
.PP
remove text at given position 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP start position of remove 
.br
\fIdelLen\fP length to remove 
.RE
.PP

.PP
Definition at line 77 of file katetextline.cpp.
.PP
References QString::length(), QString::remove(), and QMemArray::resize().
.SS "void KateTextLine::truncate (uint newLen)"
.PP
Truncates the textline to the new length. 
.PP
\fBParameters:\fP
.RS 4
\fInewLen\fP new length of line 
.RE
.PP

.PP
Definition at line 102 of file katetextline.cpp.
.PP
References QString::length(), QMemArray::truncate(), and QString::truncate().
.SS "void KateTextLine::setHlLineContinue (bool cont)\fC [inline]\fP"
.PP
set hl continue flag 
.PP
\fBParameters:\fP
.RS 4
\fIcont\fP continue flag? 
.RE
.PP

.PP
Definition at line 345 of file katetextline.h.
.SS "void KateTextLine::setAutoWrapped (bool wrapped)\fC [inline]\fP"
.PP
auto-wrapped 
.PP
\fBParameters:\fP
.RS 4
\fIwrapped\fP line was wrapped? 
.RE
.PP

.PP
Definition at line 355 of file katetextline.h.
.SS "void KateTextLine::setContext (\fBQMemArray\fP< short > & val)\fC [inline]\fP"
.PP
Sets the syntax highlight context number. 
.PP
\fBParameters:\fP
.RS 4
\fIval\fP new context array 
.RE
.PP

.PP
Definition at line 365 of file katetextline.h.
.PP
References QMemArray::assign().
.SS "void KateTextLine::setFoldingList (\fBQMemArray\fP< uint > & val)\fC [inline]\fP"
.PP
update folding list 
.PP
\fBParameters:\fP
.RS 4
\fIval\fP new folding list 
.RE
.PP

.PP
Definition at line 371 of file katetextline.h.
.PP
References QMemArray::assign(), and QMemArray::detach().
.SS "void KateTextLine::setIndentationDepth (\fBQMemArray\fP< unsigned short > & val)\fC [inline]\fP"
.PP
update indentation stack 
.PP
\fBParameters:\fP
.RS 4
\fIval\fP new indentation stack 
.RE
.PP

.PP
Definition at line 377 of file katetextline.h.
.PP
References QMemArray::assign().
.SS "uint KateTextLine::dumpSize (bool withHighlighting) const\fC [inline]\fP"
.PP
Dumpsize in bytes. 
.PP
\fBParameters:\fP
.RS 4
\fIwithHighlighting\fP should we dump the hl, too? 
.RE
.PP
\fBReturns:\fP
.RS 4
size of line for dumping 
.RE
.PP

.PP
Definition at line 388 of file katetextline.h.
.PP
References QString::length(), and QMemArray::size().
.SS "char * KateTextLine::dump (char * buf, bool withHighlighting) const"
.PP
Dumps the line to *buf and counts buff dumpSize bytes up as return value. 
.PP
\fBParameters:\fP
.RS 4
\fIbuf\fP buffer to dump to 
.br
\fIwithHighlight\fP dump hl data, too? 
.RE
.PP
\fBReturns:\fP
.RS 4
buffer index after dumping 
.RE
.PP

.PP
Definition at line 302 of file katetextline.cpp.
.PP
References QMemArray::data(), QString::length(), QMemArray::size(), and QString::unicode().
.SS "char * KateTextLine::restore (char * buf)"
.PP
Restores the line from *buf and counts buff dumpSize bytes up as return value. 
.PP
\fBParameters:\fP
.RS 4
\fIbuf\fP buffer to restore from 
.RE
.PP
\fBReturns:\fP
.RS 4
buffer index after restoring 
.RE
.PP

.PP
Definition at line 350 of file katetextline.cpp.
.PP
References QMemArray::duplicate(), QMemArray::fill(), and QString::setUnicode().

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