• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kate

KateLayoutCache Class Reference

This class handles Kate's caching of layouting information (in KateLineLayout and KateTextLayout). More...

#include <katelayoutcache.h>

Inheritance diagram for KateLayoutCache:

Inheritance graph
[legend]

List of all members.


Public Member Functions

bool acceptDirtyLayouts () const
void clear ()
int displayViewLine (const KTextEditor::Cursor &virtualCursor, bool limitToVisible=false) const
 KateLayoutCache (KateRenderer *renderer, QObject *parent)
int lastViewLine (int realLine) const
KateLineLayoutPtr line (const KTextEditor::Cursor &realCursor) const
KateLineLayoutPtr line (int realLine, int virtualLine=-1) const
void relayoutLines (int startRealLine, int endRealLine)
void setAcceptDirtyLayouts (bool accept)
void setViewWidth (int width)
void setWrap (bool wrap)
KateTextLayout textLayout (uint realLine, int viewLine) const
KateTextLayout textLayout (const KTextEditor::Cursor &realCursor) const
void updateViewCache (const KTextEditor::Cursor &startPos, int newViewLineCount=-1, int viewLinesScrolled=0)
void viewCacheDebugOutput () const
KTextEditor::Cursor viewCacheEnd () const
int viewCacheLineCount () const
KTextEditor::Cursor viewCacheStart () const
int viewLine (const KTextEditor::Cursor &realCursor) const
KateTextLayout & viewLine (int viewLine) const
int viewLineCount (int realLine) const
int viewWidth () const
bool wrap () const

Detailed Description

This class handles Kate's caching of layouting information (in KateLineLayout and KateTextLayout).

This information is used primarily by both the view and the renderer.

We outsource the hardcore layouting logic to the renderer, but other than that, this class handles all manipulation of the layout objects.

This is separate from the renderer 1) for clarity 2) so you can have separate caches for separate views of the same document, even for view and printer (if the renderer is made to support rendering onto different targets).

Author:
Hamish Rodda <rodda@kde.org>

Definition at line 77 of file katelayoutcache.h.


Constructor & Destructor Documentation

KateLayoutCache::KateLayoutCache ( KateRenderer *  renderer,
QObject *  parent 
) [explicit]

Definition at line 140 of file katelayoutcache.cpp.


Member Function Documentation

bool KateLayoutCache::acceptDirtyLayouts (  )  const

Definition at line 517 of file katelayoutcache.cpp.

void KateLayoutCache::clear (  ) 

Definition at line 474 of file katelayoutcache.cpp.

int KateLayoutCache::displayViewLine ( const KTextEditor::Cursor &  virtualCursor,
bool  limitToVisible = false 
) const

Definition at line 385 of file katelayoutcache.cpp.

int KateLayoutCache::lastViewLine ( int  realLine  )  const

Definition at line 440 of file katelayoutcache.cpp.

KateLineLayoutPtr KateLayoutCache::line ( const KTextEditor::Cursor &  realCursor  )  const

Definition at line 313 of file katelayoutcache.cpp.

KateLineLayoutPtr KateLayoutCache::line ( int  realLine,
int  virtualLine = -1 
) const

Returns the KateLineLayout for the specified line.

If one does not exist, it will be created and laid out. Layouts which are not directly part of the view will be kept until the cache is full or until they are invalidated by other means (eg. the text changes).

Parameters:
realLine real line number of the layout to retrieve.
virtualLine virtual line number. only needed if you think it may have changed (ie. basically internal to KateLayoutCache)

Definition at line 265 of file katelayoutcache.cpp.

void KateLayoutCache::relayoutLines ( int  startRealLine,
int  endRealLine 
)

Definition at line 509 of file katelayoutcache.cpp.

void KateLayoutCache::setAcceptDirtyLayouts ( bool  accept  ) 

Definition at line 525 of file katelayoutcache.cpp.

void KateLayoutCache::setViewWidth ( int  width  ) 

Definition at line 481 of file katelayoutcache.cpp.

void KateLayoutCache::setWrap ( bool  wrap  ) 

Definition at line 503 of file katelayoutcache.cpp.

KateTextLayout KateLayoutCache::textLayout ( uint  realLine,
int  viewLine 
) const

Returns the layout of the specified realLine + viewLine.

if viewLine is -1, return the last.

Definition at line 328 of file katelayoutcache.cpp.

KateTextLayout KateLayoutCache::textLayout ( const KTextEditor::Cursor &  realCursor  )  const

Returns the layout describing the text line which is occupied by realCursor.

Definition at line 318 of file katelayoutcache.cpp.

void KateLayoutCache::updateViewCache ( const KTextEditor::Cursor &  startPos,
int  newViewLineCount = -1,
int  viewLinesScrolled = 0 
)

Definition at line 152 of file katelayoutcache.cpp.

void KateLayoutCache::viewCacheDebugOutput (  )  const

Definition at line 454 of file katelayoutcache.cpp.

KTextEditor::Cursor KateLayoutCache::viewCacheEnd (  )  const

Definition at line 355 of file katelayoutcache.cpp.

int KateLayoutCache::viewCacheLineCount (  )  const

Definition at line 345 of file katelayoutcache.cpp.

KTextEditor::Cursor KateLayoutCache::viewCacheStart (  )  const

Definition at line 350 of file katelayoutcache.cpp.

int KateLayoutCache::viewLine ( const KTextEditor::Cursor &  realCursor  )  const

This returns the view line upon which realCursor is situated.

The view line is the number of lines in the view from the first line The supplied cursor should be in real lines.

Definition at line 370 of file katelayoutcache.cpp.

KateTextLayout & KateLayoutCache::viewLine ( int  viewLine  )  const

Returns the layout of the corresponding line in the view.

Definition at line 339 of file katelayoutcache.cpp.

int KateLayoutCache::viewLineCount ( int  realLine  )  const

Definition at line 449 of file katelayoutcache.cpp.

int KateLayoutCache::viewWidth (  )  const

Definition at line 360 of file katelayoutcache.cpp.

bool KateLayoutCache::wrap (  )  const

Definition at line 498 of file katelayoutcache.cpp.


The documentation for this class was generated from the following files:
  • katelayoutcache.h
  • katelayoutcache.cpp

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal