1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QScintilla: QsciLexerCustom Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>QsciLexerCustom Class Reference</h1><!-- doxytag: class="QsciLexerCustom" --><!-- doxytag: inherits="QsciLexer" -->
<p>The <a class="el" href="classQsciLexerCustom.html" title="The QsciLexerCustom class is an abstract class used as a base for new language lexers...">QsciLexerCustom</a> class is an abstract class used as a base for new language lexers.
<a href="#_details">More...</a></p>
<p><code>#include <qscilexercustom.h></code></p>
<p>Inherits <a class="el" href="classQsciLexer.html">QsciLexer</a>.</p>
<p><a href="classQsciLexerCustom-members.html">List of all members.</a></p>
<h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="classQsciLexerCustom.html#a7b9bd3dd91a101ba262522225fbbec5e">QsciLexerCustom</a> (QObject *parent=0, const char *name=0)
<li><a class="anchor" id="a3a6b7f17d604db4e06e0d469b55b7602"></a><!-- doxytag: member="QsciLexerCustom::~QsciLexerCustom" ref="a3a6b7f17d604db4e06e0d469b55b7602" args="()" -->
virtual <a class="el" href="classQsciLexerCustom.html#a3a6b7f17d604db4e06e0d469b55b7602">~QsciLexerCustom</a> ()
<li>void <a class="el" href="classQsciLexerCustom.html#aae1debbb0a7be0266725c0ca327b0834">setStyling</a> (int length, int style)
<li>void <a class="el" href="classQsciLexerCustom.html#a5ba7f97b19cfa7bd0b846fc56d94fa3c">setStyling</a> (int length, const <a class="el" href="classQsciStyle.html">QsciStyle</a> &style)
<li>void <a class="el" href="classQsciLexerCustom.html#ab187b687c1fa141c6efab92cff9d0f15">startStyling</a> (int pos, int style_bits=0)
<li>virtual void <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText</a> (int start, int end)=0
<li><a class="anchor" id="a224fe82235b9a1c7b9c8bec9dd441178"></a><!-- doxytag: member="QsciLexerCustom::setEditor" ref="a224fe82235b9a1c7b9c8bec9dd441178" args="(QsciScintilla *editor)" -->
virtual void <a class="el" href="classQsciLexerCustom.html#a224fe82235b9a1c7b9c8bec9dd441178">setEditor</a> (<a class="el" href="classQsciScintilla.html">QsciScintilla</a> *editor)
<li>virtual int <a class="el" href="classQsciLexerCustom.html#a472781cc12e12d742f77f53776cc938e">styleBitsNeeded</a> () const
</ul>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The <a class="el" href="classQsciLexerCustom.html" title="The QsciLexerCustom class is an abstract class used as a base for new language lexers...">QsciLexerCustom</a> class is an abstract class used as a base for new language lexers. </p>
<p>The advantage of implementing a new lexer this way (as opposed to adding the lexer to the underlying Scintilla code) is that it does not require the QScintilla library to be re-compiled. It also makes it possible to integrate external lexers.</p>
<p>All that is necessary to implement a new lexer is to define appropriate styles and to re-implement the <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> method. </p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a7b9bd3dd91a101ba262522225fbbec5e"></a><!-- doxytag: member="QsciLexerCustom::QsciLexerCustom" ref="a7b9bd3dd91a101ba262522225fbbec5e" args="(QObject *parent=0, const char *name=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">QsciLexerCustom::QsciLexerCustom </td>
<td>(</td>
<td class="paramtype">QObject * </td>
<td class="paramname"> <em>parent</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>name</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Construct a <a class="el" href="classQsciLexerCustom.html" title="The QsciLexerCustom class is an abstract class used as a base for new language lexers...">QsciLexerCustom</a> with parent <em>parent</em> and name <em>name</em>. <em>parent</em> is typically the <a class="el" href="classQsciScintilla.html" title="The QsciScintilla class implements a higher level, more Qt-like, API to the Scintilla...">QsciScintilla</a> instance. </p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aae1debbb0a7be0266725c0ca327b0834"></a><!-- doxytag: member="QsciLexerCustom::setStyling" ref="aae1debbb0a7be0266725c0ca327b0834" args="(int length, int style)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QsciLexerCustom::setStyling </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>length</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>style</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The next <em>length</em> characters starting from the current styling position have their style set to style number <em>style</em>. The current styling position is moved. The styling position is initially set by calling <a class="el" href="classQsciLexerCustom.html#ab187b687c1fa141c6efab92cff9d0f15">startStyling()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#ab187b687c1fa141c6efab92cff9d0f15">startStyling()</a>, <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a5ba7f97b19cfa7bd0b846fc56d94fa3c"></a><!-- doxytag: member="QsciLexerCustom::setStyling" ref="a5ba7f97b19cfa7bd0b846fc56d94fa3c" args="(int length, const QsciStyle &style)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QsciLexerCustom::setStyling </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>length</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classQsciStyle.html">QsciStyle</a> & </td>
<td class="paramname"> <em>style</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The next <em>length</em> characters starting from the current styling position have their style set to style <em>style</em>. The current styling position is moved. The styling position is initially set by calling <a class="el" href="classQsciLexerCustom.html#ab187b687c1fa141c6efab92cff9d0f15">startStyling()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#ab187b687c1fa141c6efab92cff9d0f15">startStyling()</a>, <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ab187b687c1fa141c6efab92cff9d0f15"></a><!-- doxytag: member="QsciLexerCustom::startStyling" ref="ab187b687c1fa141c6efab92cff9d0f15" args="(int pos, int style_bits=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QsciLexerCustom::startStyling </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>style_bits</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The styling position is set to <em>start</em> and the mask of style bits that can be set is set to <em>style_bits</em>. <em>style_bits</em> allows the styling of text to be done over several passes by setting different style bits on each pass. If <em>style_bits</em> is 0 then all style bits (as returned by <a class="el" href="classQsciLexerCustom.html#a472781cc12e12d742f77f53776cc938e">styleBitsNeeded()</a>) are set.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#aae1debbb0a7be0266725c0ca327b0834">setStyling()</a>, <a class="el" href="classQsciLexerCustom.html#a472781cc12e12d742f77f53776cc938e">styleBitsNeeded()</a>, <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a91d71c4bdff5140ae0b0cb34b4511f79"></a><!-- doxytag: member="QsciLexerCustom::styleText" ref="a91d71c4bdff5140ae0b0cb34b4511f79" args="(int start, int end)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void QsciLexerCustom::styleText </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>end</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This is called when the section of text beginning at position <em>start</em> and up to position <em>end</em> needs to be styled. <em>start</em> will always be at the start of a line. The text is styled by calling <a class="el" href="classQsciLexerCustom.html#ab187b687c1fa141c6efab92cff9d0f15">startStyling()</a> followed by one or more calls to <a class="el" href="classQsciLexerCustom.html#aae1debbb0a7be0266725c0ca327b0834">setStyling()</a>. It must be re-implemented by a sub-class.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#aae1debbb0a7be0266725c0ca327b0834">setStyling()</a>, <a class="el" href="classQsciLexerCustom.html#ab187b687c1fa141c6efab92cff9d0f15">startStyling()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a472781cc12e12d742f77f53776cc938e"></a><!-- doxytag: member="QsciLexerCustom::styleBitsNeeded" ref="a472781cc12e12d742f77f53776cc938e" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual int QsciLexerCustom::styleBitsNeeded </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This re-implementation returns 5 as the number of style bits needed. </p>
<p>Reimplemented from <a class="el" href="classQsciLexer.html#add2b17b97fa2acf096933b0b4553b707">QsciLexer</a>.</p>
</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Jan 20 19:56:10 2010 for QScintilla by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>
|