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

Kate

KateBuffer Class Reference

#include <katebuffer.h>

Inheritance diagram for KateBuffer:

Inheritance graph
[legend]

List of all members.


Detailed Description

The KateBuffer class maintains a collections of lines.

Author:
Waldo Bastian <bastian@kde.org>

Christoph Cullmann <cullmann@kde.org>

Definition at line 65 of file katebuffer.h.


Signals

void codeFoldingUpdated ()
void tagLines (int start, int end)

Public Member Functions

bool binary () const
bool brokenUTF8 () const
bool canEncode ()
void changeLine (int i)
void clear ()
void codeFoldingColumnUpdate (int lineNr)
int count () const
int countVisible ()
bool editChanged () const
void editEnd ()
void editStart ()
int editTagEnd () const
bool editTagFrom () const
int editTagStart () const
KateCodeFoldingTree * foldingTree ()
KateHighlighting * highlight ()
void insertLine (int i, KateTextLine::Ptr line)
void invalidateHighlighting ()
 KateBuffer (KateDocument *doc)
KateTextLine::Ptr line (int line)
void lineInfo (KateLineInfo *info, int line)
int lineNumber (int visibleLine)
int lines () const
int lineVisibleNumber (int line)
bool openFile (const QString &m_file)
KateTextLine::Ptr plainLine (int line)
void removeLine (int i)
bool saveFile (const QString &m_file)
void setHighlight (int hlMode)
void setTabWidth (int w)
int tabWidth () const
 ~KateBuffer ()

Constructor & Destructor Documentation

KateBuffer::KateBuffer ( KateDocument *  doc  )  [explicit]

Create an empty buffer.

Parameters:
doc parent document
(with one block with one empty line)

Definition at line 399 of file katebuffer.cpp.

KateBuffer::~KateBuffer (  ) 

Goodbye buffer.

Cleanup on destruction.

Definition at line 425 of file katebuffer.cpp.


Member Function Documentation

bool KateBuffer::binary (  )  const [inline]

is this file a binary?

Returns:
binary file?

Definition at line 165 of file katebuffer.h.

bool KateBuffer::brokenUTF8 (  )  const [inline]

is this file a broken utf-8? this means: was it opened as utf-8 but contained invalid chars?

Returns:
binary file?

Definition at line 172 of file katebuffer.h.

bool KateBuffer::canEncode (  ) 

Can the current codec handle all chars.

Returns:
chars can be encoded

Definition at line 604 of file katebuffer.cpp.

void KateBuffer::changeLine ( int  i  ) 

Mark line i as changed !

Definition at line 786 of file katebuffer.cpp.

void KateBuffer::clear (  ) 

Clear the buffer.

Definition at line 493 of file katebuffer.cpp.

void KateBuffer::codeFoldingColumnUpdate ( int  lineNr  ) 

Definition at line 1295 of file katebuffer.cpp.

void KateBuffer::codeFoldingUpdated (  )  [signal]

Emittend if codefolding returned with a changed list.

int KateBuffer::count (  )  const [inline]

Return the total number of lines in the buffer.

Definition at line 216 of file katebuffer.h.

int KateBuffer::countVisible (  )  [inline]

Definition at line 243 of file katebuffer.h.

bool KateBuffer::editChanged (  )  const [inline]

were there changes in the current running editing session?

Returns:
changes done?

Definition at line 97 of file katebuffer.h.

void KateBuffer::editEnd (  ) 

finish some editing action

Definition at line 451 of file katebuffer.cpp.

void KateBuffer::editStart (  ) 

start some editing action

Definition at line 435 of file katebuffer.cpp.

int KateBuffer::editTagEnd (  )  const [inline]

dirty lines end

Returns:
end line

Definition at line 109 of file katebuffer.h.

bool KateBuffer::editTagFrom (  )  const [inline]

line inserted/removed?

Returns:
line inserted/removed?

Definition at line 115 of file katebuffer.h.

int KateBuffer::editTagStart (  )  const [inline]

dirty lines start

Returns:
start line

Definition at line 103 of file katebuffer.h.

KateCodeFoldingTree* KateBuffer::foldingTree (  )  [inline]

Definition at line 271 of file katebuffer.h.

KateHighlighting* KateBuffer::highlight (  )  [inline]

Definition at line 264 of file katebuffer.h.

void KateBuffer::insertLine ( int  i,
KateTextLine::Ptr  line 
)

Insert line in front of line i.

Definition at line 802 of file katebuffer.cpp.

void KateBuffer::invalidateHighlighting (  ) 

Invalidate highlighting of whole buffer.

Definition at line 934 of file katebuffer.cpp.

KateTextLine::Ptr KateBuffer::line ( int  line  ) 

Return line line Highlighting will be updated, if needed Only use this function if you really need the highlighting information, otherwise use for better speed plainLine.

Definition at line 762 of file katebuffer.cpp.

void KateBuffer::lineInfo ( KateLineInfo *  info,
int  line 
) [inline]

Definition at line 249 of file katebuffer.h.

int KateBuffer::lineNumber ( int  visibleLine  )  [inline]

Definition at line 245 of file katebuffer.h.

int KateBuffer::lines (  )  const [inline]

Return the total number of lines in the buffer.

Definition at line 221 of file katebuffer.h.

int KateBuffer::lineVisibleNumber ( int  line  )  [inline]

Definition at line 247 of file katebuffer.h.

bool KateBuffer::openFile ( const QString &  m_file  ) 

Open a file, use the given filename.

Parameters:
m_file filename to open
Returns:
success

Definition at line 518 of file katebuffer.cpp.

KateTextLine::Ptr KateBuffer::plainLine ( int  line  )  [inline]

Return line line Highlighting won't be triggered, use this, if you need only the text of the line for example, in search/replace or other pure text manipulation functions.

Definition at line 194 of file katebuffer.h.

void KateBuffer::removeLine ( int  i  ) 

Remove line i.

Definition at line 842 of file katebuffer.cpp.

bool KateBuffer::saveFile ( const QString &  m_file  ) 

Save the buffer to a file, use the given filename + codec + end of line chars (internal use of qtextstream).

Parameters:
m_file filename to save to
Returns:
success

Definition at line 628 of file katebuffer.cpp.

void KateBuffer::setHighlight ( int  hlMode  ) 

Use highlight for highlighting.

highlight may be 0 in which case highlighting will be disabled.

Definition at line 898 of file katebuffer.cpp.

void KateBuffer::setTabWidth ( int  w  ) 

Definition at line 887 of file katebuffer.cpp.

int KateBuffer::tabWidth (  )  const [inline]

Definition at line 251 of file katebuffer.h.

void KateBuffer::tagLines ( int  start,
int  end 
) [signal]

Emitted when the highlighting of a certain range has changed.


The documentation for this class was generated from the following files:
  • katebuffer.h
  • katebuffer.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
  • kformula
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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