edbee - Qt Editor Library
Public Member Functions | List of all members
edbee::TextCaretCache Class Reference

A special cache. For remembering the x-coordinates of the carets. More...

#include <textcaretcache.h>

+ Collaboration diagram for edbee::TextCaretCache:

Public Member Functions

 TextCaretCache (TextDocument *doc, TextRenderer *renderer)
 The text document cache. More...
 
void clear ()
 
void fill (TextRangeSet &selection)
 
void replaceAll (TextCaretCache &cache)
 This method replaces all cached content with the one given. More...
 
int xpos (int offset)
 
void add (int offset, int xpos)
 Adds an xposition for the given offset. More...
 
void add (int offset)
 Adds the given offset by calculating the position. More...
 
void caretMovedFromOldOffsetToNewOffset (int oldOffset, int newOffset)
 This method should be called if the caret moves from th. More...
 
bool isFilled ()
 This method checks if the cache is filled. More...
 
void dump ()
 

Detailed Description

A special cache. For remembering the x-coordinates of the carets.

Constructor & Destructor Documentation

◆ TextCaretCache()

edbee::TextCaretCache::TextCaretCache ( TextDocument doc,
TextRenderer renderer 
)

The text document cache.

Member Function Documentation

◆ add() [1/2]

void edbee::TextCaretCache::add ( int  offset,
int  xpos 
)

Adds an xposition for the given offset.

◆ add() [2/2]

void edbee::TextCaretCache::add ( int  offset)

Adds the given offset by calculating the position.

◆ caretMovedFromOldOffsetToNewOffset()

void edbee::TextCaretCache::caretMovedFromOldOffsetToNewOffset ( int  oldOffset,
int  newOffset 
)

This method should be called if the caret moves from th.

◆ clear()

void edbee::TextCaretCache::clear ( )

◆ dump()

void edbee::TextCaretCache::dump ( )

◆ fill()

void edbee::TextCaretCache::fill ( TextRangeSet selection)

◆ isFilled()

bool edbee::TextCaretCache::isFilled ( )

This method checks if the cache is filled.

◆ replaceAll()

void edbee::TextCaretCache::replaceAll ( TextCaretCache cache)

This method replaces all cached content with the one given.

◆ xpos()

int edbee::TextCaretCache::xpos ( int  offset)

The documentation for this class was generated from the following files: