Documentation/Source/eric5.QScintilla.Lexers.LexerPygments.html

Mon, 26 Jul 2010 19:59:27 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 26 Jul 2010 19:59:27 +0200
changeset 409
0ea528e80202
parent 167
7508e44f4853
child 440
69ace3e2dcf6
permissions
-rw-r--r--

Added another style for the source docu.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html><head>
<title>eric5.QScintilla.Lexers.LexerPygments</title>
<style>
body {
    background: white;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #85774A; }
h2 { color: white; background: #85774A; }
h3 { color: black; background: #C1BBA4; }
h4 { color: black; background: #C1BBA4; }
    
a { color: #C07037; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>eric5.QScintilla.Lexers.LexerPygments</h1>
<p>
Module implementing a custom lexer using pygments.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>PYGMENTS_ERROR</td></tr><tr><td>PYGMENTS_INSERTED</td></tr><tr><td>TOKEN_MAP</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#LexerPygments">LexerPygments</a></td>
<td>Class implementing a custom lexer using pygments.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="LexerPygments" ID="LexerPygments"></a>
<h2>LexerPygments</h2>
<p>

</p><p>
    Class implementing a custom lexer using pygments.
</p>
<h3>Derived from</h3>
LexerContainer
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#LexerPygments.__init__">LexerPygments</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#LexerPygments.__guessLexer">__guessLexer</a></td>
<td>Private method to guess a pygments lexer.</td>
</tr><tr>
<td><a href="#LexerPygments.canStyle">canStyle</a></td>
<td>Public method to check, if the lexer is able to style the text.</td>
</tr><tr>
<td><a href="#LexerPygments.defaultColor">defaultColor</a></td>
<td>Public method to get the default foreground color for a style.</td>
</tr><tr>
<td><a href="#LexerPygments.defaultFont">defaultFont</a></td>
<td>Public method to get the default font for a style.</td>
</tr><tr>
<td><a href="#LexerPygments.defaultKeywords">defaultKeywords</a></td>
<td>Public method to get the default keywords.</td>
</tr><tr>
<td><a href="#LexerPygments.defaultPaper">defaultPaper</a></td>
<td>Public method to get the default background color for a style.</td>
</tr><tr>
<td><a href="#LexerPygments.description">description</a></td>
<td>Public method returning the descriptions of the styles supported by the lexer.</td>
</tr><tr>
<td><a href="#LexerPygments.isCommentStyle">isCommentStyle</a></td>
<td>Public method to check, if a style is a comment style.</td>
</tr><tr>
<td><a href="#LexerPygments.isStringStyle">isStringStyle</a></td>
<td>Public method to check, if a style is a string style.</td>
</tr><tr>
<td><a href="#LexerPygments.language">language</a></td>
<td>Public method returning the language of the lexer.</td>
</tr><tr>
<td><a href="#LexerPygments.name">name</a></td>
<td>Public method to get the name of the pygments lexer.</td>
</tr><tr>
<td><a href="#LexerPygments.styleBitsNeeded">styleBitsNeeded</a></td>
<td>Public method to get the number of style bits needed by the lexer.</td>
</tr><tr>
<td><a href="#LexerPygments.styleText">styleText</a></td>
<td>Public method to perform the styling.</td>
</tr>
</table>
<a NAME="LexerPygments.__init__" ID="LexerPygments.__init__"></a>
<h4>LexerPygments (Constructor)</h4>
<b>LexerPygments</b>(<i>parent = None, name = ""</i>)
<p>
        Constructor
</p><dl>
<dt><i>parent</i></dt>
<dd>
parent widget of this lexer
</dd><dt><i>name=</i></dt>
<dd>
name of the pygments lexer to use (string)
</dd>
</dl><a NAME="LexerPygments.__guessLexer" ID="LexerPygments.__guessLexer"></a>
<h4>LexerPygments.__guessLexer</h4>
<b>__guessLexer</b>(<i>text</i>)
<p>
        Private method to guess a pygments lexer.
</p><dl>
<dt><i>text</i></dt>
<dd>
text to base guessing on (string)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
reference to the guessed lexer (pygments.lexer)
</dd>
</dl><a NAME="LexerPygments.canStyle" ID="LexerPygments.canStyle"></a>
<h4>LexerPygments.canStyle</h4>
<b>canStyle</b>(<i></i>)
<p>
        Public method to check, if the lexer is able to style the text.
</p><dl>
<dt>Returns:</dt>
<dd>
flag indicating the lexer capability (boolean)
</dd>
</dl><a NAME="LexerPygments.defaultColor" ID="LexerPygments.defaultColor"></a>
<h4>LexerPygments.defaultColor</h4>
<b>defaultColor</b>(<i>style</i>)
<p>
        Public method to get the default foreground color for a style.
</p><dl>
<dt><i>style</i></dt>
<dd>
style number (integer)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
foreground color (QColor)
</dd>
</dl><a NAME="LexerPygments.defaultFont" ID="LexerPygments.defaultFont"></a>
<h4>LexerPygments.defaultFont</h4>
<b>defaultFont</b>(<i>style</i>)
<p>
        Public method to get the default font for a style.
</p><dl>
<dt><i>style</i></dt>
<dd>
style number (integer)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
font (QFont)
</dd>
</dl><a NAME="LexerPygments.defaultKeywords" ID="LexerPygments.defaultKeywords"></a>
<h4>LexerPygments.defaultKeywords</h4>
<b>defaultKeywords</b>(<i>kwSet</i>)
<p>
        Public method to get the default keywords.
</p><dl>
<dt><i>kwSet</i></dt>
<dd>
number of the keyword set (integer)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
string giving the keywords (string) or None
</dd>
</dl><a NAME="LexerPygments.defaultPaper" ID="LexerPygments.defaultPaper"></a>
<h4>LexerPygments.defaultPaper</h4>
<b>defaultPaper</b>(<i>style</i>)
<p>
        Public method to get the default background color for a style.
</p><dl>
<dt><i>style</i></dt>
<dd>
style number (integer)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
background color (QColor)
</dd>
</dl><a NAME="LexerPygments.description" ID="LexerPygments.description"></a>
<h4>LexerPygments.description</h4>
<b>description</b>(<i>style</i>)
<p>
        Public method returning the descriptions of the styles supported
        by the lexer.
</p><dl>
<dt><i>style</i></dt>
<dd>
style number (integer)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
description for the style (string)
</dd>
</dl><a NAME="LexerPygments.isCommentStyle" ID="LexerPygments.isCommentStyle"></a>
<h4>LexerPygments.isCommentStyle</h4>
<b>isCommentStyle</b>(<i>style</i>)
<p>
        Public method to check, if a style is a comment style.
</p><dl>
<dt>Returns:</dt>
<dd>
flag indicating a comment style (boolean)
</dd>
</dl><a NAME="LexerPygments.isStringStyle" ID="LexerPygments.isStringStyle"></a>
<h4>LexerPygments.isStringStyle</h4>
<b>isStringStyle</b>(<i>style</i>)
<p>
        Public method to check, if a style is a string style.
</p><dl>
<dt>Returns:</dt>
<dd>
flag indicating a string style (boolean)
</dd>
</dl><a NAME="LexerPygments.language" ID="LexerPygments.language"></a>
<h4>LexerPygments.language</h4>
<b>language</b>(<i></i>)
<p>
        Public method returning the language of the lexer.
</p><dl>
<dt>Returns:</dt>
<dd>
language of the lexer (string)
</dd>
</dl><a NAME="LexerPygments.name" ID="LexerPygments.name"></a>
<h4>LexerPygments.name</h4>
<b>name</b>(<i></i>)
<p>
        Public method to get the name of the pygments lexer.
</p><dl>
<dt>Returns:</dt>
<dd>
name of the pygments lexer (string)
</dd>
</dl><a NAME="LexerPygments.styleBitsNeeded" ID="LexerPygments.styleBitsNeeded"></a>
<h4>LexerPygments.styleBitsNeeded</h4>
<b>styleBitsNeeded</b>(<i></i>)
<p>
        Public method to get the number of style bits needed by the lexer.
</p><dl>
<dt>Returns:</dt>
<dd>
number of style bits needed (integer)
</dd>
</dl><a NAME="LexerPygments.styleText" ID="LexerPygments.styleText"></a>
<h4>LexerPygments.styleText</h4>
<b>styleText</b>(<i>start, end</i>)
<p>
        Public method to perform the styling.
</p><dl>
<dt><i>start</i></dt>
<dd>
position of first character to be styled (integer)
</dd><dt><i>end</i></dt>
<dd>
position of last character to be styled (integer)
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial