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 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
|
<!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>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">QScintilla
 <span id="projectnumber">2.8.4</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.5.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<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 id="navrow2" class="tabs2">
<ul class="tablist">
<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="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">QsciLexerCustom Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="QsciLexerCustom" --><!-- doxytag: inherits="QsciLexer" -->
<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><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li><a class="el" href="classQsciLexerCustom.html#a8dbdaca7dffe587e442d09f5b780fab5">QsciLexerCustom</a> (QObject *parent=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#a19d92643c31c4ec10eab14da7c931b55">startStyling</a> (int pos, int styleBits=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" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><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>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a8dbdaca7dffe587e442d09f5b780fab5"></a><!-- doxytag: member="QsciLexerCustom::QsciLexerCustom" ref="a8dbdaca7dffe587e442d09f5b780fab5" args="(QObject *parent=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><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>. <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 editor widget...">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>
</tr>
<tr>
<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#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">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>
</tr>
<tr>
<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#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQsciLexerCustom.html#a19d92643c31c4ec10eab14da7c931b55">startStyling()</a>, <a class="el" href="classQsciLexerCustom.html#a91d71c4bdff5140ae0b0cb34b4511f79">styleText()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a19d92643c31c4ec10eab14da7c931b55"></a><!-- doxytag: member="QsciLexerCustom::startStyling" ref="a19d92643c31c4ec10eab14da7c931b55" args="(int pos, int styleBits=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>styleBits</em> = <code>0</code> </td>
</tr>
<tr>
<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>styleBits</em>. <em>styleBits</em> allows the styling of text to be done over several passes by setting different style bits on each pass. If <em>styleBits</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>
</tr>
<tr>
<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#a19d92643c31c4ec10eab14da7c931b55">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#a19d92643c31c4ec10eab14da7c931b55">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 class="footer"/><address class="footer"><small>
Generated on Thu Sep 11 2014 18:15:20 for QScintilla by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>
</body>
</html>
|