KateTextLine Class Reference
#include <katetextline.h>
Inheritance diagram for KateTextLine:

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 41 of file katetextline.h.
Public Types | |
typedef KSharedPtr< KateTextLine > | Ptr |
enum | Flags { flagNoOtherData = 1, flagHlContinue = 2, flagAutoWrapped = 4, flagFoldingColumnsOutdated = 8, flagNoIndentationBasedFolding = 16, flagNoIndentationBasedFoldingAtStart = 32 } |
Public Member Functions | |
KateTextLine () | |
~KateTextLine () | |
void | setFoldingColumnsOutdated (bool set) |
bool | foldingColumnsOutdated () |
uint | length () const |
bool | hlLineContinue () 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 |
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 bool | noIndentBasedFolding () const |
const bool | noIndentBasedFoldingAtStart () const |
const QMemArray< uint > & | 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 | setAutoWrapped (bool wrapped) |
void | setContext (QMemArray< short > &val) |
void | setNoIndentBasedFolding (bool val) |
void | setNoIndentBasedFoldingAtStart (bool val) |
void | setFoldingList (QMemArray< uint > &val) |
void | setIndentationDepth (QMemArray< unsigned short > &val) |
uint | dumpSize (bool withHighlighting) const |
char * | dump (char *buf, bool withHighlighting) const |
char * | restore (char *buf) |
Member Typedef Documentation
|
Define a Shared-Pointer type.
Definition at line 47 of file katetextline.h. |
Member Enumeration Documentation
|
Used Flags.
Definition at line 53 of file katetextline.h. |
Constructor & Destructor Documentation
|
Constructor Creates an empty text line with given attribute and syntax highlight context.
Definition at line 30 of file katetextline.cpp. |
|
Destructor.
Definition at line 35 of file katetextline.cpp. |
Member Function Documentation
|
Gets the attribute at the given position use KRenderer::attributes to get the KTextAttribute for this.
Definition at line 271 of file katetextline.h. |
|
Highlighting array The size of this is string().length(). This contains the index for the attributes (so you can only have a maximum of 2^8 different highlighting styles in a document) To turn this into actual attributes (bold, green, etc), you need to feed these values into KRenderer::attributes e.g: m_renderer->attributes(attributes[3]);
Definition at line 167 of file katetextline.h. |
|
context stack
Definition at line 281 of file katetextline.h. |
|
Returns the x position of the cursor at the given position, which depends on the number of tab characters.
Definition at line 237 of file katetextline.cpp. |
|
Dumps the line to *buf and counts buff dumpSize bytes up as return value.
Definition at line 335 of file katetextline.cpp. |
|
Dumpsize in bytes.
Definition at line 384 of file katetextline.h. |
|
Is the line ending with the given string.
Definition at line 219 of file katetextline.cpp. |
|
Returns the position of the first non-whitespace character.
Definition at line 142 of file katetextline.cpp. |
|
Gets a null terminated pointer to first non space char.
Definition at line 152 of file katetextline.cpp. |
|
folding columns outdated ?
Definition at line 90 of file katetextline.h. |
|
folding list
Definition at line 292 of file katetextline.h. |
|
Gets the char at the given position.
Definition at line 145 of file katetextline.h. |
|
has the line the hl continue flag set
Definition at line 103 of file katetextline.h. |
|
indentation stack
Definition at line 298 of file katetextline.h. |
|
indentation depth of this line
Definition at line 158 of file katetextline.cpp. |
|
insert text into line
Definition at line 39 of file katetextline.cpp. |
|
was this line automagically wrapped
Definition at line 109 of file katetextline.h. |
|
Returns the position of the last non-whitespace character.
Definition at line 147 of file katetextline.cpp. |
|
Returns the length.
Definition at line 97 of file katetextline.h. |
|
Returns the text length with tabs calced in.
Definition at line 256 of file katetextline.cpp. |
|
Find the position of the next char that is not a space.
Definition at line 110 of file katetextline.cpp. |
|
Definition at line 286 of file katetextline.h. |
|
Find the position of the previous char that is not a space.
Definition at line 124 of file katetextline.cpp. |
|
remove text at given position
Definition at line 76 of file katetextline.cpp. |
|
Restores the line from *buf and counts buff dumpSize bytes up as return value.
Definition at line 383 of file katetextline.cpp. |
|
search given regexp
Definition at line 304 of file katetextline.cpp. |
|
search given string
Definition at line 273 of file katetextline.cpp. |
|
auto-wrapped
Definition at line 336 of file katetextline.h. |
|
Sets the syntax highlight context number.
Definition at line 346 of file katetextline.h. |
|
Set the flag that only positions have changed, not folding region begins/ends themselve.
Definition at line 83 of file katetextline.h. |
|
update folding list
Definition at line 367 of file katetextline.h. |
|
set hl continue flag
Definition at line 326 of file katetextline.h. |
|
update indentation stack
Definition at line 373 of file katetextline.h. |
|
sets if for the next line indent based folding should be disabled
Definition at line 351 of file katetextline.h. |
|
Is the line starting with the given string.
Definition at line 202 of file katetextline.cpp. |
|
Gets a substring.
Definition at line 181 of file katetextline.h. |
|
Gets a QString.
Definition at line 173 of file katetextline.h. |
|
Can we find the given string at the given position.
Definition at line 180 of file katetextline.cpp. |
|
Gets the text as a unicode representation.
Definition at line 151 of file katetextline.h. |
|
Truncates the textline to the new length.
Definition at line 101 of file katetextline.cpp. |
The documentation for this class was generated from the following files: