TextLine Class Reference
The TextLine represents a line of text. More...
#include <katetextline.h>
Inheritance diagram for TextLine:


| Public Types | |
| typedef KSharedPtr< TextLine > | Ptr | 
| typedef QValueVector< Ptr > | List | 
| enum | Flags { flagNoOtherData = 0x1, flagHlContinue = 0x2, flagVisible = 0x4, flagAutoWrapped = 0x8 } | 
| Public Member Functions | |
| TextLine () | |
| uint | length () const | 
| bool | hlLineContinue () const | 
| bool | isVisible () const | 
| bool | isAutoWrapped () const | 
| int | firstChar () const | 
| int | lastChar () const | 
| int | nextNonSpaceChar (uint pos) const | 
| int | previousNonSpaceChar (uint pos) const | 
| QChar | getChar (uint pos) const | 
| const QChar * | text () const | 
| uchar * | attributes () const | 
| const QString & | string () const | 
| QString | string (uint startCol, uint length) const | 
| QConstString | constString (uint startCol, uint length) const | 
| const QChar * | firstNonSpace () const | 
| uint | indentDepth (uint tabwidth) const | 
| int | cursorX (uint pos, uint tabChars) const | 
| bool | stringAtPos (uint pos, const QString &match) const | 
| bool | startingWith (const QString &match) const | 
| bool | endingWith (const QString &match) const | 
| short * | ctx () const | 
| bool | ctxSize () const | 
| bool | ctxEmpty () const | 
| bool | searchText (uint startCol, const QString &text, uint *foundAtCol, uint *matchLen, bool casesensitive=true, bool backwards=false) | 
| bool | searchText (uint startCol, const QRegExp ®exp, uint *foundAtCol, uint *matchLen, bool backwards=false) | 
| uchar | attribute (uint pos) const | 
| const QString & | textArray () const | 
| const QMemArray< uchar > & | attributesArray () const | 
| const QMemArray< short > & | ctxArray () const | 
| const QMemArray< signed char > & | foldingListArray () const | 
| const QMemArray< unsigned short > & | indentationDepthArray () const | 
| void | insertText (uint pos, uint insLen, const QChar *insText, uchar *insAttribs=0) | 
| void | removeText (uint pos, uint delLen) | 
| void | append (const QChar *s, uint l) | 
| void | truncate (uint newLen) | 
| QString | withoutTrailingSpaces () | 
| void | setHlLineContinue (bool cont) | 
| void | setVisible (bool val) | 
| void | setAutoWrapped (bool wrapped) | 
| void | setAttribs (uchar attribute, uint start, uint end) | 
| void | setContext (short *newctx, uint len) | 
| void | setFoldingList (QMemArray< signed char > &val) | 
| void | setIndentationDepth (QMemArray< unsigned short > &val) | 
| uint | dumpSize () const | 
| char * | dump (char *buf) const | 
| char * | restore (char *buf) | 
Detailed Description
The TextLine 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.
Definition at line 40 of file katetextline.h.
Constructor & Destructor Documentation
| 
 | 
| Creates an empty text line with given attribute and syntax highlight context. 
 Definition at line 28 of file katetextline.cpp. | 
Member Function Documentation
| 
 | 
| Returns the length. 
 Definition at line 61 of file katetextline.h. References QString::length(). | 
| 
 | 
| Return some flags. 
 Definition at line 66 of file katetextline.h. | 
| 
 | 
| Returns the position of the first character which is not a white space. 
 Definition at line 139 of file katetextline.cpp. References nextNonSpaceChar(). | 
| 
 | 
| Returns the position of the last character which is not a white space. 
 Definition at line 144 of file katetextline.cpp. References QString::length(), and previousNonSpaceChar(). Referenced by withoutTrailingSpaces(). | 
| 
 | 
| Find the position of the next char that is not a space. 
 
 
 Definition at line 114 of file katetextline.cpp. References QString::length(). Referenced by firstChar(). | 
| 
 | 
| Find the position of the previous char that is not a space. 
 
 
 Definition at line 125 of file katetextline.cpp. References QString::length(). Referenced by lastChar(). | 
| 
 | 
| Gets the char at the given position. 
 Definition at line 103 of file katetextline.h. | 
| 
 | 
| Gets the text. 
 Definition at line 111 of file katetextline.h. References QString::unicode(). | 
| 
 | 
| Gets a QString. 
 Definition at line 118 of file katetextline.h. | 
| 
 | ||||||||||||
| Gets a QString. 
 Definition at line 123 of file katetextline.h. References QString::mid(). | 
| 
 | ||||||||||||
| Returns the x position of the cursor at the given position, which depends on the number of tab characters. 
 Definition at line 195 of file katetextline.cpp. References QString::length(). | 
| 
 | ||||||||||||
| Can we find the given string at the given position. 
 Definition at line 180 of file katetextline.cpp. References QString::length(), and QString::mid(). | 
| 
 | 
| Is the line starting with the given string. 
 Definition at line 185 of file katetextline.cpp. References QString::left(), and QString::length(). | 
| 
 | 
| Is the line ending with the given string. 
 Definition at line 190 of file katetextline.cpp. References QString::length(), and QString::right(). | 
| 
 | 
| Gets the syntax highlight context number. 
 Definition at line 157 of file katetextline.h. References QMemArray< short >::data(). | 
| 
 | 
| Gets size of the ctxArray. 
 Definition at line 162 of file katetextline.h. References QMemArray< short >::size(). | 
| 
 | 
| Empty ctx stack ? 
 Definition at line 167 of file katetextline.h. References QMemArray< short >::isEmpty(). | 
| 
 | 
| Gets the attribute at the given position. 
 Definition at line 175 of file katetextline.h. References QString::length(). | 
| 
 | 
| Raw access on the memarray's, for example the katebuffer class. 
 Definition at line 184 of file katetextline.h. | 
| 
 | ||||||||||||||||||||
| Universal text manipulation methoda. They can be used to insert or delete text Definition at line 37 of file katetextline.cpp. References QString::insert(), QString::length(), and QMemArray< uchar >::resize(). Referenced by append(). | 
| 
 | ||||||||||||
| Appends a string of length l to the textline. 
 Definition at line 100 of file katetextline.cpp. References insertText(), and QString::length(). | 
| 
 | 
| Truncates the textline to the new length. 
 Definition at line 105 of file katetextline.cpp. References QString::length(), QMemArray< uchar >::truncate(), and QString::truncate(). | 
| 
 | 
| Removes trailing spaces. 
 Definition at line 149 of file katetextline.cpp. References lastChar(), and QString::left(). | 
| 
 | 
| Sets some flags. 
 Definition at line 218 of file katetextline.h. | 
| 
 | ||||||||||||||||
| Sets the attributes from start to end -1. 
 Definition at line 210 of file katetextline.cpp. References QString::length(). | 
| 
 | ||||||||||||
| Sets the syntax highlight context number. 
 Definition at line 244 of file katetextline.h. References QMemArray< short >::duplicate(). | 
| 
 | 
| Dumpsize in bytes. 
 Definition at line 257 of file katetextline.cpp. References QMemArray< uchar >::isEmpty(), QString::length(), QMemArray< unsigned short >::size(), QMemArray< signed char >::size(), and QMemArray< short >::size(). | 
| 
 | 
| Dumps the line to *buf and counts buff dumpSize bytes up as return value. 
 Definition at line 280 of file katetextline.cpp. References QMemArray< unsigned short >::data(), QMemArray< signed char >::data(), QMemArray< short >::data(), QMemArray< uchar >::isEmpty(), length(), QString::length(), QMemArray< unsigned short >::size(), QMemArray< signed char >::size(), QMemArray< short >::size(), and QString::unicode(). | 
| 
 | 
| Restores the line from *buf and counts buff dumpSize bytes up as return value. 
 Definition at line 364 of file katetextline.cpp. References QMemArray< uchar >::data(), QMemArray< unsigned short >::duplicate(), QMemArray< signed char >::duplicate(), QMemArray< short >::duplicate(), QMemArray< uchar >::fill(), length(), QMemArray< uchar >::resize(), QString::setUnicode(), and QMemArray< uchar >::size(). | 
The documentation for this class was generated from the following files:

