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


Public Types | |
typedef KSharedPtr< KateTextLine > | Ptr |
enum | Flags { flagNoOtherData = 0x1, flagHlContinue = 0x2, flagVisible = 0x4, flagAutoWrapped = 0x8 } |
Public Member Functions | |
KateTextLine () | |
~KateTextLine () | |
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 |
uint | lengthWithTabs (uint tabChars) const |
bool | stringAtPos (uint pos, const QString &match) const |
bool | startingWith (const QString &match) const |
bool | endingWith (const QString &match) 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 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 | truncate (uint newLen) |
void | setHlLineContinue (bool cont) |
void | setVisible (bool val) |
void | setAutoWrapped (bool wrapped) |
void | setAttribs (uchar attribute, uint start, uint end) |
void | setContext (QMemArray< short > &val) |
void | setFoldingList (QMemArray< signed char > &val) |
void | setIndentationDepth (QMemArray< unsigned short > &val) |
uint | dumpSize (bool withHighlighting) const |
char * | dump (char *buf, bool withHighlighting) const |
char * | restore (char *buf) |
Detailed Description
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.
Definition at line 38 of file katetextline.h.
Member Typedef Documentation
|
Define a Shared-Pointer type. Definition at line 44 of file katetextline.h. Referenced by KateBufBlock::insertLine(), KateBuffer::insertLine(), KateBufBlock::KateBufBlock(), KateBuffer::line(), KateBufBlock::line(), KateRenderer::paintTextLine(), KateBuffer::plainLine(), KateBuffer::saveFile(), KateBuffer::setLineVisible(), and KateRenderer::textPos(). |
Member Enumeration Documentation
|
Used Flags. Definition at line 50 of file katetextline.h. |
Constructor & Destructor Documentation
|
Constructor Creates an empty text line with given attribute and syntax highlight context. Definition at line 28 of file katetextline.cpp. |
|
Destructor. Definition at line 33 of file katetextline.cpp. |
Member Function Documentation
|
Returns the length.
|
|
has the line the hl continue flag set
|
|
is this line marked as visible by the folding
|
|
was this line automagically wrapped
|
|
Returns the position of the first non-whitespace character.
References nextNonSpaceChar(). Referenced by firstNonSpace(). |
|
Returns the position of the last non-whitespace character.
References previousNonSpaceChar(). |
|
Find the position of the next char that is not a space.
Referenced by firstChar(). |
|
Find the position of the previous char that is not a space.
Referenced by lastChar(). |
|
Gets the char at the given position.
|
|
Gets the text.
|
|
Highlighting array.
|
|
Gets a QString.
|
|
Gets a substring.
|
|
Gets a substring as constant string.
|
|
Gets a null terminated pointer to first non space char.
References firstChar(). |
|
indentation depth of this line
|
|
Returns the x position of the cursor at the given position, which depends on the number of tab characters.
|
|
Returns the text length with tabs calced in.
|
|
Can we find the given string at the given position.
|
|
Is the line starting with the given string.
|
|
Is the line ending with the given string.
|
|
search given string
|
|
search given regexp
|
|
Gets the attribute at the given position.
|
|
context stack
|
|
folding list
|
|
indentation stack
|
|
insert text into line
|
|
remove text at given position
|
|
Truncates the textline to the new length.
|
|
set hl continue flag
|
|
set visibility
|
|
auto-wrapped
|
|
Sets the attributes from start to end -1.
|
|
Sets the syntax highlight context number.
|
|
update folding list
|
|
update indentation stack
|
|
Dumpsize in bytes.
|
|
Dumps the line to *buf and counts buff dumpSize bytes up as return value.
|
|
Restores the line from *buf and counts buff dumpSize bytes up as return value.
|
The documentation for this class was generated from the following files: