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 |
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. |
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. Referenced by setAutoWrapped(), setHlLineContinue(), and setVisible(). |
|
Destructor.
Definition at line 33 of file katetextline.cpp. |
Member Function Documentation
|
Returns the length.
Definition at line 79 of file katetextline.h. |
|
has the line the hl continue flag set
Definition at line 85 of file katetextline.h. |
|
is this line marked as visible by the folding
Definition at line 91 of file katetextline.h. |
|
was this line automagically wrapped
Definition at line 97 of file katetextline.h. |
|
Returns the position of the first non-whitespace character.
Definition at line 133 of file katetextline.cpp. References nextNonSpaceChar(). Referenced by firstNonSpace(). |
|
Returns the position of the last non-whitespace character.
Definition at line 138 of file katetextline.cpp. References previousNonSpaceChar(). |
|
Find the position of the next char that is not a space.
Definition at line 108 of file katetextline.cpp. Referenced by firstChar(). |
|
Find the position of the previous char that is not a space.
Definition at line 119 of file katetextline.cpp. Referenced by lastChar(). |
|
Gets the char at the given position.
Definition at line 133 of file katetextline.h. |
|
Gets the text.
Definition at line 139 of file katetextline.h. |
|
Highlighting array.
Definition at line 145 of file katetextline.h. |
|
Gets a QString.
Definition at line 151 of file katetextline.h. |
|
Gets a substring.
Definition at line 159 of file katetextline.h. |
|
Gets a null terminated pointer to first non space char.
Definition at line 143 of file katetextline.cpp. References firstChar(). |
|
indentation depth of this line
Definition at line 149 of file katetextline.cpp. |
|
Returns the x position of the cursor at the given position, which depends on the number of tab characters.
Definition at line 184 of file katetextline.cpp. |
|
Returns the text length with tabs calced in.
Definition at line 199 of file katetextline.cpp. |
|
Can we find the given string at the given position.
Definition at line 169 of file katetextline.cpp. |
|
Is the line starting with the given string.
Definition at line 174 of file katetextline.cpp. |
|
Is the line ending with the given string.
Definition at line 179 of file katetextline.cpp. |
|
search given string
Definition at line 223 of file katetextline.cpp. |
|
search given regexp
Definition at line 249 of file katetextline.cpp. |
|
Gets the attribute at the given position.
Definition at line 246 of file katetextline.h. |
|
context stack
Definition at line 256 of file katetextline.h. |
|
folding list
Definition at line 262 of file katetextline.h. |
|
indentation stack
Definition at line 268 of file katetextline.h. |
|
insert text into line
Definition at line 37 of file katetextline.cpp. |
|
remove text at given position
Definition at line 74 of file katetextline.cpp. |
|
Truncates the textline to the new length.
Definition at line 99 of file katetextline.cpp. |
|
set hl continue flag
Definition at line 296 of file katetextline.h. References KateTextLine(). |
|
set visibility
Definition at line 306 of file katetextline.h. References KateTextLine(). |
|
auto-wrapped
Definition at line 316 of file katetextline.h. References KateTextLine(). |
|
Sets the attributes from start to end -1.
Definition at line 214 of file katetextline.cpp. |
|
Sets the syntax highlight context number.
Definition at line 334 of file katetextline.h. |
|
update folding list
Definition at line 340 of file katetextline.h. |
|
update indentation stack
Definition at line 346 of file katetextline.h. |
|
Dumpsize in bytes.
Definition at line 357 of file katetextline.h. |
|
Dumps the line to *buf and counts buff dumpSize bytes up as return value.
Definition at line 274 of file katetextline.cpp. |
|
Restores the line from *buf and counts buff dumpSize bytes up as return value.
Definition at line 322 of file katetextline.cpp. |
The documentation for this class was generated from the following files: