StateCache Class

# StateCache Class Reference

[Action.h Index] [Action.h Hierarchy]

Caches text coloring states for a complete text file. More...

`#include <StateCache.h>`

## Public Members

- StateCache (Colorizer* colorizer, KSyntaxMultiLineEdit* edit)
- void parse ()
- int reparseFromHere (unsigned int row)
- void insertLine (unsigned int row, int prevState = STATE_INVALID)
- void removeLine (unsigned int row)
- StateCacheLineElem* getLineElem (int row)

## Protected Members

- KSyntaxMultiLineEdit* Edit

## Detailed Description

A cache for saving the states of text elements and their colors for a complete text file.

## StateCache(Colorizer* colorizer, KSyntaxMultiLineEdit* edit)

constructs a StateCache that uses colorizer to detect and mark colored text; edit is the editor widget that contains the text.

## void parse()

this method parses the complete text in the edit Edit

## int reparseFromHere(unsigned int row)

reparses from line row until there are no more changes in the parsing results; returns the index of the last parsed line.

Parameters:

  row | to start parsing from.

## void insertLine(unsigned int row, int prevState = STATE_INVALID)

inserts a new LineCacheElem at row; its PrevLineEndState will be the same as for the previous LineCacheElem at row.

Parameters:

  row, | at which a StateCacheLineElem is inserted.

## void removeLine(unsigned int row)

removes line row from the LineStateCache

Parameters:

  row | to remove from LineStateCache
  prevState | this param can be STATE_INVALID, which sets the PrevLineEndState of

## StateCacheLineElem* getLineElem(int row)

retrieve a pointer to the LineStateElem at row.

Parameters:

  row | desired line.

Author: Michael Riedel Documentation generated by root@QBERT1 on Fri Jul 17 18:57:31 MEST 1998 | Kdoc