kate Library API Documentation

KateHighlighting Class Reference

List of all members.

Public Member Functions

 KateHighlighting (const KateSyntaxModeListItem *def)
 ~KateHighlighting ()
void doHighlight (KateTextLine *prevLine, KateTextLine *textLine, QMemArray< uint > *foldingList, bool *ctxChanged)
void loadWildcards ()
QValueList< QRegExp > & getRegexpExtensions ()
QStringListgetPlainExtensions ()
QString getMimetypes ()
KateHlDatagetData ()
void setData (KateHlData *)
void setKateHlItemDataList (uint schema, KateHlItemDataList &)
void getKateHlItemDataListCopy (uint schema, KateHlItemDataList &)
const QStringname () const
const QStringnameTranslated () const
const QStringsection () const
bool hidden () const
const QStringversion () const
const QStringauthor () const
const QStringlicense () const
int priority ()
const QStringgetIdentifier () const
void use ()
void release ()
bool isInWord (QChar c, int attrib=0) const
bool canBreakAt (QChar c, int attrib=0) const
bool canComment (int startAttr, int endAttr) const
signed char commentRegion (int attr) const
QString getCommentStart (int attrib=0) const
QString getCommentEnd (int attrib=0) const
QString getCommentSingleLineStart (int attrib=0) const
int attribute (int context) const
void clearAttributeArrays ()
QMemArray< KateAttribute > * attributes (uint schema)
bool noHighlighting () const
void dropDynamicContexts ()
QString indentation ()
bool foldingIndentationSensitive ()
bool allowsFolding ()

Detailed Description

Definition at line 104 of file katehighlight.h.


Member Function Documentation

void KateHighlighting::doHighlight KateTextLine prevLine,
KateTextLine textLine,
QMemArray< uint > *  foldingList,
bool *  ctxChanged
 

Parse the text and fill in the context array and folding list array.

Parameters:
prevLine The previous line, the context array is picked up from that if present.
textLine The text line to parse
foldinglist will be filled
ctxChanged will be set to reflect if the context changed

Definition at line 1330 of file katehighlight.cpp.

References KateTextLine::attributes(), KateTextLine::ctxArray(), QMemArray::duplicate(), KateTextLine::firstChar(), KateTextLine::hlLineContinue(), QMemArray::isEmpty(), KateTextLine::length(), QMemArray::resize(), KateTextLine::setContext(), KateTextLine::setHlLineContinue(), QMemArray::size(), and KateTextLine::string().

void KateHighlighting::setKateHlItemDataList uint  schema,
KateHlItemDataList list
 

Saves the KateHlData attribute definitions to the config file.

Parameters:
schema The id of the schema group to save
list KateHlItemDataList containing the data to be used

Definition at line 1706 of file katehighlight.cpp.

References QPtrList::first(), KateHlManager::getKConfig(), name(), QPtrList::next(), QString::number(), KateFactory::self(), KateHlManager::self(), KConfigBase::setGroup(), and KConfigBase::writeEntry().

Referenced by KateSchemaConfigHighlightTab::apply().

void KateHighlighting::use  ) 
 

Increase the usage count, and trigger initialization if needed.

Definition at line 1734 of file katehighlight.cpp.

Referenced by KateBuffer::setHighlight().

void KateHighlighting::release  ) 
 

Decrease the usage count, and trigger cleanup if needed.

Definition at line 1745 of file katehighlight.cpp.

Referenced by KateBuffer::setHighlight(), and KateBuffer::~KateBuffer().

bool KateHighlighting::isInWord QChar  c,
int  attrib = 0
const
 

Returns:
true if the character c is not a deliminator character for the corresponding highlight.

Definition at line 2053 of file katehighlight.cpp.

References QString::find(), QDict::find(), and KGlobal::staticQString().

Referenced by KateDocument::transform().

bool KateHighlighting::canBreakAt QChar  c,
int  attrib = 0
const
 

Returns:
true if the character c is a wordwrap deliminator as specified in the general keyword section of the xml file.

Definition at line 2059 of file katehighlight.cpp.

References QString::find(), and KGlobal::staticQString().

bool KateHighlighting::canComment int  startAttr,
int  endAttr
const
 

Returns:
true if beginAttr and endAttr are members of the same highlight, and there are comment markers of either type in that.

Definition at line 2070 of file katehighlight.cpp.

References QDict::isEmpty(), and QString::isEmpty().

signed char KateHighlighting::commentRegion int  attr  )  const
 

Returns:
0 if highlighting which attr is a member of does not define a comment region, otherwise the region is returned

Definition at line 2065 of file katehighlight.cpp.

References QString::isEmpty(), and QString::toShort().

Referenced by KateDocument::comment().

QString KateHighlighting::getCommentStart int  attrib = 0  )  const
 

Returns:
the mulitiline comment start marker for the highlight corresponding to attrib.

Definition at line 2078 of file katehighlight.cpp.

Referenced by KateDocument::comment().

QString KateHighlighting::getCommentEnd int  attrib = 0  )  const
 

Returns:
the muiltiline comment end marker for the highlight corresponding to attrib.

Definition at line 2083 of file katehighlight.cpp.

Referenced by KateDocument::comment().

QString KateHighlighting::getCommentSingleLineStart int  attrib = 0  )  const
 

Returns:
the single comment marker for the highlight corresponding to attrib.

Definition at line 2088 of file katehighlight.cpp.

Referenced by KateDocument::comment().

int KateHighlighting::attribute int  context  )  const
 

Returns:
the attribute for context.

void KateHighlighting::dropDynamicContexts  ) 
 

Drop all dynamic contexts.

Shall be called with extreme care, and shall be immediatly followed by a full HL invalidation.

Definition at line 1311 of file katehighlight.cpp.

References QMap::clear(), QValueVector::resize(), and QValueVector::size().

Referenced by KateHlManager::resetDynamicCtxs().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kate Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 8 06:26:27 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003