QextScintillaLexer Class Reference

The QextScintillaLexer class is an abstract class used as a base for specific language lexers. More...

#include <qextscintillalexer.h>

Inherited by QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSS, QextScintillaLexerDiff, QextScintillaLexerHTML, QextScintillaLexerLua, QextScintillaLexerMakefile, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, QextScintillaLexerRuby, QextScintillaLexerSQL, and QextScintillaLexerTeX.

List of all members.

Public Slots

Signals

Public Member Functions

Protected Member Functions


Detailed Description

The QextScintillaLexer class is an abstract class used as a base for specific language lexers.

A Scintilla lexer scans the text breaking it up into separate language objects, e.g. keywords, strings, operators. The lexer then uses a different style to draw each object. A style is identified by a style number and has a number of attributes, including colour and font. A specific language lexer will implement appropriate default styles which can be overriden by an application by further sub-classing the specific language lexer.

A specific language lexer may provide one or more sets of words to be recognised as keywords. Most lexers only provide one set, but some may support languages embedded in other languages and provide several sets.

QextScintillaLexer provides convenience methods for saving and restoring user preferences for fonts and colours.


Constructor & Destructor Documentation

QextScintillaLexer::QextScintillaLexer ( TQObject *  parent = 0,
const char *  name = 0 
)

Construct a QextScintillaLexer with parent parent and name name. parent is typically the QextScintilla instance.

virtual QextScintillaLexer::~QextScintillaLexer (  )  [virtual]

Destroys the QextScintillaLexer instance.


Member Function Documentation

virtual const char* QextScintillaLexer::language (  )  const [pure virtual]

Returns the name of the language. It must be re-implemented by a sub-class.

Implemented in QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSharp, QextScintillaLexerCSS, QextScintillaLexerDiff, QextScintillaLexerHTML, QextScintillaLexerIDL, QextScintillaLexerJava, QextScintillaLexerJavaScript, QextScintillaLexerLua, QextScintillaLexerMakefile, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, QextScintillaLexerRuby, QextScintillaLexerSQL, and QextScintillaLexerTeX.

virtual const char* QextScintillaLexer::lexer (  )  const [pure virtual]

Returns the name of the lexer. Some lexers support a number of languages. It must be re-implemented by a sub-class.

Implemented in QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSS, QextScintillaLexerDiff, QextScintillaLexerHTML, QextScintillaLexerLua, QextScintillaLexerMakefile, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, QextScintillaLexerRuby, QextScintillaLexerSQL, and QextScintillaLexerTeX.

int QextScintillaLexer::autoIndentStyle (  ) 

Returns the auto-indentation style. The default is 0 if the language is block structured, or QextScintilla::AiMaintain if not.

See also:
setAutoIndentStyle(), QextScintilla::AiMaintain, QextScintilla::AiOpening, QextScintilla::AiClosing

virtual TQColor QextScintillaLexer::color ( int  style  )  const [virtual]

Returns the foreground colour of the text for style number style. The default colour is black.

See also:
paper()

Reimplemented in QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSharp, QextScintillaLexerCSS, QextScintillaLexerDiff, QextScintillaLexerHTML, QextScintillaLexerIDL, QextScintillaLexerJavaScript, QextScintillaLexerLua, QextScintillaLexerMakefile, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, QextScintillaLexerRuby, QextScintillaLexerSQL, and QextScintillaLexerTeX.

virtual bool QextScintillaLexer::eolFill ( int  style  )  const [virtual]

Returns the end-of-line for style number style. The default is FALSE.

Reimplemented in QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSharp, QextScintillaLexerHTML, QextScintillaLexerJavaScript, QextScintillaLexerLua, QextScintillaLexerMakefile, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, QextScintillaLexerRuby, and QextScintillaLexerSQL.

virtual TQFont QextScintillaLexer::font ( int  style  )  const [virtual]

Returns the font for style number style. The default font is that returned by defaultFont().

See also:
defaultFont()

Reimplemented in QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSharp, QextScintillaLexerCSS, QextScintillaLexerHTML, QextScintillaLexerJavaScript, QextScintillaLexerLua, QextScintillaLexerMakefile, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, QextScintillaLexerRuby, and QextScintillaLexerSQL.

virtual const char* QextScintillaLexer::keywords ( int  set  )  const [virtual]

Returns the set of keywords for the keyword set set recognised by the lexer as a space separated string. 0 is returned if there is no such set.

Reimplemented in QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSharp, QextScintillaLexerCSS, QextScintillaLexerHTML, QextScintillaLexerIDL, QextScintillaLexerJava, QextScintillaLexerJavaScript, QextScintillaLexerLua, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerPython, QextScintillaLexerRuby, QextScintillaLexerSQL, and QextScintillaLexerTeX.

virtual TQString QextScintillaLexer::description ( int  style  )  const [pure virtual]

Returns the descriptive name for style number style. If the style is invalid for this language then TQString() is returned. This is intended to be used in user preference dialogs.

Implemented in QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSharp, QextScintillaLexerCSS, QextScintillaLexerDiff, QextScintillaLexerHTML, QextScintillaLexerIDL, QextScintillaLexerJavaScript, QextScintillaLexerLua, QextScintillaLexerMakefile, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, QextScintillaLexerRuby, QextScintillaLexerSQL, and QextScintillaLexerTeX.

virtual TQColor QextScintillaLexer::paper ( int  style  )  const [virtual]

Returns the background colour of the text for style number style.

See also:
defaultPaper(), color()

Reimplemented in QextScintillaLexerBash, QextScintillaLexerBatch, QextScintillaLexerCPP, QextScintillaLexerCSharp, QextScintillaLexerHTML, QextScintillaLexerJavaScript, QextScintillaLexerLua, QextScintillaLexerMakefile, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, QextScintillaLexerRuby, and QextScintillaLexerSQL.

virtual TQFont QextScintillaLexer::defaultFont (  )  const [virtual]

Returns the default font for all styles.

See also:
setDefaultFont()

virtual TQColor QextScintillaLexer::defaultColor (  )  const [virtual]

Returns the default text colour for all styles.

See also:
setDefaultColor()

virtual TQColor QextScintillaLexer::defaultPaper (  )  const [virtual]

Returns the default paper colour for all styles.

See also:
setDefaultPaper()

virtual void QextScintillaLexer::refreshProperties (  )  [virtual]

Causes all properties to be refreshed by emitting the propertyChanged() signal as required.

Reimplemented in QextScintillaLexerBash, QextScintillaLexerCPP, QextScintillaLexerCSS, QextScintillaLexerHTML, QextScintillaLexerLua, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, and QextScintillaLexerSQL.

bool QextScintillaLexer::readSettings ( TQSettings &  qs,
const char *  prefix = "/Scintilla" 
)

The colour, paper, font and end-of-line for each style number, and all lexer specific properties are read from the settings qs. prefix is prepended to the key of each entry. TRUE is returned if there was no error.

See also:
writeSettings(), QextScintilla::setLexer()

bool QextScintillaLexer::writeSettings ( TQSettings &  qs,
const char *  prefix = "/Scintilla" 
) const

The colour, paper, font and end-of-line for each style number, and all lexer specific properties are written to the settings qs. prefix is prepended to the key of each entry. TRUE is returned if there was no error.

See also:
readSettings()

virtual void QextScintillaLexer::setAutoIndentStyle ( int  autoindentstyle  )  [virtual, slot]

The auto-indentation style is set to autoindentstyle.

See also:
autoIndentStyle(), QextScintilla::AiMaintain, QextScintilla::AiOpening, QextScintilla::AiClosing

virtual void QextScintillaLexer::setColor ( const TQColor &  c,
int  style = -1 
) [virtual, slot]

The foreground colour for style number style is set to c. If style is -1 then the colour is set for all styles.

virtual void QextScintillaLexer::setDefaultFont ( const TQFont &  f  )  [virtual, slot]

The default font for all styles is set to f.

See also:
defaultFont()

virtual void QextScintillaLexer::setDefaultColor ( const TQColor &  c  )  [virtual, slot]

The default text colour for all styles is set to c.

See also:
defaultColor(), color()

virtual void QextScintillaLexer::setDefaultPaper ( const TQColor &  c  )  [virtual, slot]

The default paper colour for all styles is set to c.

See also:
defaultPaper(), paper()

virtual void QextScintillaLexer::setEolFill ( bool  eoffill,
int  style = -1 
) [virtual, slot]

The end-of-line fill for style number style is set to eoffill. If style is -1 then the fill is set for all styles.

virtual void QextScintillaLexer::setFont ( const TQFont &  f,
int  style = -1 
) [virtual, slot]

The font for style number style is set to f. If style is -1 then the font is set for all styles.

virtual void QextScintillaLexer::setPaper ( const TQColor &  c,
int  style = -1 
) [virtual, slot]

The background colour for style number style is set to c. If style is -1 then the colour is set for all styles.

void QextScintillaLexer::colorChanged ( const TQColor &  c,
int  style 
) [signal]

This signal is emitted when the foreground colour of style number style has changed. The new colour is c.

void QextScintillaLexer::eolFillChanged ( bool  eoffilled,
int  style 
) [signal]

This signal is emitted when the end-of-file fill of style number style has changed. The new fill is eoffilled.

void QextScintillaLexer::fontChanged ( const TQFont &  f,
int  style 
) [signal]

This signal is emitted when the font of style number style has changed. The new font is f.

void QextScintillaLexer::paperChanged ( const TQColor &  c,
int  style 
) [signal]

This signal is emitted when the background colour of style number style has changed. The new colour is c.

void QextScintillaLexer::propertyChanged ( const char *  prop,
const char *  val 
) [signal]

This signal is emitted when the value of the lexer property prop needs to be changed. The new value is val.

virtual bool QextScintillaLexer::readProperties ( TQSettings &  qs,
const TQString &  prefix 
) [protected, virtual]

The lexer's properties are read from the settings qs. prefix (which has a trailing '/') should be used as a prefix to the key of each setting. TRUE is returned if there is no error.

Reimplemented in QextScintillaLexerBash, QextScintillaLexerCPP, QextScintillaLexerCSS, QextScintillaLexerHTML, QextScintillaLexerLua, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, and QextScintillaLexerSQL.

virtual bool QextScintillaLexer::writeProperties ( TQSettings &  qs,
const TQString &  prefix 
) const [protected, virtual]

The lexer's properties are written to the settings qs. prefix (which has a trailing '/') should be used as a prefix to the key of each setting. TRUE is returned if there is no error.

Reimplemented in QextScintillaLexerBash, QextScintillaLexerCPP, QextScintillaLexerCSS, QextScintillaLexerHTML, QextScintillaLexerLua, QextScintillaLexerPerl, QextScintillaLexerPOV, QextScintillaLexerProperties, QextScintillaLexerPython, and QextScintillaLexerSQL.


Generated on Thu Nov 30 09:32:31 2006 for TQScintilla by  doxygen 1.4.7