[UPDATE] Update Scintilla from 2.0.1 to 2.1.2

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@640 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2010-07-12 22:19:51 +00:00
parent f5251b5bc2
commit a2dd828443
105 changed files with 4327 additions and 3147 deletions

View File

@ -6,8 +6,8 @@ To build SciTE, Scintilla must first be built.
*** GTK+/Linux version ***
You must first have GTK+ 1.2 or later and GCC (3.1 or better) installed.
GTK+ 1.0x will not work and when it did it was very slow.
You must first have GTK+ 2.0 or later and GCC (4.1 or better) installed.
GTK+ 1.x will not work.
Other C++ compilers may work but may require tweaking the make file.
To build Scintilla, use the makefile located in the scintilla/gtk directory
@ -29,10 +29,6 @@ and make install as this location is compiled into the executable. The global
properties file is installed at $prefix/share/scite/SciTEGlobal.properties.
The language specific properties files are also installed into this directory.
To build Scintilla for GTK+ 1 rather than the default GTK+ 2, define GTK1 on
the make command line:
make GTK1=1
To remove SciTE
make uninstall
@ -45,9 +41,8 @@ The current make file only supports static linking between SciTE and Scintilla.
*** Windows version ***
A C++ compiler is required. Visual Studio .NET 2008 is the development system
used for most development although Mingw32 3.1 is also supported.
Borland did work but the command lines are now too long and the most recent
Borland version does not work. For older versions such as version 5.02, add the -l option.
used for most development although TDM Mingw32 4.4.1 is also supported.
For older versions of Borland C++ such as version 5.02, add the -l option.
To build Scintilla, make in the scintilla/win32 directory
cd scintilla\win32
@ -67,3 +62,13 @@ An executable SciTE will now be in scite\bin.
The Visual C++ 6.0 project (.dsp) files are no longer supported but are left
in the download for people that are prepared to update them.
*** GTK+/Windows version ***
Mingw32 is known to work. Other compilers will probably not work.
Only Scintilla will build with GTK+ on Windows. SciTE will not work.
To build Scintilla, make in the scintilla/gtk directory
cd scintilla\gtk
mingw32-make

View File

@ -244,6 +244,7 @@
does not follow platform conventions well. A second API could be implemented here that did
follow platform conventions.
</p>
</body>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -52,5 +52,6 @@
<td valign="top"><img src="32.png" /></td>
</tr>
</table>
</body>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -247,5 +247,16 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR>
</SPAN><SPAN class=S10>};</SPAN>
</body>
<h3>
Submitting a lexer
</h3>
<p>Add a public feature request to the <a href="https://sourceforge.net/tracker/?group_id=2439&atid=352439">Feature Request Tracker</a>.</p>
<p>Send all the modified and new files as full text (not patches) in an archive (.zip or .tgz).</p>
<p>Define all of the lexical states in a modified Scintilla.iface.</p>
<p>Ensure there are no warnings under the compiler you use. Warnings from other compilers
will be noted on the feature request.</p>
<p>sc.ch is an int: do not pass this around as a char.</p>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -38,7 +38,7 @@
<h1>Scintilla Documentation</h1>
<p>Last edited 7/August/2009 NH</p>
<p>Last edited 4/April/2010 NH</p>
<p>There is <a class="jump" href="Design.html">an overview of the internal design of
Scintilla</a>.<br />
@ -71,6 +71,10 @@
<p>The GTK+ version also uses messages in a similar way to the Windows version. This is
different to normal GTK+ practice but made it easier to implement rapidly.</p>
<p>Scintilla does not properly support right-to-left languages like Arabic and Hebrew.
While text in these languages may appear correct, it is not possible to interact with this text
as is normal with other editing components.</p>
<p>This documentation describes the individual messages and notifications used by Scintilla. It
does not describe how to link them together to form a useful editor. For now, the best way to
work out how to develop using Scintilla is to see how SciTE uses it. SciTE exercises most of
@ -233,7 +237,7 @@
<td>o <a class="toc" href="#KeyBindings">Key bindings</a></td>
<td>o <a class="toc" href="#PopupEditMenu">Popup edit menu</a></td>
<td>o <a class="toc" href="#MacroRecording">Macro recording</a></td>
</tr>
@ -241,7 +245,7 @@
<td>o <a class="toc" href="#Printing">Printing</a></td>
<td>o <a class="toc" href="#DirectAccess">Direct access</a></td>
<td>o <a class="toc" href="#MultipleViews">Multiple views</a></td>
</tr>
@ -249,7 +253,7 @@
<td>o <a class="toc" href="#Folding">Folding</a></td>
<td>o <a class="toc" href="#LineWrapping">Line wrapping</a></td>
<td>o <a class="toc" href="#Zooming">Zooming</a></td>
</tr>
@ -257,7 +261,7 @@
<td>o <a class="toc" href="#LongLines">Long lines</a></td>
<td>o <a class="toc" href="#Lexer">Lexer</a></td>
<td>o <a class="toc" href="#Notifications">Notifications</a></td>
</tr>
@ -265,7 +269,7 @@
<td>o <a class="toc" href="#GTK">GTK+</a></td>
<td>o <a class="toc" href="#DeprecatedMessages">Deprecated messages</a></td>
<td>o <a class="toc" href="#EditMessagesNeverSupportedByScintilla">Edit messages never
supported by Scintilla</a></td>
@ -297,7 +301,7 @@
languages, and three independent indicators so that, for example, syntax errors, deprecated
names and bad indentation could all be displayed at once. The number of bits used for styles
can be altered with <a class="message"
href="#SCI_SETSTYLEBITS"><code>SCI_SETSTYLEBITS</code></a> up to a maximum of 7 bits.
href="#SCI_SETSTYLEBITS"><code>SCI_SETSTYLEBITS</code></a> up to a maximum of 8 bits.
The remaining bits can be used for indicators.</p>
<p>In this document, 'character' normally refers to a byte even when multi-byte characters are used.
@ -327,7 +331,7 @@
*text)</a><br />
<a class="message" href="#SCI_SETREADONLY">SCI_SETREADONLY(bool readOnly)</a><br />
<a class="message" href="#SCI_GETREADONLY">SCI_GETREADONLY</a><br />
<a class="message" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE(&lt;unused&gt;, TextRange
<a class="message" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE(&lt;unused&gt;, Sci_TextRange
*tr)</a><br />
<a class="message" href="#SCI_ALLOCATE">SCI_ALLOCATE(int bytes, &lt;unused&gt;)</a><br />
<a class="message" href="#SCI_ADDTEXT">SCI_ADDTEXT(int length, const char *s)</a><br />
@ -338,7 +342,7 @@
<a class="message" href="#SCI_CLEARDOCUMENTSTYLE">SCI_CLEARDOCUMENTSTYLE</a><br />
<a class="message" href="#SCI_GETCHARAT">SCI_GETCHARAT(int position)</a><br />
<a class="message" href="#SCI_GETSTYLEAT">SCI_GETSTYLEAT(int position)</a><br />
<a class="message" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT(&lt;unused&gt;, TextRange
<a class="message" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT(&lt;unused&gt;, Sci_TextRange
*tr)</a><br />
<a class="message" href="#SCI_SETSTYLEBITS">SCI_SETSTYLEBITS(int bits)</a><br />
<a class="message" href="#SCI_GETSTYLEBITS">SCI_GETSTYLEBITS</a><br />
@ -409,9 +413,9 @@
href="#SCN_MODIFYATTEMPTRO"><code>SCN_MODIFYATTEMPTRO</code></a> notification.</p>
<p><b id="SCI_GETTEXTRANGE">SCI_GETTEXTRANGE(&lt;unused&gt;, <a class="jump"
href="#TextRange">TextRange</a> *tr)</b><br />
href="#Sci_TextRange">Sci_TextRange</a> *tr)</b><br />
This collects the text between the positions <code>cpMin</code> and <code>cpMax</code> and
copies it to <code>lpstrText</code> (see <code>struct TextRange</code> in
copies it to <code>lpstrText</code> (see <code>struct Sci_TextRange</code> in
<code>Scintilla.h</code>). If <code>cpMax</code> is -1, text is returned to the end of the
document. The text is 0 terminated, so you must supply a buffer that is at least 1 character
longer than the number of characters you wish to read. The return value is the length of the
@ -424,11 +428,11 @@
href="#SCI_GETTEXT">SCI_GETTEXT</a></code></p>
<p><b id="SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT(&lt;unused&gt;, <a class="jump"
href="#TextRange">TextRange</a> *tr)</b><br />
href="#Sci_TextRange">Sci_TextRange</a> *tr)</b><br />
This collects styled text into a buffer using two bytes for each cell, with the character at
the lower address of each pair and the style byte at the upper address. Characters between the
positions <code>cpMin</code> and <code>cpMax</code> are copied to <code>lpstrText</code> (see
<code>struct TextRange</code> in <code>Scintilla.h</code>). Two 0 bytes are added to the end of
<code>struct Sci_TextRange</code> in <code>Scintilla.h</code>). Two 0 bytes are added to the end of
the text, so the buffer that <code>lpstrText</code> points at must be at least
<code>2*(cpMax-cpMin)+2</code> bytes long. No check is made for sensible values of
<code>cpMin</code> or <code>cpMax</code>. Positions outside the document return character codes
@ -483,23 +487,23 @@
<p><b id="SCI_SETSTYLEBITS">SCI_SETSTYLEBITS(int bits)</b><br />
<b id="SCI_GETSTYLEBITS">SCI_GETSTYLEBITS</b><br />
This pair of routines sets and reads back the number of bits in each cell to use for styling,
to a maximum of 7 style bits. The remaining bits can be used as indicators. The standard
to a maximum of 8 style bits. The remaining bits can be used as indicators. The standard
setting is <code>SCI_SETSTYLEBITS(5)</code>.
The number of styling bits needed by the current lexer can be found with
<a class="message" href="#SCI_GETSTYLEBITSNEEDED">SCI_GETSTYLEBITSNEEDED</a>.</p>
<p><b id="TextRange">TextRange</b> and <b id="CharacterRange">CharacterRange</b><br />
<p><b id="Sci_TextRange">Sci_TextRange</b> and <b id="Sci_CharacterRange">Sci_CharacterRange</b><br />
These structures are defined to be exactly the same shape as the Win32 <code>TEXTRANGE</code>
and <code>CHARRANGE</code>, so that older code that treats Scintilla as a RichEdit will
work.</p>
<pre>
struct CharacterRange {
struct Sci_CharacterRange {
long cpMin;
long cpMax;
};
struct TextRange {
struct CharacterRange chrg;
struct Sci_TextRange {
struct Sci_CharacterRange chrg;
char *lpstrText;
};
</pre>
@ -531,7 +535,7 @@ struct TextRange {
or can be called from the container using direct access to the buffer contents through
<a class="message" href="#SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</a>.
</p>
<code><a class="message" href="#SCI_FINDTEXT">SCI_FINDTEXT(int flags, TextToFind
<code><a class="message" href="#SCI_FINDTEXT">SCI_FINDTEXT(int flags, Sci_TextToFind
*ttf)</a><br />
<a class="message" href="#SCI_SEARCHANCHOR">SCI_SEARCHANCHOR</a><br />
<a class="message" href="#SCI_SEARCHNEXT">SCI_SEARCHNEXT(int searchFlags, const char
@ -678,35 +682,35 @@ struct TextRange {
</table>
<p><b id="SCI_FINDTEXT">SCI_FINDTEXT(int searchFlags, <a class="jump"
href="#TextToFind">TextToFind</a> *ttf)</b><br />
href="#Sci_TextToFind">Sci_TextToFind</a> *ttf)</b><br />
This message searches for text in the document. It does not use or move the current selection.
The <a class="jump" href="#searchFlags"><code>searchFlags</code></a> argument controls the
search type, which includes regular expression searches.</p>
<p>The <code>TextToFind</code> structure is defined in <code>Scintilla.h</code>; set
<p>The <code>Sci_TextToFind</code> structure is defined in <code>Scintilla.h</code>; set
<code>chrg.cpMin</code> and <code>chrg.cpMax</code> with the range of positions in the document
to search. If <code>SCFIND_REGEXP</code> is not included in the flags, you can search backwards by
setting <code>chrg.cpMax</code> less than <code>chrg.cpMin</code>. If <code>SCFIND_REGEXP</code>
is included, the search is always forwards (even if <code>chrg.cpMax</code> is less than <code>chrg.cpMin</code>).
Set the <code>lpstrText</code> member of <code>TextToFind</code> to point at a zero terminated
text string holding the search pattern. If your language makes the use of <code>TextToFind</code>
Set the <code>lpstrText</code> member of <code>Sci_TextToFind</code> to point at a zero terminated
text string holding the search pattern. If your language makes the use of <code>Sci_TextToFind</code>
difficult, you should consider using <code>SCI_SEARCHINTARGET</code> instead.</p>
<p>The return value is -1 if the search fails or the position of the start of the found text if
it succeeds. The <code>chrgText.cpMin</code> and <code>chrgText.cpMax</code> members of
<code>TextToFind</code> are filled in with the start and end positions of the found text.</p>
<code>Sci_TextToFind</code> are filled in with the start and end positions of the found text.</p>
<p>See also: <code><a class="message"
href="#SCI_SEARCHINTARGET">SCI_SEARCHINTARGET</a></code></p>
<p><b id="TextToFind">TextToFind</b><br />
<p><b id="Sci_TextToFind">Sci_TextToFind</b><br />
This structure is defined to have exactly the same shape as the Win32 structure
<code>FINDTEXTEX</code> for old code that treated Scintilla as a RichEdit control.</p>
<pre>
struct TextToFind {
struct <a class="jump" href="#CharacterRange">CharacterRange</a> chrg; // range to search
struct Sci_TextToFind {
struct <a class="jump" href="#Sci_CharacterRange">Sci_CharacterRange</a> chrg; // range to search
char *lpstrText; // the search pattern (zero terminated)
struct CharacterRange chrgText; // returned as position of matching text
struct Sci_CharacterRange chrgText; // returned as position of matching text
};
</pre>
@ -747,8 +751,8 @@ struct TextToFind {
<code>SCI_REPLACETARGET</code> or <code>SCI_REPLACETARGETRE</code>.</p>
<p>Searching can be performed within the target range with <code>SCI_SEARCHINTARGET</code>,
which uses a counted string to allow searching for null characters. It returns the length of
range or -1 for failure, in which case the target is not moved. The flags used by
which uses a counted string to allow searching for null characters. It returns the
position of the start of the matching text range or -1 for failure, in which case the target is not moved. The flags used by
<code>SCI_SEARCHINTARGET</code> such as <code>SCFIND_MATCHCASE</code>,
<code>SCFIND_WHOLEWORD</code>, <code>SCFIND_WORDSTART</code>, and <code>SCFIND_REGEXP</code>
can be set with <code>SCI_SETSEARCHFLAGS</code>. <code>SCI_SEARCHINTARGET</code> may be simpler
@ -768,6 +772,7 @@ struct TextToFind {
*text)</a><br />
<a class="message" href="#SCI_REPLACETARGETRE">SCI_REPLACETARGETRE(int length, const char
*text)</a><br />
<a class="message" href="#SCI_GETTAG">SCI_GETTAG(int tagNumber, char *tagValue)</a><br />
</code>
<p><b id="SCI_SETTARGETSTART">SCI_SETTARGETSTART(int pos)</b><br />
@ -814,6 +819,10 @@ struct TextToFind {
After replacement, the target range refers to the replacement text.
The return value is the length of the replacement string.</p>
<p><b id="SCI_GETTAG">SCI_GETTAG(int tagNumber, char *tagValue)</b><br />
Discover what text was matched by tagged expressions in a regular expression search.
This is useful if the application wants to interpret the replacement string itself.</p>
<p>See also: <a class="message" href="#SCI_FINDTEXT"><code>SCI_FINDTEXT</code></a></p>
<h2 id="Overtype">Overtype</h2>
@ -884,7 +893,7 @@ struct TextToFind {
<p><b id="SCI_SETSTATUS">SCI_SETSTATUS(int status)</b><br />
<b id="SCI_GETSTATUS">SCI_GETSTATUS</b><br />
If an error occurs, Scintilla may set an internal error number that can be retrieved with
<code>SCI_GETSTATUS</code>.
<code>SCI_GETSTATUS</code>.
To clear the error status call <code>SCI_SETSTATUS(0)</code>.
The currently defined statuses are:
@ -982,12 +991,12 @@ struct TextToFind {
combined with the preceding or following operations if they are undone.</p>
<p><b id="SCI_ADDUNDOACTION">SCI_ADDUNDOACTION(int token, int flags)</b><br />
The container can add its own actions into the undo stack by calling
<code>SCI_ADDUNDOACTION</code> and an <code>SCN_MODIFIED</code>
notification will be sent to the container with the
The container can add its own actions into the undo stack by calling
<code>SCI_ADDUNDOACTION</code> and an <code>SCN_MODIFIED</code>
notification will be sent to the container with the
<a class="message" href="#SC_MOD_CONTAINER"><code>SC_MOD_CONTAINER</code></a>
flag when it is time to undo (<code>SC_PERFORMED_UNDO</code>) or
redo (<code>SC_PERFORMED_REDO</code>) the action. The token argument supplied is
flag when it is time to undo (<code>SC_PERFORMED_UNDO</code>) or
redo (<code>SC_PERFORMED_REDO</code>) the action. The token argument supplied is
returned in the <code>token</code> field of the notification.</p>
<p>For example, if the container wanted to allow undo and redo of a 'toggle bookmark' command then
it could call <code>SCI_ADDUNDOACTION(line, 0)</code> each time the command is performed.
@ -995,13 +1004,13 @@ struct TextToFind {
the token field. If there are different types of commands or parameters that need to be stored into the undo
stack then the container should maintain a stack of its own for the document and use the current
position in that stack as the argument to <code>SCI_ADDUNDOACTION(line)</code>.
<code>SCI_ADDUNDOACTION</code> commands are not combined together
<code>SCI_ADDUNDOACTION</code> commands are not combined together
into a single undo transaction unless grouped with <code>SCI_BEGINUNDOACTION</code>
and <code>SCI_ENDUNDOACTION</code>.</p>
<p>The flags argument can be <code>UNDO_MAY_COALESCE</code> (1) if the container action may be
<p>The flags argument can be <code>UNDO_MAY_COALESCE</code> (1) if the container action may be
coalesced along with any insertion and deletion actions into a single compound action, otherwise 0.
Coalescing treats coalescible container actions as transparent so will still only group together insertions that
Coalescing treats coalescible container actions as transparent so will still only group together insertions that
look like typing or deletions that look like multiple uses of the Backspace or Delete keys.
</p>
<h2 id="SelectionAndInformation">Selection and information</h2>
@ -1015,6 +1024,7 @@ struct TextToFind {
<code><a class="message" href="#SCI_GETTEXTLENGTH">SCI_GETTEXTLENGTH</a><br />
<a class="message" href="#SCI_GETLENGTH">SCI_GETLENGTH</a><br />
<a class="message" href="#SCI_GETLINECOUNT">SCI_GETLINECOUNT</a><br />
<a class="message" href="#SCI_SETFIRSTVISIBLELINE">SCI_SETFIRSTVISIBLELINE(int lineDisplay)</a><br />
<a class="message" href="#SCI_GETFIRSTVISIBLELINE">SCI_GETFIRSTVISIBLELINE</a><br />
<a class="message" href="#SCI_LINESONSCREEN">SCI_LINESONSCREEN</a><br />
<a class="message" href="#SCI_GETMODIFY">SCI_GETMODIFY</a><br />
@ -1074,8 +1084,9 @@ struct TextToFind {
This returns the number of lines in the document. An empty document contains 1 line. A
document holding only an end of line sequence has 2 lines.</p>
<p><b id="SCI_GETFIRSTVISIBLELINE">SCI_GETFIRSTVISIBLELINE</b><br />
This returns the line number of the first visible line in the Scintilla view. The first line
<p><b id="SCI_SETFIRSTVISIBLELINE">SCI_SETFIRSTVISIBLELINE(int lineDisplay)</b><br />
<b id="SCI_GETFIRSTVISIBLELINE">SCI_GETFIRSTVISIBLELINE</b><br />
These messages retrieve and set the line number of the first visible line in the Scintilla view. The first line
in the document is numbered 0. The value is a visible line rather than a document line.</p>
<p><b id="SCI_LINESONSCREEN">SCI_LINESONSCREEN</b><br />
@ -1209,15 +1220,15 @@ struct TextToFind {
This copies the currently selected text and a terminating 0 byte to the <code>text</code>
buffer. The buffer size should be determined by calling with a NULL pointer for the <code>text</code> argument
<code>SCI_GETSELTEXT(0,0)</code>.
This allows for rectangular and discontiguous selections as well as simple selections.
See <a class="toc" href="#MultipleSelectionAndVirtualSpace">Multiple Selection</a> for information on
This allows for rectangular and discontiguous selections as well as simple selections.
See <a class="toc" href="#MultipleSelectionAndVirtualSpace">Multiple Selection</a> for information on
how multiple and rectangular selections and virtual space are copied.</p>
<p>See also: <code><a class="message" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>,
<a class="message" href="#SCI_GETLINE">SCI_GETLINE</a>,
<a class="message" href="#SCI_GETTEXT">SCI_GETTEXT</a>,
<a class="message" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>,
<a class="message" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a>
<p>See also: <code><a class="message" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>,
<a class="message" href="#SCI_GETLINE">SCI_GETLINE</a>,
<a class="message" href="#SCI_GETTEXT">SCI_GETTEXT</a>,
<a class="message" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>,
<a class="message" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a>
</code></p>
<p><b id="SCI_GETCURLINE">SCI_GETCURLINE(int textLen, char *text)</b><br />
@ -1387,7 +1398,7 @@ struct TextToFind {
<b id="SCI_CHARPOSITIONFROMPOINTCLOSE">SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int y)</b><br />
<code>SCI_CHARPOSITIONFROMPOINT</code> finds the closest character to a point and
<code>SCI_CHARPOSITIONFROMPOINTCLOSE</code> is similar but returns -1 if the point is outside the
window or not close to any characters. This is similar to the previous methods but finds characters rather than
window or not close to any characters. This is similar to the previous methods but finds characters rather than
inter-character positions.</p>
<p><b id="SCI_POINTXFROMPOSITION">SCI_POINTXFROMPOSITION(&lt;unused&gt;, int pos)</b><br />
@ -1413,6 +1424,8 @@ struct TextToFind {
<a class="message" href="#SCI_GETMULTIPLESELECTION">SCI_GETMULTIPLESELECTION</a><br />
<a class="message" href="#SCI_SETADDITIONALSELECTIONTYPING">SCI_SETADDITIONALSELECTIONTYPING(bool additionalSelectionTyping)</a><br />
<a class="message" href="#SCI_GETADDITIONALSELECTIONTYPING">SCI_GETADDITIONALSELECTIONTYPING</a><br />
<a class="message" href="#SCI_SETMULTIPASTE">SCI_SETMULTIPASTE(int multiPaste)</a><br />
<a class="message" href="#SCI_GETMULTIPASTE">SCI_GETMULTIPASTE</a><br />
<a class="message" href="#SCI_SETVIRTUALSPACEOPTIONS">SCI_SETVIRTUALSPACEOPTIONS(int virtualSpaceOptions)</a><br />
<a class="message" href="#SCI_GETVIRTUALSPACEOPTIONS">SCI_GETVIRTUALSPACEOPTIONS</a><br />
<a class="message" href="#SCI_SETRECTANGULARSELECTIONMODIFIER">SCI_SETRECTANGULARSELECTIONMODIFIER(int modifier)</a><br />
@ -1459,14 +1472,17 @@ struct TextToFind {
<a class="message" href="#SCI_GETADDITIONALCARETFORE">SCI_GETADDITIONALCARETFORE</a><br />
<a class="message" href="#SCI_SETADDITIONALCARETSBLINK">SCI_SETADDITIONALCARETSBLINK(bool additionalCaretsBlink)</a><br />
<a class="message" href="#SCI_GETADDITIONALCARETSBLINK">SCI_GETADDITIONALCARETSBLINK</a><br />
<a class="message" href="#SCI_SETADDITIONALCARETSVISIBLE">SCI_SETADDITIONALCARETSVISIBLE(bool additionalCaretsVisible)</a><br />
<a class="message" href="#SCI_GETADDITIONALCARETSVISIBLE">SCI_GETADDITIONALCARETSVISIBLE</a><br />
<br />
<a class="message" href="#SCI_SWAPMAINANCHORCARET">SCI_SWAPMAINANCHORCARET</a><br />
<a class="message" href="#SCI_ROTATESELECTION">SCI_ROTATESELECTION</a><br />
</code>
<p>
There may be multiple selections active at one time.
More selections are made by holding down the Ctrl key while dragging with the mouse.
There may be multiple selections active at one time.
More selections are made by holding down the Ctrl key while dragging with the mouse.
The most recent selection is the main selection and determines which part of the document is shown automatically.
Any selection apart from the main selection is called an additional selection.
The calls in the previous section operate on the main selection.
@ -1480,11 +1496,11 @@ struct TextToFind {
</p>
<p>
Virtual space is space beyond the end of each line. The caret may be moved into virtual space but no real space will be
Virtual space is space beyond the end of each line. The caret may be moved into virtual space but no real space will be
added to the document until there is some text typed or some other text insertion command is used.
</p>
<p>When discontiguous selections are copied to the clipboard, each selection is added to the clipboard text
<p>When discontiguous selections are copied to the clipboard, each selection is added to the clipboard text
in order with no delimiting characters.
For rectangular selections the document's line end is added after each line's text. Rectangular selections
are always copied from top line to bottom, not in the in order of selection.Virtual space is not copied.</p>
@ -1499,11 +1515,17 @@ struct TextToFind {
<b id="SCI_GETADDITIONALSELECTIONTYPING">SCI_GETADDITIONALSELECTIONTYPING</b><br />
Whether typing, backspace, or delete works with multiple selections simultaneously.</p>
<p>
<b id="SCI_SETMULTIPASTE">SCI_SETMULTIPASTE(int multiPaste)</b><br />
<b id="SCI_GETMULTIPASTE">SCI_GETMULTIPASTE</b><br />
When pasting into multiple selections, the pasted text can go into just the main selection with <code>SC_MULTIPASTE_ONCE</code>=0
or into each selection with <code>SC_MULTIPASTE_EACH</code>=1. <code>SC_MULTIPASTE_ONCE</code> is the default.</p>
<p>
<b id="SCI_SETVIRTUALSPACEOPTIONS">SCI_SETVIRTUALSPACEOPTIONS(int virtualSpace)</b><br />
<b id="SCI_GETVIRTUALSPACEOPTIONS">SCI_GETVIRTUALSPACEOPTIONS</b><br />
Virtual space can be enabled or disabled for rectangular selections or in other circumstances or in both.
There are two bit flags <code>SCVS_RECTANGULARSELECTION</code>=1 and
Virtual space can be enabled or disabled for rectangular selections or in other circumstances or in both.
There are two bit flags <code>SCVS_RECTANGULARSELECTION</code>=1 and
<code>SCVS_USERACCESSIBLE</code>=2 which can be set independently.
<code>SCVS_NONE</code>=0, the default, disables all use of virtual space.</p>
@ -1513,13 +1535,13 @@ struct TextToFind {
On GTK+, the key used to indicate that a rectangular selection should be created when combined with a mouse drag can be set.
The three possible values are <code>SCMOD_CTRL</code>=2 (default), <code>SCMOD_ALT</code>=4 or <code>SCMOD_SUPER</code>=8.
Since <code>SCMOD_ALT</code> is often already used by a window manager, the window manager may need configuring to allow this choice.
<code>SCMOD_SUPER</code> is often a system dependent modifier key such as the Left Windows key on a Windows keyboard or the
<code>SCMOD_SUPER</code> is often a system dependent modifier key such as the Left Windows key on a Windows keyboard or the
Command key on a Mac.</p>
<p>
<b id="SCI_GETSELECTIONS">SCI_GETSELECTIONS</b><br />
Return the number of selections currently active.</p>
<p>
<b id="SCI_CLEARSELECTIONS">SCI_CLEARSELECTIONS</b><br />
Set a single empty selection at 0 as the only selection.</p>
@ -1530,7 +1552,7 @@ struct TextToFind {
<p>
<b id="SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor)</b><br />
Add a new selection from <code>anchor</code> to <code>caret</code> as the main selection retaining all other
Add a new selection from <code>anchor</code> to <code>caret</code> as the main selection retaining all other
selections as additional selections.
Since there is always at least one selection, to set a list of selections, the first selection should be
added with <code>SCI_SETSELECTION</code> and later selections added with <code>SCI_ADDSELECTION</code></p>
@ -1595,6 +1617,11 @@ struct TextToFind {
<a class="message" href="#SCI_SETCARETPERIOD"><code>SCI_SETCARETPERIOD</code></a>, and
<a class="message" href="#SCI_GETCARETPERIOD"><code>SCI_GETCARETPERIOD</code></a>.</p>
<p>
<b id="SCI_SETADDITIONALCARETSVISIBLE">SCI_SETADDITIONALCARETSVISIBLE(bool additionalCaretsVisible)</b><br />
<b id="SCI_GETADDITIONALCARETSVISIBLE">SCI_GETADDITIONALCARETSVISIBLE</b><br />
Determine whether to show additional carets (defaults to <code>true</code>).
<p>
<b id="SCI_SWAPMAINANCHORCARET">SCI_SWAPMAINANCHORCARET</b><br />
<b id="SCI_ROTATESELECTION">SCI_ROTATESELECTION</b><br />
@ -1950,12 +1977,15 @@ struct TextToFind {
useWhitespaceForeColour, int colour)</a><br />
<a class="message" href="#SCI_SETWHITESPACEBACK">SCI_SETWHITESPACEBACK(bool
useWhitespaceBackColour, int colour)</a><br />
<a class="message" href="#SCI_SETWHITESPACESIZE">SCI_SETWHITESPACESIZE(int
size)</a><br />
<a class="message" href="#SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE</a><br />
<a class="message" href="#SCI_SETEXTRAASCENT">SCI_SETEXTRAASCENT(int extraAscent)</a><br />
<a class="message" href="#SCI_GETEXTRAASCENT">SCI_GETEXTRAASCENT</a><br />
<a class="message" href="#SCI_SETEXTRADESCENT">SCI_SETEXTRADESCENT(int extraDescent)</a><br />
<a class="message" href="#SCI_GETEXTRADESCENT">SCI_GETEXTRADESCENT</a><br />
</code>
<p><b id="SCI_SETVIEWWS">SCI_SETVIEWWS(int wsMode)</b><br />
<b id="SCI_GETVIEWWS">SCI_GETVIEWWS</b><br />
White space can be made visible which may be useful for languages in which white space is
@ -2005,15 +2035,21 @@ struct TextToFind {
the lexer's colours with <code>SCI_SETWHITESPACEFORE</code> and
<code>SCI_SETWHITESPACEBACK</code>.</p>
<b id="SCI_SETWHITESPACESIZE">SCI_SETWHITESPACESIZE(int size)</b><br />
<b id="SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE</b><br />
<code>SCI_SETWHITESPACESIZE</code> sets the size of the dots used for mark space characters.
The <code>SCI_GETWHITESPACESIZE</code> message retrieves the current size.
<p>
<p>
<b id="SCI_SETEXTRAASCENT">SCI_SETEXTRAASCENT(int extraAscent)</b><br />
<b id="SCI_GETEXTRAASCENT">SCI_GETEXTRAASCENT</b><br />
<b id="SCI_SETEXTRADESCENT">SCI_SETEXTRADESCENT(int extraDescent)</b><br />
<b id="SCI_GETEXTRADESCENT">SCI_GETEXTRADESCENT</b><br />
Text is drawn with the base of each character on a 'baseline'. The height of a line is found from the maximum
that any style extends above the baseline (its 'ascent'), added to the maximum that any style extends below the
Text is drawn with the base of each character on a 'baseline'. The height of a line is found from the maximum
that any style extends above the baseline (its 'ascent'), added to the maximum that any style extends below the
baseline (its 'descent').
Space may be added to the maximum ascent (<code>SCI_SETEXTRAASCENT</code>) and the
Space may be added to the maximum ascent (<code>SCI_SETEXTRAASCENT</code>) and the
maximum descent (<code>SCI_SETEXTRADESCENT</code>) to allow for more space between lines.
This may done to make the text easier to read or to accomodate underlines or highlights.
<p>
@ -2620,7 +2656,7 @@ struct TextToFind {
is hidden. Margin 1 is set to display non-folding symbols and is given a width of 16 pixels, so
it is visible. Margin 2 is set to display the folding symbols, but is given a width of 0, so it
is hidden. Of course, you can set the margins to be whatever you wish.</p>
<p>Styled text margins used to show revision and blame information:</p>
<p><img src="styledmargin.png" alt="Styled text margins used to show revision and blame information" /></p>
@ -2734,20 +2770,20 @@ struct TextToFind {
<b id="SCI_MARGINSETSTYLES">SCI_MARGINSETSTYLES(int line, char *styles)</b><br />
<b id="SCI_MARGINGETSTYLES">SCI_MARGINGETSTYLES(int line, char *styles)</b><br />
<b id="SCI_MARGINTEXTCLEARALL">SCI_MARGINTEXTCLEARALL</b><br />
Text margins are created with the type SC_MARGIN_TEXT or SC_MARGIN_RTEXT.
Text margins are created with the type SC_MARGIN_TEXT or SC_MARGIN_RTEXT.
A different string may be set for each line with <code>SCI_MARGINSETTEXT</code>.
The whole of the text margin on a line may be displayed in a particular style with
<code>SCI_MARGINSETSTYLE</code> or each character may be individually styled with
The whole of the text margin on a line may be displayed in a particular style with
<code>SCI_MARGINSETSTYLE</code> or each character may be individually styled with
<code>SCI_MARGINSETSTYLES</code> which uses an array of bytes with each byte setting the style
of the corresponding text byte simlar to <code>SCI_SETSTYLINGEX</code>.
Setting a text margin will cause a
of the corresponding text byte similar to <code>SCI_SETSTYLINGEX</code>.
Setting a text margin will cause a
<a class="message" href="#SC_MOD_CHANGEMARGIN"><code>SC_MOD_CHANGEMARGIN</code></a>
notification to be sent.
</p>
<p>
<b id="SCI_MARGINSETSTYLEOFFSET">SCI_MARGINSETSTYLEOFFSET(int style)</b><br />
<b id="SCI_MARGINGETSTYLEOFFSET">SCI_MARGINGETSTYLEOFFSET</b><br />
Margin styles may be completely separated from standard text styles by setting a style offset. For example,
Margin styles may be completely separated from standard text styles by setting a style offset. For example,
<code>SCI_MARGINSETSTYLEOFFSET(256)</code> would allow the margin styles to be numbered from
256 upto 511 so they do not overlap styles set by lexers. Each style number set with <code>SCI_MARGINSETSTYLE</code>
or <code>SCI_MARGINSETSTYLES</code> has the offset added before looking up the style.
@ -2756,8 +2792,8 @@ struct TextToFind {
<h2 id="Annotations">Annotations</h2>
<p>Annotations are read-only lines of text underneath each line of editable text.
An annotation may consist of multiple lines separated by '\n'.
Annotations can be used to display an assembler version of code for debugging or to show diagnostic messages inline or to
An annotation may consist of multiple lines separated by '\n'.
Annotations can be used to display an assembler version of code for debugging or to show diagnostic messages inline or to
line up different versions of text in a merge tool.</p>
<p>Annotations used for inline diagnostics:</p>
<p><img src="annotations.png" alt="Annotations used for inline diagnostics" /></p>
@ -2788,12 +2824,12 @@ struct TextToFind {
<b id="SCI_ANNOTATIONCLEARALL">SCI_ANNOTATIONCLEARALL</b><br />
A different string may be set for each line with <code>SCI_ANNOTATIONSETTEXT</code>.
To clear annotations call <code>SCI_ANNOTATIONSETTEXT</code> with a NULL pointer.
The whole of the text ANNOTATION on a line may be displayed in a particular style with
<code>SCI_ANNOTATIONSETSTYLE</code> or each character may be individually styled with
The whole of the text ANNOTATION on a line may be displayed in a particular style with
<code>SCI_ANNOTATIONSETSTYLE</code> or each character may be individually styled with
<code>SCI_ANNOTATIONSETSTYLES</code> which uses an array of bytes with each byte setting the style
of the corresponding text byte simlar to <code>SCI_SETSTYLINGEX</code>. The text must be set first as it
of the corresponding text byte similar to <code>SCI_SETSTYLINGEX</code>. The text must be set first as it
specifies how long the annotation is so how many bytes of styling to read.
Setting an annotation will cause a
Setting an annotation will cause a
<a class="message" href="#SC_MOD_CHANGEANNOTATION"><code>SC_MOD_CHANGEANNOTATION</code></a>
notification to be sent.
</p>
@ -2806,7 +2842,7 @@ struct TextToFind {
<b id="SCI_ANNOTATIONSETVISIBLE">SCI_ANNOTATIONSETVISIBLE(int visible)</b><br />
<b id="SCI_ANNOTATIONGETVISIBLE">SCI_ANNOTATIONGETVISIBLE</b><br />
Annotations can be made visible in a view and there is a choice of display style when visible.
The two messages set and get the annotation display mode. The <code>visible</code>
The two messages set and get the annotation display mode. The <code>visible</code>
argument can be one of:</p>
<table cellpadding="1" cellspacing="2" border="0" summary="Annotation visibility">
@ -2841,9 +2877,9 @@ struct TextToFind {
<p>
<b id="SCI_ANNOTATIONSETSTYLEOFFSET">SCI_ANNOTATIONSETSTYLEOFFSET(int style)</b><br />
<b id="SCI_ANNOTATIONGETSTYLEOFFSET">SCI_ANNOTATIONGETSTYLEOFFSET</b><br />
Annotation styles may be completely separated from standard text styles by setting a style offset. For example,
Annotation styles may be completely separated from standard text styles by setting a style offset. For example,
<code>SCI_ANNOTATIONSETSTYLEOFFSET(512)</code> would allow the annotation styles to be numbered from
512 upto 767 so they do not overlap styles set by lexers (or margins if margins offset is 256).
512 upto 767 so they do not overlap styles set by lexers (or margins if margins offset is 256).
Each style number set with <code>SCI_ANNOTATIONSETSTYLE</code>
or <code>SCI_ANNOTATIONSETSTYLES</code> has the offset added before looking up the style.
</p>
@ -2856,6 +2892,8 @@ struct TextToFind {
<a class="message" href="#SCI_GETBUFFEREDDRAW">SCI_GETBUFFEREDDRAW</a><br />
<a class="message" href="#SCI_SETTWOPHASEDRAW">SCI_SETTWOPHASEDRAW(bool twoPhase)</a><br />
<a class="message" href="#SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW</a><br />
<a class="message" href="#SCI_SETFONTQUALITY">SCI_SETFONTQUALITY(int fontQuality)</a><br />
<a class="message" href="#SCI_GETFONTQUALITY">SCI_GETFONTQUALITY</a><br />
<a class="message" href="#SCI_SETCODEPAGE">SCI_SETCODEPAGE(int codePage)</a><br />
<a class="message" href="#SCI_GETCODEPAGE">SCI_GETCODEPAGE</a><br />
<a class="message" href="#SCI_SETKEYSUNICODE">SCI_SETKEYSUNICODE(bool keysUnicode)</a><br />
@ -2917,6 +2955,16 @@ struct TextToFind {
transparent mode. Two phase drawing may flicker more than single phase
unless buffered drawing is on. The default is for drawing to be two phase.</p>
<p><b id="SCI_SETFONTQUALITY">SCI_SETFONTQUALITY(int fontQuality)</b><br />
<b id="SCI_GETFONTQUALITY">SCI_GETFONTQUALITY</b><br />
Manage font quality (antialiasing method). Currently, the following values are available on Windows:
<code>SC_EFF_QUALITY_DEFAULT</code> (backward compatible),
<code>SC_EFF_QUALITY_NON_ANTIALIASED</code>,
<code>SC_EFF_QUALITY_ANTIALIASED</code>,
<code>SC_EFF_QUALITY_LCD_OPTIMIZED</code>.</p>
<p>In case it is necessary to squeeze more options into this property, only a limited number of bits defined
by SC_EFF_QUALITY_MASK (0xf) will be used for quality.</p>
<p><b id="SCI_SETCODEPAGE">SCI_SETCODEPAGE(int codePage)</b><br />
<b id="SCI_GETCODEPAGE">SCI_GETCODEPAGE</b><br />
Scintilla has some support for Japanese, Chinese and Korean DBCS. Use this message with
@ -2933,16 +2981,17 @@ struct TextToFind {
normal Unicode encoding before being drawn by the OS and thus can display Hebrew, Arabic,
Cyrillic, and Han characters. Languages which can use two characters stacked vertically in one
horizontal space, such as Thai, will mostly work but there are some issues where the characters
are drawn separately leading to visual glitches. Bi-directional text is not supported. Characters outside the
Basic Multilingual Plane are unlikely to work.</p>
are drawn separately leading to visual glitches. Bi-directional text is not supported. </p>
<p>On Windows, code page can be set to 932 (Japanese Shift-JIS), 936 (Simplified Chinese GBK),
949 (Korean Unified Hangul Code), 950 (Traditional Chinese Big5), or 1361 (Korean Johab)
although these may require installation of language specific support.</p>
<p>On GTK+, code page <code>SC_CP_DBCS</code> (1) sets Scintilla into
multi byte character mode as is required for Japanese language processing with
the EUC encoding.</p>
<p>On GTK+, code page can be set to 932 (Japanese Shift-JIS), 936 (Simplified Chinese GBK),
or 950 (Traditional Chinese Big5).
The code page may also be set to <code>SC_CP_DBCS</code> (1)
which uses the current locale to handle multi byte characters which may work for otherwise unsupported
code pages.</p>
<p>For GTK+ 1.x, the locale should be set to a Unicode locale with a call similar to
<code>setlocale(LC_CTYPE, "en_US.UTF-8")</code>. Fonts with an <code>"iso10646"</code> registry
@ -3057,8 +3106,7 @@ struct TextToFind {
<a class="message" href="#SCI_GETLINEINDENTATION">SCI_GETLINEINDENTATION(int line)</a><br />
<a class="message" href="#SCI_GETLINEINDENTPOSITION">SCI_GETLINEINDENTPOSITION(int
line)</a><br />
<a class="message" href="#SCI_SETINDENTATIONGUIDES">SCI_SETINDENTATIONGUIDES(bool
view)</a><br />
<a class="message" href="#SCI_SETINDENTATIONGUIDES">SCI_SETINDENTATIONGUIDES(int indentView)</a><br />
<a class="message" href="#SCI_GETINDENTATIONGUIDES">SCI_GETINDENTATIONGUIDES</a><br />
<a class="message" href="#SCI_SETHIGHLIGHTGUIDE">SCI_SETHIGHLIGHTGUIDE(int column)</a><br />
<a class="message" href="#SCI_GETHIGHLIGHTGUIDE">SCI_GETHIGHLIGHTGUIDE</a><br />
@ -3154,7 +3202,7 @@ struct TextToFind {
<h2 id="Markers">Markers</h2>
<p>There are 32 markers, numbered 0 to 31, and you can assign any combination of them to each
<p>There are 32 markers, numbered 0 to <code>MARKER_MAX</code> (31), and you can assign any combination of them to each
line in the document. Markers appear in the <a class="jump" href="#Margins">selection
margin</a> to the left of the text. If the selection margin is set to zero width, the
background colour of the whole line is changed instead. Marker numbers 25 to 31 are used by
@ -3218,8 +3266,8 @@ struct TextToFind {
The <code>SC_MARK_EMPTY</code> symbol is invisible, allowing client code to track the movement
of lines. You would also use it if you changed the folding style and wanted one or more of the
<code>SC_FOLDERNUM_</code>* markers to have no associated symbol.</p>
<p>Applications may use the marker symbol <code>SC_MARK_AVAILABLE</code> to indicate that
<p>Applications may use the marker symbol <code>SC_MARK_AVAILABLE</code> to indicate that
plugins may allocate that marker number.
</p>
@ -3364,7 +3412,7 @@ struct TextToFind {
the XPM format <a class="jump" href="http://koala.ilog.fr/lehors/xpm.html">here</a>.</p>
<p><b id="SCI_MARKERSYMBOLDEFINED">SCI_MARKERSYMBOLDEFINED(int markerNumber)</b><br />
Returns the symbol defined for a markerNumber with <code>SCI_MARKERDEFINE</code>
Returns the symbol defined for a markerNumber with <code>SCI_MARKERDEFINE</code>
or <code>SC_MARK_PIXMAP</code> if defined with <code>SCI_MARKERDEFINEPIXMAP</code>.</p>
<p><b id="SCI_MARKERSETFORE">SCI_MARKERSETFORE(int markerNumber, int <a class="jump"
@ -3644,7 +3692,7 @@ struct TextToFind {
when you are done.</p>
<p>The number of bits used for styles can be altered with <a class="message"
href="#SCI_SETSTYLEBITS"><code>SCI_SETSTYLEBITS</code></a> from 0 to 7 bits. The remaining bits
href="#SCI_SETSTYLEBITS"><code>SCI_SETSTYLEBITS</code></a> from 0 to 8 bits. The remaining bits
can be used for indicators, so there can be from 1 to 8 indicators. However, the
<code>INDIC*_MASK</code> constants defined in <code>Scintilla.h</code> all assume 5 bits of
styling information and 3 indicators. If you use a different arrangement, you must define your
@ -3685,6 +3733,8 @@ struct TextToFind {
<a class="message" href="#SCI_AUTOCSELECT">SCI_AUTOCSELECT(&lt;unused&gt;, const char
*select)</a><br />
<a class="message" href="#SCI_AUTOCGETCURRENT">SCI_AUTOCGETCURRENT</a><br />
<a class="message" href="#SCI_AUTOCGETCURRENTTEXT">SCI_AUTOCGETCURRENTTEXT(&lt;unused&gt;,
char *text)</a><br />
<a class="message" href="#SCI_AUTOCSETCANCELATSTART">SCI_AUTOCSETCANCELATSTART(bool
cancel)</a><br />
<a class="message" href="#SCI_AUTOCGETCANCELATSTART">SCI_AUTOCGETCANCELATSTART</a><br />
@ -3764,8 +3814,18 @@ struct TextToFind {
item is found, it is selected. If the item is not found, the autocompletion list closes if
auto-hide is true (see <a class="message"
href="#SCI_AUTOCSETAUTOHIDE"><code>SCI_AUTOCSETAUTOHIDE</code></a>).<br />
The current selection can be retrieved with <code>SCI_AUTOCGETCURRENT</code>
</p>
The current selection index can be retrieved with <code>SCI_AUTOCGETCURRENT</code>.</p>
<p><b id="SCI_AUTOCGETCURRENTTEXT">SCI_AUTOCGETCURRENTTEXT(&lt;unused&gt;, char *text)</b><br />
This message retrieves the current selected text in the autocompletion list. Normally the
<a class="message" href="#SCN_AUTOCSELECTION"><code>SCN_AUTOCSELECTION</code></a> notification
is used instead.</p>
<p></p>The value is copied to the <code>text</code> buffer, returning the length (not including the
terminating 0). If not found, an empty string is copied to the buffer and 0 is returned.</p>
<p>If the value argument is 0 then the length that should be allocated to store the value is
returned; again, the terminating 0 is not included.</p>
<p><b id="SCI_AUTOCSETCANCELATSTART">SCI_AUTOCSETCANCELATSTART(bool cancel)</b><br />
<b id="SCI_AUTOCGETCANCELATSTART">SCI_AUTOCGETCANCELATSTART</b><br />
@ -4304,7 +4364,7 @@ struct TextToFind {
which can include a printer display context. Printed output shows text styling as on the
screen, but it hides all margins except a line number margin. All special marker effects are
removed and the selection and caret are hidden.</p>
<code><a class="message" href="#SCI_FORMATRANGE">SCI_FORMATRANGE(bool bDraw, RangeToFormat
<code><a class="message" href="#SCI_FORMATRANGE">SCI_FORMATRANGE(bool bDraw, Sci_RangeToFormat
*pfr)</a><br />
<a class="message" href="#SCI_SETPRINTMAGNIFICATION">SCI_SETPRINTMAGNIFICATION(int
magnification)</a><br />
@ -4315,7 +4375,7 @@ struct TextToFind {
<a class="message" href="#SCI_GETPRINTWRAPMODE">SCI_GETPRINTWRAPMODE</a><br />
</code>
<p><b id="SCI_FORMATRANGE">SCI_FORMATRANGE(bool bDraw, RangeToFormat *pfr)</b><br />
<p><b id="SCI_FORMATRANGE">SCI_FORMATRANGE(bool bDraw, Sci_RangeToFormat *pfr)</b><br />
This call allows Windows users to render a range of text into a device context. If you use
this for printing, you will probably want to arrange a page header and footer; Scintilla does
not do this for you. See <code>SciTEWin::Print()</code> in <code>SciTEWinDlg.cxx</code> for an
@ -4326,12 +4386,14 @@ struct TextToFind {
(for example, if you use this with MFC you will need to paginate in
<code>OnBeginPrinting()</code> before you output each page.</p>
<pre>
struct RangeToFormat {
SurfaceID hdc; // The HDC (device context) we print to
SurfaceID hdcTarget; // The HDC we use for measuring (may be same as hdc)
PRectangle rc; // Rectangle in which to print
PRectangle rcPage; // Physically printable page size
CharacterRange chrg; // Range of characters to print
struct Sci_Rectangle { int left; int top; int right; int bottom; };
struct Sci_RangeToFormat {
Sci_SurfaceID hdc; // The HDC (device context) we print to
Sci_SurfaceID hdcTarget; // The HDC we use for measuring (may be same as hdc)
Sci_Rectangle rc; // Rectangle in which to print
Sci_Rectangle rcPage; // Physically printable page size
Sci_CharacterRange chrg; // Range of characters to print
};
</pre>
@ -4664,48 +4726,53 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<table cellpadding="1" cellspacing="2" border="0" summary="Fold flags">
<tbody>
<tr>
<th align="center">Value</th>
<th align="left">Symbol</th>
<th align="left">Value</th>
<th align="left">Effect</th>
</tr>
</tbody>
<tbody valign="top">
<tr>
<td align="center">1</td>
<td align="left">Experimental - draw boxes if expanded</td>
<td align="left"></td>
<td align="left">1</td>
<td align="left">Experimental feature that has been removed.</td>
</tr>
<tr>
<td align="center">2</td>
<td align="left">SC_FOLDFLAG_LINEBEFORE_EXPANDED</td>
<td align="left">2</td>
<td align="left">Draw above if expanded</td>
</tr>
<tr>
<td align="center">4</td>
<td align="left">SC_FOLDFLAG_LINEBEFORE_CONTRACTED</td>
<td align="left">4</td>
<td align="left">Draw above if not expanded</td>
</tr>
<tr>
<td align="center">8</td>
<td align="left">SC_FOLDFLAG_LINEAFTER_EXPANDED</td>
<td align="left">8</td>
<td align="left">Draw below if expanded</td>
</tr>
<tr>
<td align="center">16</td>
<td align="left">SC_FOLDFLAG_LINEAFTER_CONTRACTED</td>
<td align="left">16</td>
<td align="left">Draw below if not expanded</td>
</tr>
<tr>
<td align="center">64</td>
<td align="left">SC_FOLDFLAG_LEVELNUMBERS</td>
<td align="left">64</td>
<td align="left">display hexadecimal fold levels in line margin to aid debugging of
folding. This feature needs to be redesigned to be sensible.</td>
folding. The appearance of this feature may change in the future.</td>
</tr>
</tbody>
</table>
@ -4906,7 +4973,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<tr>
<td align="left"><code>SC_WRAPINDENT_FIXED</code></td>
<td align="center">0</td>
<td>Wrapped sublines aligned to left of window plus amount set by
<td>Wrapped sublines aligned to left of window plus amount set by
<a class="message" href="#SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT</a></td>
</tr>
@ -5119,9 +5186,11 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<code>Fold</code>. See <code>externalLexer.cxx</code> for more.</p>
<code><a class="message" href="#SCI_SETLEXER">SCI_SETLEXER(int lexer)</a><br />
<a class="message" href="#SCI_GETLEXER">SCI_GETLEXER</a><br />
<a class="message" href="#SCI_SETLEXERLANGUAGE">SCI_SETLEXERLANGUAGE(&lt;unused&gt;, char
<a class="message" href="#SCI_SETLEXERLANGUAGE">SCI_SETLEXERLANGUAGE(&lt;unused&gt;, const char
*name)</a><br />
<a class="message" href="#SCI_LOADLEXERLIBRARY">SCI_LOADLEXERLIBRARY(&lt;unused&gt;, char
<a class="message" href="#SCI_GETLEXERLANGUAGE">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char
*name)</a><br />
<a class="message" href="#SCI_LOADLEXERLIBRARY">SCI_LOADLEXERLIBRARY(&lt;unused&gt;, const char
*path)</a><br />
<a class="message" href="#SCI_COLOURISE">SCI_COLOURISE(int start, int end)</a><br />
<a class="message" href="#SCI_SETPROPERTY">SCI_SETPROPERTY(const char *key, const char *value)</a><br />
@ -5145,7 +5214,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
assigns unused lexer numbers to.</p>
<p><b id="SCI_SETLEXERLANGUAGE">SCI_SETLEXERLANGUAGE(&lt;unused&gt;, const char *name)</b><br />
This message lets you select a lexer by name, and is the only method if you are using an
<b id="SCI_GETLEXERLANGUAGE">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char *name)</b><br />
<code>SCI_SETLEXERLANGUAGE</code> lets you select a lexer by name, and is the only method if you are using an
external lexer or if you have written a lexer module for a language of your own and do not wish
to assign it an explicit lexer number. To select an existing lexer, set <code>name</code> to
match the (case sensitive) name given to the module, for example "ada" or "python", not "Ada"
@ -5157,6 +5227,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
href="#SCI_GETLEXER"><code>SCI_GETLEXER</code></a> before and after setting the new lexer to
see if the lexer number changed.</p>
<p><code>SCI_GETLEXERLANGUAGE</code> retrieves the name of the lexer.</p>
<p><b id="SCI_LOADLEXERLIBRARY">SCI_LOADLEXERLIBRARY(&lt;unused&gt;, const char *path)</b><br />
Load a lexer implemented in a shared library. This is a .so file on GTK+/Linux or a .DLL file on Windows.
</p>
@ -5193,6 +5265,12 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
Property names should start with "lexer.&lt;lexer&gt;." or "fold.&lt;lexer&gt;." when they apply to one
lexer or start with "lexer." or "fold." if they apply to multiple lexers.</p>
<p>Applications may discover the set of properties used by searching the source code of lexers for lines that contain
<code>GetProperty</code> and a double quoted string and extract the value of the double quoted string as the property name.
The <code>scintilla/src/LexGen.py</code> script does this and can be used as an example.
Documentation for the property may be located above the call as a multi-line comment starting with
<br/><code>// property &lt;property-name&gt;</code></p>
<p><b id="SCI_GETPROPERTY">SCI_GETPROPERTY(const char *key, char *value)</b><br />
Lookup a keyword:value pair using the specified key; if found, copy the value to the user-supplied
buffer and return the length (not including the terminating 0). If not found, copy an empty string
@ -5681,7 +5759,7 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE</a>(lineNumber);
<td align="center">0x40000</td>
<td>This is set on for actions that the container stored into the undo stack with
<td>This is set on for actions that the container stored into the undo stack with
<a class="message" href="#SCI_ADDUNDOACTION"><code>SCI_ADDUNDOACTION</code></a>.
</td>
@ -6164,6 +6242,7 @@ EM_SETTARGETDEVICE
to create an instance of your class. You must disable the built-in implementation by defining
<code>SCI_OWNREGEX</code>.</p>
</body>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -25,9 +25,9 @@
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
<font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla201.zip?download">
<font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla212.zip?download">
Windows</a>&nbsp;&nbsp;
<a href="http://prdownloads.sourceforge.net/scintilla/scintilla201.tgz?download">
<a href="http://prdownloads.sourceforge.net/scintilla/scintilla212.tgz?download">
GTK+/Linux</a>&nbsp;&nbsp;
</font>
</td>
@ -41,7 +41,7 @@
containing very few restrictions.
</p>
<h3>
Release 2.01
Release 2.12
</h3>
<h4>
Source Code
@ -49,8 +49,8 @@
The source code package contains all of the source code for Scintilla but no binary
executable code and is available in
<ul>
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla201.zip?download">zip format</a> (1130K) commonly used on Windows</li>
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla201.tgz?download">tgz format</a> (970K) commonly used on Linux and compatible operating systems</li>
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla212.zip?download">zip format</a> (1160K) commonly used on Windows</li>
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla212.tgz?download">tgz format</a> (1080K) commonly used on Linux and compatible operating systems</li>
</ul>
Instructions for building on both Windows and Linux are included in the readme file.
<h4>
@ -66,5 +66,6 @@
Previous versions can be downloaded from the <a href="ScintillaHistory.html">history
page</a>.
</p>
</body>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -339,6 +339,14 @@
<td>Eric Kidd</td>
<td>maXmo</td>
<td>David Severwright</td>
<td>Jon Strait</td>
</tr><tr>
<td>Oliver Kiddle</td>
<td>Etienne Girondel</td>
<td>Haimag Ren</td>
<td>Andrey Moskalyov</td>
</tr><tr>
<td>Xavi</td>
</tr>
</table>
<p>
@ -350,6 +358,411 @@
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite212.zip?download">Release 2.12</a>
</h3>
<ul>
<li>
Released 1 June 2010.
</li>
<li>
Drawing optimizations improve speed and fix some visible flashing when scrolling.
</li>
<li>
Copy Path command added to File menu in SciTE.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2986745&group_id=2439">Feature #2986745.</a>
</li>
<li>
Optional warning displayed by SciTE when saving a file which has been modified by another process.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2975041&group_id=2439">Feature #2975041.</a>
</li>
<li>
Flagship lexer for xBase languages updated to follow the language much more closely.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2992689&group_id=2439">Feature #2992689.</a>
</li>
<li>
HTML lexer highlights Django templates in more regions.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3002874&group_id=2439">Feature #3002874.</a>
</li>
<li>
Dropping files on SciTE on Windows, releases the drag object earlier and opens the files asynchronously,
leading to smoother user experience.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2986724&group_id=2439">Feature #2986724.</a>
</li>
<li>
SciTE HTML exports take the Use Monospaced Font setting into account.
</li>
<li>
SciTE window title "[n of m]" localised.
</li>
<li>
When new line inserted at start of line, markers are moved down.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2986727&group_id=2439">Bug #2986727.</a>
</li>
<li>
On Windows, dropped text has its line ends converted, similar to pasting.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3005328&group_id=2439">Bug #3005328.</a>
</li>
<li>
Fixed bug with middle-click paste in block select mode where text was pasted next to selection rather than at cursor.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2984460&group_id=2439">Bug #2984460.</a>
</li>
<li>
Fixed SciTE crash where a style had a size parameter without a value.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3003834&group_id=2439">Bug #3003834.</a>
</li>
<li>
Debug assertions in multiple lexers fixed.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3000566&group_id=2439">Bug #3000566.</a>
</li>
<li>
CSS lexer fixed bug where @font-face displayed incorrectly
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2994224&group_id=2439">Bug #2994224.</a>
</li>
<li>
CSS lexer fixed bug where open comment caused highlighting error.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1683672&group_id=2439">Bug #1683672.</a>
</li>
<li>
Shell file lexer fixed highlight glitch with here docs where the first line is a comment.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830239&group_id=2439">Bug #2830239.</a>
</li>
<li>
Bug fixed in SciTE openpath property that caused Open Selected File to fail to open the selected file.
</li>
<li>
Bug fixed in SciTE FileExt property when file name with no extension evaluated to whole path.
</li>
<li>
Fixed SciTE on Windows printing bug where the $(CurrentTime), $(CurrentPage) variables were not expanded.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2994612&group_id=2439">Bug #2994612.</a>
</li>
<li>
SciTE compiles for 64-bit Windows and runs without crashing.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2986312&group_id=2439">Bug #2986312.</a>
</li>
<li>
Full Screen mode in Windows Vista/7 improved to hide Start button and size borders a little better.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3002813&group_id=2439">Bug #3002813.</a>
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite211.zip?download">Release 2.11</a>
</h3>
<ul>
<li>
Released 9 April 2010.
</li>
<li>
Fixes compatibility of Scintilla.h with the C language.
</li>
<li>
With a rectangular selection SCI_GETSELECTIONSTART and SCI_GETSELECTIONEND return limits of the
rectangular selection rather than the limits of the main selection.
</li>
<li>
When SciTE on Windows is minimized to tray, only takes a single click to restore rather than a double click.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=981917&group_id=2439">Feature #981917.</a>
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite210.zip?download">Release 2.10</a>
</h3>
<ul>
<li>
Released 4 April 2010.
</li>
<li>
Version 1.x of GTK+ is no longer supported.
</li>
<li>
SciTE is no longer supported on Windows 95, 98 or ME.
</li>
<li>
Case-insensitive search works for non-ASCII characters in UTF-8 and 8-bit encodings.
Non-regex search in DBCS encodings is always case-sensitive.
</li>
<li>
Non-ASCII characters may be changed to upper and lower case.
</li>
<li>
SciTE on Windows can access all files including those with names outside the user's preferred character encoding.
</li>
<li>
SciTE may be extended with lexers written in Lua.
</li>
<li>
When there are multiple selections, the paste command can go either to the main selection or to each
selection. This is controlled with SCI_SETMULTIPASTE.
</li>
<li>
More forms of bad UTF-8 are detected including overlong sequences, surrogates, and characters outside
the valid range. Bad UTF-8 bytes are now displayed as 2 hex digits preceded by 'x'.
</li>
<li>
SCI_GETTAG retrieves the value of captured expressions within regular expression searches.
</li>
<li>
Django template highlighting added to the HTML lexer.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2974889&group_id=2439">Feature #2974889.</a>
</li>
<li>
Verilog line comments can be folded.
</li>
<li>
SciTE on Windows allows specifying a filter for the Save As dialog.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2943445&group_id=2439">Feature #2943445.</a>
</li>
<li>
Bug fixed when multiple selection disabled where rectangular selections could be expanded into multiple selections.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2948260&group_id=2439">Bug #2948260.</a>
</li>
<li>
Bug fixed when document horizontally scrolled and up/down-arrow did not return to the same
column after horizontal scroll occurred.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2950799&group_id=2439">Bug #2950799.</a>
</li>
<li>
Bug fixed to remove hotspot highlight when mouse is moved out of the document. Windows only fix.
<a href="https://sourceforge.net/tracker/?func=detail&aid=2951353&group_id=2439&atid=102439">Bug #2951353.</a>
</li>
<li>
R lexer now performs case-sensitive check for keywords.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2956543&group_id=2439">Bug #2956543.</a>
</li>
<li>
Bug fixed on GTK+ where text disappeared when a wrap occurred.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2958043&group_id=2439">Bug #2958043.</a>
</li>
<li>
Bug fixed where regular expression replace cannot escape the '\' character by using '\\'.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2959876&group_id=2439">Bug #2959876.</a>
</li>
<li>
Bug fixed on GTK+ when virtual space disabled, middle-click could still paste text beyond end of line.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2971618&group_id=2439">Bug #2971618.</a>
</li>
<li>
SciTE crash fixed when double clicking on a malformed error message in the output pane.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2976551&group_id=2439">Bug #2976551.</a>
</li>
<li>
Improved performance on GTK+ when changing parameters associated with scroll bars to the same value.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2964357&group_id=2439">Bug #2964357.</a>
</li>
<li>
Fixed bug with pressing Shift+Tab with a rectangular selection so that it performs an un-indent
similar to how Tab performs an indent.
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite203.zip?download">Release 2.03</a>
</h3>
<ul>
<li>
Released 14 February 2010.
</li>
<li>
Added SCI_SETFIRSTVISIBLELINE to match SCI_GETFIRSTVISIBLELINE.
</li>
<li>
Erlang lexer extended set of numeric bases recognised; separate style for module:function_name; detects
built-in functions, known module attributes, and known preprocessor instructions; recognizes EDoc and EDoc macros;
separates types of comments.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2942448&group_id=2439">Bug #2942448.</a>
</li>
<li>
Python lexer extended with lexer.python.strings.over.newline option that allows non-triple-quoted strings to extend
past line ends. This allows use of the Ren'Py language.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2945550&group_id=2439">Feature #2945550.</a>
</li>
<li>
Fixed bugs with cursor movement after deleting a rectangular selection.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2942131&group_id=2439">Bug #2942131.</a>
</li>
<li>
Fixed bug where calling SCI_SETSEL when there is a rectangular selection left
the additional selections selected.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2947064&group_id=2439">Bug #2947064.</a>
</li>
<li>
Fixed macro recording bug where not all bytes in multi-byte character insertions were reported through
SCI_REPLACESEL.
</li>
<li>
Fixed SciTE bug where using Ctrl+Enter followed by Ctrl+Space produced an autocompletion list
with only a single line containing all the identifiers.
</li>
<li>
Fixed SciTE on GTK+ bug where running a tool made the user interface completely unresponsive.
</li>
<li>
Fixed SciTE on Windows Copy to RTF bug.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2108574&group_id=2439">Bug #2108574.</a>
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite202.zip?download">Release 2.02</a>
</h3>
<ul>
<li>
Released on 25 January 2010.
</li>
<li>
Markdown lexer added.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2844081&group_id=2439">Feature #2844081.</a>
</li>
<li>
On GTK+, include code that understands the ranges of lead bytes for code pages 932, 936, and 950
so that most Chinese and Japanese text can be used on systems that are not set to the corresponding locale.
</li>
<li>
Allow changing the size of dots in visible whitespace using SCI_SETWHITESPACESIZE.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2839427&group_id=2439">Feature #2839427.</a>
</li>
<li>
Additional carets can be hidden with SCI_SETADDITIONALCARETSVISIBLE.
</li>
<li>
Can choose anti-aliased, non-anti-aliased or lcd-optimized text using SCI_SETFONTQUALITY.
</li>
<li>
Retrieve the current selected text in the autocompletion list with SCI_AUTOCGETCURRENTTEXT.
</li>
<li>
Retrieve the name of the current lexer with SCI_GETLEXERLANGUAGE.
</li>
<li>
Progress 4GL lexer improves handling of comments in preprocessor declaration.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2902206&group_id=2439">Feature #2902206.</a>
</li>
<li>
HTML lexer extended to handle Mako template language.
</li>
<li>
SQL folder extended for SQL Anywhere "EXISTS" and "ENDIF" keywords.
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2887524&group_id=2439">Feature #2887524.</a>
</li>
<li>
SciTE adds APIPath and AbbrevPath variables.
</li>
<li>
SciTE on GTK+ uses pipes instead of temporary files for running tools. This should be more secure.
</li>
<li>
Fixed crash when calling SCI_STYLEGETFONT for a style which does not have a font set.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2857425&group_id=2439">Bug #2857425.</a>
</li>
<li>
Fixed crash caused by not having sufficient styles allocated after choosing a lexer.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2881279&group_id=2439">Bug #2881279.</a>
</li>
<li>
Fixed crash in SciTE using autocomplete word when word characters includes space.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2840141&group_id=2439">Bug #2840141.</a>
</li>
<li>
Fixed bug with handling upper-case file extensions SciTE on GTK+.
</li>
<li>
Fixed SciTE loading files from sessions with folded folds where it would not
be scrolled to the correct location.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2882775&group_id=2439">Bug #2882775.</a>
</li>
<li>
Fixed SciTE loading files from sessions when file no longer exists.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2883437&group_id=2439">Bug #2883437.</a>
</li>
<li>
Fixed SciTE export to HTML using the wrong background colour.
</li>
<li>
Fixed crash when adding an annotation and then adding a new line after the annotation.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2929708&group_id=2439">Bug #2929708.</a>
</li>
<li>
Fixed crash in SciTE setting a property to nil from Lua.
</li>
<li>
SCI_GETSELTEXT fixed to return correct length.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2929441&group_id=2439">Bug #2929441.</a>
</li>
<li>
Fixed text positioning problems with selection in some circumstances.
</li>
<li>
Fixed text positioning problems with ligatures on GTK+.
</li>
<li>
Fixed problem pasting into rectangular selection with caret at bottom caused text to go from the caret down
rather than replacing the selection.
</li>
<li>
Fixed problem replacing in a rectangular selection where only the final line was changed.
</li>
<li>
Fixed inability to select a rectangular area using Alt+Shift+Click at both corners.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2899746&group_id=2439">Bug #2899746.</a>
</li>
<li>
Fixed problem moving to start/end of a rectangular selection with left/right key.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2871358&group_id=2439">Bug #2871358.</a>
</li>
<li>
Fixed problem with Select All when there's a rectangular selection.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2930488&group_id=2439">Bug #2930488.</a>
</li>
<li>
Fixed SCI_LINEDUPLICATE on a rectangular selection to not produce multiple discontinuous selections.
</li>
<li>
Virtual space removed when performing delete word left or delete line left.
Virtual space converted to real space for delete word right.
Preserve virtual space when pressing Delete key.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2882566&group_id=2439">Bug #2882566.</a>
</li>
<li>
Fixed problem where Shift+Alt+Down did not move through wrapped lines.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2871749&group_id=2439">Bug #2871749.</a>
</li>
<li>
Fixed incorrect background colour when using coloured lines with virtual space.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2914691&group_id=2439">Bug #2914691.</a>
</li>
<li>
Fixed failure to display wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2936108&group_id=2439">Bug #2936108.</a>
</li>
<li>
Fixed blank background colour with EOLFilled style on last line.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2890105&group_id=2439">Bug #2890105.</a>
</li>
<li>
Fixed problem in VB lexer with keyword at end of file.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2901239&group_id=2439">Bug #2901239.</a>
</li>
<li>
Fixed SciTE bug where double clicking on a tab closed the file.
</li>
<li>
Fixed SciTE brace matching commands to only work when the caret is next to the brace, not when
it is in virtual space.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2885560&group_id=2439">Bug #2885560.</a>
</li>
<li>
Fixed SciTE on Windows Vista to access files in the Program Files directory rather than allow Windows
to virtualize access.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2916685&group_id=2439">Bug #2916685.</a>
</li>
<li>
Fixed NSIS folder to handle keywords that start with '!'.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2872157&group_id=2439">Bug #2872157.</a>
</li>
<li>
Changed linkage of Scintilla_LinkLexers to "C" so that it can be used by clients written in C.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2844718&group_id=2439">Bug #2844718.</a>
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite201.zip?download">Release 2.01</a>
</h3>
@ -387,7 +800,7 @@
Released on 11 August 2009.
</li>
<li>
Multiple pieces of text can be selected simultaneously by holding control whil dragging the mouse.
Multiple pieces of text can be selected simultaneously by holding control while dragging the mouse.
Typing, backspace and delete may affect all selections together.
</li>
<li>
@ -400,37 +813,37 @@
MagikSF lexer recognises numbers correctly.
</li>
<li>
Folding of Python comments and blank lines improved. Bug #210240.
Folding of Python comments and blank lines improved. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=210240&group_id=2439">Bug #210240.</a>
</li>
<li>
Bug fixed where background colour of last character in document leaked past that character.
</li>
<li>
Crash fixed when adding marker beyond last line in document. Bug #2830307.
Crash fixed when adding marker beyond last line in document. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830307&group_id=2439">Bug #2830307.</a>
</li>
<li>
Resource leak fixed in SciTE for Windows when printing fails. Bug #2816524.
Resource leak fixed in SciTE for Windows when printing fails. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2816524&group_id=2439">Bug #2816524.</a>
</li>
<li>
Bug fixed on Windows where the system caret was destroyed during destruction when another window
was using the system caret. Bug #2830223.
Bug fixed on Windows where the system caret was destroyed during destruction when another window
was using the system caret. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830223&group_id=2439">Bug #2830223.</a>
</li>
<li>
Bug fixed where indentation guides were drawn over text when the indentation used a style with a different
space width to the default style.
</li>
<li>
SciTE bug fixed where box comment added a bare line feed rather than the chosen line end. Bug #2818104.
SciTE bug fixed where box comment added a bare line feed rather than the chosen line end. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2818104&group_id=2439">Bug #2818104.</a>
</li>
<li>
Reverted fix that led to wrapping whole document when displaying the first line of the document.
</li>
<li>
Export to LaTeX in SciTE fixed to work in more cases and not use as much space. Bug #1286548.
Export to LaTeX in SciTE fixed to work in more cases and not use as much space. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1286548&group_id=2439">Bug #1286548.</a>
</li>
<li>
Bug fixed where EN_CHANGE notification was sent when performing a paste operation in a
read-only document. Bug #2825485.
read-only document. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2825485&group_id=2439">Bug #2825485.</a>
</li>
<li>
Refactored code so that Scintilla exposes less of its internal implementation and uses the C++ standard
@ -447,9 +860,9 @@
</li>
<li>
Memory exhaustion and other exceptions handled by placing an error value into the
status property rather than crashing.
status property rather than crashing.
Scintilla now builds with exception handling enabled and requires exception handling to be enabled. <br />
This is a major change and application developers should consider how they will deal with Scintilla exhausting
This is a major change and application developers should consider how they will deal with Scintilla exhausting
memory since Scintilla may not be in a stable state.
</li>
<li>
@ -479,13 +892,13 @@
</li>
<li>
When lines are wrapped, subsequent lines may be indented to match the indent of the initial line,
or one more indentation level. Feature #2796119.
or one more indentation level. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2796119&group_id=2439">Feature #2796119.</a>
</li>
<li>
APIs added for finding the character at a point rather than an inter-character position. Feature #2646738.
APIs added for finding the character at a point rather than an inter-character position. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2646738&group_id=2439">Feature #2646738.</a>
</li>
<li>
A new marker SC_MARK_BACKGROUND_UNDERLINE is drawn in the text area as an underline
A new marker SC_MARK_BACKGROUND_UNDERLINE is drawn in the text area as an underline
the full width of the window.
</li>
<li>
@ -495,27 +908,28 @@
CAML lexer also supports SML.
</li>
<li>
D lexer handles string and numeric literals more accurately. Feature #2793782.
D lexer handles string and numeric literals more accurately. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2793782&group_id=2439">Feature #2793782.</a>
</li>
<li>
Forth lexer is now case-insensitive and better supports numbers like $hex and %binary. Feature #2804894.
Forth lexer is now case-insensitive and better supports numbers like $hex and %binary. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2804894&group_id=2439">Feature #2804894.</a>
</li>
<li>
Lisp lexer treats '[', ']', '{', and '}' as balanced delimiters which is common usage. Feature #2794989.<br />
It treats keyword argument names as being equivalent to symbols. Feature #2794901.
Lisp lexer treats '[', ']', '{', and '}' as balanced delimiters which is common usage. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2794989&group_id=2439">Feature #2794989.</a>
<br />
It treats keyword argument names as being equivalent to symbols. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2794901&group_id=2439">Feature #2794901.</a>
</li>
<li>
Pascal lexer bug fixed to prevent hang when 'interface' near beginning of file. Bug #2802863.
Pascal lexer bug fixed to prevent hang when 'interface' near beginning of file. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2802863&group_id=2439">Bug #2802863.</a>
</li>
<li>
Perl lexer bug fixed where previous lexical states persisted causing "/" special case styling and
subroutine prototype styling to not be correct. Bug #2809168.
subroutine prototype styling to not be correct. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2809168&group_id=2439">Bug #2809168.</a>
</li>
<li>
XML lexer fixes bug where Unicode entities like '&amp;—' were broken into fragments. Bug #2804760.
XML lexer fixes bug where Unicode entities like '&amp;—' were broken into fragments. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2804760&group_id=2439">Bug #2804760.</a>
</li>
<li>
SciTE on GTK+ enables scrolling the tab bar on recent versions of GTK+. Feature #2061821.
SciTE on GTK+ enables scrolling the tab bar on recent versions of GTK+. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2061821&group_id=2439">Feature #2061821.</a>
</li>
<li>
SciTE on Windows allows tab bar tabs to be reordered by drag and drop.
@ -530,7 +944,7 @@
Width of icon column of autocompletion lists on GTK+ made more consistent.
</li>
<li>
Bug with slicing UTF-8 text into character fragments when there is a sequence of 100 or more 3 byte characters. Bug #2780566.
Bug with slicing UTF-8 text into character fragments when there is a sequence of 100 or more 3 byte characters. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2780566&group_id=2439">Bug #2780566.</a>
</li>
<li>
Folding bugs introduced in 1.78 fixed. Some of the fix was generic and there was also a specific fix for C++.
@ -539,7 +953,7 @@
Bug fixed where a rectangular paste was not padding the line with sufficient spaces to align the pasted text.
</li>
<li>
Bug fixed with showing all text on each line of multi-line annotations when styling the whole annotation using SCI_ANNOTATIONSETSTYLE. Bug #2789430.
Bug fixed with showing all text on each line of multi-line annotations when styling the whole annotation using SCI_ANNOTATIONSETSTYLE. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2789430&group_id=2439">Bug #2789430.</a>
</li>
</ul>
<h3>
@ -566,49 +980,49 @@
Can increase the amount of font ascent and descent.
</li>
<li>
COBOL lexer added. Feature #2127406.
COBOL lexer added. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439">Feature #2127406.</a>
</li>
<li>
Nimrod lexer added. Feature #2642620.
Nimrod lexer added. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2642620&group_id=2439">Feature #2642620.</a>
</li>
<li>
PowerPro lexer added. Feature #2195308.
PowerPro lexer added. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2195308&group_id=2439">Feature #2195308.</a>
</li>
<li>
SML lexer added. Feature #2710950.
SML lexer added. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2710950&group_id=2439">Feature #2710950.</a>
</li>
<li>
SORCUS Installation file lexer added. Feature #2343375.
SORCUS Installation file lexer added. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2343375&group_id=2439">Feature #2343375.</a>
</li>
<li>
TACL lexer added. Feature #2127406.
TACL lexer added. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439">Feature #2127406.</a>
</li>
<li>
TAL lexer added. Feature #2127406.
TAL lexer added. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439">Feature #2127406.</a>
</li>
<li>
Rewritten Pascal lexer with improved folding and other fixes. Feature #2190650.
Rewritten Pascal lexer with improved folding and other fixes. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2190650&group_id=2439">Feature #2190650.</a>
</li>
<li>
INDIC_ROUNDBOX translucency level can be modified. Feature #2586290.
INDIC_ROUNDBOX translucency level can be modified. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2586290&group_id=2439">Feature #2586290.</a>
</li>
<li>
C++ lexer treats angle brackets in #include directives as quotes when styling.within.preprocessor. Bug #2551033.
C++ lexer treats angle brackets in #include directives as quotes when styling.within.preprocessor. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2551033&group_id=2439">Bug #2551033.</a>
</li>
<li>
Inno Setup lexer is sensitive to whether within the [Code] section and handles comments better. Bug #2552973.
Inno Setup lexer is sensitive to whether within the [Code] section and handles comments better. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2552973&group_id=2439">Bug #2552973.</a>
</li>
<li>
HTML lexer does not go into script mode when script tag is self-closing.
</li>
<li>
HTML folder fixed where confused by comments when fold.html.preprocessor off. Bug #2532774.
HTML folder fixed where confused by comments when fold.html.preprocessor off. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2532774&group_id=2439">Bug #2532774.</a>
</li>
<li>
Perl lexer fixes problem with string matching caused by line endings. Bug #2648342.
Perl lexer fixes problem with string matching caused by line endings. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2648342&group_id=2439">Bug #2648342.</a>
</li>
<li>
Progress lexer fixes problem with "last-event:function" phrase. Bug #2483619.
Progress lexer fixes problem with "last-event:function" phrase. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2483619&group_id=2439">Bug #2483619.</a>
</li>
<li>
Properties file lexer extended to handle RFC2822 text when lexer.props.allow.initial.spaces on.
@ -617,51 +1031,53 @@
Python lexer adds options for Python 3 and Cython.
</li>
<li>
Shell lexer fixes heredoc problem caused by line endings. Bug #2635257.
Shell lexer fixes heredoc problem caused by line endings. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2635257&group_id=2439">Bug #2635257.</a>
</li>
<li>
TeX lexer handles comment at end of line correctly. Bug #2698766.
TeX lexer handles comment at end of line correctly. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2698766&group_id=2439">Bug #2698766.</a>
</li>
<li>
SciTE retains selection range when performing a replace selection command. Feature #2339160.
SciTE retains selection range when performing a replace selection command. <a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2339160&group_id=2439">Feature #2339160.</a>
</li>
<li>
SciTE definition of word characters fixed to match documentaiton. Bug #2464531.
SciTE definition of word characters fixed to match documentaiton. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2464531&group_id=2439">Bug #2464531.</a>
</li>
<li>
SciTE on GTK+ performing Search or Replace when dialog already shown now brings dialog to foreground.
Bug #2634224.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2634224&group_id=2439">Bug #2634224.</a>
</li>
<li>
Fixed encoding bug with calltips on GTK+.
</li>
<li>
Block caret drawn in correct place on wrapped lines. Bug #2126144.
Block caret drawn in correct place on wrapped lines. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2126144&group_id=2439">Bug #2126144.</a>
</li>
<li>
Compilation for 64 bit Windows works using MinGW. Bug #2515578.
Compilation for 64 bit Windows works using MinGW. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2515578&group_id=2439">Bug #2515578.</a>
</li>
<li>
Incorrect memory freeing fixed on OS X. Bug #2354098, #2671749.
Incorrect memory freeing fixed on OS X.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2354098&group_id=2439">Bug #2354098</a>,
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2671749&group_id=2439">Bug #2671749.</a>
</li>
<li>
SciTE on GTK+ crash fixed on startup when child process exits before initialisation complete.
Bug #2716987.
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2716987&group_id=2439">Bug #2716987.</a>
</li>
<li>
Crash fixed when AutoCompleteGetCurrent called with no active autocompletion.
</li>
<li>
Flickering diminished when pressing Tab. Bug #2723006.
Flickering diminished when pressing Tab. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2723006&group_id=2439">Bug #2723006.</a>
</li>
<li>
Namespace compilation issues with GTK+ on OS X fixed.
</li>
<li>
Increased maximum length of SciTE's Language menu on GTK+ to 100 items. Bug #2528241.
Increased maximum length of SciTE's Language menu on GTK+ to 100 items. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2528241&group_id=2439">Bug #2528241.</a>
</li>
<li>
Fixed incorrect Python lexing for multi-line continued strings. Bug #2450963.
Fixed incorrect Python lexing for multi-line continued strings. <a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2450963&group_id=2439">Bug #2450963.</a>
</li>
</ul>
<h3>
@ -676,7 +1092,7 @@
to libraries like regular expression libraries.
</li>
<li>
Scintilla on Windows can interpret keys as Unicode even when a narrow character
Scintilla on Windows can interpret keys as Unicode even when a narrow character
window with SCI_SETKEYSUNICODE.
</li>
<li>
@ -701,7 +1117,7 @@
CSS lexer updated and works with non-ASCII.
</li>
<li>
Diff lexer adds style for changed lines, handles subversion diffs better and
Diff lexer adds style for changed lines, handles subversion diffs better and
fixes styling and folding for lines containing chunk dividers ("---").
</li>
<li>
@ -711,7 +1127,7 @@
Haskell lexer allows hexadecimal literals.
</li>
<li>
HTML lexer improves PHP and JavaScript folding.
HTML lexer improves PHP and JavaScript folding.
PHP heredocs, nowdocs, strings and comments processed more accurately.
Internet Explorer's non-standard &gt;comment&lt; tag supported.
Script recognition in XML can be controlled with lexer.xml.allow.scripts property.
@ -756,7 +1172,7 @@
SciTE bug fixed where eol.mode not used for initial buffer.
</li>
<li>
SciTE bug fixed where a file could be saved as the same name as another
SciTE bug fixed where a file could be saved as the same name as another
buffer leading to confusing behaviour.
</li>
<li>
@ -6359,6 +6775,7 @@
<h3>
Beta releases of SciTE were called Tide
</h3>
</body>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -111,6 +111,27 @@
<h3>
Projects using Scintilla
</h3>
<p>
<a href="http://www.sparxsystems.com/products/ea/index.html">Enterprise Architect</a>
is a UML 2.1 analysis and design tool.
</p>
<p>
<a href="https://launchpad.net/codeassistor">The CodeAssistor Editor</a>
is a small and simple MacOSX source code editor.
</p>
<p>
<a href="http://www.topwizprogramming.com/freecode_pbeditor.html">PBEditor</a>
is a text editor for PowerBuilder.
</p>
<p>
<a href="http://www.cryptool.org/">CrypTool</a>
is an application for applying and analyzing cryptographic algorithms.
</p>
<p>
<a href="http://code.google.com/p/fxite/">FXiTe</a>
is an advanced cross-platform text editor built with the Fox GUI toolkit
and the FXScintilla text widget.
</p>
<p>
<a href="http://www.jabaco.org/">Jabaco</a>
is a simple programming language with a Visual Basic like syntax.
@ -168,7 +189,7 @@
is a Windows GUI client for the Subversion source control software.
</p>
<p>
<a href="http://geany.uvena.de/Main/HomePage">Geany</a>
<a href="http://www.geany.org/">Geany</a>
is a small and fast GTK2 based IDE, which has only a few dependencies from other packages.
</p>
<p>
@ -469,6 +490,7 @@
<p>
Inspirational coding soundscapes by <a href="http://www.davidbridie.com.au">David Bridie</a>.
</p>
</body>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -82,9 +82,6 @@
Persisting view state such as current folding into a stream or blob so it is easy
to restore.
</p>
<p>
Move line up and move line down keys or move selected lines up / down.
</p>
<p>
Printing of highlight lines and folding margin.
</p>
@ -102,24 +99,12 @@
<p>
More lexers for other languages.
</p>
<p>
Automatically calculated range for horizontal scrolling.
</p>
<p>
Virtual space at the end of lines so the caret can be moved beyond the end
of lines with the cursor keys. May also make rectangular operations easier
to perform.
</p>
<h3>
SciTE To Do
</h3>
<p>
Good regular expression support through a plugin.
</p>
<p>
Allow tools to transform the selection, performing an operation like
indentation or sorting.
</p>
<p>
Allow file name based selection on all properties rather than just a chosen few.
</p>
@ -142,9 +127,6 @@
These are features I don't like or don't think are important enough to work on.
Implementations are welcome from others though.
</p>
<p>
Automatically saving modified menu shortcuts on exit.
</p>
<p>
Mouse wheel panning (press the mouse wheel and then move the mouse) on
Windows.
@ -171,5 +153,6 @@
Just code it for your platform and I'll either reimplement for the other platform or
ensure that there is no effect on the other platform.
</p>
</body>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -370,6 +370,7 @@ SPAN {
<p>
<i>Page contributed by Andrew McKinlay.</i>
</p>
</body>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -138,5 +138,6 @@
<p>
<i>Page contributed by Holger Schmidt.</i>
</p>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body></html>

View File

@ -9,13 +9,32 @@
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
<meta name="Description"
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
<meta name="Date.Modified" content="20090819" />
<meta name="Date.Modified" content="20100601" />
<style type="text/css">
.versionlist {
color: #FFCC99;
#versionlist {
margin: 0;
padding: .5em;
list-style-type: none;
color: #FFCC99;
background: #000000;
}
#versionlist li {
margin-bottom: .5em;
}
#menu {
margin: 0;
padding: .5em 0;
list-style-type: none;
font-size: larger;
background: #CCCCCC;
}
#menu li {
margin: 0;
padding: 0 .5em;
display: inline;
}
</style>
<script>
<script type="text/javascript">
function IsRemote() {
var loc = '' + window.location;
return loc.indexOf('http:') != -1;
@ -36,8 +55,8 @@
GTK+</font>
</td>
<td width="40%" align="right">
<font color="#FFCC99" size="3"> Release version 2.01<br />
Site last modified August 19 2009</font>
<font color="#FFCC99" size="3"> Release version 2.12<br />
Site last modified June 1 2010</font>
</td>
<td width="20%">
&nbsp;
@ -51,63 +70,32 @@
</td>
</tr>
</table>
<table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="6" border="0">
<tr>
<td width="100%">
<span class="versionlist">Version 2.01 fixes some problems with multiple selection.</span>
</td>
</tr>
<tr>
<td width="100%">
<span class="versionlist">Version 2.0 supports multiple selection and virtual space.</span>
</td>
</tr>
<tr>
<td width="100%">
<span class="versionlist">Version 1.79 reports memory exhaustion instead of crashing.<br />
This is a major change and application developers should consider how they will deal with Scintilla exhausting
memory since Scintilla may not be in a stable state.</span>
</td>
</tr>
<tr>
<td width="100%">
<span class="versionlist">Version 1.78 allows annotation lines to be displayed beneath each document line
and to display a margin with different text for each document line.</span>
</td>
</tr>
<tr>
<td width="100%">
<span class="versionlist">Version 1.77 allows direct temporary access to the text buffer.</span>
</td>
</tr>
<tr>
<td width="100%">
<span class="versionlist">Version 1.76 fixes some minor bugs.</span>
</td>
</tr>
</table>
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
<font size="4">
<ul id="versionlist">
<li>Version 2.12 improves drawing speed and fixes bugs.</li>
<li>Version 2.11 fixes compatibility with the C language.</li>
<li>Version 2.10 performs case insensitive search and upper and lower casing for non-ASCII characters.
Support for version 1.x of GTK+ removed.</li>
<li>Version 2.03 fixes some problems with rectangular selection.</li>
<li>Version 2.02 fixes some problems with rectangular selection.</li>
<li>Version 2.01 fixes some problems with multiple selection.</li>
<li>Version 2.0 supports multiple selection and virtual space.</li>
</ul>
<ul id="menu">
<li id="remote1"><a href="http://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
<li id="remote2"><a href="http://www.scintilla.org/ScintillaDownload.html">Download</a></li>
<li><a href="http://www.scintilla.org/ScintillaDoc.html">Documentation</a></li>
<li><a href="http://www.scintilla.org/ScintillaToDo.html">Bugs</a></li>
<li id="remote3"><a href="http://www.scintilla.org/SciTE.html">SciTE</a></li>
<li><a href="http://www.scintilla.org/ScintillaHistory.html">History</a></li>
<li><a href="http://www.scintilla.org/ScintillaRelated.html">Related</a></li>
</ul>
<script type="text/javascript" language="JavaScript"><!--
if (IsRemote()) {
document.write('<a href="http://www.scintilla.org/SciTEImage.html">Screenshot</a>&nbsp;&nbsp;');
document.write('<a href="http://www.scintilla.org/ScintillaDownload.html">Download</a>&nbsp;&nbsp;');
if (!IsRemote()) { //if NOT remote...
document.getElementById('remote1').style.display='none';
document.getElementById('remote2').style.display='none';
document.getElementById('remote3').style.display='none';
}
//--></script>
<a href="http://www.scintilla.org/ScintillaDoc.html">Documentation</a>&nbsp;&nbsp;
<a href="http://www.scintilla.org/ScintillaToDo.html">Bugs</a>&nbsp;&nbsp;
<script type="text/javascript" language="JavaScript"><!--
if (IsRemote()) {
document.write('<a href="http://www.scintilla.org/SciTE.html">SciTE</a>&nbsp;&nbsp; ');
}
//--></script>
<a href="http://www.scintilla.org/ScintillaHistory.html">
History</a>&nbsp;&nbsp; <a href="http://www.scintilla.org/ScintillaRelated.html">Related</a>&nbsp;&nbsp;</font>
</td>
</tr>
</table>
<p>
<a href="http://www.scintilla.org/ScintillaDoc.html">Scintilla</a> is a free source code editing component.
It comes with complete source code and a <a href="http://www.scintilla.org/License.txt">license</a> that
@ -143,8 +131,8 @@ if (IsRemote()) {
</p>
<p>
Scintilla and SciTE are currently available for Intel Win32 and Linux compatible operating
systems with GTK+. They have been run on Windows XP, Windows 7RC, and on Ubuntu 9.04
with GTK+ 2.16. <a href="http://www.scintilla.org/SciTEImage.html">Here is a screenshot of
systems with GTK+. They have been run on Windows XP, Windows 7, and on Ubuntu 9.10
with GTK+ 2.18. <a href="http://www.scintilla.org/SciTEImage.html">Here is a screenshot of
SciTE.</a><br />
</p>
<p>
@ -181,10 +169,10 @@ if (IsRemote()) {
may receive no response.
<br />
</p>
There is a <a href="https://sourceforge.net/project/?group_id=2439">Scintilla project page</a>
hosted on
<script type="text/javascript" language="JavaScript">
<!--
document.write('There is a <a href="https://sourceforge.net/project/?group_id=2439">Scintilla project page<\/a>');
document.write(' hosted on ');
if (IsRemote()) {
document.write('<a href="http://sourceforge.net/projects/scintilla">');
document.write('<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2439&amp;type=8" width="80" height="15" alt="Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> ');
@ -193,6 +181,11 @@ if (IsRemote()) {
}
//-->
</script>
</body>
<noscript>
<a href="http://sourceforge.net/projects/scintilla">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2439&amp;type=8" width="80" height="15" alt="Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>
</noscript>
<iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
</body>
</html>

View File

@ -3,12 +3,7 @@
// Copyright 2004 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <iconv.h>
#if GTK_MAJOR_VERSION >= 2
typedef GIConv ConverterHandle;
#else
typedef iconv_t ConverterHandle;
#endif
typedef GIConv ConverterHandle;
const ConverterHandle iconvhBad = (ConverterHandle)(-1);
// Since various versions of iconv can not agree on whether the src argument
// is char ** or const char ** provide a templatised adaptor.
@ -24,11 +19,7 @@ size_t iconv_adaptor(size_t(*f_iconv)(ConverterHandle, T, size_t *, char **, siz
class Converter {
ConverterHandle iconvh;
void OpenHandle(const char *fullDestination, const char *charSetSource) {
#if GTK_MAJOR_VERSION >= 2
iconvh = g_iconv_open(fullDestination, charSetSource);
#else
iconvh = iconv_open(fullDestination, charSetSource);
#endif
}
bool Succeeded() const {
return iconvh != iconvhBad;
@ -65,11 +56,7 @@ public:
}
void Close() {
if (Succeeded()) {
#if GTK_MAJOR_VERSION >= 2
g_iconv_close(iconvh);
#else
iconv_close(iconvh);
#endif
iconvh = iconvhBad;
}
}
@ -77,11 +64,7 @@ public:
if (!Succeeded()) {
return (size_t)(-1);
} else {
#if GTK_MAJOR_VERSION >= 2
return iconv_adaptor(g_iconv, iconvh, src, srcleft, dst, dstleft);
#else
return iconv_adaptor(iconv, iconvh, src, srcleft, dst, dstleft);
#endif
}
}
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,334 +1,337 @@
PlatGTK.o: PlatGTK.cxx \
../include/Scintilla.h ../include/ScintillaWidget.h \
../src/UniConversion.h ../src/XPM.h Converter.h
../include/Scintilla.h ../include/ScintillaWidget.h \
../src/UniConversion.h ../src/XPM.h Converter.h
ScintillaGTK.o: ScintillaGTK.cxx \
../include/Scintilla.h ../include/ScintillaWidget.h \
../include/SciLexer.h ../include/PropSet.h ../src/PropSetSimple.h \
../include/Accessor.h ../include/KeyWords.h ../src/SVector.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h ../src/CellBuffer.h ../src/CallTip.h \
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/AutoComplete.h ../src/ViewStyle.h \
../src/Decoration.h ../src/CharClassify.h ../src/Document.h \
../src/Selection.h ../src/PositionCache.h ../src/Editor.h \
../src/ScintillaBase.h ../src/UniConversion.h scintilla-marshal.h \
../src/ExternalLexer.h Converter.h
../include/Scintilla.h ../include/ScintillaWidget.h \
../include/SciLexer.h ../include/PropSet.h ../src/PropSetSimple.h \
../include/Accessor.h ../include/KeyWords.h ../src/SVector.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h ../src/CellBuffer.h ../src/CallTip.h \
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/AutoComplete.h ../src/ViewStyle.h \
../src/Decoration.h ../src/CharClassify.h ../src/Document.h \
../src/Selection.h ../src/PositionCache.h ../src/Editor.h \
../src/ScintillaBase.h ../src/UniConversion.h scintilla-marshal.h \
../src/ExternalLexer.h Converter.h
AutoComplete.o: ../src/AutoComplete.cxx ../include/Platform.h \
../src/CharClassify.h ../src/AutoComplete.h
../src/CharClassify.h ../src/AutoComplete.h
CallTip.o: ../src/CallTip.cxx ../include/Platform.h \
../include/Scintilla.h ../src/CallTip.h
../include/Scintilla.h ../src/CallTip.h
CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/CellBuffer.h
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/CellBuffer.h
CharClassify.o: ../src/CharClassify.cxx ../src/CharClassify.h
ContractionState.o: ../src/ContractionState.cxx ../include/Platform.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h
Decoration.o: ../src/Decoration.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/Decoration.h
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/Decoration.h
DocumentAccessor.o: ../src/DocumentAccessor.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/DocumentAccessor.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/CellBuffer.h ../include/Scintilla.h ../src/CharClassify.h \
../src/Decoration.h ../src/Document.h
../include/PropSet.h ../include/Accessor.h ../src/DocumentAccessor.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/CellBuffer.h ../include/Scintilla.h ../src/CharClassify.h \
../src/Decoration.h ../src/Document.h
Document.o: ../src/Document.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/CellBuffer.h ../src/PerLine.h \
../src/CharClassify.h ../src/Decoration.h ../src/Document.h \
../src/RESearch.h
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/CellBuffer.h ../src/PerLine.h \
../src/CharClassify.h ../src/Decoration.h ../src/Document.h \
../src/RESearch.h
Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h ../src/CellBuffer.h ../src/KeyMap.h \
../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \
../src/ViewStyle.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h ../src/CellBuffer.h ../src/KeyMap.h \
../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \
../src/ViewStyle.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h
ExternalLexer.o: ../src/ExternalLexer.cxx ../include/Platform.h \
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \
../src/ExternalLexer.h
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \
../src/ExternalLexer.h
Indicator.o: ../src/Indicator.cxx ../include/Platform.h \
../include/Scintilla.h ../src/Indicator.h
../include/Scintilla.h ../src/Indicator.h
KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
../src/KeyMap.h
../src/KeyMap.h
KeyWords.o: ../src/KeyWords.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexAbaqus.o: ../src/LexAbaqus.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexAda.o: ../src/LexAda.cxx ../include/Platform.h ../include/Accessor.h \
../src/StyleContext.h ../include/PropSet.h ../include/KeyWords.h \
../include/SciLexer.h
../src/StyleContext.h ../include/PropSet.h ../include/KeyWords.h \
../include/SciLexer.h
LexAPDL.o: ../src/LexAPDL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexAsm.o: ../src/LexAsm.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexAsn1.o: ../src/LexAsn1.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexASY.o: ../src/LexASY.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexAU3.o: ../src/LexAU3.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexAVE.o: ../src/LexAVE.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexBaan.o: ../src/LexBaan.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexBash.o: ../src/LexBash.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexBasic.o: ../src/LexBasic.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexBullant.o: ../src/LexBullant.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexCaml.o: ../src/LexCaml.cxx ../include/Platform.h ../include/PropSet.h \
../src/PropSetSimple.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../src/PropSetSimple.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexCLW.o: ../src/LexCLW.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexCmake.o: ../src/LexCmake.cxx ../include/Platform.h \
../src/CharClassify.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../src/CharClassify.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexCOBOL.o: ../src/LexCOBOL.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
LexConf.o: ../src/LexConf.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
LexCPP.o: ../src/LexCPP.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexCrontab.o: ../src/LexCrontab.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexCsound.o: ../src/LexCsound.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexCSS.o: ../src/LexCSS.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexD.o: ../src/LexD.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexEiffel.o: ../src/LexEiffel.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexErlang.o: ../src/LexErlang.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexEScript.o: ../src/LexEScript.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexFlagship.o: ../src/LexFlagship.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexForth.o: ../src/LexForth.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexFortran.o: ../src/LexFortran.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexGAP.o: ../src/LexGAP.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexGui4Cli.o: ../src/LexGui4Cli.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexHaskell.o: ../src/LexHaskell.cxx ../include/Platform.h \
../include/PropSet.h ../src/PropSetSimple.h ../include/Accessor.h \
../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
../include/PropSet.h ../src/PropSetSimple.h ../include/Accessor.h \
../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
LexHTML.o: ../src/LexHTML.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexInno.o: ../src/LexInno.cxx ../include/Platform.h ../src/CharClassify.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexKix.o: ../src/LexKix.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexLisp.o: ../src/LexLisp.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexLout.o: ../src/LexLout.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexLua.o: ../src/LexLua.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexMagik.o: ../src/LexMagik.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexMarkdown.o: ../src/LexMarkdown.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexMatlab.o: ../src/LexMatlab.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexMetapost.o: ../src/LexMetapost.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
LexMMIXAL.o: ../src/LexMMIXAL.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexMPT.o: ../src/LexMPT.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
LexMSSQL.o: ../src/LexMSSQL.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexMySQL.o: ../src/LexMySQL.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexNimrod.o: ../src/LexNimrod.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexNsis.o: ../src/LexNsis.cxx ../include/Platform.h ../src/CharClassify.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexOpal.o: ../src/LexOpal.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexOthers.o: ../src/LexOthers.cxx ../include/Platform.h \
../src/CharClassify.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../src/CharClassify.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexPascal.o: ../src/LexPascal.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h \
../src/CharacterSet.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h \
../src/CharacterSet.h
LexPB.o: ../src/LexPB.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexPerl.o: ../src/LexPerl.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexPLM.o: ../src/LexPLM.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexPOV.o: ../src/LexPOV.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexPowerPro.o: ../src/LexPowerPro.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \
../src/CharacterSet.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \
../src/CharacterSet.h
LexPowerShell.o: ../src/LexPowerShell.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexProgress.o: ../src/LexProgress.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexPS.o: ../src/LexPS.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexPython.o: ../src/LexPython.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexR.o: ../src/LexR.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexRebol.o: ../src/LexRebol.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
LexRuby.o: ../src/LexRuby.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
LexScriptol.o: ../src/LexScriptol.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexSmalltalk.o: ../src/LexSmalltalk.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexSML.o: ../src/LexSML.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexSorcus.o: ../src/LexSorcus.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexSpecman.o: ../src/LexSpecman.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexSpice.o: ../src/LexSpice.cxx ../include/Platform.h \
../include/Accessor.h ../src/StyleContext.h ../include/PropSet.h \
../include/KeyWords.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/PropSet.h \
../include/KeyWords.h ../include/SciLexer.h
LexSQL.o: ../src/LexSQL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexTACL.o: ../src/LexTACL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexTADS3.o: ../src/LexTADS3.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexTAL.o: ../src/LexTAL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexTCL.o: ../src/LexTCL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexTeX.o: ../src/LexTeX.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexVB.o: ../src/LexVB.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexVerilog.o: ../src/LexVerilog.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexVHDL.o: ../src/LexVHDL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexYAML.o: ../src/LexYAML.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LineMarker.o: ../src/LineMarker.cxx ../include/Platform.h \
../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h
../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h
PerLine.o: ../src/PerLine.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/CellBuffer.h ../src/PerLine.h
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/CellBuffer.h ../src/PerLine.h
PositionCache.o: ../src/PositionCache.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
../src/Decoration.h ../src/Document.h ../src/Selection.h \
../src/PositionCache.h
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
../src/Decoration.h ../src/Document.h ../src/Selection.h \
../src/PositionCache.h
PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \
../src/PropSetSimple.h
../src/PropSetSimple.h
RESearch.o: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h
RunStyles.o: ../src/RunStyles.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h
ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \
../include/Scintilla.h ../include/PropSet.h ../src/PropSetSimple.h \
../include/SciLexer.h ../include/Accessor.h ../src/DocumentAccessor.h \
../include/KeyWords.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \
../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \
../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h ../src/ScintillaBase.h
../include/Scintilla.h ../include/PropSet.h ../src/PropSetSimple.h \
../include/SciLexer.h ../include/Accessor.h ../src/DocumentAccessor.h \
../include/KeyWords.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \
../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \
../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h ../src/ScintillaBase.h
Selection.o: ../src/Selection.cxx ../include/Platform.h \
../include/Scintilla.h ../src/Selection.h
../include/Scintilla.h ../src/Selection.h
StyleContext.o: ../src/StyleContext.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h
Style.o: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
../src/Style.h
../src/Style.h
UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h
ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h
WindowAccessor.o: ../src/WindowAccessor.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/WindowAccessor.h \
../include/Scintilla.h
../include/PropSet.h ../include/Accessor.h ../include/WindowAccessor.h \
../include/Scintilla.h
XPM.o: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h

View File

@ -1,21 +1,27 @@
# Make file for Scintilla on Linux or compatible OS
# Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.
# This makefile assumes GCC 3.1 is used and changes will be needed to use other compilers.
# This makefile assumes GCC 4.3 is used and changes will be needed to use other compilers.
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
# Builds for GTK+ 2 if available else GTK+ 1.
# To force GTK+ 2 build, define GTK2 on the make command line.
# To force GTK+ 1 build, define GTK1 on the make command line.
# Builds for GTK+ 2 and no longer supports GTK+ 1.
# Also works with ming32-make on Windows.
.SUFFIXES: .cxx .c .o .h .a
ifdef CLANG
CC = clang
CCOMP = clang
else
CC = g++
CCOMP = gcc
endif
AR = ar
RANLIB = touch
ifndef windir
ifeq ($(shell uname),Darwin)
RANLIB = ranlib
endif
endif
COMPLIB=../bin/scintilla.a
@ -23,7 +29,7 @@ vpath %.h ../src ../include
vpath %.cxx ../src
INCLUDEDIRS=-I ../include -I ../src
CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic -Os -DGTK -DSCI_LEXER $(INCLUDEDIRS)
CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic -DGTK -DSCI_LEXER $(INCLUDEDIRS)
ifdef NOTHREADS
THREADFLAGS=-DG_THREADS_IMPL_NONE
@ -37,23 +43,8 @@ else
CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
endif
# If explicit setting of GTK1 or GTK2 then use that else look for
# pkg-config which is an OK indication that GTK2 is available
ifdef GTK2
CONFIGFLAGS:=$(shell pkg-config --cflags gtk+-2.0)
MARSHALLER=scintilla-marshal.o
else
ifdef GTK1
CONFIGFLAGS:=$(shell gtk-config --cflags)
else
ifneq (,$(findstring /,$(shell whereis pkg-config)))
CONFIGFLAGS:=$(shell pkg-config --cflags gtk+-2.0)
MARSHALLER=scintilla-marshal.o
else
CONFIGFLAGS:=$(shell gtk-config --cflags)
endif
endif
endif
.cxx.o:
$(CC) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
@ -68,12 +59,13 @@ LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o \
LexCOBOL.o LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o \
LexEiffel.o LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o \
LexGAP.o LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o \
LexLout.o LexLua.o LexMagik.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexMPT.o \
LexMSSQL.o LexMySQL.o LexNimrod.o LexNsis.o LexOpal.o LexOthers.o LexPascal.o \
LexPB.o LexPerl.o LexPLM.o LexPOV.o LexPowerPro.o LexPowerShell.o \
LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o LexScriptol.o \
LexSmalltalk.o LexSML.o LexSorcus.o LexSpecman.o LexSpice.o LexSQL.o LexTACL.o \
LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o LexVHDL.o LexYAML.o
LexLout.o LexLua.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o \
LexMMIXAL.o LexMPT.o LexMSSQL.o LexMySQL.o LexNimrod.o LexNsis.o LexOpal.o \
LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPOV.o LexPowerPro.o \
LexPowerShell.o LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o \
LexScriptol.o LexSmalltalk.o LexSML.o LexSorcus.o LexSpecman.o LexSpice.o \
LexSQL.o LexTACL.o LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o \
LexVHDL.o LexYAML.o
#--Autogenerated -- end of automatically generated section
all: $(COMPLIB)

View File

@ -295,7 +295,7 @@ public:
virtual ~Font();
virtual void Create(const char *faceName, int characterSet, int size,
bool bold, bool italic, bool extraFontFlag=false);
bool bold, bool italic, int extraFontFlag=0);
virtual void Release();
FontID GetID() { return fid; }
@ -314,8 +314,8 @@ private:
Surface(const Surface &) {}
Surface &operator=(const Surface &) { return *this; }
public:
Surface() {};
virtual ~Surface() {};
Surface() {}
virtual ~Surface() {}
static Surface *Allocate();
virtual void Init(WindowID wid)=0;
@ -474,7 +474,7 @@ public:
*/
class DynamicLibrary {
public:
virtual ~DynamicLibrary() {};
virtual ~DynamicLibrary() {}
/// @return Pointer to function "name", or NULL on failure.
virtual Function FindFunction(const char *name) = 0;

View File

@ -110,11 +110,13 @@
#define SCLEX_POWERPRO 95
#define SCLEX_NIMROD 96
#define SCLEX_SML 97
#define SCLEX_MARKDOWN 198
#define SCLEX_SEARCHRESULT 98
#define SCLEX_OBJC 99
#define SCLEX_USER 100
#define SCLEX_AUTOMATIC 1000
//For All lexer
@ -682,6 +684,7 @@
#define SCE_CSS_EXTENDED_IDENTIFIER 19
#define SCE_CSS_EXTENDED_PSEUDOCLASS 20
#define SCE_CSS_EXTENDED_PSEUDOELEMENT 21
#define SCE_CSS_MEDIA 22
#define SCE_POV_DEFAULT 0
#define SCE_POV_COMMENT 1
#define SCE_POV_COMMENTLINE 2
@ -834,8 +837,19 @@
#define SCE_ERLANG_CHARACTER 9
#define SCE_ERLANG_MACRO 10
#define SCE_ERLANG_RECORD 11
#define SCE_ERLANG_SEPARATOR 12
#define SCE_ERLANG_PREPROC 12
#define SCE_ERLANG_NODE_NAME 13
#define SCE_ERLANG_COMMENT_FUNCTION 14
#define SCE_ERLANG_COMMENT_MODULE 15
#define SCE_ERLANG_COMMENT_DOC 16
#define SCE_ERLANG_COMMENT_DOC_MACRO 17
#define SCE_ERLANG_ATOM_QUOTED 18
#define SCE_ERLANG_MACRO_QUOTED 19
#define SCE_ERLANG_RECORD_QUOTED 20
#define SCE_ERLANG_NODE_NAME_QUOTED 21
#define SCE_ERLANG_BIFS 22
#define SCE_ERLANG_MODULES 23
#define SCE_ERLANG_MODULES_ATT 24
#define SCE_ERLANG_UNKNOWN 31
#define SCE_MSSQL_DEFAULT 0
#define SCE_MSSQL_COMMENT 1
@ -1115,11 +1129,19 @@
#define SCE_FS_DATE 16
#define SCE_FS_STRINGEOL 17
#define SCE_FS_CONSTANT 18
#define SCE_FS_ASM 19
#define SCE_FS_LABEL 20
#define SCE_FS_ERROR 21
#define SCE_FS_HEXNUMBER 22
#define SCE_FS_BINNUMBER 23
#define SCE_FS_WORDOPERATOR 19
#define SCE_FS_DISABLEDCODE 20
#define SCE_FS_DEFAULT_C 21
#define SCE_FS_COMMENTDOC_C 22
#define SCE_FS_COMMENTLINEDOC_C 23
#define SCE_FS_KEYWORD_C 24
#define SCE_FS_KEYWORD2_C 25
#define SCE_FS_NUMBER_C 26
#define SCE_FS_STRING_C 27
#define SCE_FS_PREPROCESSOR_C 28
#define SCE_FS_OPERATOR_C 29
#define SCE_FS_IDENTIFIER_C 30
#define SCE_FS_STRINGEOL_C 31
#define SCE_CSOUND_DEFAULT 0
#define SCE_CSOUND_COMMENT 1
#define SCE_CSOUND_NUMBER 2
@ -1142,7 +1164,6 @@
#define SCE_INNO_PARAMETER 3
#define SCE_INNO_SECTION 4
#define SCE_INNO_PREPROC 5
#define SCE_INNO_PREPROC_INLINE 6
#define SCE_INNO_INLINE_EXPANSION 6
#define SCE_INNO_COMMENT_PASCAL 7
#define SCE_INNO_KEYWORD_PASCAL 8
@ -1389,6 +1410,28 @@
#define SCE_SML_COMMENT1 13
#define SCE_SML_COMMENT2 14
#define SCE_SML_COMMENT3 15
#define SCE_MARKDOWN_DEFAULT 0
#define SCE_MARKDOWN_LINE_BEGIN 1
#define SCE_MARKDOWN_STRONG1 2
#define SCE_MARKDOWN_STRONG2 3
#define SCE_MARKDOWN_EM1 4
#define SCE_MARKDOWN_EM2 5
#define SCE_MARKDOWN_HEADER1 6
#define SCE_MARKDOWN_HEADER2 7
#define SCE_MARKDOWN_HEADER3 8
#define SCE_MARKDOWN_HEADER4 9
#define SCE_MARKDOWN_HEADER5 10
#define SCE_MARKDOWN_HEADER6 11
#define SCE_MARKDOWN_PRECHAR 12
#define SCE_MARKDOWN_ULIST_ITEM 13
#define SCE_MARKDOWN_OLIST_ITEM 14
#define SCE_MARKDOWN_BLOCKQUOTE 15
#define SCE_MARKDOWN_STRIKEOUT 16
#define SCE_MARKDOWN_HRULE 17
#define SCE_MARKDOWN_LINK 18
#define SCE_MARKDOWN_CODE 19
#define SCE_MARKDOWN_CODE2 20
#define SCE_MARKDOWN_CODEBK 21
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
#endif

View File

@ -11,17 +11,21 @@
#ifndef SCINTILLA_H
#define SCINTILLA_H
#if LCCWIN
typedef BOOL bool;
#ifdef __cplusplus
extern "C" {
#endif
#if PLAT_WIN
#if defined(_WIN32)
/* Return false on failure: */
bool Scintilla_RegisterClasses(void *hInstance);
bool Scintilla_ReleaseResources();
int Scintilla_RegisterClasses(void *hInstance);
int Scintilla_ReleaseResources();
#endif
int Scintilla_LinkLexers();
#ifdef __cplusplus
}
#endif
/* Here should be placed typedefs for uptr_t, an unsigned integer type large enough to
* hold a pointer and sptr_t, a signed integer large enough to hold a pointer.
* May need to be changed for 64 bit platforms. */
@ -258,6 +262,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETWHITESPACEFORE 2084
#define SCI_SETWHITESPACEBACK 2085
#define SCI_SETWHITESPACESIZE 2086
#define SCI_GETWHITESPACESIZE 2087
#define SCI_SETSTYLEBITS 2090
#define SCI_GETSTYLEBITS 2091
#define SCI_SETLINESTATE 2092
@ -472,6 +478,19 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_APPENDTEXT 2282
#define SCI_GETTWOPHASEDRAW 2283
#define SCI_SETTWOPHASEDRAW 2284
#define SC_EFF_QUALITY_MASK 0xF
#define SC_EFF_QUALITY_DEFAULT 0
#define SC_EFF_QUALITY_NON_ANTIALIASED 1
#define SC_EFF_QUALITY_ANTIALIASED 2
#define SC_EFF_QUALITY_LCD_OPTIMIZED 3
#define SCI_SETFONTQUALITY 2611
#define SCI_GETFONTQUALITY 2612
#define SCI_SETFIRSTVISIBLELINE 2613
#define SC_MULTIPASTE_ONCE 0
#define SC_MULTIPASTE_EACH 1
#define SCI_SETMULTIPASTE 2614
#define SCI_GETMULTIPASTE 2615
#define SCI_GETTAG 2616
#define SCI_TARGETFROMSELECTION 2287
#define SCI_LINESJOIN 2288
#define SCI_LINESSPLIT 2289
@ -646,6 +665,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETWHITESPACECHARS 2443
#define SCI_SETCHARSDEFAULT 2444
#define SCI_AUTOCGETCURRENT 2445
#define SCI_AUTOCGETCURRENTTEXT 2610
#define SCI_ALLOCATE 2446
#define SCI_TARGETASUTF8 2447
#define SCI_SETLENGTHFORENCODE 2448
@ -724,6 +744,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETADDITIONALSELECTIONTYPING 2566
#define SCI_SETADDITIONALCARETSBLINK 2567
#define SCI_GETADDITIONALCARETSBLINK 2568
#define SCI_SETADDITIONALCARETSVISIBLE 2608
#define SCI_GETADDITIONALCARETSVISIBLE 2609
#define SCI_GETSELECTIONS 2570
#define SCI_CLEARSELECTIONS 2571
#define SCI_SETSELECTION 2572
@ -779,6 +801,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETPROPERTYEXPANDED 4009
#define SCI_GETPROPERTYINT 4010
#define SCI_GETSTYLEBITSNEEDED 4011
#define SCI_GETLEXERLANGUAGE 4012
#define SC_MOD_INSERTTEXT 0x1
#define SC_MOD_DELETETEXT 0x2
#define SC_MOD_CHANGESTYLE 0x4
@ -886,23 +909,28 @@ struct Sci_TextToFind {
#define TextRange Sci_TextRange
#define TextToFind Sci_TextToFind
#ifdef PLATFORM_H
typedef void *Sci_SurfaceID;
struct Sci_Rectangle {
int left;
int top;
int right;
int bottom;
};
/* This structure is used in printing and requires some of the graphics types
* from Platform.h. Not needed by most client code. */
struct Sci_RangeToFormat {
SurfaceID hdc;
SurfaceID hdcTarget;
PRectangle rc;
PRectangle rcPage;
Sci_CharacterRange chrg;
Sci_SurfaceID hdc;
Sci_SurfaceID hdcTarget;
struct Sci_Rectangle rc;
struct Sci_Rectangle rcPage;
struct Sci_CharacterRange chrg;
};
#define RangeToFormat Sci_RangeToFormat
#endif
struct Sci_NotifyHeader {
/* Compatible with Windows NMHDR.
* hwndFrom is really an environment specific window handle or pointer

View File

@ -571,6 +571,12 @@ fun void SetWhitespaceFore=2084(bool useSetting, colour fore)
# Set the background colour of all whitespace and whether to use this setting.
fun void SetWhitespaceBack=2085(bool useSetting, colour back)
# Set the size of the dots used to mark space characters.
set void SetWhitespaceSize=2086(int size,)
# Get the size of the dots used to mark space characters.
get int GetWhitespaceSize=2087(,)
# Divide each styling byte into lexical class bits (default: 5) and indicator
# bits (default: 3). If a lexer requires more than 32 lexical states, then this
# is used to expand the possible states.
@ -1199,6 +1205,37 @@ get bool GetTwoPhaseDraw=2283(,)
# and then the foreground. This avoids chopping off characters that overlap the next run.
set void SetTwoPhaseDraw=2284(bool twoPhase,)
# Control font anti-aliasing.
enu FontQuality=SC_EFF_
val SC_EFF_QUALITY_MASK=0xF
val SC_EFF_QUALITY_DEFAULT=0
val SC_EFF_QUALITY_NON_ANTIALIASED=1
val SC_EFF_QUALITY_ANTIALIASED=2
val SC_EFF_QUALITY_LCD_OPTIMIZED=3
# Choose the quality level for text from the FontQuality enumeration.
set void SetFontQuality=2611(int fontQuality,)
# Retrieve the quality level for text.
get int GetFontQuality=2612(,)
# Scroll so that a display line is at the top of the display.
set void SetFirstVisibleLine=2613(int lineDisplay,)
enu MultiPaste=SC_MULTIPASTE_
val SC_MULTIPASTE_ONCE=0
val SC_MULTIPASTE_EACH=1
# Change the effect of pasting when there are multiple selections.
set void SetMultiPaste=2614(int multiPaste,)
# Retrieve the effect of pasting when there are multiple selections..
get int GetMultiPaste=2615(,)
# Retrieve the value of a tag from a regular expression search.
fun int GetTag=2616(int tagNumber, stringresult tagValue)
# Make the target range start and end be the same as the selection range start and end.
fun void TargetFromSelection=2287(,)
@ -1718,6 +1755,10 @@ fun void SetCharsDefault=2444(,)
# Get currently selected item position in the auto-completion list
fun int AutoCGetCurrent=2445(,)
# Get currently selected item text in the auto-completion list
# Returns the length of the item text
fun int AutoCGetCurrentText=2610(, stringresult s)
# Enlarge the document to a particular size of text bytes.
fun void Allocate=2446(int bytes,)
@ -1945,6 +1986,12 @@ set void SetAdditionalCaretsBlink=2567(bool additionalCaretsBlink,)
# Whether additional carets will blink
get bool GetAdditionalCaretsBlink=2568(,)
# Set whether additional carets are visible
set void SetAdditionalCaretsVisible=2608(bool additionalCaretsBlink,)
# Whether additional carets are visible
get bool GetAdditionalCaretsVisible=2609(,)
# How many selections are there?
get int GetSelections=2570(,)
@ -1976,13 +2023,13 @@ get int GetSelectionNAnchorVirtualSpace=2583(int selection,)
set void SetSelectionNStart=2584(int selection, position pos)
# Returns the position at the start of the selection.
get position GetSelectionNStart=2585(,)
get position GetSelectionNStart=2585(int selection,)
# Sets the position that ends the selection - this becomes the currentPosition.
set void SetSelectionNEnd=2586(int selection, position pos,)
# Returns the position at the end of the selection.
get position GetSelectionNEnd=2587(,)
get position GetSelectionNEnd=2587(int selection,)
set void SetRectangularSelectionCaret=2588(position pos,)
get position GetRectangularSelectionCaret=2589(,)
@ -2081,6 +2128,10 @@ get int GetPropertyInt=4010(string key,)
# Retrieve the number of bits the current lexer needs for styling.
get int GetStyleBitsNeeded=4011(,)
# Retrieve the name of the lexer.
# Return the length of the text.
get int GetLexerLanguage=4012(, stringresult text)
# Notifications
# Type of modification and the action which caused the modification.
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
@ -2247,6 +2298,7 @@ val SCLEX_SORCUS=94
val SCLEX_POWERPRO=95
val SCLEX_NIMROD=96
val SCLEX_SML=97
val SCLEX_MARKDOWN=98
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
# value assigned in sequence from SCLEX_AUTOMATIC+1.
@ -2854,6 +2906,7 @@ val SCE_CSS_PSEUDOELEMENT=18
val SCE_CSS_EXTENDED_IDENTIFIER=19
val SCE_CSS_EXTENDED_PSEUDOCLASS=20
val SCE_CSS_EXTENDED_PSEUDOELEMENT=21
val SCE_CSS_MEDIA=22
# Lexical states for SCLEX_POV
lex POV=SCLEX_POV SCE_POV_
val SCE_POV_DEFAULT=0
@ -3029,8 +3082,19 @@ val SCE_ERLANG_FUNCTION_NAME=8
val SCE_ERLANG_CHARACTER=9
val SCE_ERLANG_MACRO=10
val SCE_ERLANG_RECORD=11
val SCE_ERLANG_SEPARATOR=12
val SCE_ERLANG_PREPROC=12
val SCE_ERLANG_NODE_NAME=13
val SCE_ERLANG_COMMENT_FUNCTION=14
val SCE_ERLANG_COMMENT_MODULE=15
val SCE_ERLANG_COMMENT_DOC=16
val SCE_ERLANG_COMMENT_DOC_MACRO=17
val SCE_ERLANG_ATOM_QUOTED=18
val SCE_ERLANG_MACRO_QUOTED=19
val SCE_ERLANG_RECORD_QUOTED=20
val SCE_ERLANG_NODE_NAME_QUOTED=21
val SCE_ERLANG_BIFS=22
val SCE_ERLANG_MODULES=23
val SCE_ERLANG_MODULES_ATT=24
val SCE_ERLANG_UNKNOWN=31
# Lexical states for SCLEX_OCTAVE are identical to MatLab
lex Octave=SCLEX_OCTAVE SCE_MATLAB_
@ -3325,7 +3389,7 @@ val SCE_ST_ASSIGN=14
val SCE_ST_CHARACTER=15
val SCE_ST_SPEC_SEL=16
# Lexical states for SCLEX_FLAGSHIP (clipper)
lex FlagShip=SCLEX_FLAGSHIP SCE_B_
lex FlagShip=SCLEX_FLAGSHIP SCE_FS_
val SCE_FS_DEFAULT=0
val SCE_FS_COMMENT=1
val SCE_FS_COMMENTLINE=2
@ -3345,11 +3409,19 @@ val SCE_FS_IDENTIFIER=15
val SCE_FS_DATE=16
val SCE_FS_STRINGEOL=17
val SCE_FS_CONSTANT=18
val SCE_FS_ASM=19
val SCE_FS_LABEL=20
val SCE_FS_ERROR=21
val SCE_FS_HEXNUMBER=22
val SCE_FS_BINNUMBER=23
val SCE_FS_WORDOPERATOR=19
val SCE_FS_DISABLEDCODE=20
val SCE_FS_DEFAULT_C=21
val SCE_FS_COMMENTDOC_C=22
val SCE_FS_COMMENTLINEDOC_C=23
val SCE_FS_KEYWORD_C=24
val SCE_FS_KEYWORD2_C=25
val SCE_FS_NUMBER_C=26
val SCE_FS_STRING_C=27
val SCE_FS_PREPROCESSOR_C=28
val SCE_FS_OPERATOR_C=29
val SCE_FS_IDENTIFIER_C=30
val SCE_FS_STRINGEOL_C=31
# Lexical states for SCLEX_CSOUND
lex Csound=SCLEX_CSOUND SCE_CSOUND_
val SCE_CSOUND_DEFAULT=0
@ -3376,7 +3448,6 @@ val SCE_INNO_KEYWORD=2
val SCE_INNO_PARAMETER=3
val SCE_INNO_SECTION=4
val SCE_INNO_PREPROC=5
val SCE_INNO_PREPROC_INLINE=6
val SCE_INNO_INLINE_EXPANSION=6
val SCE_INNO_COMMENT_PASCAL=7
val SCE_INNO_KEYWORD_PASCAL=8
@ -3657,6 +3728,30 @@ val SCE_SML_COMMENT=12
val SCE_SML_COMMENT1=13
val SCE_SML_COMMENT2=14
val SCE_SML_COMMENT3=15
# Lexical state for SCLEX_MARKDOWN
lex Markdown=SCLEX_MARKDOWN SCE_MARKDOWN_
val SCE_MARKDOWN_DEFAULT=0
val SCE_MARKDOWN_LINE_BEGIN=1
val SCE_MARKDOWN_STRONG1=2
val SCE_MARKDOWN_STRONG2=3
val SCE_MARKDOWN_EM1=4
val SCE_MARKDOWN_EM2=5
val SCE_MARKDOWN_HEADER1=6
val SCE_MARKDOWN_HEADER2=7
val SCE_MARKDOWN_HEADER3=8
val SCE_MARKDOWN_HEADER4=9
val SCE_MARKDOWN_HEADER5=10
val SCE_MARKDOWN_HEADER6=11
val SCE_MARKDOWN_PRECHAR=12
val SCE_MARKDOWN_ULIST_ITEM=13
val SCE_MARKDOWN_OLIST_ITEM=14
val SCE_MARKDOWN_BLOCKQUOTE=15
val SCE_MARKDOWN_STRIKEOUT=16
val SCE_MARKDOWN_HRULE=17
val SCE_MARKDOWN_LINK=18
val SCE_MARKDOWN_CODE=19
val SCE_MARKDOWN_CODE2=20
val SCE_MARKDOWN_CODEBK=21
# Events

View File

@ -9,7 +9,7 @@
#ifndef SCINTILLAWIDGET_H
#define SCINTILLAWIDGET_H
#if PLAT_GTK
#if defined(GTK)
#ifdef __cplusplus
extern "C" {
@ -34,21 +34,13 @@ struct _ScintillaClass {
void (* notify) (ScintillaObject *ttt);
};
#if GLIB_MAJOR_VERSION < 2
GtkType scintilla_get_type (void);
#else
GType scintilla_get_type (void);
#endif
GtkWidget* scintilla_new (void);
void scintilla_set_id (ScintillaObject *sci, uptr_t id);
sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
void scintilla_release_resources(void);
#if GTK_MAJOR_VERSION < 2
#define SCINTILLA_NOTIFY "notify"
#else
#define SCINTILLA_NOTIFY "sci-notify"
#endif
#ifdef __cplusplus
}

View File

@ -53,7 +53,7 @@ public:
}
void StartAt(unsigned int start, char chMask=31);
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }
unsigned int GetStartSegment() { return startSeg; }
void StartSegment(unsigned int pos);
void ColourTo(unsigned int pos, int chAttr);

View File

@ -43,12 +43,12 @@ AutoComplete::~AutoComplete() {
}
}
bool AutoComplete::Active() {
bool AutoComplete::Active() const {
return active;
}
void AutoComplete::Start(Window &parent, int ctrlID,
int position, Point location, int startLen_,
void AutoComplete::Start(Window &parent, int ctrlID,
int position, Point location, int startLen_,
int lineHeight, bool unicodeMode) {
if (active) {
Cancel();
@ -82,7 +82,7 @@ void AutoComplete::SetSeparator(char separator_) {
separator = separator_;
}
char AutoComplete::GetSeparator() {
char AutoComplete::GetSeparator() const {
return separator;
}
@ -90,7 +90,7 @@ void AutoComplete::SetTypesep(char separator_) {
typesep = separator_;
}
char AutoComplete::GetTypesep() {
char AutoComplete::GetTypesep() const {
return typesep;
}

View File

@ -36,7 +36,7 @@ public:
~AutoComplete();
/// Is the auto completion list displayed?
bool Active();
bool Active() const;
/// Display the auto completion list positioned to be near a character position
void Start(Window &parent, int ctrlID, int position, Point location,
@ -52,11 +52,11 @@ public:
/// The separator character is used when interpreting the list in SetList
void SetSeparator(char separator_);
char GetSeparator();
char GetSeparator() const;
/// The typesep character is used for seperating the word from the type
void SetTypesep(char separator_);
char GetTypesep();
char GetTypesep() const;
/// The list string contains a sequence of words separated by the separator character
void SetList(const char *list);

View File

@ -68,7 +68,7 @@ static bool IsArrowCharacter(char ch) {
}
// We ignore tabs unless a tab width has been set.
bool CallTip::IsTabCharacter(char ch) {
bool CallTip::IsTabCharacter(char ch) const {
return (tabSize > 0) && (ch == '\t');
}
@ -95,7 +95,7 @@ void CallTip::DrawChunk(Surface *surface, int &x, const char *s,
int maxEnd = 0;
const int numEnds = 10;
int ends[numEnds + 2];
for (int i=0;i<len;i++) {
for (int i=0; i<len; i++) {
if ((maxEnd < numEnds) &&
(IsArrowCharacter(s[i]) || IsTabCharacter(s[i])) ) {
if (i > 0)
@ -254,8 +254,7 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,
const char *faceName, int size,
int codePage_, int characterSet, Window &wParent) {
clickPlace = 0;
if (val)
delete []val;
delete []val;
val = 0;
val = new char[strlen(defn) + 1];
strcpy(val, defn);

View File

@ -27,13 +27,13 @@ class CallTip {
bool useStyleCallTip; // if true, STYLE_CALLTIP should be used
// Private so CallTip objects can not be copied
CallTip(const CallTip &) {}
CallTip &operator=(const CallTip &) { return *this; }
CallTip(const CallTip &);
CallTip &operator=(const CallTip &);
void DrawChunk(Surface *surface, int &x, const char *s,
int posStart, int posEnd, int ytext, PRectangle rcClient,
bool highlight, bool draw);
int PaintContents(Surface *surfaceWindow, bool draw);
bool IsTabCharacter(char c);
bool IsTabCharacter(char c) const;
int NextTabPos(int x);
public:
@ -61,7 +61,7 @@ public:
/// Setup the calltip and return a rectangle of the area required.
PRectangle CallTipStart(int pos, Point pt, const char *defn,
const char *faceName, int size, int codePage_,
const char *faceName, int size, int codePage_,
int characterSet, Window &wParent);
void CallTipCancel();

View File

@ -44,9 +44,11 @@ void LineVector::InsertText(int line, int delta) {
starts.InsertText(line, delta);
}
void LineVector::InsertLine(int line, int position) {
void LineVector::InsertLine(int line, int position, bool lineStart) {
starts.InsertPartition(line, position);
if (perLine) {
if ((line > 0) && lineStart)
line--;
perLine->InsertLine(line);
}
}
@ -71,6 +73,7 @@ Action::Action() {
position = 0;
data = 0;
lenData = 0;
mayCoalesce = false;
}
Action::~Action() {
@ -196,7 +199,7 @@ void UndoHistory::AppendAction(actionType at, int position, char *data, int leng
// Insertions must be immediately after to coalesce
currentAction++;
} else if (at == removeAction) {
if ((lengthData == 1) || (lengthData == 2)){
if ((lengthData == 1) || (lengthData == 2)) {
if ((position + lengthData) == actPrevious->position) {
; // Backspace -> OK
} else if (position == actPrevious->position) {
@ -338,7 +341,7 @@ char CellBuffer::CharAt(int position) const {
return substance.ValueAt(position);
}
void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) {
void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) const {
if (lengthRetrieve < 0)
return;
if (position < 0)
@ -348,17 +351,17 @@ void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) {
lengthRetrieve, substance.Length());
return;
}
for (int i=0; i<lengthRetrieve; i++) {
*buffer++ = substance.ValueAt(position + i);
}
}
char CellBuffer::StyleAt(int position) {
char CellBuffer::StyleAt(int position) const {
return style.ValueAt(position);
}
const char *CellBuffer::BufferPointer() {
const char *CellBuffer::BufferPointer() {
return substance.BufferPointer();
}
@ -454,7 +457,7 @@ int CellBuffer::LineStart(int line) const {
return lv.LineStart(line);
}
bool CellBuffer::IsReadOnly() {
bool CellBuffer::IsReadOnly() const {
return readOnly;
}
@ -472,8 +475,8 @@ bool CellBuffer::IsSavePoint() {
// Without undo
void CellBuffer::InsertLine(int line, int position) {
lv.InsertLine(line, position);
void CellBuffer::InsertLine(int line, int position, bool lineStart) {
lv.InsertLine(line, position, lineStart);
}
void CellBuffer::RemoveLine(int line) {
@ -489,27 +492,28 @@ void CellBuffer::BasicInsertString(int position, const char *s, int insertLength
style.InsertValue(position, insertLength, 0);
int lineInsert = lv.LineFromPosition(position) + 1;
bool atLineStart = lv.LineStart(lineInsert-1) == position;
// Point all the lines after the insertion point further along in the buffer
lv.InsertText(lineInsert-1, insertLength);
char chPrev = substance.ValueAt(position - 1);
char chAfter = substance.ValueAt(position + insertLength);
if (chPrev == '\r' && chAfter == '\n') {
// Splitting up a crlf pair at position
InsertLine(lineInsert, position);
InsertLine(lineInsert, position, false);
lineInsert++;
}
char ch = ' ';
for (int i = 0; i < insertLength; i++) {
ch = s[i];
if (ch == '\r') {
InsertLine(lineInsert, (position + i) + 1);
InsertLine(lineInsert, (position + i) + 1, atLineStart);
lineInsert++;
} else if (ch == '\n') {
if (chPrev == '\r') {
// Patch up what was end of line
lv.SetLineStart(lineInsert - 1, (position + i) + 1);
} else {
InsertLine(lineInsert, (position + i) + 1);
InsertLine(lineInsert, (position + i) + 1, atLineStart);
lineInsert++;
}
}
@ -585,7 +589,7 @@ bool CellBuffer::SetUndoCollection(bool collectUndo) {
return collectingUndo;
}
bool CellBuffer::IsCollectingUndo() {
bool CellBuffer::IsCollectingUndo() const {
return collectingUndo;
}

View File

@ -37,7 +37,7 @@ public:
void SetPerLine(PerLine *pl);
void InsertText(int line, int delta);
void InsertLine(int line, int position);
void InsertLine(int line, int position, bool lineStart);
void SetLineStart(int line, int position);
void RemoveLine(int line);
int Lines() const {
@ -149,8 +149,8 @@ public:
/// Retrieving positions outside the range of the buffer works and returns 0
char CharAt(int position) const;
void GetCharRange(char *buffer, int position, int lengthRetrieve);
char StyleAt(int position);
void GetCharRange(char *buffer, int position, int lengthRetrieve) const;
char StyleAt(int position) const;
const char *BufferPointer();
int Length() const;
@ -159,7 +159,7 @@ public:
int Lines() const;
int LineStart(int line) const;
int LineFromPosition(int pos) const { return lv.LineFromPosition(pos); }
void InsertLine(int line, int position);
void InsertLine(int line, int position, bool lineStart);
void RemoveLine(int line);
const char *InsertString(int position, const char *s, int insertLength, bool &startSequence);
@ -170,7 +170,7 @@ public:
const char *DeleteChars(int position, int deleteLength, bool &startSequence);
bool IsReadOnly();
bool IsReadOnly() const;
void SetReadOnly(bool set);
/// The save point is a marker in the undo stack where the container has stated that
@ -183,7 +183,7 @@ public:
void BasicDeleteChars(int position, int deleteLength);
bool SetUndoCollection(bool collectUndo);
bool IsCollectingUndo();
bool IsCollectingUndo() const;
void BeginUndoAction();
void EndUndoAction();
void AddUndoAction(int token, bool mayCoalesce);

View File

@ -53,6 +53,7 @@ public:
}
bool Contains(int val) const {
PLATFORM_ASSERT(val >= 0);
if (val < 0) return false;
return (val < size) ? bset[val] : valueAfter;
}
};

View File

@ -232,11 +232,11 @@ void ContractionState::ShowAll() {
void ContractionState::Check() const {
#ifdef CHECK_CORRECTNESS
for (int vline = 0;vline < LinesDisplayed(); vline++) {
for (int vline = 0; vline < LinesDisplayed(); vline++) {
const int lineDoc = DocFromDisplay(vline);
PLATFORM_ASSERT(GetVisible(lineDoc));
}
for (int lineDoc = 0;lineDoc < LinesInDoc(); lineDoc++) {
for (int lineDoc = 0; lineDoc < LinesInDoc(); lineDoc++) {
const int displayThis = DisplayFromDoc(lineDoc);
const int displayNext = DisplayFromDoc(lineDoc + 1);
const int height = displayNext - displayThis;

View File

@ -40,10 +40,10 @@ public:
~DecorationList();
void SetCurrentIndicator(int indicator);
int GetCurrentIndicator() { return currentIndicator; }
int GetCurrentIndicator() const { return currentIndicator; }
void SetCurrentValue(int value);
int GetCurrentValue() { return currentValue; }
int GetCurrentValue() const { return currentValue; }
// Returns true if some values may have changed
bool FillRange(int &position, int value, int &fillLength);

View File

@ -10,6 +10,17 @@
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <vector>
// With Borland C++ 5.5, including <string> includes Windows.h leading to defining
// FindText to FindTextA which makes calls here to Document::FindText fail.
#ifdef __BORLANDC__
#ifdef FindText
#undef FindText
#endif
#endif
#include "Platform.h"
#include "Scintilla.h"
@ -22,103 +33,12 @@
#include "Decoration.h"
#include "Document.h"
#include "RESearch.h"
#include "UniConversion.h"
#ifdef SCI_NAMESPACE
using namespace Scintilla;
#endif
//Vitaliy
#include "UniConversion.h"
#include <windows.h>
#ifdef FindText
#undef FindText
#define FindText FindText
#endif
// Win32 only !!!
static bool IsMustDie9x(void)
{
OSVERSIONINFO osver;
osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if ( GetVersionEx( &osver ) )
{
if ( (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) &&
(osver.dwMajorVersion == 4) )
{
//MessageBox(NULL, "MustDie9x == true", "Test", MB_OK);
return true;
}
}
//MessageBox(NULL, "MustDie9x == false", "Test", MB_OK);
return false;
}
static inline void Platform_MakeUpperW(wchar_t* wstr, unsigned int len) {
// TODO: Add platform-specific function here
// Win32 example:
static bool bIsMustDie9x = IsMustDie9x();
if ( !bIsMustDie9x )
{
::CharUpperW(wstr);
}
else
{
char* str = new char[len + 1];
if ( str )
{
::WideCharToMultiByte(CP_ACP, 0, wstr, len, str, len, NULL, NULL);
str[len] = 0;
::CharUpperA(str);
::MultiByteToWideChar(CP_ACP, 0, str, len, wstr, len);
wstr[len] = 0;
delete [] str;
}
}
}
static inline char Platform_MakeUpperCharA(const char ch) {
// TODO: Add platform-specific function here
// Win32 example:
char str[2] = {ch, 0};
::CharUpperA(str);
return str[0];
}
static inline char Platform_MakeLowerCharA(const char ch) {
// TODO: Add platform-specific function here
// Win32 example:
char str[2] = {ch, 0};
::CharLowerA(str);
return str[0];
}
// NOTE: this function is called for non-Unicode characters only!
// ( i.e. when (!dbcsCodePage || isascii(ch)) )
static inline char MakeUpperCaseA(char ch) {
if (ch >= 'A' && ch <= 'Z')
return ch;
else if (ch >= 'a' && ch <= 'z')
return static_cast<char>(ch - 'a' + 'A');
else
return Platform_MakeUpperCharA(ch);
}
// NOTE: this function is called for non-Unicode characters only!
// ( i.e. when (!dbcsCodePage || isascii(ch)) )
static inline char MakeLowerCaseA(char ch) {
if (ch >= 'a' && ch <= 'z')
return ch;
else if (ch >= 'A' && ch <= 'Z')
return static_cast<char>(ch - 'A' + 'a');
else
return Platform_MakeLowerCharA(ch);
}
// yilatiV
// This is ASCII specific but is safe with chars >= 0x80
static inline bool isspacechar(unsigned char ch) {
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
@ -232,13 +152,13 @@ void Document::SetSavePoint() {
NotifySavePoint(true);
}
int Document::GetMark(int line) {
return static_cast<LineMarkers*>(perLineData[ldMarkers])->MarkValue(line);
int Document::GetMark(int line) {
return static_cast<LineMarkers *>(perLineData[ldMarkers])->MarkValue(line);
}
int Document::AddMark(int line, int markerNum) {
if (line <= LinesTotal()) {
int prev = static_cast<LineMarkers*>(perLineData[ldMarkers])->
int prev = static_cast<LineMarkers *>(perLineData[ldMarkers])->
AddMark(line, markerNum, LinesTotal());
DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line);
NotifyModified(mh);
@ -252,20 +172,20 @@ void Document::AddMarkSet(int line, int valueSet) {
unsigned int m = valueSet;
for (int i = 0; m; i++, m >>= 1)
if (m & 1)
static_cast<LineMarkers*>(perLineData[ldMarkers])->
static_cast<LineMarkers *>(perLineData[ldMarkers])->
AddMark(line, i, LinesTotal());
DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line);
NotifyModified(mh);
}
void Document::DeleteMark(int line, int markerNum) {
static_cast<LineMarkers*>(perLineData[ldMarkers])->DeleteMark(line, markerNum, false);
static_cast<LineMarkers *>(perLineData[ldMarkers])->DeleteMark(line, markerNum, false);
DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line);
NotifyModified(mh);
}
void Document::DeleteMarkFromHandle(int markerHandle) {
static_cast<LineMarkers*>(perLineData[ldMarkers])->DeleteMarkFromHandle(markerHandle);
static_cast<LineMarkers *>(perLineData[ldMarkers])->DeleteMarkFromHandle(markerHandle);
DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0);
mh.line = -1;
NotifyModified(mh);
@ -273,15 +193,15 @@ void Document::DeleteMarkFromHandle(int markerHandle) {
void Document::DeleteAllMarks(int markerNum) {
for (int line = 0; line < LinesTotal(); line++) {
static_cast<LineMarkers*>(perLineData[ldMarkers])->DeleteMark(line, markerNum, true);
static_cast<LineMarkers *>(perLineData[ldMarkers])->DeleteMark(line, markerNum, true);
}
DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0);
mh.line = -1;
NotifyModified(mh);
}
int Document::LineFromHandle(int markerHandle) {
return static_cast<LineMarkers*>(perLineData[ldMarkers])->LineFromHandle(markerHandle);
int Document::LineFromHandle(int markerHandle) {
return static_cast<LineMarkers *>(perLineData[ldMarkers])->LineFromHandle(markerHandle);
}
int Document::LineStart(int line) const {
@ -318,7 +238,7 @@ int Document::VCHomePosition(int position) const {
int startPosition = LineStart(line);
int endLine = LineEnd(line);
int startText = startPosition;
while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t' ) )
while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t'))
startText++;
if (position == startText)
return startPosition;
@ -327,7 +247,7 @@ int Document::VCHomePosition(int position) const {
}
int Document::SetLevel(int line, int level) {
int prev = static_cast<LineLevels*>(perLineData[ldLevels])->SetLevel(line, level, LinesTotal());
int prev = static_cast<LineLevels *>(perLineData[ldLevels])->SetLevel(line, level, LinesTotal());
if (prev != level) {
DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER,
LineStart(line), 0, 0, 0, line);
@ -338,12 +258,12 @@ int Document::SetLevel(int line, int level) {
return prev;
}
int Document::GetLevel(int line) {
return static_cast<LineLevels*>(perLineData[ldLevels])->GetLevel(line);
int Document::GetLevel(int line) const {
return static_cast<LineLevels *>(perLineData[ldLevels])->GetLevel(line);
}
void Document::ClearLevels() {
static_cast<LineLevels*>(perLineData[ldLevels])->ClearLevels();
void Document::ClearLevels() {
static_cast<LineLevels *>(perLineData[ldLevels])->ClearLevels();
}
static bool IsSubordinate(int levelStart, int levelTry) {
@ -529,7 +449,7 @@ int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) {
while (posCheck < pos) {
char mbstr[maxBytesInDBCSCharacter+1];
int i;
for(i=0;i<Platform::DBCSCharMaxLength();i++) {
for (i=0; i<Platform::DBCSCharMaxLength(); i++) {
mbstr[i] = cb.CharAt(posCheck+i);
}
mbstr[i] = '\0';
@ -831,7 +751,7 @@ int Document::GetLineIndentation(int line) {
if ((line >= 0) && (line < LinesTotal())) {
int lineStart = LineStart(line);
int length = Length();
for (int i = lineStart;i < length;i++) {
for (int i = lineStart; i < length; i++) {
char ch = cb.CharAt(i);
if (ch == ' ')
indent++;
@ -874,7 +794,7 @@ int Document::GetColumn(int pos) {
int column = 0;
int line = LineFromPosition(pos);
if ((line >= 0) && (line < LinesTotal())) {
for (int i = LineStart(line);i < pos;) {
for (int i = LineStart(line); i < pos;) {
char ch = cb.CharAt(i);
if (ch == '\t') {
column = NextTab(column, tabInChars);
@ -896,8 +816,8 @@ int Document::GetColumn(int pos) {
int Document::FindColumn(int line, int column) {
int position = LineStart(line);
int columnCurrent = 0;
if ((line >= 0) && (line < LinesTotal())) {
int columnCurrent = 0;
while ((columnCurrent < column) && (position < Length())) {
char ch = cb.CharAt(position);
if (ch == '\t') {
@ -1061,7 +981,7 @@ int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) {
while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart))
pos++;
}
return MovePositionOutsideChar(pos, delta);
return MovePositionOutsideChar(pos, delta, true);
}
/**
@ -1166,157 +1086,172 @@ static inline char MakeLowerCase(char ch) {
return static_cast<char>(ch - 'A' + 'a');
}
static bool GoodTrailByte(int v) {
return (v >= 0x80) && (v < 0xc0);
}
size_t Document::ExtractChar(int pos, char *bytes) {
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
size_t widthChar = UTF8CharLength(ch);
bytes[0] = ch;
for (size_t i=1; i<widthChar; i++) {
bytes[i] = cb.CharAt(pos+i);
if (!GoodTrailByte(static_cast<unsigned char>(bytes[i]))) { // Bad byte
widthChar = 1;
}
}
return widthChar;
}
CaseFolderTable::CaseFolderTable() {
for (size_t iChar=0; iChar<sizeof(mapping); iChar++) {
mapping[iChar] = static_cast<char>(iChar);
}
}
CaseFolderTable::~CaseFolderTable() {
}
size_t CaseFolderTable::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) {
if (lenMixed > sizeFolded) {
return 0;
} else {
for (size_t i=0; i<lenMixed; i++) {
folded[i] = mapping[static_cast<unsigned char>(mixed[i])];
}
return lenMixed;
}
}
void CaseFolderTable::SetTranslation(char ch, char chTranslation) {
mapping[static_cast<unsigned char>(ch)] = chTranslation;
}
void CaseFolderTable::StandardASCII() {
for (size_t iChar=0; iChar<sizeof(mapping); iChar++) {
if (iChar >= 'A' && iChar <= 'Z') {
mapping[iChar] = static_cast<char>(iChar - 'A' + 'a');
} else {
mapping[iChar] = static_cast<char>(iChar);
}
}
}
bool Document::MatchesWordOptions(bool word, bool wordStart, int pos, int length) {
return (!word && !wordStart) ||
(word && IsWordAt(pos, pos + length)) ||
(wordStart && IsWordStartAt(pos));
}
/**
* Find text in document, supporting both forward and backward
* searches (just pass minPos > maxPos to do a backward search)
* Has not been tested with backwards DBCS searches yet.
*/
long Document::FindText(int minPos, int maxPos, const char *s,
long Document::FindText(int minPos, int maxPos, const char *search,
bool caseSensitive, bool word, bool wordStart, bool regExp, int flags,
int *length) {
int *length, CaseFolder *pcf) {
if (regExp) {
if (!regex)
regex = CreateRegexSearch(&charClass);
return regex->FindText(this, minPos, maxPos, s, caseSensitive, word, wordStart, flags, length);
return regex->FindText(this, minPos, maxPos, search, caseSensitive, word, wordStart, flags, length);
} else {
bool forward = minPos <= maxPos;
int increment = forward ? 1 : -1;
const bool forward = minPos <= maxPos;
const int increment = forward ? 1 : -1;
// Range endpoints should not be inside DBCS characters, but just in case, move them.
int startPos = MovePositionOutsideChar(minPos, increment, false);
int endPos = MovePositionOutsideChar(maxPos, increment, false);
const int startPos = MovePositionOutsideChar(minPos, increment, false);
const int endPos = MovePositionOutsideChar(maxPos, increment, false);
// Compute actual search ranges needed
int lengthFind = *length;
if (lengthFind == -1)
lengthFind = static_cast<int>(strlen(s));
int endSearch = endPos;
if (startPos <= endPos) {
endSearch = endPos - lengthFind + 1;
}
const int lengthFind = (*length == -1) ? static_cast<int>(strlen(search)) : *length;
const int endSearch = (startPos <= endPos) ? endPos - lengthFind + 1 : endPos;
//Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind);
// >>> Added by DV
wchar_t* ws_upr = NULL; // string we are searching for in UCS-2
wchar_t temp_ws[4]; // buffer for current character in UCS-2
char temp_s[8]; // buffer for current character in UTF-8
int ws_len = 0;
if (dbcsCodePage == SC_CP_UTF8 && !caseSensitive)
{
ws_len = (int) UTF16Length(s, lengthFind);
if (ws_len != lengthFind) {
const int ws_size = ws_len + 2;
ws_upr = new wchar_t[ws_size];
if (ws_upr) {
UTF16FromUTF8(s, lengthFind, ws_upr, ws_size - 1);
ws_upr[ws_len] = 0;
Platform_MakeUpperW(ws_upr, ws_len);
// now ws_upr is UCS-2 representation of s in upper-case
const int limitPos = Platform::Maximum(startPos, endPos);
int pos = forward ? startPos : (startPos - 1);
if (caseSensitive) {
while (forward ? (pos < endSearch) : (pos >= endSearch)) {
bool found = (pos + lengthFind) <= limitPos;
for (int indexSearch = 0; (indexSearch < lengthFind) && found; indexSearch++) {
found = CharAt(pos + indexSearch) == search[indexSearch];
}
if (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) {
return pos;
}
pos += increment;
if (dbcsCodePage && (pos >= 0)) {
// Have to use >= 0 as otherwise next statement would change
// -1 to 0 and make loop infinite.
// Ensure trying to match from start of character
pos = MovePositionOutsideChar(pos, increment, false);
}
}
// else we are searching for Latin characters
// i.e. no special processing required
}
// <<< Added by DV
char firstChar = s[0];
if (!caseSensitive)
firstChar = static_cast<char>(MakeUpperCaseA(firstChar));
int pos = forward ? startPos : (startPos - 1);
while (forward ? (pos < endSearch) : (pos >= endSearch)) {
char ch = CharAt(pos);
if (caseSensitive) {
if (ch == firstChar) {
bool found = true;
if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false;
for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) {
ch = CharAt(pos + posMatch);
if (ch != s[posMatch])
found = false;
}
if (found) {
if ((!word && !wordStart) ||
(word && IsWordAt(pos, pos + lengthFind)) ||
(wordStart && IsWordStartAt(pos)))
return pos;
}
} else if (SC_CP_UTF8 == dbcsCodePage) {
const size_t maxBytesCharacter = 4;
const size_t maxFoldingExpansion = 4;
std::vector<char> searchThing(lengthFind * maxBytesCharacter * maxFoldingExpansion + 1);
const int lenSearch = pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind);
while (forward ? (pos < endSearch) : (pos >= endSearch)) {
int widthFirstCharacter = 0;
int indexDocument = 0;
int indexSearch = 0;
bool characterMatches = true;
while (characterMatches &&
((pos + indexDocument) < limitPos) &&
(indexSearch < lenSearch)) {
char bytes[maxBytesCharacter + 1];
bytes[maxBytesCharacter] = 0;
const int widthChar = ExtractChar(pos + indexDocument, bytes);
if (!widthFirstCharacter)
widthFirstCharacter = widthChar;
char folded[maxBytesCharacter * maxFoldingExpansion + 1];
const int lenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar);
folded[lenFlat] = 0;
// Does folded match the buffer
characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat);
indexDocument += widthChar;
indexSearch += lenFlat;
}
}
// >>> Added by DV
else if (ws_upr) {
const int maxPos = Platform::Maximum(startPos, endPos);
int charPos = pos;
int ws_len_checked = 0;
while (ws_len_checked < ws_len) {
// LenChar returns 2 for "\r\n"
// this is wrong for UTF8 because "\r\n"
// is not one character with length=2
const int charLen = IsCrLf(charPos) ? 1 : LenChar(charPos);
if (charPos + charLen > maxPos)
break;
// current UTF-8 character
for (int i = 0; i < charLen; i++) {
temp_s[i] = CharAt(charPos + i);
}
temp_s[charLen] = 0;
// current character as UCS-2
const unsigned int uLen = UTF16FromUTF8(temp_s, charLen, temp_ws, 3);
temp_ws[uLen] = 0; // uLen can be 1 (ordinary) or 2 (surrogate)
// upper case
Platform_MakeUpperW(temp_ws, uLen);
if ((temp_ws[0] == ws_upr[ws_len_checked]) &&
(uLen == 1 || temp_ws[1] == ws_upr[ws_len_checked+1])) {
ws_len_checked += uLen;
charPos += charLen; // go to next character
} else
break;
}
if (ws_len_checked == ws_len) {
if ((!word && !wordStart) ||
(word && IsWordAt(pos, pos + lengthFind)) ||
(wordStart && IsWordStartAt(pos))) {
delete [] ws_upr;
if (characterMatches && (indexSearch == static_cast<int>(lenSearch))) {
if (MatchesWordOptions(word, wordStart, pos, indexDocument)) {
*length = indexDocument;
return pos;
}
}
}
// <<< Added by DV
else {
if (MakeUpperCaseA(ch) == firstChar) {
bool found = true;
if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false;
for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) {
ch = CharAt(pos + posMatch);
if (MakeUpperCaseA(ch) != MakeUpperCaseA(s[posMatch]))
found = false;
}
if (found) {
if ((!word && !wordStart) ||
(word && IsWordAt(pos, pos + lengthFind)) ||
(wordStart && IsWordStartAt(pos)))
return pos;
if (forward) {
pos += widthFirstCharacter;
} else {
pos--;
if (pos > 0) {
// Ensure trying to match from start of character
pos = MovePositionOutsideChar(pos, increment, false);
}
}
}
pos += increment;
if (dbcsCodePage && (pos >= 0)) {
// Ensure trying to match from start of character
pos = MovePositionOutsideChar(pos, increment, false);
} else {
CaseFolderTable caseFolder;
std::vector<char> searchThing(lengthFind + 1);
pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind);
while (forward ? (pos < endSearch) : (pos >= endSearch)) {
bool found = (pos + lengthFind) <= limitPos;
for (int indexSearch = 0; (indexSearch < lengthFind) && found; indexSearch++) {
char ch = CharAt(pos + indexSearch);
char folded[2];
pcf->Fold(folded, sizeof(folded), &ch, 1);
found = folded[0] == searchThing[indexSearch];
}
if (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) {
return pos;
}
pos += increment;
if (dbcsCodePage && (pos >= 0)) {
// Ensure trying to match from start of character
pos = MovePositionOutsideChar(pos, increment, false);
}
}
}
// >>> Added by DV
if (ws_upr) {
delete [] ws_upr;
}
// <<< Added by DV
}
//Platform::DebugPrintf("Not found\n");
return -1;
@ -1337,11 +1272,11 @@ void Document::ChangeCase(Range r, bool makeUpperCase) {
char ch = CharAt(pos);
if (makeUpperCase) {
if (IsLowerCase(ch)) {
ChangeChar(pos, static_cast<char>(MakeUpperCaseA(ch)));
ChangeChar(pos, static_cast<char>(MakeUpperCase(ch)));
}
} else {
if (IsUpperCase(ch)) {
ChangeChar(pos, static_cast<char>(MakeLowerCaseA(ch)));
ChangeChar(pos, static_cast<char>(MakeLowerCase(ch)));
}
}
}
@ -1424,7 +1359,7 @@ void Document::EnsureStyledTo(int pos) {
}
int Document::SetLineState(int line, int state) {
int statePrevious = static_cast<LineState*>(perLineData[ldState])->SetLineState(line, state);
int statePrevious = static_cast<LineState *>(perLineData[ldState])->SetLineState(line, state);
if (state != statePrevious) {
DocModification mh(SC_MOD_CHANGELINESTATE, 0, 0, 0, 0, line);
NotifyModified(mh);
@ -1432,59 +1367,59 @@ int Document::SetLineState(int line, int state) {
return statePrevious;
}
int Document::GetLineState(int line) {
return static_cast<LineState*>(perLineData[ldState])->GetLineState(line);
int Document::GetLineState(int line) const {
return static_cast<LineState *>(perLineData[ldState])->GetLineState(line);
}
int Document::GetMaxLineState() {
return static_cast<LineState*>(perLineData[ldState])->GetMaxLineState();
int Document::GetMaxLineState() {
return static_cast<LineState *>(perLineData[ldState])->GetMaxLineState();
}
StyledText Document::MarginStyledText(int line) {
LineAnnotation *pla = static_cast<LineAnnotation*>(perLineData[ldMargin]);
return StyledText(pla->Length(line), pla->Text(line),
LineAnnotation *pla = static_cast<LineAnnotation *>(perLineData[ldMargin]);
return StyledText(pla->Length(line), pla->Text(line),
pla->MultipleStyles(line), pla->Style(line), pla->Styles(line));
}
void Document::MarginSetText(int line, const char *text) {
static_cast<LineAnnotation*>(perLineData[ldMargin])->SetText(line, text);
static_cast<LineAnnotation *>(perLineData[ldMargin])->SetText(line, text);
DocModification mh(SC_MOD_CHANGEMARGIN, LineStart(line), 0, 0, 0, line);
NotifyModified(mh);
}
void Document::MarginSetStyle(int line, int style) {
static_cast<LineAnnotation*>(perLineData[ldMargin])->SetStyle(line, style);
static_cast<LineAnnotation *>(perLineData[ldMargin])->SetStyle(line, style);
}
void Document::MarginSetStyles(int line, const unsigned char *styles) {
static_cast<LineAnnotation*>(perLineData[ldMargin])->SetStyles(line, styles);
static_cast<LineAnnotation *>(perLineData[ldMargin])->SetStyles(line, styles);
}
int Document::MarginLength(int line) const {
return static_cast<LineAnnotation*>(perLineData[ldMargin])->Length(line);
return static_cast<LineAnnotation *>(perLineData[ldMargin])->Length(line);
}
void Document::MarginClearAll() {
int maxEditorLine = LinesTotal();
for (int l=0;l<maxEditorLine;l++)
for (int l=0; l<maxEditorLine; l++)
MarginSetText(l, 0);
// Free remaining data
static_cast<LineAnnotation*>(perLineData[ldMargin])->ClearAll();
static_cast<LineAnnotation *>(perLineData[ldMargin])->ClearAll();
}
bool Document::AnnotationAny() const {
return static_cast<LineAnnotation*>(perLineData[ldAnnotation])->AnySet();
return static_cast<LineAnnotation *>(perLineData[ldAnnotation])->AnySet();
}
StyledText Document::AnnotationStyledText(int line) {
LineAnnotation *pla = static_cast<LineAnnotation*>(perLineData[ldAnnotation]);
return StyledText(pla->Length(line), pla->Text(line),
LineAnnotation *pla = static_cast<LineAnnotation *>(perLineData[ldAnnotation]);
return StyledText(pla->Length(line), pla->Text(line),
pla->MultipleStyles(line), pla->Style(line), pla->Styles(line));
}
void Document::AnnotationSetText(int line, const char *text) {
const int linesBefore = AnnotationLines(line);
static_cast<LineAnnotation*>(perLineData[ldAnnotation])->SetText(line, text);
static_cast<LineAnnotation *>(perLineData[ldAnnotation])->SetText(line, text);
const int linesAfter = AnnotationLines(line);
DocModification mh(SC_MOD_CHANGEANNOTATION, LineStart(line), 0, 0, 0, line);
mh.annotationLinesAdded = linesAfter - linesBefore;
@ -1492,27 +1427,27 @@ void Document::AnnotationSetText(int line, const char *text) {
}
void Document::AnnotationSetStyle(int line, int style) {
static_cast<LineAnnotation*>(perLineData[ldAnnotation])->SetStyle(line, style);
static_cast<LineAnnotation *>(perLineData[ldAnnotation])->SetStyle(line, style);
}
void Document::AnnotationSetStyles(int line, const unsigned char *styles) {
static_cast<LineAnnotation*>(perLineData[ldAnnotation])->SetStyles(line, styles);
static_cast<LineAnnotation *>(perLineData[ldAnnotation])->SetStyles(line, styles);
}
int Document::AnnotationLength(int line) const {
return static_cast<LineAnnotation*>(perLineData[ldAnnotation])->Length(line);
return static_cast<LineAnnotation *>(perLineData[ldAnnotation])->Length(line);
}
int Document::AnnotationLines(int line) const {
return static_cast<LineAnnotation*>(perLineData[ldAnnotation])->Lines(line);
return static_cast<LineAnnotation *>(perLineData[ldAnnotation])->Lines(line);
}
void Document::AnnotationClearAll() {
int maxEditorLine = LinesTotal();
for (int l=0;l<maxEditorLine;l++)
for (int l=0; l<maxEditorLine; l++)
AnnotationSetText(l, 0);
// Free remaining data
static_cast<LineAnnotation*>(perLineData[ldAnnotation])->ClearAll();
static_cast<LineAnnotation *>(perLineData[ldAnnotation])->ClearAll();
}
void Document::IncrementStyleClock() {
@ -1691,11 +1626,11 @@ bool IsLineEndChar(char c) {
int Document::ExtendStyleRange(int pos, int delta, bool singleLine) {
int sStart = cb.StyleAt(pos);
if (delta < 0) {
while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) )
while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))))
pos--;
pos++;
} else {
while (pos < (Length()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) )
while (pos < (Length()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))))
pos++;
}
return pos;
@ -1737,7 +1672,7 @@ int Document::BraceMatch(int position, int /*maxReStyle*/) {
int depth = 1;
position = position + direction;
while ((position >= 0) && (position < Length())) {
position = MovePositionOutsideChar(position, direction);
position = MovePositionOutsideChar(position, direction, true);
char chAtPos = CharAt(position);
char styAtPos = static_cast<char>(StyleAt(position) & stylingBitsMask);
if ((position > GetEndStyled()) || (styAtPos == styBrace)) {
@ -1768,7 +1703,7 @@ public:
bool caseSensitive, bool word, bool wordStart, int flags,
int *length);
virtual const char *SubstituteByPosition(Document* doc, const char *text, int *length);
virtual const char *SubstituteByPosition(Document *doc, const char *text, int *length);
private:
RESearch search;
@ -1883,7 +1818,7 @@ long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s
return pos;
}
const char *BuiltinRegex::SubstituteByPosition(Document* doc, const char *text, int *length) {
const char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text, int *length) {
delete []substituted;
substituted = 0;
DocumentIndexer di(doc, doc->Length());
@ -1905,6 +1840,7 @@ const char *BuiltinRegex::SubstituteByPosition(Document* doc, const char *text,
case 'r':
case 't':
case 'v':
case '\\':
i++;
}
lenResult++;
@ -1948,6 +1884,9 @@ const char *BuiltinRegex::SubstituteByPosition(Document* doc, const char *text,
case 'v':
*o++ = '\v';
break;
case '\\':
*o++ = '\\';
break;
default:
*o++ = '\\';
j--;

View File

@ -32,10 +32,10 @@ public:
Range(Position pos=0) :
start(pos), end(pos) {
};
}
Range(Position start_, Position end_) :
start(start_), end(end_) {
};
}
bool Valid() const {
return (start != invalidPosition) && (end != invalidPosition);
@ -81,17 +81,17 @@ class Document;
*/
class RegexSearchBase {
public:
virtual ~RegexSearchBase(){}
virtual ~RegexSearchBase() {}
virtual long FindText(Document* doc, int minPos, int maxPos, const char *s,
virtual long FindText(Document *doc, int minPos, int maxPos, const char *s,
bool caseSensitive, bool word, bool wordStart, int flags, int *length) = 0;
///@return String with the substitutions, must remain valid until the next call or destruction
virtual const char *SubstituteByPosition(Document* doc, const char *text, int *length) = 0;
virtual const char *SubstituteByPosition(Document *doc, const char *text, int *length) = 0;
};
/// Factory function for RegexSearchBase
extern RegexSearchBase* CreateRegexSearch(CharClassify *charClassTable);
extern RegexSearchBase *CreateRegexSearch(CharClassify *charClassTable);
struct StyledText {
size_t length;
@ -99,7 +99,7 @@ struct StyledText {
bool multipleStyles;
size_t style;
const unsigned char *styles;
StyledText( size_t length_, const char *text_, bool multipleStyles_, int style_, const unsigned char *styles_) :
StyledText(size_t length_, const char *text_, bool multipleStyles_, int style_, const unsigned char *styles_) :
length(length_), text(text_), multipleStyles(multipleStyles_), style(style_), styles(styles_) {
}
// Return number of bytes from start to before '\n' or end of text.
@ -115,6 +115,24 @@ struct StyledText {
}
};
class CaseFolder {
public:
virtual ~CaseFolder() {
}
virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) = 0;
};
class CaseFolderTable : public CaseFolder {
protected:
char mapping[256];
public:
CaseFolderTable();
virtual ~CaseFolderTable();
virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed);
void SetTranslation(char ch, char chTranslation);
void StandardASCII();
};
/**
*/
class Document : PerLine {
@ -147,11 +165,11 @@ private:
int lenWatchers;
// ldSize is not real data - it is for dimensions and loops
enum lineData { ldMarkers, ldLevels, ldState, ldMargin, ldAnnotation, ldSize };
enum lineData { ldMarkers, ldLevels, ldState, ldMargin, ldAnnotation, ldSize };
PerLine *perLineData[ldSize];
bool matchesValid;
RegexSearchBase* regex;
RegexSearchBase *regex;
public:
int stylingBits;
@ -225,10 +243,10 @@ public:
void DelCharBack(int pos);
char CharAt(int position) { return cb.CharAt(position); }
void GetCharRange(char *buffer, int position, int lengthRetrieve) {
void GetCharRange(char *buffer, int position, int lengthRetrieve) const {
cb.GetCharRange(buffer, position, lengthRetrieve);
}
char StyleAt(int position) { return cb.StyleAt(position); }
char StyleAt(int position) const { return cb.StyleAt(position); }
int GetMark(int line);
int AddMark(int line, int markerNum);
void AddMarkSet(int line, int valueSet);
@ -243,7 +261,7 @@ public:
int VCHomePosition(int position) const;
int SetLevel(int line, int level);
int GetLevel(int line);
int GetLevel(int line) const;
void ClearLevels();
int GetLastChild(int lineParent, int level=-1);
int GetFoldParent(int line);
@ -254,9 +272,10 @@ public:
int NextWordEnd(int pos, int delta);
int Length() const { return cb.Length(); }
void Allocate(int newSize) { cb.Allocate(newSize); }
long FindText(int minPos, int maxPos, const char *s,
bool caseSensitive, bool word, bool wordStart, bool regExp, int flags, int *length);
long FindText(int iMessage, unsigned long wParam, long lParam);
size_t ExtractChar(int pos, char *bytes);
bool MatchesWordOptions(bool word, bool wordStart, int pos, int length);
long FindText(int minPos, int maxPos, const char *search, bool caseSensitive, bool word,
bool wordStart, bool regExp, int flags, int *length, CaseFolder *pcf);
const char *SubstituteByPosition(const char *text, int *length);
int LinesTotal() const;
@ -275,7 +294,7 @@ public:
void DecorationFillRange(int position, int value, int fillLength);
int SetLineState(int line, int state);
int GetLineState(int line);
int GetLineState(int line) const;
int GetMaxLineState();
StyledText MarginStyledText(int line);
@ -324,7 +343,7 @@ class UndoGroup {
Document *pdoc;
bool groupNeeded;
public:
UndoGroup(Document *pdoc_, bool groupNeeded_=true) :
UndoGroup(Document *pdoc_, bool groupNeeded_=true) :
pdoc(pdoc_), groupNeeded(groupNeeded_) {
if (groupNeeded) {
pdoc->BeginUndoAction();

View File

@ -187,7 +187,7 @@ int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnI
indent += SC_FOLDLEVELBASE;
// if completely empty line or the start of a comment...
if ((ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') ||
(pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) )
(pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)))
return indent | SC_FOLDLEVELWHITEFLAG;
else
return indent;

View File

@ -17,8 +17,8 @@ class Document;
class DocumentAccessor : public Accessor {
// Private so DocumentAccessor objects can not be copied
DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {}
DocumentAccessor &operator=(const DocumentAccessor &) { return *this; }
DocumentAccessor(const DocumentAccessor &source);
DocumentAccessor &operator=(const DocumentAccessor &);
protected:
Document *pdoc;
@ -38,9 +38,9 @@ protected:
void Fill(int position);
public:
DocumentAccessor(Document *pdoc_, PropertyGet &props_, WindowID id_=0) :
DocumentAccessor(Document *pdoc_, PropertyGet &props_, WindowID id_=0) :
Accessor(), pdoc(pdoc_), props(props_), id(id_),
lenDoc(-1), validLen(0), chFlags(0), chWhile(0),
lenDoc(-1), validLen(0), chFlags(0), chWhile(0),
startSeg(0), startPosStyling(0),
mask(127) { // Initialize the mask to be big enough for any lexer.
}
@ -54,8 +54,8 @@ public:
void Flush();
int GetLineState(int line);
int SetLineState(int line, int state);
int GetPropertyInt(const char *key, int defaultValue=0) {
return props.GetInt(key, defaultValue);
int GetPropertyInt(const char *key, int defaultValue=0) {
return props.GetInt(key, defaultValue);
}
char *GetProperties() {
return props.ToString();
@ -63,7 +63,7 @@ public:
WindowID GetWindow() { return id; }
void StartAt(unsigned int start, char chMask=31);
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }
unsigned int GetStartSegment() { return startSeg; }
void StartSegment(unsigned int pos);
void ColourTo(unsigned int pos, int chAttr);

File diff suppressed because it is too large Load Diff

View File

@ -45,6 +45,26 @@ public:
Idler();
};
/**
* When platform has a way to generate an event before painting,
* accumulate needed styling range in StyleNeeded to avoid unnecessary work.
*/
class StyleNeeded {
public:
bool active;
Position upTo;
StyleNeeded() : active(false), upTo(0) {}
void Reset() {
active = false;
upTo = 0;
}
void NeedUpTo(Position pos) {
if (upTo < pos)
upTo = pos;
}
};
/**
* Hold a piece of text selected for copying or dragging.
* The text is expected to hold a terminating '\0' and this is counted in len.
@ -98,8 +118,8 @@ public:
*/
class Editor : public DocWatcher {
// Private so Editor objects can not be copied
Editor(const Editor &) : DocWatcher() {}
Editor &operator=(const Editor &) { return *this; }
Editor(const Editor &);
Editor &operator=(const Editor &);
protected: // ScintillaBase subclass needs access to much of Editor
@ -142,7 +162,9 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool caretSticky;
bool multipleSelection;
bool additionalSelectionTyping;
int multiPasteMode;
bool additionalCaretsBlink;
bool additionalCaretsVisible;
int virtualSpaceOptions;
@ -195,7 +217,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
enum { notPainting, painting, paintAbandoned } paintState;
PRectangle rcPaint;
bool paintingAllText;
StyleNeeded styleNeeded;
int modEventMask;
SelectionText drag;
@ -270,7 +293,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool AbandonPaint();
void RedrawRect(PRectangle rc);
void Redraw();
void RedrawSelMargin(int line=-1);
void RedrawSelMargin(int line=-1, bool allAfter=false);
PRectangle RectangleFromRange(int start, int end);
void InvalidateRange(int start, int end);
@ -282,6 +305,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
SelectionPosition SelectionStart();
SelectionPosition SelectionEnd();
void SetRectangularRange();
void ThinRectangularRange();
void InvalidateSelection(SelectionRange newMain, bool invalidateWholeSelection=false);
void SetSelection(SelectionPosition currentPos_, SelectionPosition anchor_);
void SetSelection(int currentPos_, int anchor_);
@ -305,6 +329,14 @@ protected: // ScintillaBase subclass needs access to much of Editor
void HorizontalScrollTo(int xPos);
void MoveCaretInsideView(bool ensureVisible=true);
int DisplayFromPosition(int pos);
struct XYScrollPosition {
int xOffset;
int topLine;
XYScrollPosition(int xOffset_, int topLine_) : xOffset(xOffset_), topLine(topLine_) {}
};
XYScrollPosition XYScrollToMakeVisible(const bool useMargin, const bool vert, const bool horiz);
void SetXYScroll(XYScrollPosition newXY);
void EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true);
void ShowCaretAtCurrentPosition();
void DropCaret();
@ -336,7 +368,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
PRectangle rcLine, LineLayout *ll, int subLine);
void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart,
PRectangle rcLine, LineLayout *ll, int subLine);
void DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine,
void DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine,
int xStart, int offset, int posCaret, PRectangle rcCaret, ColourAllocated caretColour);
void DrawCarets(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
PRectangle rcLine, LineLayout *ll, int subLine);
@ -356,6 +388,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
int InsertSpace(int position, unsigned int spaces);
void AddChar(char ch);
virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false);
void InsertPaste(SelectionPosition selStart, const char *text, int len);
void ClearSelection();
void ClearAll();
void ClearDocumentStyle();
@ -386,7 +419,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt);
void NotifyUpdateUI();
void NotifyPainted();
void NotifyScrolled();
void NotifyScrolled();
void NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt);
bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt);
void NotifyNeedShown(int pos, int len);
@ -402,7 +435,9 @@ protected: // ScintillaBase subclass needs access to much of Editor
void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
void PageMove(int direction, Selection::selTypes sel=Selection::noSel, bool stuttered = false);
void ChangeCaseOfSelection(bool makeUpperCase);
enum { cmSame, cmUpper, cmLower } caseMap;
virtual std::string CaseMapString(const std::string &s, int caseMapping);
void ChangeCaseOfSelection(int caseMapping);
void LineTranspose();
void Duplicate(bool forLine);
virtual void CancelModes();
@ -419,6 +454,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
void Indent(bool forwards);
virtual CaseFolder *CaseFolderForEncoding();
long FindText(uptr_t wParam, sptr_t lParam);
void SearchAnchor();
long SearchText(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
@ -441,6 +477,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool PointInSelMargin(Point pt);
void LineSelection(int lineCurrent_, int lineAnchor_);
void DwellEnd(bool mouseMoved);
void MouseLeave();
virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
void ButtonMove(Point pt);
void ButtonUp(Point pt, unsigned int curTime, bool ctrl);
@ -453,6 +490,11 @@ protected: // ScintillaBase subclass needs access to much of Editor
virtual bool HaveMouseCapture() = 0;
void SetFocusState(bool focusState);
int PositionAfterArea(PRectangle rcArea);
void StyleToPositionInView(Position pos);
void IdleStyling();
virtual void QueueStyling(int upTo);
virtual bool PaintContains(PRectangle rc);
bool PaintContainsMargin();
void CheckForChangeOutsidePaint(Range r);
@ -460,18 +502,19 @@ protected: // ScintillaBase subclass needs access to much of Editor
void SetAnnotationHeights(int start, int end);
void SetDocPointer(Document *document);
void SetAnnotationVisible(int visible);
void Expand(int &line, bool doExpand);
void ToggleContraction(int line);
void EnsureLineVisible(int lineDoc, bool enforcePolicy);
int GetTag(char *tagValue, int tagNumber);
int ReplaceTarget(bool replacePatterns, const char *text, int length=-1);
bool PositionIsHotspot(int position);
bool PointIsHotspot(Point pt);
void SetHotSpotRange(Point *pt);
void GetHotSpotRange(int& hsStart, int& hsEnd);
void GetHotSpotRange(int &hsStart, int &hsEnd);
int CodePage() const;
virtual bool ValidCodePage(int /* codePage */) const { return true; }
@ -484,6 +527,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
static const char *StringFromEOLMode(int eolMode);
static sptr_t StringResult(sptr_t lParam, const char *val);
public:
// Public so the COM thunks can access it.
bool IsUnicodeMode() const;

View File

@ -40,7 +40,7 @@ char **WordListsToStrings(WordList *val[]) {
while (val[dim])
dim++;
char **wls = new char * [dim + 1];
for (int i = 0;i < dim;i++) {
for (int i = 0; i < dim; i++) {
std::string words;
words = "";
for (int n = 0; n < val[i]->len; n++) {
@ -114,7 +114,7 @@ void ExternalLexerModule::SetExternal(ExtLexerFunction fLexer, ExtFoldFunction f
//
//------------------------------------------
LexerLibrary::LexerLibrary(const char* ModuleName) {
LexerLibrary::LexerLibrary(const char *ModuleName) {
// Initialise some members...
first = NULL;
last = NULL;
@ -195,18 +195,15 @@ void LexerLibrary::Release() {
/// Return the single LexerManager instance...
LexerManager *LexerManager::GetInstance() {
if(!theInstance)
if (!theInstance)
theInstance = new LexerManager;
return theInstance;
}
/// Delete any LexerManager instance...
void LexerManager::DeleteInstance()
{
if(theInstance) {
delete theInstance;
theInstance = NULL;
}
void LexerManager::DeleteInstance() {
delete theInstance;
theInstance = NULL;
}
/// protected constructor - this is a singleton...
@ -219,13 +216,15 @@ LexerManager::~LexerManager() {
Clear();
}
void LexerManager::Load(const char* path)
{
void LexerManager::Load(const char *path) {
LoadLexerLibrary(path);
}
void LexerManager::LoadLexerLibrary(const char* module)
{
void LexerManager::LoadLexerLibrary(const char *module) {
for (LexerLibrary *ll = first; ll; ll= ll->next) {
if (strcmp(ll->m_sModuleName.c_str(), module) == 0)
return;
}
LexerLibrary *lib = new LexerLibrary(module);
if (NULL != first) {
last->next = lib;
@ -236,8 +235,7 @@ void LexerManager::LoadLexerLibrary(const char* module)
}
}
void LexerManager::Clear()
{
void LexerManager::Clear() {
if (NULL != first) {
LexerLibrary *cur = first;
LexerLibrary *next;
@ -257,8 +255,7 @@ void LexerManager::Clear()
//
//------------------------------------------
LMMinder::~LMMinder()
{
LMMinder::~LMMinder() {
LexerManager::DeleteInstance();
}

View File

@ -23,7 +23,7 @@ typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int
char *words[], WindowID window, char *props);
typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle,
char *words[], WindowID window, char *props);
typedef void* (EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index);
typedef void*(EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index);
typedef int (EXT_LEXER_DECL *GetLexerCountFn)();
typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength);
@ -37,11 +37,12 @@ protected:
int externalLanguage;
char name[100];
public:
ExternalLexerModule(int language_, LexerFunction fnLexer_,
const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_){
ExternalLexerModule(int language_, LexerFunction fnLexer_,
const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_) {
strncpy(name, languageName_, sizeof(name));
name[sizeof(name)-1] = '\0';
languageName = name;
};
}
virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
WordList *keywordlists[], Accessor &styler) const;
virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
@ -63,10 +64,10 @@ class LexerLibrary {
LexerMinder *last;
public:
LexerLibrary(const char* ModuleName);
LexerLibrary(const char *ModuleName);
~LexerLibrary();
void Release();
LexerLibrary *next;
std::string m_sModuleName;
};
@ -75,18 +76,18 @@ public:
class LexerManager {
public:
~LexerManager();
static LexerManager *GetInstance();
static void DeleteInstance();
void Load(const char* path);
void Load(const char *path);
void Clear();
private:
LexerManager();
static LexerManager *theInstance;
void LoadLexerLibrary(const char* module);
void LoadLexerLibrary(const char *module);
LexerLibrary *first;
LexerLibrary *last;
};

View File

@ -33,7 +33,7 @@ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = fa
// For rapid determination of whether a character is a separator, build
// a look up table.
bool wordSeparator[256];
for (int i=0;i<256; i++) {
for (int i=0; i<256; i++) {
wordSeparator[i] = false;
}
wordSeparator['\r'] = true;
@ -92,11 +92,11 @@ void WordList::Set(const char *s) {
extern "C" int cmpString(const void *a1, const void *a2) {
// Can't work out the correct incantation to use modern casts here
return strcmp(*(char**)(a1), *(char**)(a2));
return strcmp(*(char **)(a1), *(char **)(a2));
}
static void SortWordList(char **words, unsigned int len) {
qsort(reinterpret_cast<void*>(words), len, sizeof(*words),
qsort(reinterpret_cast<void *>(words), len, sizeof(*words),
cmpString);
}
@ -216,7 +216,7 @@ LexerModule::LexerModule(int language_,
LexerFunction fnLexer_,
const char *languageName_,
LexerFunction fnFolder_,
const char * const wordListDescriptions_[],
const char *const wordListDescriptions_[],
int styleBits_) :
language(language_),
fnLexer(fnLexer_),
@ -375,6 +375,7 @@ int Scintilla_LinkLexers() {
LINK_LEXER(lmLua);
LINK_LEXER(lmMagikSF);
LINK_LEXER(lmMake);
LINK_LEXER(lmMarkdown);
LINK_LEXER(lmMatlab);
LINK_LEXER(lmMETAPOST);
LINK_LEXER(lmMMIXAL);
@ -384,7 +385,7 @@ int Scintilla_LinkLexers() {
LINK_LEXER(lmNncrontab);
LINK_LEXER(lmNsis);
LINK_LEXER(lmNull);
LINK_LEXER(lmObjC);
LINK_LEXER(lmObjC);
LINK_LEXER(lmOctave);
LINK_LEXER(lmOpal);
LINK_LEXER(lmPascal);
@ -405,7 +406,7 @@ int Scintilla_LinkLexers() {
LINK_LEXER(lmREBOL);
LINK_LEXER(lmRuby);
LINK_LEXER(lmScriptol);
LINK_LEXER(lmSearchResult);
LINK_LEXER(lmSearchResult);
LINK_LEXER(lmSmalltalk);
LINK_LEXER(lmSML);
LINK_LEXER(lmSorc);
@ -417,7 +418,7 @@ int Scintilla_LinkLexers() {
LINK_LEXER(lmTAL);
LINK_LEXER(lmTCL);
LINK_LEXER(lmTeX);
LINK_LEXER(lmUserDefine);
LINK_LEXER(lmUserDefine);
LINK_LEXER(lmVB);
LINK_LEXER(lmVBScript);
LINK_LEXER(lmVerilog);

View File

@ -42,7 +42,7 @@ inline bool IsAWordStart(const int ch) {
}
inline bool isAveOperator(char ch) {
if (isalnum(ch))
if (isascii(ch) && isalnum(ch))
return false;
// '.' left out as it is used to make up numbers
if (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||

View File

@ -248,14 +248,8 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
sc.SetState(SCE_SH_DEFAULT);
break;
case SCE_SH_COMMENTLINE:
if (sc.ch == '\\' && (sc.chNext == '\r' || sc.chNext == '\n')) {
// comment continuation
sc.Forward();
if (sc.ch == '\r' && sc.chNext == '\n') {
sc.Forward();
}
} else if (sc.atLineEnd) {
sc.ForwardSetState(SCE_SH_DEFAULT);
if (sc.atLineEnd && sc.chPrev != '\\') {
sc.SetState(SCE_SH_DEFAULT);
}
break;
case SCE_SH_HERE_DELIM:
@ -294,23 +288,14 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
HereDoc.State = 1;
}
} else if (HereDoc.State == 1) { // collect the delimiter
if (HereDoc.Quoted) { // a quoted here-doc delimiter
if (sc.ch == HereDoc.Quote) { // closing quote => end of delimiter
sc.ForwardSetState(SCE_SH_DEFAULT);
} else {
if (sc.ch == '\\' && sc.chNext == HereDoc.Quote) { // escaped quote
sc.Forward();
}
HereDoc.Append(sc.ch);
}
} else { // an unquoted here-doc delimiter
if (setHereDoc2.Contains(sc.ch)) {
HereDoc.Append(sc.ch);
} else if (sc.ch == '\\') {
// skip escape prefix
} else {
sc.SetState(SCE_SH_DEFAULT);
}
if (setHereDoc2.Contains(sc.ch) || sc.chPrev == '\\') {
HereDoc.Append(sc.ch);
} else if (HereDoc.Quoted && sc.ch == HereDoc.Quote) { // closing quote => end of delimiter
sc.ForwardSetState(SCE_SH_DEFAULT);
} else if (sc.ch == '\\') {
// skip escape prefix
} else {
sc.SetState(SCE_SH_DEFAULT);
}
if (HereDoc.DelimiterLength >= HERE_DELIM_MAX - 1) { // force blowup
sc.SetState(SCE_SH_ERROR);

View File

@ -21,6 +21,7 @@ using namespace Scintilla;
static int classifyWordBullant(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
s[0] = '\0';
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
@ -111,7 +112,7 @@ static void ColouriseBullantDoc(unsigned int startPos, int length, int initStyle
}
blockChange=0;
*/ }
if (!isspace(ch))
if (!(isascii(ch) && isspace(ch)))
visibleChars++;
if (styler.IsLeadByte(ch)) {

View File

@ -202,7 +202,7 @@ static void ColouriseCOBOLDoc(unsigned int startPos, int length, int initStyle,
}
if (state == SCE_C_DEFAULT) {
if (isCOBOLwordstart(ch) || (ch == '$' && isalpha(chNext))) {
if (isCOBOLwordstart(ch) || (ch == '$' && isascii(chNext) && isalpha(chNext))) {
ColourTo(styler, i-1, state);
state = SCE_C_IDENTIFIER;
} else if (column == 0 && ch == '*' && chNext != '*') {

View File

@ -59,8 +59,8 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
WordList &keywords4 = *keywordlists[3];
// property styling.within.preprocessor
// For C++ code, determines whether all preprocessor code is styled in the preprocessor style (0, the default)
// or only from the initial # to the end of the command word(1).
// For C++ code, determines whether all preprocessor code is styled in the preprocessor style (0, the default)
// or only from the initial # to the end of the command word(1).
bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor") != 0;
CharacterSet setOKBeforeRE(CharacterSet::setNone, "([{=,:;!%^&*|?~+-");
@ -72,7 +72,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
CharacterSet setWord(CharacterSet::setAlphaNum, "._", 0x80, true);
// property lexer.cpp.allow.dollars
// Set to 0 to disallow the '$' character in identifiers with the cpp lexer.
// Set to 0 to disallow the '$' character in identifiers with the cpp lexer.
if (styler.GetPropertyInt("lexer.cpp.allow.dollars", 1) != 0) {
setWordStart.Add('$');
setWord.Add('$');
@ -379,20 +379,20 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle,
WordList *[], Accessor &styler) {
// property fold.comment
// This option enables folding multi-line comments and explicit fold points when using the C++ lexer.
// Explicit fold points allows adding extra folding by placing a //{ comment at the start and a //}
// at the end of a section that should fold.
// This option enables folding multi-line comments and explicit fold points when using the C++ lexer.
// Explicit fold points allows adding extra folding by placing a //{ comment at the start and a //}
// at the end of a section that should fold.
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
// property fold.preprocessor
// This option enables folding preprocessor directives when using the C++ lexer.
// Includes C#'s explicit #region and #endregion folding directives.
// This option enables folding preprocessor directives when using the C++ lexer.
// Includes C#'s explicit #region and #endregion folding directives.
bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0;
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
// property fold.at.else
// This option enables C++ folding on a "} else {" line of an if statement.
// property fold.at.else
// This option enables C++ folding on a "} else {" line of an if statement.
bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) != 0;
unsigned int endPos = startPos + length;
@ -483,14 +483,14 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle,
}
}
static const char * const cppWordLists[] = {
static const char *const cppWordLists[] = {
"Primary keywords and identifiers",
"Secondary keywords and identifiers",
"Documentation comment keywords",
"Unused",
"Global classes and typedefs",
0,
};
};
static void ColouriseCppDocSensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
Accessor &styler) {

View File

@ -62,6 +62,7 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo
int lastState = -1; // before operator
int lastStateC = -1; // before comment
int lastStateS = -1; // before single-quoted/double-quoted string
int op = ' '; // last operator
int opPrev = ' '; // last operator
@ -105,7 +106,7 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo
i--;
if ((sc.currentPos - i) % 2 == 1)
continue;
sc.ForwardSetState(SCE_CSS_VALUE);
sc.ForwardSetState(lastStateS);
}
if (sc.state == SCE_CSS_OPERATOR) {
@ -140,9 +141,9 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo
sc.SetState(SCE_CSS_TAG);
break;
case '{':
if (lastState == SCE_CSS_DIRECTIVE)
if (lastState == SCE_CSS_MEDIA)
sc.SetState(SCE_CSS_DEFAULT);
else if (lastState == SCE_CSS_TAG)
else if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DIRECTIVE)
sc.SetState(SCE_CSS_IDENTIFIER);
break;
case '}':
@ -219,7 +220,8 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo
sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_PSEUDOELEMENT ||
sc.state == SCE_CSS_EXTENDED_PSEUDOCLASS || sc.state == SCE_CSS_EXTENDED_PSEUDOELEMENT ||
sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS ||
sc.state == SCE_CSS_IMPORTANT
sc.state == SCE_CSS_IMPORTANT ||
sc.state == SCE_CSS_DIRECTIVE
)) {
char s[100];
sc.GetCurrentLowered(s, sizeof(s));
@ -263,6 +265,10 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo
if (strcmp(s2, "important") != 0)
sc.ChangeState(SCE_CSS_VALUE);
break;
case SCE_CSS_DIRECTIVE:
if (op == '@' && strcmp(s2, "media") == 0)
sc.ChangeState(SCE_CSS_MEDIA);
break;
}
}
@ -280,12 +286,14 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo
lastStateC = sc.state;
sc.SetState(SCE_CSS_COMMENT);
sc.Forward();
} else if (sc.state == SCE_CSS_VALUE && (sc.ch == '\"' || sc.ch == '\'')) {
} else if ((sc.state == SCE_CSS_VALUE || sc.state == SCE_CSS_ATTRIBUTE)
&& (sc.ch == '\"' || sc.ch == '\'')) {
lastStateS = sc.state;
sc.SetState((sc.ch == '\"' ? SCE_CSS_DOUBLESTRING : SCE_CSS_SINGLESTRING));
} else if (IsCssOperator(sc.ch)
&& (sc.state != SCE_CSS_ATTRIBUTE || sc.ch == ']')
&& (sc.state != SCE_CSS_VALUE || sc.ch == ';' || sc.ch == '}' || sc.ch == '!')
&& (sc.state != SCE_CSS_DIRECTIVE || sc.ch == ';' || sc.ch == '{')
&& ((sc.state != SCE_CSS_DIRECTIVE && sc.state != SCE_CSS_MEDIA) || sc.ch == ';' || sc.ch == '{')
) {
if (sc.state != SCE_CSS_OPERATOR)
lastState = sc.state;

View File

@ -430,13 +430,11 @@ void ColouriseCamlDoc(
static
#endif /* BUILD_AS_EXTERNAL_LEXER */
void FoldCamlDoc(
unsigned int startPos, int length,
int initStyle,
WordList *keywordlists[],
Accessor &styler)
unsigned int, int,
int,
WordList *[],
Accessor &)
{
// below useless evaluation(s) to supress "not used" warnings
startPos || length || initStyle || keywordlists[0] || styler.Length();
}
static const char * const camlWordListDesc[] = {

View File

@ -70,17 +70,17 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k
} else if( ch == '"') {
state = SCE_CONF_STRING;
styler.ColourTo(i,SCE_CONF_STRING);
} else if( ispunct(ch) ) {
} else if( isascii(ch) && ispunct(ch) ) {
// signals an operator...
// no state jump necessary for this
// simple case...
styler.ColourTo(i,SCE_CONF_OPERATOR);
} else if( isalpha(ch) ) {
} else if( isascii(ch) && isalpha(ch) ) {
// signals the start of an identifier
bufferCount = 0;
buffer[bufferCount++] = static_cast<char>(tolower(ch));
state = SCE_CONF_IDENTIFIER;
} else if( isdigit(ch) ) {
} else if( isascii(ch) && isdigit(ch) ) {
// signals the start of a number
bufferCount = 0;
buffer[bufferCount++] = ch;
@ -107,7 +107,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k
// if we find a non-alphanumeric char,
// we simply go to default state
// else we're still dealing with an extension...
if( isalnum(ch) || (ch == '_') ||
if( (isascii(ch) && isalnum(ch)) || (ch == '_') ||
(ch == '-') || (ch == '$') ||
(ch == '/') || (ch == '.') || (ch == '*') )
{
@ -129,7 +129,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k
case SCE_CONF_IDENTIFIER:
// stay in CONF_IDENTIFIER state until we find a non-alphanumeric
if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) {
if( (isascii(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) {
buffer[bufferCount++] = static_cast<char>(tolower(ch));
} else {
state = SCE_CONF_DEFAULT;
@ -154,7 +154,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k
case SCE_CONF_NUMBER:
// stay in CONF_NUMBER state until we find a non-numeric
if( isdigit(ch) || ch == '.') {
if( (isascii(ch) && isdigit(ch)) || ch == '.') {
buffer[bufferCount++] = ch;
} else {
state = SCE_CONF_DEFAULT;

View File

@ -94,12 +94,12 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
// signals an asterisk
// no state jump necessary for this simple case...
styler.ColourTo(i,SCE_NNCRONTAB_ASTERISK);
} else if( isalpha(ch) || ch == '<' ) {
} else if( (isascii(ch) && isalpha(ch)) || ch == '<' ) {
// signals the start of an identifier
bufferCount = 0;
buffer[bufferCount++] = ch;
state = SCE_NNCRONTAB_IDENTIFIER;
} else if( isdigit(ch) ) {
} else if( isascii(ch) && isdigit(ch) ) {
// signals the start of a number
bufferCount = 0;
buffer[bufferCount++] = ch;
@ -167,7 +167,7 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
case SCE_NNCRONTAB_IDENTIFIER:
// stay in CONF_IDENTIFIER state until we find a non-alphanumeric
if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') ||
if( (isascii(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') ||
(ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') ||
(ch == '@') ) {
buffer[bufferCount++] = ch;
@ -196,7 +196,7 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
case SCE_NNCRONTAB_NUMBER:
// stay in CONF_NUMBER state until we find a non-numeric
if( isdigit(ch) /* || ch == '.' */ ) {
if( isascii(ch) && isdigit(ch) /* || ch == '.' */ ) {
buffer[bufferCount++] = ch;
} else {
state = SCE_NNCRONTAB_DEFAULT;

View File

@ -35,7 +35,7 @@ static inline bool IsAWordStart(const int ch) {
}
static inline bool IsCsoundOperator(char ch) {
if (isalnum(ch))
if (isascii(ch) && isalnum(ch))
return false;
// '.' left out as it is used to make up numbers
if (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
// Scintilla source code edit control
/** @file LexFlagShip.cxx
** Lexer for FlagShip
** (Syntactically compatible to other XBase dialects, like dBase, Clipper, Fox etc.)
** Lexer for Harbour and FlagShip.
** (Syntactically compatible to other xBase dialects, like Clipper, dBase, Clip, FoxPro etc.)
**/
// Copyright 2005 by Randy Butler
// Copyright 2010 by Xavi <jarabal/at/gmail.com> (Harbour)
// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
@ -21,149 +22,276 @@
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
#include "CharacterSet.h"
#ifdef SCI_NAMESPACE
using namespace Scintilla;
#endif
static bool IsFlagShipComment(Accessor &styler, int pos, int len) {
return len>0 && styler[pos]=='\'';
}
static inline bool IsTypeCharacter(int ch) {
return ch == '%' || ch == '&' || ch == '@' || ch == '!' || ch == '#' || ch == '$';
}
// Extended to accept accented characters
static inline bool IsAWordChar(int ch) {
static inline bool IsAWordChar(int ch)
{
return ch >= 0x80 ||
(isalnum(ch) || ch == '.' || ch == '_');
(isalnum(ch) || ch == '_');
}
static inline bool IsAWordStart(int ch) {
return ch >= 0x80 ||
(isalnum(ch) || ch == '_');
}
static inline bool IsADateCharacter(const int ch) {
return (ch < 0x80) &&
(isalnum(ch) || ch == '|' || ch == '-' || ch == '/' || ch == ':' || ch == ' ' || ch == '\t');
}
static void ColouriseFlagShipDoc(unsigned int startPos, int length, int initStyle,
WordList *keywordlists[], Accessor &styler) {
WordList *keywordlists[], Accessor &styler)
{
//bool FSScriptSyntax = true;
WordList &keywords = *keywordlists[0];
WordList &keywords2 = *keywordlists[1];
WordList &keywords3 = *keywordlists[2];
WordList &keywords4 = *keywordlists[3];
WordList &keywords5 = *keywordlists[4];
styler.StartAt(startPos);
// property lexer.flagship.styling.within.preprocessor
// For Harbour code, determines whether all preprocessor code is styled in the preprocessor style (0) or only from the
// initial # to the end of the command word(1, the default). It also determines how to present text, dump, and disabled code.
bool stylingWithinPreprocessor = styler.GetPropertyInt("lexer.flagship.styling.within.preprocessor", 1) != 0;
CharacterSet setDoxygen(CharacterSet::setAlpha, "$@\\&<>#{}[]");
int visibleChars = 0;
int closeStringChar = 0;
int styleBeforeDCKeyword = SCE_FS_DEFAULT;
bool bEnableCode = initStyle < SCE_FS_DISABLEDCODE;
StyleContext sc(startPos, length, initStyle, styler);
for (; sc.More(); sc.Forward()) {
if (sc.state == SCE_FS_OPERATOR) {
sc.SetState(SCE_FS_DEFAULT);
} else if (sc.state == SCE_FS_IDENTIFIER) {
if (!IsAWordChar(sc.ch)) {
char s[100];
sc.GetCurrentLowered(s, sizeof(s));
if (keywords.InList(s)) {
sc.ChangeState(SCE_FS_KEYWORD);
} else if (keywords2.InList(s)) {
sc.ChangeState(SCE_FS_KEYWORD2);
} else if (keywords3.InList(s)) {
sc.ChangeState(SCE_FS_KEYWORD3);
} else if (keywords4.InList(s)) {
sc.ChangeState(SCE_FS_KEYWORD4);
}// Else, it is really an identifier...
sc.SetState(SCE_FS_DEFAULT);
}
} else if (sc.state == SCE_FS_NUMBER) {
if (!IsAWordChar(sc.ch)) {
sc.SetState(SCE_FS_DEFAULT);
}
} else if (sc.state == SCE_FS_STRING) {
// VB doubles quotes to preserve them, so just end this string
// state now as a following quote will start again
if (sc.ch == '\"') {
if (tolower(sc.chNext) == 'c') {
sc.Forward();
// Determine if the current state should terminate.
switch (sc.state) {
case SCE_FS_OPERATOR:
case SCE_FS_OPERATOR_C:
case SCE_FS_WORDOPERATOR:
sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
break;
case SCE_FS_IDENTIFIER:
case SCE_FS_IDENTIFIER_C:
if (!IsAWordChar(sc.ch)) {
char s[64];
sc.GetCurrentLowered(s, sizeof(s));
if (keywords.InList(s)) {
sc.ChangeState(bEnableCode ? SCE_FS_KEYWORD : SCE_FS_KEYWORD_C);
} else if (keywords2.InList(s)) {
sc.ChangeState(bEnableCode ? SCE_FS_KEYWORD2 : SCE_FS_KEYWORD2_C);
} else if (bEnableCode && keywords3.InList(s)) {
sc.ChangeState(SCE_FS_KEYWORD3);
} else if (bEnableCode && keywords4.InList(s)) {
sc.ChangeState(SCE_FS_KEYWORD4);
}// Else, it is really an identifier...
sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
}
break;
case SCE_FS_NUMBER:
if (!IsAWordChar(sc.ch) && !(sc.ch == '.' && IsADigit(sc.chNext))) {
sc.SetState(SCE_FS_DEFAULT);
}
break;
case SCE_FS_NUMBER_C:
if (!IsAWordChar(sc.ch) && sc.ch != '.') {
sc.SetState(SCE_FS_DEFAULT_C);
}
break;
case SCE_FS_CONSTANT:
if (!IsAWordChar(sc.ch)) {
sc.SetState(SCE_FS_DEFAULT);
}
break;
case SCE_FS_STRING:
case SCE_FS_STRING_C:
if (sc.ch == closeStringChar) {
sc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
} else if (sc.atLineEnd) {
sc.ChangeState(bEnableCode ? SCE_FS_STRINGEOL : SCE_FS_STRINGEOL_C);
}
break;
case SCE_FS_STRINGEOL:
case SCE_FS_STRINGEOL_C:
if (sc.atLineStart) {
sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
}
break;
case SCE_FS_COMMENTDOC:
case SCE_FS_COMMENTDOC_C:
if (sc.Match('*', '/')) {
sc.Forward();
sc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
} else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support
// Verify that we have the conditions to mark a comment-doc-keyword
if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) {
styleBeforeDCKeyword = bEnableCode ? SCE_FS_COMMENTDOC : SCE_FS_COMMENTDOC_C;
sc.SetState(SCE_FS_COMMENTDOCKEYWORD);
}
}
break;
case SCE_FS_COMMENT:
case SCE_FS_COMMENTLINE:
if (sc.atLineStart) {
sc.SetState(SCE_FS_DEFAULT);
}
break;
case SCE_FS_COMMENTLINEDOC:
case SCE_FS_COMMENTLINEDOC_C:
if (sc.atLineStart) {
sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
} else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support
// Verify that we have the conditions to mark a comment-doc-keyword
if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) {
styleBeforeDCKeyword = bEnableCode ? SCE_FS_COMMENTLINEDOC : SCE_FS_COMMENTLINEDOC_C;
sc.SetState(SCE_FS_COMMENTDOCKEYWORD);
}
}
break;
case SCE_FS_COMMENTDOCKEYWORD:
if ((styleBeforeDCKeyword == SCE_FS_COMMENTDOC || styleBeforeDCKeyword == SCE_FS_COMMENTDOC_C) &&
sc.Match('*', '/')) {
sc.ChangeState(SCE_FS_COMMENTDOCKEYWORDERROR);
sc.Forward();
sc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
} else if (!setDoxygen.Contains(sc.ch)) {
char s[64];
sc.GetCurrentLowered(s, sizeof(s));
if (!IsASpace(sc.ch) || !keywords5.InList(s + 1)) {
sc.ChangeState(SCE_FS_COMMENTDOCKEYWORDERROR);
}
sc.SetState(styleBeforeDCKeyword);
}
break;
case SCE_FS_PREPROCESSOR:
case SCE_FS_PREPROCESSOR_C:
if (sc.atLineEnd) {
if (!(sc.chPrev == ';' || sc.GetRelative(-2) == ';')) {
sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
}
} else if (stylingWithinPreprocessor) {
if (IsASpaceOrTab(sc.ch)) {
sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
}
} else if (sc.Match('/', '*') || sc.Match('/', '/') || sc.Match('&', '&')) {
sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
}
break;
case SCE_FS_DISABLEDCODE:
if (sc.ch == '#' && visibleChars == 0) {
sc.SetState(bEnableCode ? SCE_FS_PREPROCESSOR : SCE_FS_PREPROCESSOR_C);
do { // Skip whitespace between # and preprocessor word
sc.Forward();
} while (IsASpaceOrTab(sc.ch) && sc.More());
if (sc.MatchIgnoreCase("pragma")) {
sc.Forward(6);
do { // Skip more whitespace until keyword
sc.Forward();
} while (IsASpaceOrTab(sc.ch) && sc.More());
if (sc.MatchIgnoreCase("enddump") || sc.MatchIgnoreCase("__endtext")) {
bEnableCode = true;
sc.SetState(SCE_FS_DISABLEDCODE);
sc.Forward(sc.ch == '_' ? 8 : 6);
sc.ForwardSetState(SCE_FS_DEFAULT);
} else {
sc.ChangeState(SCE_FS_DISABLEDCODE);
}
} else {
sc.ChangeState(SCE_FS_DISABLEDCODE);
}
}
break;
case SCE_FS_DATE:
if (sc.ch == '}') {
sc.ForwardSetState(SCE_FS_DEFAULT);
} else if (sc.atLineEnd) {
sc.ChangeState(SCE_FS_STRINGEOL);
}
sc.ForwardSetState(SCE_FS_DEFAULT);
} else if (sc.atLineEnd) {
sc.ChangeState(SCE_FS_STRINGEOL);
sc.ForwardSetState(SCE_FS_DEFAULT);
}
} else if (sc.state == SCE_FS_COMMENT) {
if (sc.Match('*', '/')) { // new code
sc.Forward();
sc.ForwardSetState(SCE_FS_DEFAULT);
//if (sc.atLineEnd) { // old code
// sc.SetState(SCE_FS_DEFAULT);
}
} else if (sc.state == SCE_FS_COMMENTLINE) { //new code
if (sc.ch == '\r' || sc.ch == '\n') {
sc.SetState(SCE_FS_DEFAULT);
visibleChars = 0;
}
} else if (sc.state == SCE_FS_PREPROCESSOR) {
if (sc.atLineEnd) {
sc.SetState(SCE_FS_DEFAULT);
}
} else if (sc.state == SCE_FS_DATE) {
if (sc.ch == '#' || !IsADateCharacter(sc.chNext)) {
sc.ForwardSetState(SCE_FS_DEFAULT);
}
}
// Determine if a new state should be entered.
if (sc.state == SCE_FS_DEFAULT) {
if (sc.Match('/', '*')) { // New code
sc.SetState(SCE_FS_COMMENT);
sc.Forward(); // Eat the * so it isn't used for the end of the comment
//if (sc.ch == '\'') { // Old code
// sc.SetState(SCE_FS_COMMENT); // old code
} else if (sc.Match('/', '/')) { // New code
if (sc.state == SCE_FS_DEFAULT || sc.state == SCE_FS_DEFAULT_C) {
if (bEnableCode &&
(sc.MatchIgnoreCase(".and.") || sc.MatchIgnoreCase(".not."))) {
sc.SetState(SCE_FS_WORDOPERATOR);
sc.Forward(4);
} else if (bEnableCode && sc.MatchIgnoreCase(".or.")) {
sc.SetState(SCE_FS_WORDOPERATOR);
sc.Forward(3);
} else if (bEnableCode &&
(sc.MatchIgnoreCase(".t.") || sc.MatchIgnoreCase(".f.") ||
(!IsAWordChar(sc.GetRelative(3)) && sc.MatchIgnoreCase("nil")))) {
sc.SetState(SCE_FS_CONSTANT);
sc.Forward(2);
} else if (sc.Match('/', '*')) {
sc.SetState(bEnableCode ? SCE_FS_COMMENTDOC : SCE_FS_COMMENTDOC_C);
sc.Forward();
} else if (bEnableCode && sc.Match('&', '&')) {
sc.SetState(SCE_FS_COMMENTLINE);
} else if (sc.ch == '\"') {
sc.SetState(SCE_FS_STRING);
sc.Forward();
} else if (sc.Match('/', '/')) {
sc.SetState(bEnableCode ? SCE_FS_COMMENTLINEDOC : SCE_FS_COMMENTLINEDOC_C);
sc.Forward();
} else if (bEnableCode && sc.ch == '*' && visibleChars == 0) {
sc.SetState(SCE_FS_COMMENT);
} else if (sc.ch == '\"' || sc.ch == '\'') {
sc.SetState(bEnableCode ? SCE_FS_STRING : SCE_FS_STRING_C);
closeStringChar = sc.ch;
} else if (closeStringChar == '>' && sc.ch == '<') {
sc.SetState(bEnableCode ? SCE_FS_STRING : SCE_FS_STRING_C);
} else if (sc.ch == '#' && visibleChars == 0) {
// Preprocessor commands are alone on their line
sc.SetState(SCE_FS_PREPROCESSOR);
} else if (sc.ch == '#') {
int n = 1;
int chSeek = ' ';
while ((n < 100) && (chSeek == ' ' || chSeek == '\t')) {
chSeek = sc.GetRelative(n);
n++;
sc.SetState(bEnableCode ? SCE_FS_PREPROCESSOR : SCE_FS_PREPROCESSOR_C);
do { // Skip whitespace between # and preprocessor word
sc.Forward();
} while (IsASpaceOrTab(sc.ch) && sc.More());
if (sc.atLineEnd) {
sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);
} else if (sc.MatchIgnoreCase("include")) {
if (stylingWithinPreprocessor) {
closeStringChar = '>';
}
} else if (sc.MatchIgnoreCase("pragma")) {
sc.Forward(6);
do { // Skip more whitespace until keyword
sc.Forward();
} while (IsASpaceOrTab(sc.ch) && sc.More());
if (sc.MatchIgnoreCase("begindump") || sc.MatchIgnoreCase("__cstream")) {
bEnableCode = false;
if (stylingWithinPreprocessor) {
sc.SetState(SCE_FS_DISABLEDCODE);
sc.Forward(8);
sc.ForwardSetState(SCE_FS_DEFAULT_C);
} else {
sc.SetState(SCE_FS_DISABLEDCODE);
}
} else if (sc.MatchIgnoreCase("enddump") || sc.MatchIgnoreCase("__endtext")) {
bEnableCode = true;
sc.SetState(SCE_FS_DISABLEDCODE);
sc.Forward(sc.ch == '_' ? 8 : 6);
sc.ForwardSetState(SCE_FS_DEFAULT);
}
}
if (IsADigit(chSeek)) {
} else if (bEnableCode && sc.ch == '{') {
int p = 0;
int chSeek;
unsigned int endPos(startPos + length);
do { // Skip whitespace
chSeek = sc.GetRelative(++p);
} while (IsASpaceOrTab(chSeek) && (sc.currentPos + p < endPos));
if (chSeek == '^') {
sc.SetState(SCE_FS_DATE);
} else {
sc.SetState(SCE_FS_OPERATOR);
}
} else if (sc.ch == '&' && tolower(sc.chNext) == 'h') {
sc.SetState(SCE_FS_NUMBER);
} else if (sc.ch == '&' && tolower(sc.chNext) == 'o') {
sc.SetState(SCE_FS_NUMBER);
} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
sc.SetState(SCE_FS_NUMBER);
} else if (IsAWordStart(sc.ch) || (sc.ch == '[')) {
sc.SetState(SCE_FS_IDENTIFIER);
} else if (isoperator(static_cast<char>(sc.ch)) || (sc.ch == '\\')) {
sc.SetState(SCE_FS_OPERATOR);
sc.SetState(bEnableCode ? SCE_FS_NUMBER : SCE_FS_NUMBER_C);
} else if (IsAWordChar(sc.ch)) {
sc.SetState(bEnableCode ? SCE_FS_IDENTIFIER : SCE_FS_IDENTIFIER_C);
} else if (isoperator(static_cast<char>(sc.ch)) || (bEnableCode && sc.ch == '@')) {
sc.SetState(bEnableCode ? SCE_FS_OPERATOR : SCE_FS_OPERATOR_C);
}
}
if (sc.atLineEnd) {
visibleChars = 0;
closeStringChar = 0;
}
if (!IsASpace(sc.ch)) {
visibleChars++;
@ -173,36 +301,33 @@ static void ColouriseFlagShipDoc(unsigned int startPos, int length, int initStyl
}
static void FoldFlagShipDoc(unsigned int startPos, int length, int,
WordList *[], Accessor &styler) {
WordList *[], Accessor &styler)
{
int endPos = startPos + length;
// Backtrack to previous line in case need to fix its fold status
int lineCurrent = styler.GetLine(startPos);
if (startPos > 0) {
if (lineCurrent > 0) {
if (startPos > 0 && lineCurrent > 0) {
lineCurrent--;
startPos = styler.LineStart(lineCurrent);
}
}
int spaceFlags = 0;
int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsFlagShipComment);
int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags);
char chNext = styler[startPos];
for (int i = startPos; i < endPos; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) {
if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos-1)) {
int lev = indentCurrent;
int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsFlagShipComment);
int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags);
if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {
// Only non whitespace lines can be headers
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) {
lev |= SC_FOLDLEVELHEADERFLAG;
} else if (indentNext & SC_FOLDLEVELWHITEFLAG) {
// Line after is blank so check the next - maybe should continue further?
int spaceFlags2 = 0;
int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsFlagShipComment);
int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2);
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) {
lev |= SC_FOLDLEVELHEADERFLAG;
}
@ -215,16 +340,13 @@ static void FoldFlagShipDoc(unsigned int startPos, int length, int,
}
}
static const char * const FSWordListDesc[] = {
"Keywords",
"functions",
"user2",
"user3",
"Keywords Commands",
"Std Library Functions",
"Procedure, return, exit",
"Class (oop)",
"Doxygen keywords",
0
};
LexerModule lmFlagShip(SCLEX_FLAGSHIP, ColouriseFlagShipDoc, "flagship", FoldFlagShipDoc, FSWordListDesc);

View File

@ -26,7 +26,7 @@ using namespace Scintilla;
#endif
static inline bool IsGAPOperator(char ch) {
if (isalnum(ch)) return false;
if (isascii(ch) && isalnum(ch)) return false;
if (ch == '+' || ch == '-' || ch == '*' || ch == '/' ||
ch == '^' || ch == ',' || ch == '!' || ch == '.' ||
ch == '=' || ch == '<' || ch == '>' || ch == '(' ||

View File

@ -181,7 +181,7 @@ def FindProperties(lexFile):
properties = {}
f = open(lexFile)
for l in f.readlines():
if "GetProperty" in l:
if "GetProperty" in l and '"' in l:
l = l.strip()
if not l.startswith("//"): # Drop comments
propertyName = l.split("\"")[1]
@ -219,7 +219,7 @@ def ciCompare(a,b):
def ciKey(a):
return a.lower()
def sortListInsensitive(l):
try: # Try key function
l.sort(key=ciKey)
@ -255,9 +255,9 @@ def RegenerateAll():
sortListInsensitive(documentProperties)
propertiesHTML = []
for k in documentProperties:
propertiesHTML.append("\t<tr>\n\t<td>%s</td>\n\t<td>%s</td>\n\t</tr>" %
propertiesHTML.append("\t<tr>\n\t<td>%s</td>\n\t<td>%s</td>\n\t</tr>" %
(k, propertyDocuments[k]))
# Find all the SciTE properties files
otherProps = ["abbrev.properties", "Embedded.properties", "SciTEGlobal.properties", "SciTE.properties"]
if os.path.exists(root + "scite"):
@ -275,7 +275,6 @@ def RegenerateAll():
# extracted from the Scintilla source ZIP (typically created on
# Windows).
Regenerate(root + "scintilla/gtk/makefile", "#", LF, lexFiles)
Regenerate(root + "scintilla/gtk/scintilla.mak", "#", NATIVE, lexFiles)
Regenerate(root + "scintilla/macosx/makefile", "#", LF, lexFiles)
if os.path.exists(root + "scite"):
Regenerate(root + "scite/win32/makefile", "#", NATIVE, lexFiles, propFiles)

View File

@ -69,6 +69,22 @@ static void GetTextSegment(Accessor &styler, unsigned int start, unsigned int en
s[i] = '\0';
}
static const char *GetNextWord(Accessor &styler, unsigned int start, char *s, size_t sLen) {
size_t i = 0;
for (; i < sLen-1; i++) {
char ch = static_cast<char>(styler.SafeGetCharAt(start + i));
if ((i == 0) && !IsAWordStart(ch))
break;
if ((i > 0) && !IsAWordChar(ch))
break;
s[i] = ch;
}
s[i] = '\0';
return s;
}
static script_type segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigned int end, script_type prevValue) {
char s[100];
GetTextSegment(styler, start, end, s, sizeof(s));
@ -486,6 +502,35 @@ static bool isOKBeforeRE(int ch) {
return (ch == '(') || (ch == '=') || (ch == ',');
}
static bool isMakoBlockEnd(const int ch, const int chNext, const char *blockType) {
if (strlen(blockType) == 0) {
return ((ch == '%') && (chNext == '>'));
} else if ((0 == strcmp(blockType, "inherit")) ||
(0 == strcmp(blockType, "namespace")) ||
(0 == strcmp(blockType, "include")) ||
(0 == strcmp(blockType, "page"))) {
return ((ch == '/') && (chNext == '>'));
} else if (0 == strcmp(blockType, "%")) {
return isLineEnd(ch);
} else if (0 == strcmp(blockType, "{")) {
return ch == '}';
} else {
return (ch == '>');
}
}
static bool isDjangoBlockEnd(const int ch, const int chNext, const char *blockType) {
if (strlen(blockType) == 0) {
return 0;
} else if (0 == strcmp(blockType, "%")) {
return ((ch == '%') && (chNext == '}'));
} else if (0 == strcmp(blockType, "{")) {
return ((ch == '}') && (chNext == '}'));
} else {
return 0;
}
}
static bool isPHPStringState(int state) {
return
(state == SCE_HPHP_HSTRING) ||
@ -558,6 +603,10 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
phpStringDelimiter[0] = '\0';
int StateToPrint = initStyle;
int state = stateForPrintState(StateToPrint);
char makoBlockType[200];
makoBlockType[0] = '\0';
char djangoBlockType[2];
djangoBlockType[0] = '\0';
// If inside a tag, it may be a script tag, so reread from the start to ensure any language tags are seen
if (InTagState(state)) {
@ -587,8 +636,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
// Default client and ASP scripting language is JavaScript
lineState = eScriptJS << 8;
// property asp.default.language
// Script in ASP code is initially assumed to be in JavaScript.
// property asp.default.language
// Script in ASP code is initially assumed to be in JavaScript.
// To change this to VBScript set asp.default.language to 2. Python is 3.
// Don
//lineState |= styler.GetPropertyInt("asp.default.language", eScriptJS) << 4;
@ -608,40 +657,49 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
if (inScriptType == eNonHtmlScript && state == SCE_H_COMMENT) {
scriptLanguage = eScriptComment;
}
script_type beforeLanguage = ScriptOfState(beforePreProc);
// property fold.html
// Folding is turned on or off for HTML and XML files with this option.
// property fold.html
// Folding is turned on or off for HTML and XML files with this option.
// The fold option must also be on for folding to occur.
const bool foldHTML = styler.GetPropertyInt("fold.html", 0) != 0;
const bool fold = foldHTML && styler.GetPropertyInt("fold", 0);
// property fold.html.preprocessor
// Folding is turned on or off for scripts embedded in HTML files with this option.
// property fold.html.preprocessor
// Folding is turned on or off for scripts embedded in HTML files with this option.
// The default is on.
const bool foldHTMLPreprocessor = foldHTML && styler.GetPropertyInt("fold.html.preprocessor", 1);
const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
// property fold.hypertext.comment
// Allow folding for comments in scripts embedded in HTML.
// The default is off.
// property fold.hypertext.comment
// Allow folding for comments in scripts embedded in HTML.
// The default is off.
const bool foldComment = fold && styler.GetPropertyInt("fold.hypertext.comment", 0) != 0;
// property fold.hypertext.heredoc
// Allow folding for heredocs in scripts embedded in HTML.
// The default is off.
// property fold.hypertext.heredoc
// Allow folding for heredocs in scripts embedded in HTML.
// The default is off.
const bool foldHeredoc = fold && styler.GetPropertyInt("fold.hypertext.heredoc", 0) != 0;
// property html.tags.case.sensitive
// For XML and HTML, setting this property to 1 will make tags match in a case
// sensitive way which is the expected behaviour for XML and XHTML.
// property html.tags.case.sensitive
// For XML and HTML, setting this property to 1 will make tags match in a case
// sensitive way which is the expected behaviour for XML and XHTML.
const bool caseSensitive = styler.GetPropertyInt("html.tags.case.sensitive", 0) != 0;
// property lexer.xml.allow.scripts
// Set to 0 to disable scripts in XML.
// property lexer.xml.allow.scripts
// Set to 0 to disable scripts in XML.
const bool allowScripts = styler.GetPropertyInt("lexer.xml.allow.scripts", 1) != 0;
// property lexer.html.mako
// Set to 1 to enable the mako template language.
const bool isMako = styler.GetPropertyInt("lexer.html.mako", 0) != 0;
// property lexer.html.django
// Set to 1 to enable the django template language.
const bool isDjango = styler.GetPropertyInt("lexer.html.django", 0) != 0;
const CharacterSet setHTMLWord(CharacterSet::setAlphaNum, ".-_:!#", 0x80, true);
const CharacterSet setTagContinue(CharacterSet::setAlphaNum, ".-_:!#[", 0x80, true);
const CharacterSet setAttributeContinue(CharacterSet::setAlphaNum, ".-_:!#/", 0x80, true);
@ -649,6 +707,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
int levelCurrent = levelPrev;
int visibleChars = 0;
int lineStartVisibleChars = 0;
int chPrev = ' ';
int ch = ' ';
@ -689,6 +748,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
if ((!IsASpace(ch) || !foldCompact) && fold)
visibleChars++;
if (!IsASpace(ch))
lineStartVisibleChars++;
// decide what is the current state to print (depending of the script tag)
StateToPrint = statePrintForState(state, inScriptType);
@ -757,6 +818,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
levelPrev = levelCurrent;
}
lineCurrent++;
lineStartVisibleChars = 0;
styler.SetLineState(lineCurrent,
((inScriptType & 0x03) << 0) |
((tagOpened & 0x01) << 2) |
@ -766,6 +828,11 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
((beforePreProc & 0xFF) << 12));
}
// Allow falling through to mako handling code if newline is going to end a block
if (((ch == '\r' && chNext != '\n') || (ch == '\n')) &&
(!isMako || (0 != strcmp(makoBlockType, "%")))) {
}
// generic end of script processing
else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) {
// Check if it's the end of the script tag (or any other HTML tag)
@ -850,8 +917,80 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
continue;
}
// handle the start Mako template Python code
else if (isMako && scriptLanguage == eScriptNone && ((ch == '<' && chNext == '%') ||
(lineStartVisibleChars == 1 && ch == '%') ||
(ch == '$' && chNext == '{') ||
(ch == '<' && chNext == '/' && chNext2 == '%'))) {
if (ch == '%')
strcpy(makoBlockType, "%");
else if (ch == '$')
strcpy(makoBlockType, "{");
else if (chNext == '/')
GetNextWord(styler, i+3, makoBlockType, sizeof(makoBlockType));
else
GetNextWord(styler, i+2, makoBlockType, sizeof(makoBlockType));
styler.ColourTo(i - 1, StateToPrint);
beforePreProc = state;
if (inScriptType == eNonHtmlScript)
inScriptType = eNonHtmlScriptPreProc;
else
inScriptType = eNonHtmlPreProc;
if (chNext == '/') {
i += 2;
visibleChars += 2;
} else if (ch != '%') {
i++;
visibleChars++;
}
state = SCE_HP_START;
scriptLanguage = eScriptPython;
styler.ColourTo(i, SCE_H_ASP);
if (foldHTMLPreprocessor && ch == '<')
levelCurrent++;
if (ch != '%' && ch != '$') {
i += strlen(makoBlockType);
visibleChars += strlen(makoBlockType);
if (keywords4.InList(makoBlockType))
styler.ColourTo(i, SCE_HP_WORD);
else
styler.ColourTo(i, SCE_H_TAGUNKNOWN);
}
ch = static_cast<unsigned char>(styler.SafeGetCharAt(i));
continue;
}
// handle the start Django template code
else if (isDjango && scriptLanguage != eScriptPython && (ch == '{' && (chNext == '%' || chNext == '{'))) {
if (chNext == '%')
strcpy(djangoBlockType, "%");
else
strcpy(djangoBlockType, "{");
styler.ColourTo(i - 1, StateToPrint);
beforePreProc = state;
if (inScriptType == eNonHtmlScript)
inScriptType = eNonHtmlScriptPreProc;
else
inScriptType = eNonHtmlPreProc;
i += 1;
visibleChars += 1;
state = SCE_HP_START;
beforeLanguage = scriptLanguage;
scriptLanguage = eScriptPython;
styler.ColourTo(i, SCE_H_ASP);
if (foldHTMLPreprocessor && chNext == '%')
levelCurrent++;
ch = static_cast<unsigned char>(styler.SafeGetCharAt(i));
continue;
}
// handle the start of ASP pre-processor = Non-HTML
else if (!isCommentASPState(state) && (ch == '<') && (chNext == '%') && !isPHPStringState(state)) {
else if (!isMako && !isDjango && !isCommentASPState(state) && (ch == '<') && (chNext == '%') && !isPHPStringState(state)) {
styler.ColourTo(i - 1, StateToPrint);
beforePreProc = state;
if (inScriptType == eNonHtmlScript)
@ -916,12 +1055,72 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
continue;
}
// handle the end of Mako Python code
else if (isMako &&
((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) &&
(scriptLanguage != eScriptNone) && stateAllowsTermination(state) &&
isMakoBlockEnd(ch, chNext, makoBlockType)) {
if (state == SCE_H_ASPAT) {
aspScript = segIsScriptingIndicator(styler,
styler.GetStartSegment(), i - 1, aspScript);
}
if (state == SCE_HP_WORD) {
classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType);
} else {
styler.ColourTo(i - 1, StateToPrint);
}
if (0 != strcmp(makoBlockType, "%") && (0 != strcmp(makoBlockType, "{")) && ch != '>') {
i++;
visibleChars++;
}
if (0 != strcmp(makoBlockType, "%")) {
styler.ColourTo(i, SCE_H_ASP);
}
state = beforePreProc;
if (inScriptType == eNonHtmlScriptPreProc)
inScriptType = eNonHtmlScript;
else
inScriptType = eHtml;
if (foldHTMLPreprocessor && ch != '\n' && ch != '\r') {
levelCurrent--;
}
scriptLanguage = eScriptNone;
continue;
}
// handle the end of Django template code
else if (isDjango &&
((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) &&
(scriptLanguage != eScriptNone) && stateAllowsTermination(state) &&
isDjangoBlockEnd(ch, chNext, djangoBlockType)) {
if (state == SCE_H_ASPAT) {
aspScript = segIsScriptingIndicator(styler,
styler.GetStartSegment(), i - 1, aspScript);
}
if (state == SCE_HP_WORD) {
classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType);
} else {
styler.ColourTo(i - 1, StateToPrint);
}
i += 1;
visibleChars += 1;
styler.ColourTo(i, SCE_H_ASP);
state = beforePreProc;
if (inScriptType == eNonHtmlScriptPreProc)
inScriptType = eNonHtmlScript;
else
inScriptType = eHtml;
if (foldHTMLPreprocessor) {
levelCurrent--;
}
scriptLanguage = beforeLanguage;
continue;
}
// handle the end of a pre-processor = Non-HTML
else if ((
((inScriptType == eNonHtmlPreProc)
|| (inScriptType == eNonHtmlScriptPreProc)) && (
((scriptLanguage != eScriptNone) && stateAllowsTermination(state) && ((ch == '%') || (ch == '?')))
) && (chNext == '>')) ||
else if ((!isMako && !isDjango && ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) &&
(((scriptLanguage != eScriptNone) && stateAllowsTermination(state))) &&
(((ch == '%') || (ch == '?')) && (chNext == '>'))) ||
((scriptLanguage == eScriptSGML) && (ch == '>') && (state != SCE_H_SGML_COMMENT))) {
if (state == SCE_H_ASPAT) {
aspScript = segIsScriptingIndicator(styler,

View File

@ -139,7 +139,7 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W
}
}
} else if (state == SCE_LISP_MACRO_DISPATCH) {
if (!isdigit(ch)) {
if (!(isascii(ch) && isdigit(ch))) {
if (ch != 'r' && ch != 'R' && (i - styler.GetStartSegment()) > 1) {
state = SCE_LISP_DEFAULT;
} else {

View File

@ -32,7 +32,7 @@ static inline bool IsAWordChar(const int ch) {
}
inline bool isMMIXALOperator(char ch) {
if (isalnum(ch))
if (isascii(ch) && isalnum(ch))
return false;
if (ch == '+' || ch == '-' || ch == '|' || ch == '^' ||
ch == '*' || ch == '/' || ch == '/' ||

View File

@ -32,7 +32,7 @@ static int GetLotLineState(std::string &line) {
// Now finds the first non-blank character
unsigned i; // Declares counter here to make it persistent after the for loop
for (i = 0; i < line.length(); ++i) {
if (!isspace(line[i]))
if (!(isascii(line[i]) && isspace(line[i])))
break;
}

View File

@ -361,7 +361,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
// Not really a standard, but we add support for single line comments
// with special curly braces syntax as foldable comments too.
// MySQL needs -- comments to be followed by space or control char
if (styler.Match(startPos, "--"))
if (styler.Match(i, "--"))
{
char chNext2 = styler.SafeGetCharAt(i + 2);
char chNext3 = styler.SafeGetCharAt(i + 3);
@ -394,12 +394,12 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
// Reserved and other keywords.
if (style != stylePrev)
{
bool beginFound = MatchIgnoreCase(styler, startPos, "begin");
bool ifFound = MatchIgnoreCase(styler, startPos, "if");
bool thenFound = MatchIgnoreCase(styler, startPos, "then");
bool whileFound = MatchIgnoreCase(styler, startPos, "while");
bool loopFound = MatchIgnoreCase(styler, startPos, "loop");
bool repeatFound = MatchIgnoreCase(styler, startPos, "repeat");
bool beginFound = MatchIgnoreCase(styler, i, "begin");
bool ifFound = MatchIgnoreCase(styler, i, "if");
bool thenFound = MatchIgnoreCase(styler, i, "then");
bool whileFound = MatchIgnoreCase(styler, i, "while");
bool loopFound = MatchIgnoreCase(styler, i, "loop");
bool repeatFound = MatchIgnoreCase(styler, i, "repeat");
if (!foldOnlyBegin && endFound && (ifFound || whileFound || loopFound))
{
@ -413,7 +413,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
// will be increased later, if not, then at eol.
}
else
if (!foldOnlyBegin && MatchIgnoreCase(styler, startPos, "else"))
if (!foldOnlyBegin && MatchIgnoreCase(styler, i, "else"))
{
levelNext--;
elseFound = true;
@ -430,7 +430,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
if (ifFound)
elseFound = false;
else
if (MatchIgnoreCase(styler, startPos, "when"))
if (MatchIgnoreCase(styler, i, "when"))
whenFound = true;
else
{
@ -445,7 +445,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
levelNext++;
}
else
if (MatchIgnoreCase(styler, startPos, "end"))
if (MatchIgnoreCase(styler, i, "end"))
{
// Multiple "end" in a row are counted multiple times!
if (endFound)

View File

@ -78,7 +78,7 @@ static bool NsisNextLineHasElse(unsigned int start, unsigned int end, Accessor &
}
}
if( nNextLine == -1 ) // We never foudn the next line...
if( nNextLine == -1 ) // We never found the next line...
return false;
for( unsigned int firstChar = nNextLine; firstChar < end; firstChar++ )
@ -146,7 +146,7 @@ static int calculateFoldNsis(unsigned int start, unsigned int end, int foldlevel
if( s[0] == '!' )
{
if( NsisCmp(s, "!ifndef", bIgnoreCase) == 0 || NsisCmp(s, "!ifdef", bIgnoreCase ) == 0 || NsisCmp(s, "!if", bIgnoreCase ) == 0 || NsisCmp(s, "!macro", bIgnoreCase ) == 0 )
if( NsisCmp(s, "!ifndef", bIgnoreCase) == 0 || NsisCmp(s, "!ifdef", bIgnoreCase ) == 0 || NsisCmp(s, "!ifmacrodef", bIgnoreCase ) == 0 || NsisCmp(s, "!ifmacrondef", bIgnoreCase ) == 0 || NsisCmp(s, "!if", bIgnoreCase ) == 0 || NsisCmp(s, "!macro", bIgnoreCase ) == 0 )
newFoldlevel++;
else if( NsisCmp(s, "!endif", bIgnoreCase) == 0 || NsisCmp(s, "!macroend", bIgnoreCase ) == 0 )
newFoldlevel--;
@ -191,16 +191,16 @@ static int classifyWordNsis(unsigned int start, unsigned int end, WordList *keyw
}
// Check for special words...
if( NsisCmp(s, "!macro", bIgnoreCase ) == 0 || NsisCmp(s, "!macroend", bIgnoreCase) == 0 ) // Covers !micro and !microend
if( NsisCmp(s, "!macro", bIgnoreCase ) == 0 || NsisCmp(s, "!macroend", bIgnoreCase) == 0 ) // Covers !macro and !macroend
return SCE_NSIS_MACRODEF;
if( NsisCmp(s, "!ifdef", bIgnoreCase ) == 0 || NsisCmp(s, "!ifndef", bIgnoreCase) == 0 || NsisCmp(s, "!endif", bIgnoreCase) == 0 )
if( NsisCmp(s, "!ifdef", bIgnoreCase ) == 0 || NsisCmp(s, "!ifndef", bIgnoreCase) == 0 || NsisCmp(s, "!endif", bIgnoreCase) == 0 ) // Covers !ifdef, !ifndef and !endif
return SCE_NSIS_IFDEFINEDEF;
if( NsisCmp(s, "!else", bIgnoreCase ) == 0 ) // || NsisCmp(s, "!ifndef", bIgnoreCase) == 0 || NsisCmp(s, "!endif", bIgnoreCase) == 0 )
if( NsisCmp(s, "!if", bIgnoreCase ) == 0 || NsisCmp(s, "!else", bIgnoreCase ) == 0 ) // Covers !if and else
return SCE_NSIS_IFDEFINEDEF;
if( NsisCmp(s, "!if", bIgnoreCase ) == 0 )
if (NsisCmp(s, "!ifmacrodef", bIgnoreCase ) == 0 || NsisCmp(s, "!ifmacrondef", bIgnoreCase ) == 0 ) // Covers !ifmacrodef and !ifnmacrodef
return SCE_NSIS_IFDEFINEDEF;
if( NsisCmp(s, "SectionGroup", bIgnoreCase) == 0 || NsisCmp(s, "SectionGroupEnd", bIgnoreCase) == 0 ) // Covers SectionGroup and SectionGroupEnd

View File

@ -292,7 +292,7 @@ inline bool HandleInteger( unsigned int & cur, unsigned int one_too_much, Access
}
ch = styler.SafeGetCharAt( cur );
if( !isdigit( ch ) )
if( !( isascii( ch ) && isdigit( ch ) ) )
{
styler.ColourTo( cur - 1, SCE_OPAL_INTEGER );
styler.StartSegment( cur );
@ -311,7 +311,7 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor
{
ch = styler.SafeGetCharAt( cur );
if( ( ch != '_' ) && ( ch != '-' ) &&
!islower( ch ) && !isupper( ch ) && !isdigit( ch ) ) break;
!( isascii( ch ) && ( islower( ch ) || isupper( ch ) || isdigit( ch ) ) ) ) break;
cur++;
if( cur >= one_too_much )
@ -487,13 +487,13 @@ static void ColouriseOpalDoc( unsigned int startPos, int length, int initStyle,
default:
{
// Integer
if( isdigit( ch ) )
if( isascii( ch ) && isdigit( ch ) )
{
if( !HandleInteger( cur, one_too_much, styler ) ) return;
}
// Keyword
else if( islower( ch ) || isupper( ch ) )
else if( isascii( ch ) && ( islower( ch ) || isupper( ch ) ) )
{
if( !HandleWord( cur, one_too_much, styler, keywordlists ) ) return;

View File

@ -37,6 +37,10 @@ static bool Is1To9(char ch) {
return (ch >= '1') && (ch <= '9');
}
static bool IsAlphabetic(int ch) {
return isascii(ch) && isalpha(ch);
}
static inline bool AtEOL(Accessor &styler, unsigned int i) {
return (styler[i] == '\n') ||
((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n'));
@ -101,7 +105,7 @@ static void ColouriseBatchLine(
}
return;
// Check for Drive Change (Drive Change is internal command) - return if found
} else if ((isalpha(lineBuffer[offset])) &&
} else if ((IsAlphabetic(lineBuffer[offset])) &&
(lineBuffer[offset + 1] == ':') &&
((isspacechar(lineBuffer[offset + 2])) ||
(((lineBuffer[offset + 2] == '\\')) &&
@ -723,10 +727,10 @@ static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *
unsigned int linePos = 0;
unsigned int startLine = startPos;
// property lexer.props.allow.initial.spaces
// For properties files, set to 0 to style all lines that start with whitespace in the default style.
// This is not suitable for SciTE .properties files which use indentation for flow control but
// can be used for RFC2822 text where indentation is used for continuation lines.
// property lexer.props.allow.initial.spaces
// For properties files, set to 0 to style all lines that start with whitespace in the default style.
// This is not suitable for SciTE .properties files which use indentation for flow control but
// can be used for RFC2822 text where indentation is used for continuation lines.
bool allowInitialSpaces = styler.GetPropertyInt("lexer.props.allow.initial.spaces", 1) != 0;
for (unsigned int i = startPos; i < startPos + length; i++) {
@ -961,17 +965,17 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin
} else if (strstart(lineBuffer, "Warning ")) {
// Borland warning message
return SCE_ERR_BORLAND;
} else if (strstr(lineBuffer, "at line " ) &&
(strstr(lineBuffer, "at line " ) < (lineBuffer + lengthLine)) &&
} else if (strstr(lineBuffer, "at line ") &&
(strstr(lineBuffer, "at line ") < (lineBuffer + lengthLine)) &&
strstr(lineBuffer, "file ") &&
(strstr(lineBuffer, "file ") < (lineBuffer + lengthLine))) {
// Lua 4 error message
return SCE_ERR_LUA;
} else if (strstr(lineBuffer, " at " ) &&
(strstr(lineBuffer, " at " ) < (lineBuffer + lengthLine)) &&
} else if (strstr(lineBuffer, " at ") &&
(strstr(lineBuffer, " at ") < (lineBuffer + lengthLine)) &&
strstr(lineBuffer, " line ") &&
(strstr(lineBuffer, " line ") < (lineBuffer + lengthLine)) &&
(strstr(lineBuffer, " at " ) < (strstr(lineBuffer, " line ")))) {
(strstr(lineBuffer, " at ") < (strstr(lineBuffer, " line ")))) {
// perl error message
return SCE_ERR_PERL;
} else if ((memcmp(lineBuffer, " at ", 6) == 0) &&
@ -1065,7 +1069,7 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin
numstep = 1; // ch was ' ', handle as if it's a delphi errorline, only add 1 to i.
else
numstep = 2; // otherwise add 2.
for (j = i + numstep; j < lengthLine && isalpha(lineBuffer[j]) && chPos < sizeof(word) - 1; j++)
for (j = i + numstep; j < lengthLine && IsAlphabetic(lineBuffer[j]) && chPos < sizeof(word) - 1; j++)
word[chPos++] = lineBuffer[j];
word[chPos] = 0;
if (!CompareCaseInsensitive(word, "error") || !CompareCaseInsensitive(word, "warning") ||
@ -1131,11 +1135,11 @@ static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordLi
styler.StartSegment(startPos);
unsigned int linePos = 0;
// property lexer.errorlist.value.separate
// For lines in the output pane that are matches from Find in Files or GCC-style
// diagnostics, style the path and line number separately from the rest of the
// line with style 21 used for the rest of the line.
// This allows matched text to be more easily distinguished from its location.
// property lexer.errorlist.value.separate
// For lines in the output pane that are matches from Find in Files or GCC-style
// diagnostics, style the path and line number separately from the rest of the
// line with style 21 used for the rest of the line.
// This allows matched text to be more easily distinguished from its location.
bool valueSeparate = styler.GetPropertyInt("lexer.errorlist.value.separate", 0) != 0;
for (unsigned int i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
@ -1252,13 +1256,13 @@ static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle,
styler.ColourTo(lengthDoc-1, state);
}
static const char * const batchWordListDesc[] = {
static const char *const batchWordListDesc[] = {
"Internal Commands",
"External Commands",
0
};
static const char * const emptyWordListDesc[] = {
static const char *const emptyWordListDesc[] = {
0
};

View File

@ -1243,7 +1243,7 @@ static void FoldPerlDoc(unsigned int startPos, int length, int, WordList *[],
else if (styler.Match(i, "=head"))
isPodHeading = true;
} else if (style == SCE_PL_DATASECTION) {
if (ch == '=' && isalpha(chNext) && levelCurrent == SC_FOLDLEVELBASE)
if (ch == '=' && isascii(chNext) && isalpha(chNext) && levelCurrent == SC_FOLDLEVELBASE)
levelCurrent++;
else if (styler.Match(i, "=cut") && levelCurrent > SC_FOLDLEVELBASE)
levelCurrent--;

View File

@ -9,7 +9,6 @@
/** TODO:
WebSpeed support in html lexer
Support "end triggers" expression of the triggers phrase
change lmPS to lmProgress
Support more than 6 comments levels
**/
#include <stdlib.h>
@ -39,7 +38,7 @@ static inline bool IsAWordStart(int ch) {
return (ch < 0x80) && (isalpha(ch) || ch == '_');
}
enum SentenceStart { SetSentenceStart = 0xf, ResetSentenceStart = 0x10}; // true -> bit5 = 0
enum SentenceStart { SetSentenceStart = 0xf, ResetSentenceStart = 0x10}; // true -> bit = 0
static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
Accessor &styler) {
@ -51,7 +50,7 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo
int visibleChars = 0;
int sentenceStartState; // true -> bit5 = 0
int mask;
StyleContext sc(startPos, length, initStyle, styler);
@ -64,6 +63,7 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo
}
// Handle line continuation generically.
if ((sc.state & 0xf) < SCE_4GL_COMMENT1) {
if (sc.ch == '~') {
if (sc.chNext > ' ') {
// skip special char after ~
@ -85,22 +85,23 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo
}
}
}
}
// Determine if a new state should be terminated.
sentenceStartState = sc.state & 0x10;
mask = sc.state & 0x10;
switch (sc.state & 0xf) {
case SCE_4GL_OPERATOR:
sc.SetState(SCE_4GL_DEFAULT | sentenceStartState);
sc.SetState(SCE_4GL_DEFAULT | mask);
break;
case SCE_4GL_NUMBER:
if (!(IsADigit(sc.ch))) {
sc.SetState(SCE_4GL_DEFAULT | sentenceStartState);
sc.SetState(SCE_4GL_DEFAULT | mask);
}
break;
case SCE_4GL_IDENTIFIER:
if (!IsAWordChar(sc.ch) && sc.ch != '-') {
char s[1000];
sc.GetCurrentLowered(s, sizeof(s));
if (((sentenceStartState == 0) && keywords2.InList(s)) || keywords3.InList(s)) {
if ((((sc.state & 0x10) == 0) && keywords2.InList(s)) || keywords3.InList(s)) {
sc.ChangeState(SCE_4GL_BLOCK | ResetSentenceStart);
}
else if (keywords1.InList(s)) {
@ -122,18 +123,19 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo
case SCE_4GL_PREPROCESSOR:
if (sc.atLineStart) {
sc.SetState(SCE_4GL_DEFAULT & SetSentenceStart);
} else if (sc.ch == '*' && sc.chNext == '/') {
sc.ForwardSetState(SCE_4GL_DEFAULT | sentenceStartState);
}
/* code removed to allow comments inside preprocessor
else if (sc.ch == '*' && sc.chNext == '/') {
sc.ForwardSetState(SCE_4GL_DEFAULT | sentenceStartState); } */
break;
case SCE_4GL_STRING:
if (sc.ch == '\"') {
sc.ForwardSetState(SCE_4GL_DEFAULT | sentenceStartState);
sc.ForwardSetState(SCE_4GL_DEFAULT | mask);
}
break;
case SCE_4GL_CHARACTER:
if (sc.ch == '\'') {
sc.ForwardSetState(SCE_4GL_DEFAULT | sentenceStartState);
sc.ForwardSetState(SCE_4GL_DEFAULT | mask);
}
break;
default:
@ -141,7 +143,7 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo
if (sc.ch == '*' && sc.chNext == '/') {
sc.Forward();
if ((sc.state & 0xf) == SCE_4GL_COMMENT1) {
sc.ForwardSetState(SCE_4GL_DEFAULT | sentenceStartState);
sc.ForwardSetState(SCE_4GL_DEFAULT | mask);
}
else
sc.SetState((sc.state & 0x1f) - 1);
@ -153,14 +155,14 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo
}
// Determine if a new state should be entered.
sentenceStartState = sc.state & 0x10;
mask = sc.state & 0x10;
if ((sc.state & 0xf) == SCE_4GL_DEFAULT) {
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
sc.SetState(SCE_4GL_NUMBER | ResetSentenceStart);
} else if (IsAWordStart(sc.ch) || sc.ch == '@') {
sc.SetState(SCE_4GL_IDENTIFIER | sentenceStartState);
} else if (IsAWordStart(sc.ch) || (sc.ch == '@')) {
sc.SetState(SCE_4GL_IDENTIFIER | mask);
} else if (sc.ch == '/' && sc.chNext == '*') {
sc.SetState(SCE_4GL_COMMENT1 | sentenceStartState);
sc.SetState(SCE_4GL_COMMENT1 | mask);
sc.Forward();
} else if (sc.ch == '\"') {
sc.SetState(SCE_4GL_STRING | ResetSentenceStart);
@ -176,12 +178,12 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo
} else if ((sc.ch == '.' || sc.ch == ':' || sc.ch == '}') && (sc.chNext == ' ' || sc.chNext == '\t' || sc.chNext == '\n' || sc.chNext == '\r')) {
sc.SetState(sc.state & SetSentenceStart);
} else if (isoperator(static_cast<char>(sc.ch))) {
/* This code allows highlight of handles. Alas, it would cause the frase "last-event:function"
to be recognized as a BlockBegin
/* This code allows highlight of handles. Alas, it would cause the phrase "last-event:function"
to be recognized as a BlockBegin */
if (sc.ch == ':')
sc.SetState(SCE_4GL_OPERATOR & SetSentenceStart);
else */
/* else */
sc.SetState(SCE_4GL_OPERATOR | ResetSentenceStart);
}
}

View File

@ -36,7 +36,7 @@ static bool IsPyComment(Accessor &styler, int pos, int len) {
enum literalsAllowed { litNone=0, litU=1, litB=2};
static bool IsPyStringTypeChar(int ch, literalsAllowed allowed) {
return
return
((allowed & litB) && (ch == 'b' || ch == 'B')) ||
((allowed & litU) && (ch == 'u' || ch == 'U'));
}
@ -136,13 +136,13 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
WordList &keywords2 = *keywordlists[1];
// property tab.timmy.whinge.level
// For Python code, checks whether indenting is consistent.
// The default, 0 turns off indentation checking,
// 1 checks whether each line is potentially inconsistent with the previous line,
// 2 checks whether any space characters occur before a tab character in the indentation,
// 3 checks whether any spaces are in the indentation, and
// For Python code, checks whether indenting is consistent.
// The default, 0 turns off indentation checking,
// 1 checks whether each line is potentially inconsistent with the previous line,
// 2 checks whether any space characters occur before a tab character in the indentation,
// 3 checks whether any spaces are in the indentation, and
// 4 checks for any tab characters in the indentation.
// 1 is a good level to use.
// 1 is a good level to use.
const int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level");
// property lexer.python.literals.binary
@ -158,6 +158,10 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
if (styler.GetPropertyInt("lexer.python.strings.b", 1))
allowedLiterals = static_cast<literalsAllowed>(allowedLiterals | litB);
// property lexer.python.strings.over.newline
// Set to 1 to allow strings to span newline characters.
bool stringsOverNewline = styler.GetPropertyInt("lexer.python.strings.over.newline") != 0;
initStyle = initStyle & 31;
if (initStyle == SCE_P_STRINGEOL) {
initStyle = SCE_P_DEFAULT;
@ -204,7 +208,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
}
lineCurrent++;
if ((sc.state == SCE_P_STRING) || (sc.state == SCE_P_CHARACTER)) {
if (inContinuedString) {
if (inContinuedString || stringsOverNewline) {
inContinuedString = false;
} else {
sc.ChangeState(SCE_P_STRINGEOL);
@ -349,7 +353,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
if (sc.ch == '0' && (sc.chNext == 'x' || sc.chNext == 'X')) {
base_n_number = true;
sc.SetState(SCE_P_NUMBER);
} else if (sc.ch == '0' &&
} else if (sc.ch == '0' &&
(sc.chNext == 'o' || sc.chNext == 'O' || sc.chNext == 'b' || sc.chNext == 'B')) {
if (base2or8Literals) {
base_n_number = true;
@ -534,7 +538,7 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
}
// Set fold header on non-quote/non-comment line
if (!quote && !comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG) ) {
if (!quote && !comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))
lev |= SC_FOLDLEVELHEADERFLAG;
}
@ -554,7 +558,7 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
//styler.SetLevel(lineCurrent, indentCurrent);
}
static const char * const pythonWordListDesc[] = {
static const char *const pythonWordListDesc[] = {
"Keywords",
"Highlighted identifiers",
0

View File

@ -77,9 +77,9 @@ static void ColouriseRDoc(unsigned int startPos, int length, int initStyle, Word
sc.SetState(SCE_R_DEFAULT);
}
} else if (sc.state == SCE_R_IDENTIFIER) {
if (!IsAWordChar(sc.ch) || (sc.ch == '.')) {
if (!IsAWordChar(sc.ch)) {
char s[100];
sc.GetCurrentLowered(s, sizeof(s));
sc.GetCurrent(s, sizeof(s));
if (keywords.InList(s)) {
sc.ChangeState(SCE_R_KWORD);
} else if (keywords2.InList(s)) {

View File

@ -203,13 +203,11 @@ void ColouriseSMLDoc(
}
void FoldSMLDoc(
unsigned int startPos, int length,
int initStyle,
WordList *keywordlists[],
Accessor &styler)
unsigned int, int,
int,
WordList *[],
Accessor &)
{
//supress "not used" warnings
startPos || length || initStyle || keywordlists[0] || styler.Length();
}
static const char * const SMLWordListDesc[] = {

View File

@ -231,6 +231,10 @@ static void FoldSQLDoc(unsigned int startPos, int length, int initStyle,
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
bool foldOnlyBegin = styler.GetPropertyInt("fold.sql.only.begin", 0) != 0;
// property fold.sql.exists
// Enables "EXISTS" to end a fold as is started by "IF" in "DROP TABLE IF EXISTS".
bool foldSqlExists = styler.GetPropertyInt("fold.sql.exists", 1) != 0;
unsigned int endPos = startPos + length;
int visibleChars = 0;
int lineCurrent = styler.GetLine(startPos);
@ -303,9 +307,13 @@ static void FoldSQLDoc(unsigned int startPos, int length, int initStyle,
}
} else if (strcmp(s, "begin") == 0) {
levelNext++;
} else if (strcmp(s, "end") == 0 ||
// DROP TABLE IF EXISTS or CREATE TABLE IF NOT EXISTS
strcmp(s, "exists") == 0) {
} else if ((strcmp(s, "end") == 0) ||
// // DROP TABLE IF EXISTS or CREATE TABLE IF NOT EXISTS
(foldSqlExists && (strcmp(s, "exists") == 0)) ||
// // SQL Anywhere permits IF ... ELSE ... ENDIF
// // will only be active if "endif" appears in the
// // keyword list.
(strcmp(s, "endif") == 0)) {
endFound = true;
levelNext--;
if (levelNext < SC_FOLDLEVELBASE) {

View File

@ -214,6 +214,40 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
visibleChars++;
}
}
if (sc.state == SCE_B_IDENTIFIER && !IsAWordChar(sc.ch)) {
// In Basic (except VBScript), a variable name or a function name
// can end with a special character indicating the type of the value
// held or returned.
bool skipType = false;
if (!vbScriptSyntax && IsTypeCharacter(sc.ch)) {
sc.Forward(); // Skip it
skipType = true;
}
if (sc.ch == ']') {
sc.Forward();
}
char s[100];
sc.GetCurrentLowered(s, sizeof(s));
if (skipType) {
s[strlen(s) - 1] = '\0';
}
if (strcmp(s, "rem") == 0) {
sc.ChangeState(SCE_B_COMMENT);
} else {
if (keywords.InList(s)) {
sc.ChangeState(SCE_B_KEYWORD);
} else if (keywords2.InList(s)) {
sc.ChangeState(SCE_B_KEYWORD2);
} else if (keywords3.InList(s)) {
sc.ChangeState(SCE_B_KEYWORD3);
} else if (keywords4.InList(s)) {
sc.ChangeState(SCE_B_KEYWORD4);
} // Else, it is really an identifier...
sc.SetState(SCE_B_DEFAULT);
}
}
sc.Complete();
}

View File

@ -1,9 +1,9 @@
// Scintilla source code edit control
/** @file LexVHDL.cxx
** Lexer for VHDL
** Written by Phil Reid,
** Written by Phil Reid,
** Based on:
** - The Verilog Lexer by Avi Yegudin
** - The Verilog Lexer by Avi Yegudin
** - The Fortran Lexer by Chuan-jian Shen
** - The C++ lexer by Neil Hodgson
**/
@ -126,7 +126,7 @@ static void ColouriseVHDLDoc(
sc.SetState(SCE_VHDL_IDENTIFIER);
} else if (sc.Match('-', '-')) {
sc.SetState(SCE_VHDL_COMMENT);
sc.Forward();
sc.Forward();
} else if (sc.Match('-', '-')) {
if (sc.Match("--!")) // Nice to have a different comment style
sc.SetState(SCE_VHDL_COMMENTLINEBANG);
@ -161,7 +161,7 @@ static bool IsCommentLine(int line, Accessor &styler) {
static void FoldNoBoxVHDLDoc(
unsigned int startPos,
int length,
int initStyle,
int,
Accessor &styler)
{
// Decided it would be smarter to have the lexer have all keywords included. Therefore I
@ -249,7 +249,6 @@ static void FoldNoBoxVHDLDoc(
char chPrev = '\0';
char chNextNonBlank;
int styleNext = styler.StyleAt(startPos);
int style = initStyle;
//Platform::DebugPrintf("Line[%04d] Prev[%20s] ************************* Level[%x]\n", lineCurrent+1, prevWord, levelCurrent);
/***************************************/
@ -265,16 +264,16 @@ static void FoldNoBoxVHDLDoc(
j ++ ;
chNextNonBlank = styler.SafeGetCharAt(j);
}
style = styleNext;
int style = styleNext;
styleNext = styler.StyleAt(i + 1);
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
if (foldComment && atEOL && IsCommentLine(lineCurrent, styler))
if (foldComment && atEOL && IsCommentLine(lineCurrent, styler))
{
if(!IsCommentLine(lineCurrent-1, styler) && IsCommentLine(lineCurrent+1, styler))
{
levelNext++;
}
}
else if(IsCommentLine(lineCurrent-1, styler) && !IsCommentLine(lineCurrent+1, styler))
{
levelNext--;
@ -380,7 +379,7 @@ static void FoldNoBoxVHDLDoc(
((strcmp(s, "begin") == 0) && (strcmp(prevWord, "function") == 0)) ||
((strcmp(s, "begin") == 0) && (strcmp(prevWord, "procedure") == 0)))
{
levelMinCurrentBegin = levelNext - 1;
levelMinCurrentBegin = levelNext - 1;
}
//Platform::DebugPrintf("Line[%04d] Prev[%20s] Cur[%20s] Level[%x]\n", lineCurrent+1, prevWord, s, levelCurrent);
strcpy(prevWord, s);
@ -444,34 +443,34 @@ LexerModule lmVHDL(SCLEX_VHDL, ColouriseVHDLDoc, "vhdl", FoldVHDLDoc, VHDLWordLi
// Keyword:
// access after alias all architecture array assert attribute begin block body buffer bus case component
// configuration constant disconnect downto else elsif end entity exit file for function generate generic
// group guarded if impure in inertial inout is label library linkage literal loop map new next null of
// on open others out package port postponed procedure process pure range record register reject report
// return select severity shared signal subtype then to transport type unaffected units until use variable
// access after alias all architecture array assert attribute begin block body buffer bus case component
// configuration constant disconnect downto else elsif end entity exit file for function generate generic
// group guarded if impure in inertial inout is label library linkage literal loop map new next null of
// on open others out package port postponed procedure process pure range record register reject report
// return select severity shared signal subtype then to transport type unaffected units until use variable
// wait when while with
//
// Operators:
// abs and mod nand nor not or rem rol ror sla sll sra srl xnor xor
//
// Attributes:
// left right low high ascending image value pos val succ pred leftof rightof base range reverse_range
// length delayed stable quiet transaction event active last_event last_active last_value driving
// left right low high ascending image value pos val succ pred leftof rightof base range reverse_range
// length delayed stable quiet transaction event active last_event last_active last_value driving
// driving_value simple_name path_name instance_name
//
// Std Functions:
// now readline read writeline write endfile resolved to_bit to_bitvector to_stdulogic to_stdlogicvector
// to_stdulogicvector to_x01 to_x01z to_UX01 rising_edge falling_edge is_x shift_left shift_right rotate_left
// now readline read writeline write endfile resolved to_bit to_bitvector to_stdulogic to_stdlogicvector
// to_stdulogicvector to_x01 to_x01z to_UX01 rising_edge falling_edge is_x shift_left shift_right rotate_left
// rotate_right resize to_integer to_unsigned to_signed std_match to_01
//
// Std Packages:
// std ieee work standard textio std_logic_1164 std_logic_arith std_logic_misc std_logic_signed
// std_logic_textio std_logic_unsigned numeric_bit numeric_std math_complex math_real vital_primitives
// std ieee work standard textio std_logic_1164 std_logic_arith std_logic_misc std_logic_signed
// std_logic_textio std_logic_unsigned numeric_bit numeric_std math_complex math_real vital_primitives
// vital_timing
//
// Std Types:
// boolean bit character severity_level integer real time delay_length natural positive string bit_vector
// file_open_kind file_open_status line text side width std_ulogic std_ulogic_vector std_logic
// boolean bit character severity_level integer real time delay_length natural positive string bit_vector
// file_open_kind file_open_status line text side width std_ulogic std_ulogic_vector std_logic
// std_logic_vector X01 X01Z UX01 UX01Z unsigned signed
//

View File

@ -150,6 +150,22 @@ static bool IsStreamCommentStyle(int style) {
return style == SCE_V_COMMENT;
}
static bool IsCommentLine(int line, Accessor &styler) {
int pos = styler.LineStart(line);
int eolPos = styler.LineStart(line + 1) - 1;
for (int i = pos; i < eolPos; i++) {
char ch = styler[i];
char chNext = styler.SafeGetCharAt(i + 1);
int style = styler.StyleAt(i);
if (ch == '/' && chNext == '/' &&
(style == SCE_V_COMMENTLINE || style == SCE_V_COMMENTLINEBANG)) {
return true;
} else if (!IsASpaceOrTab(ch)) {
return false;
}
}
return false;
}
// Store both the current line's fold level and the next lines in the
// level store to make it easy to pick up with each increment
// and to make it possible to fiddle the current level for "} else {".
@ -195,6 +211,15 @@ static void FoldNoBoxVerilogDoc(unsigned int startPos, int length, int initStyle
levelNext--;
}
}
if (foldComment && atEOL && IsCommentLine(lineCurrent, styler))
{
if (!IsCommentLine(lineCurrent - 1, styler)
&& IsCommentLine(lineCurrent + 1, styler))
levelNext++;
else if (IsCommentLine(lineCurrent - 1, styler)
&& !IsCommentLine(lineCurrent+1, styler))
levelNext--;
}
if (foldComment && (style == SCE_V_COMMENTLINE)) {
if ((ch == '/') && (chNext == '/')) {
char chNext2 = styler.SafeGetCharAt(i + 2);

View File

@ -31,7 +31,7 @@ void LineMarker::SetXPM(const char *textForm) {
markType = SC_MARK_PIXMAP;
}
void LineMarker::SetXPM(const char * const *linesForm) {
void LineMarker::SetXPM(const char *const *linesForm) {
delete pxpm;
pxpm = new XPM(linesForm);
markType = SC_MARK_PIXMAP;
@ -154,7 +154,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
rcSmall.bottom = rc.bottom - 2;
surface->RectangleDraw(rcSmall, fore.allocated, back.allocated);
} else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND ||
} else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND ||
markType == SC_MARK_UNDERLINE || markType == SC_MARK_AVAILABLE) {
// An invisible marker so don't draw anything

View File

@ -51,7 +51,7 @@ public:
}
void RefreshColourPalette(Palette &pal, bool want);
void SetXPM(const char *textForm);
void SetXPM(const char * const *linesForm);
void SetXPM(const char *const *linesForm);
void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter);
};

View File

@ -8,7 +8,7 @@
#ifndef PARTITIONING_H
#define PARTITIONING_H
/// A split vector of integers with a method for adding a value to all elements
/// A split vector of integers with a method for adding a value to all elements
/// in a range.
/// Used by the Partitioning class.

View File

@ -241,7 +241,7 @@ void LineLevels::Init() {
void LineLevels::InsertLine(int line) {
if (levels.Length()) {
int level = SC_FOLDLEVELBASE;
if ((line > 0) && (line < levels.Length())) {
if ((line > 0) && (line < levels.Length())) {
level = levels[line-1] & ~SC_FOLDLEVELWHITEFLAG;
}
levels.InsertValue(line, 1, level);
@ -362,6 +362,7 @@ void LineAnnotation::Init() {
void LineAnnotation::InsertLine(int line) {
if (annotations.Length()) {
annotations.EnsureLength(line);
annotations.Insert(line, 0);
}
}
@ -420,7 +421,7 @@ void LineAnnotation::SetText(int line, const char *text) {
delete []annotations[line];
}
annotations[line] = AllocateAnnotation(strlen(text), style);
AnnotationHeader *pah = reinterpret_cast<AnnotationHeader*>(annotations[line]);
AnnotationHeader *pah = reinterpret_cast<AnnotationHeader *>(annotations[line]);
pah->style = static_cast<short>(style);
pah->length = strlen(text);
pah->lines = static_cast<short>(NumberLines(text));

View File

@ -11,7 +11,7 @@
#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif
/**
* This holds the marker identifier and the marker type to display.
* MarkerHandleNumbers are members of lists.

View File

@ -10,6 +10,7 @@
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <vector>
#include "Platform.h"
@ -361,7 +362,8 @@ void BreakFinder::Insert(int val) {
for (unsigned int j = 0; j<saeLen; j++) {
if (val == selAndEdge[j]) {
return;
} if (val < selAndEdge[j]) {
}
if (val < selAndEdge[j]) {
for (unsigned int k = saeLen; k>j; k--) {
selAndEdge[k] = selAndEdge[k-1];
}
@ -386,7 +388,7 @@ static int NextBadU(const char *s, int p, int len, int &trailBytes) {
return -1;
}
BreakFinder::BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posLineStart_, bool utf8_, int xStart) :
BreakFinder::BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posLineStart_, bool utf8_, int xStart, bool breakForSelection) :
ll(ll_),
lineStart(lineStart_),
lineEnd(lineEnd_),
@ -412,13 +414,19 @@ BreakFinder::BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posL
nextBreak--;
}
SelectionSegment segmentLine(SelectionPosition(posLineStart), SelectionPosition(posLineStart + lineEnd));
for (size_t r=0; r<ll->psel->Count(); r++) {
SelectionSegment portion = ll->psel->Range(r).Intersect(segmentLine);
if (portion.start.IsValid())
Insert(portion.start.Position() - posLineStart - 1);
if (portion.end.IsValid())
Insert(portion.end.Position() - posLineStart - 1);
if (breakForSelection) {
SelectionPosition posStart(posLineStart);
SelectionPosition posEnd(posLineStart + lineEnd);
SelectionSegment segmentLine(posStart, posEnd);
for (size_t r=0; r<ll->psel->Count(); r++) {
SelectionSegment portion = ll->psel->Range(r).Intersect(segmentLine);
if (!(portion.start == portion.end)) {
if (portion.start.IsValid())
Insert(portion.start.Position() - posLineStart - 1);
if (portion.end.IsValid())
Insert(portion.end.Position() - posLineStart - 1);
}
}
}
Insert(ll->edgeColumn - 1);
@ -441,7 +449,7 @@ BreakFinder::~BreakFinder() {
delete []selAndEdge;
}
int BreakFinder::First() {
int BreakFinder::First() const {
return nextBreak;
}
@ -528,7 +536,7 @@ void PositionCacheEntry::Set(unsigned int styleNumber_, const char *s_,
clock = clock_;
if (s_ && positions_) {
positions = new short[len + (len + 1) / 2];
for (unsigned int i=0;i<len;i++) {
for (unsigned int i=0; i<len; i++) {
positions[i] = static_cast<short>(positions_[i]);
}
memcpy(reinterpret_cast<char *>(positions + len), s_, len);
@ -551,7 +559,7 @@ bool PositionCacheEntry::Retrieve(unsigned int styleNumber_, const char *s_,
unsigned int len_, int *positions_) const {
if ((styleNumber == styleNumber_) && (len == len_) &&
(memcmp(reinterpret_cast<char *>(positions + len), s_, len)== 0)) {
for (unsigned int i=0;i<len;i++) {
for (unsigned int i=0; i<len; i++) {
positions_[i] = positions[i];
}
return true;
@ -573,7 +581,7 @@ int PositionCacheEntry::Hash(unsigned int styleNumber, const char *s, unsigned i
return ret;
}
bool PositionCacheEntry::NewerThan(const PositionCacheEntry &other) {
bool PositionCacheEntry::NewerThan(const PositionCacheEntry &other) const {
return clock > other.clock;
}
@ -597,7 +605,7 @@ PositionCache::~PositionCache() {
void PositionCache::Clear() {
if (!allClear) {
for (size_t i=0;i<size;i++) {
for (size_t i=0; i<size; i++) {
pces[i].Clear();
}
}
@ -641,7 +649,7 @@ void PositionCache::MeasureWidths(Surface *surface, ViewStyle &vstyle, unsigned
if (clock > 60000) {
// Since there are only 16 bits for the clock, wrap it round and
// reset all cache entries so none get stuck with a high clock.
for (size_t i=0;i<size;i++) {
for (size_t i=0; i<size; i++) {
pces[i].ResetClock();
}
clock = 2;

View File

@ -93,7 +93,7 @@ public:
};
void Invalidate(LineLayout::validLevel validity_);
void SetLevel(int level_);
int GetLevel() { return level; }
int GetLevel() const { return level; }
LineLayout *Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_,
int linesOnScreen, int linesInDoc);
void Dispose(LineLayout *ll);
@ -111,7 +111,7 @@ public:
void Clear();
bool Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, int *positions_) const;
static int Hash(unsigned int styleNumber, const char *s, unsigned int len);
bool NewerThan(const PositionCacheEntry &other);
bool NewerThan(const PositionCacheEntry &other) const;
void ResetClock();
};
@ -136,9 +136,9 @@ class BreakFinder {
int subBreak;
void Insert(int val);
public:
BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posLineStart_, bool utf8_, int xStart);
BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posLineStart_, bool utf8_, int xStart, bool breakForSelection);
~BreakFinder();
int First();
int First() const;
int Next();
};
@ -152,7 +152,7 @@ public:
~PositionCache();
void Clear();
void SetSize(size_t size_);
int GetSize() { return size; }
int GetSize() const { return size; }
void MeasureWidths(Surface *surface, ViewStyle &vstyle, unsigned int styleNumber,
const char *s, unsigned int len, int *positions);
};

View File

@ -96,7 +96,7 @@ const char *PropSetSimple::Get(const char *key) const {
// for that, through a recursive function and a simple chain of pointers.
struct VarChain {
VarChain(const char*var_=NULL, const VarChain *link_=NULL): var(var_), link(link_) {}
VarChain(const char *var_=NULL, const VarChain *link_=NULL): var(var_), link(link_) {}
bool contains(const char *testVar) const {
return (var && (0 == strcmp(var, testVar)))

View File

@ -248,6 +248,7 @@ const char bitarr[] = { 1, 2, 4, 8, 16, 32, 64, '\200' };
*/
RESearch::RESearch(CharClassify *charClassTable) {
failure = 0;
charClass = charClassTable;
Init();
}
@ -418,6 +419,7 @@ int RESearch::GetBackslashExpression(
ChSet(static_cast<unsigned char>(c));
}
}
break;
case 'w':
for (c = 0; c < MAXCHR; c++) {
if (iswordc(static_cast<unsigned char>(c))) {

View File

@ -19,19 +19,19 @@ namespace Scintilla {
*/
class SVector {
enum { allocSize = 4000 };
int *v; ///< The vector
unsigned int size; ///< Number of elements allocated
unsigned int len; ///< Number of elements used in vector
/** Internally allocate more elements than the user wants
* to avoid thrashing the memory allocator. */
void SizeTo(int newSize) {
if (newSize < allocSize)
newSize += allocSize;
else
else
newSize = (newSize * 3) / 2;
int* newv = new int[newSize];
int *newv = new int[newSize];
size = newSize;
unsigned int i=0;
for (; i<len; i++) {
@ -43,7 +43,7 @@ class SVector {
delete []v;
v = newv;
}
public:
SVector() {
v = 0;
@ -60,7 +60,7 @@ public:
size = 0;
if (other.Length() > 0) {
SizeTo(other.Length());
for (int i=0;i<other.Length();i++)
for (int i=0; i<other.Length(); i++)
v[i] = other.v[i];
len = other.Length();
}
@ -74,7 +74,7 @@ public:
size = 0;
if (other.Length() > 0) {
SizeTo(other.Length());
for (int i=0;i<other.Length();i++)
for (int i=0; i<other.Length(); i++)
v[i] = other.v[i];
len = other.Length();
}

View File

@ -10,6 +10,7 @@
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <vector>
#include "Platform.h"
@ -56,7 +57,7 @@ ScintillaBase::ScintillaBase() {
lexLanguage = SCLEX_CONTAINER;
performingStyle = false;
lexCurrent = 0;
for (int wl = 0;wl < numWordLists;wl++)
for (int wl = 0; wl < numWordLists; wl++)
keyWordLists[wl] = new WordList;
keyWordLists[numWordLists] = 0;
#endif
@ -64,7 +65,7 @@ ScintillaBase::ScintillaBase() {
ScintillaBase::~ScintillaBase() {
#ifdef SCI_LEXER
for (int wl = 0;wl < numWordLists;wl++)
for (int wl = 0; wl < numWordLists; wl++)
delete keyWordLists[wl];
#endif
}
@ -202,8 +203,8 @@ int ScintillaBase::KeyCommand(unsigned int iMessage) {
return Editor::KeyCommand(iMessage);
}
void ScintillaBase::AutoCompleteDoubleClick(void* p) {
ScintillaBase* sci = reinterpret_cast<ScintillaBase*>(p);
void ScintillaBase::AutoCompleteDoubleClick(void *p) {
ScintillaBase *sci = reinterpret_cast<ScintillaBase *>(p);
sci->AutoCompleteCompleted();
}
@ -392,6 +393,23 @@ int ScintillaBase::AutoCompleteGetCurrent() {
return ac.lb->GetSelection();
}
int ScintillaBase::AutoCompleteGetCurrentText(char *buffer) {
if (ac.Active()) {
int item = ac.lb->GetSelection();
char selected[1000];
selected[0] = '\0';
if (item != -1) {
ac.lb->GetValue(item, selected, sizeof(selected));
if (buffer != NULL)
strcpy(buffer, selected);
return strlen(selected);
}
}
if (buffer != NULL)
*buffer = '\0';
return 0;
}
void ScintillaBase::CallTipShow(Point pt, const char *defn) {
ac.Cancel();
pt.y += vs.lineHeight;
@ -464,6 +482,8 @@ void ScintillaBase::SetLexer(uptr_t wParam) {
lexCurrent = LexerModule::Find(lexLanguage);
if (!lexCurrent)
lexCurrent = LexerModule::Find(SCLEX_NULL);
int bits = lexCurrent ? lexCurrent->GetStyleBitsNeeded() : 5;
vs.EnsureStyle((1 << bits) - 1);
}
void ScintillaBase::SetLexerLanguage(const char *languageName) {
@ -473,6 +493,8 @@ void ScintillaBase::SetLexerLanguage(const char *languageName) {
lexCurrent = LexerModule::Find(SCLEX_NULL);
if (lexCurrent)
lexLanguage = lexCurrent->GetLanguage();
int bits = lexCurrent ? lexCurrent->GetStyleBitsNeeded() : 5;
vs.EnsureStyle((1 << bits) - 1);
}
void ScintillaBase::Colourise(int start, int end) {
@ -564,6 +586,9 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara
case SCI_AUTOCGETCURRENT:
return AutoCompleteGetCurrent();
case SCI_AUTOCGETCURRENTTEXT:
return AutoCompleteGetCurrentText(reinterpret_cast<char *>(lParam));
case SCI_AUTOCSETCANCELATSTART:
ac.cancelAtStartPos = wParam != 0;
break;
@ -706,15 +731,8 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara
reinterpret_cast<const char *>(lParam));
break;
case SCI_GETPROPERTY: {
const char *val = props.Get(reinterpret_cast<const char *>(wParam));
const int n = strlen(val);
if (lParam != 0) {
char *ptr = reinterpret_cast<char *>(lParam);
strcpy(ptr, val);
}
return n; // Not including NUL
}
case SCI_GETPROPERTY:
return StringResult(lParam, props.Get(reinterpret_cast<const char *>(wParam)));
case SCI_GETPROPERTYEXPANDED: {
char *val = props.Expanded(reinterpret_cast<const char *>(wParam));
@ -741,8 +759,12 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara
SetLexerLanguage(reinterpret_cast<const char *>(lParam));
break;
case SCI_GETLEXERLANGUAGE:
return StringResult(lParam, lexCurrent ? lexCurrent->languageName : "");
case SCI_GETSTYLEBITSNEEDED:
return lexCurrent ? lexCurrent->GetStyleBitsNeeded() : 5;
#endif
default:

View File

@ -16,8 +16,8 @@ namespace Scintilla {
*/
class ScintillaBase : public Editor {
// Private so ScintillaBase objects can not be copied
ScintillaBase(const ScintillaBase &) : Editor() {}
ScintillaBase &operator=(const ScintillaBase &) { return *this; }
ScintillaBase(const ScintillaBase &);
ScintillaBase &operator=(const ScintillaBase &);
protected:
/** Enumeration of commands and child windows. */
@ -43,9 +43,8 @@ protected:
int listType; ///< 0 is an autocomplete list
int maxListWidth; /// Maximum width of list, in average character widths
bool performingStyle; ///< Prevent reentrance
#ifdef SCI_LEXER
bool performingStyle; ///< Prevent reentrance
int lexLanguage;
const LexerModule *lexCurrent;
PropSetSimple props;
@ -72,11 +71,12 @@ protected:
void AutoCompleteCancel();
void AutoCompleteMove(int delta);
int AutoCompleteGetCurrent();
int AutoCompleteGetCurrentText(char *buffer);
void AutoCompleteCharacterAdded(char ch);
void AutoCompleteCharacterDeleted();
void AutoCompleteCompleted();
void AutoCompleteMoveToCurrentWord();
static void AutoCompleteDoubleClick(void* p);
static void AutoCompleteDoubleClick(void *p);
void CallTipClick();
void CallTipShow(Point pt, const char *defn);

View File

@ -127,7 +127,7 @@ bool SelectionRange::Trim(SelectionRange range) {
} else if (start <= startRange) {
// Trim end
end = startRange;
} else { //
} else { //
PLATFORM_ASSERT(end >= endRange);
// Trim start
start = endRange;
@ -179,6 +179,27 @@ SelectionRange &Selection::Rectangular() {
return rangeRectangular;
}
SelectionSegment Selection::Limits() const {
if (ranges.empty()) {
return SelectionSegment();
} else {
SelectionSegment sr(ranges[0].anchor, ranges[0].caret);
for (size_t i=1; i<ranges.size(); i++) {
sr.Extend(ranges[i].anchor);
sr.Extend(ranges[i].caret);
}
return sr;
}
}
SelectionSegment Selection::LimitsForRectangularElseMain() const {
if (IsRectangular()) {
return Limits();
} else {
return SelectionSegment(ranges[mainRange].caret, ranges[mainRange].anchor);
}
}
size_t Selection::Count() const {
return ranges.size();
}
@ -246,7 +267,7 @@ void Selection::TrimSelection(SelectionRange range) {
for (size_t i=0; i<ranges.size();) {
if ((i != mainRange) && (ranges[i].Trim(range))) {
// Trimmed to empty so remove
for (size_t j=i;j<ranges.size()-1;j++) {
for (size_t j=i; j<ranges.size()-1; j++) {
ranges[j] = ranges[j+1];
if (j == mainRange-1)
mainRange--;

View File

@ -57,7 +57,7 @@ public:
};
// Ordered range to make drawing simpler
struct SelectionSegment {
struct SelectionSegment {
SelectionPosition start;
SelectionPosition end;
SelectionSegment() {
@ -74,6 +74,12 @@ struct SelectionSegment {
bool Empty() const {
return start == end;
}
void Extend(SelectionPosition p) {
if (start > p)
start = p;
if (end < p)
end = p;
}
};
struct SelectionRange {
@ -141,6 +147,11 @@ public:
int MainCaret() const;
int MainAnchor() const;
SelectionRange &Rectangular();
SelectionSegment Limits() const;
// This is for when you want to move the caret in response to a
// user direction command - for rectangular selections, use the range
// that covers all selected text otherwise return the main selection.
SelectionSegment LimitsForRectangularElseMain() const;
size_t Count() const;
size_t Main() const;
void SetMain(size_t r);

View File

@ -1,6 +1,6 @@
// Scintilla source code edit control
/** @file SplitVector.h
** Main data structure for holding arrays that handle insertions
** Main data structure for holding arrays that handle insertions
** and deletions efficiently.
**/
// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>
@ -97,7 +97,7 @@ public:
/// Retrieve the character at a particular position.
/// Retrieving positions outside the range of the buffer returns 0.
/// The assertions here are disabled since calling code can be
/// The assertions here are disabled since calling code can be
/// simpler if out of range access works and returns 0.
T ValueAt(int position) const {
if (position < part1Length) {
@ -135,7 +135,7 @@ public:
}
}
T& operator[](int position) const {
T &operator[](int position) const {
PLATFORM_ASSERT(position >= 0 && position < lengthBody);
if (position < part1Length) {
return body[position];
@ -182,14 +182,14 @@ public:
}
}
/// Ensure at least length elements allocated,
/// Ensure at least length elements allocated,
/// appending zero valued elements if needed.
void EnsureLength(int wantedLength) {
if (Length() < wantedLength) {
InsertValue(Length(), wantedLength - Length(), 0);
}
}
/// Insert text into the buffer from an array.
void InsertFromArray(int positionToInsert, const T s[], int positionFrom, int insertLength) {
PLATFORM_ASSERT((positionToInsert >= 0) && (positionToInsert <= lengthBody));
@ -238,7 +238,7 @@ public:
DeleteRange(0, lengthBody);
}
T* BufferPointer() {
T *BufferPointer() {
RoomFor(1);
GapTo(lengthBody);
body[lengthBody] = 0;

View File

@ -92,6 +92,13 @@ void Style::Clear(ColourDesired fore_, ColourDesired back_, int size_,
else
font.Release();
aliasOfDefaultFont = false;
sizeZoomed = 2;
lineHeight = 2;
ascent = 1;
descent = 1;
externalLeading = 0;
aveCharWidth = 1;
spaceWidth = 1;
}
void Style::ClearTo(const Style &source) {
@ -126,7 +133,7 @@ bool Style::EquivalentFontTo(const Style *other) const {
return strcmp(fontName, other->fontName) == 0;
}
void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle, bool extraFontFlag) {
void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle, int extraFontFlag) {
sizeZoomed = size + zoomLevel;
if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1
sizeZoomed = 2;

View File

@ -53,8 +53,8 @@ public:
bool visible_, bool changeable_, bool hotspot_);
void ClearTo(const Style &source);
bool EquivalentFontTo(const Style *other) const;
void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0, bool extraFontFlag = false);
bool IsProtected() const { return !(changeable && visible);};
void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0, int extraFontFlag = 0);
bool IsProtected() const { return !(changeable && visible);}
};
#ifdef SCI_NAMESPACE

View File

@ -16,9 +16,7 @@ namespace Scintilla {
class StyleContext {
Accessor &styler;
unsigned int endPos;
StyleContext& operator=(const StyleContext&) {
return *this;
}
StyleContext &operator=(const StyleContext &);
void GetNextChar(unsigned int pos) {
chNext = static_cast<unsigned char>(styler.SafeGetCharAt(pos+1));
if (styler.IsLeadByte(static_cast<char>(chNext))) {
@ -67,7 +65,7 @@ public:
void Complete() {
styler.ColourTo(currentPos - 1, state);
}
bool More() {
bool More() const {
return currentPos < endPos;
}
void Forward() {
@ -110,10 +108,10 @@ public:
int GetRelative(int n) {
return static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n));
}
bool Match(char ch0) {
bool Match(char ch0) const {
return ch == static_cast<unsigned char>(ch0);
}
bool Match(char ch0, char ch1) {
bool Match(char ch0, char ch1) const {
return (ch == static_cast<unsigned char>(ch0)) && (chNext == static_cast<unsigned char>(ch1));
}
bool Match(const char *s) {

View File

@ -1,6 +1,6 @@
// Scintilla source code edit control
/** @file UniConversion.cxx
** Functions to handle UFT-8 and UCS-2 strings.
** Functions to handle UTF-8 and UTF-16 strings.
**/
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
@ -61,10 +61,22 @@ void UTF8FromUTF16(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned
putf[len] = '\0';
}
unsigned int UTF8CharLength(unsigned char ch) {
if (ch < 0x80) {
return 1;
} else if (ch < 0x80 + 0x40 + 0x20) {
return 2;
} else if (ch < 0x80 + 0x40 + 0x20 + 0x10) {
return 3;
} else {
return 4;
}
}
unsigned int UTF16Length(const char *s, unsigned int len) {
unsigned int ulen = 0;
unsigned int charLen;
for (unsigned int i=0;i<len;) {
for (unsigned int i=0; i<len;) {
unsigned char ch = static_cast<unsigned char>(s[i]);
if (ch < 0x80) {
charLen = 1;

View File

@ -1,12 +1,13 @@
// Scintilla source code edit control
/** @file UniConversion.h
** Functions to handle UFT-8 and UCS-2 strings.
** Functions to handle UTF-8 and UTF-16 strings.
**/
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen);
void UTF8FromUTF16(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len);
unsigned int UTF8CharLength(unsigned char ch);
unsigned int UTF16Length(const char *s, unsigned int len);
unsigned int UTF16FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen);

View File

@ -41,7 +41,7 @@ FontNames::~FontNames() {
}
void FontNames::Clear() {
for (int i=0;i<max;i++) {
for (int i=0; i<max; i++) {
delete []names[i];
}
max = 0;
@ -50,7 +50,7 @@ void FontNames::Clear() {
const char *FontNames::Save(const char *name) {
if (!name)
return 0;
for (int i=0;i<max;i++) {
for (int i=0; i<max; i++) {
if (strcmp(names[i], name) == 0) {
return names[i];
}
@ -59,7 +59,7 @@ const char *FontNames::Save(const char *name) {
// Grow array
int sizeNew = size * 2;
char **namesNew = new char *[sizeNew];
for (int j=0;j<max;j++) {
for (int j=0; j<max; j++) {
namesNew[j] = names[j];
}
delete []names;
@ -78,15 +78,15 @@ ViewStyle::ViewStyle() {
ViewStyle::ViewStyle(const ViewStyle &source) {
Init(source.stylesSize);
for (unsigned int sty=0;sty<source.stylesSize;sty++) {
for (unsigned int sty=0; sty<source.stylesSize; sty++) {
styles[sty] = source.styles[sty];
// Can't just copy fontname as its lifetime is relative to its owning ViewStyle
styles[sty].fontName = fontNames.Save(source.styles[sty].fontName);
}
for (int mrk=0;mrk<=MARKER_MAX;mrk++) {
for (int mrk=0; mrk<=MARKER_MAX; mrk++) {
markers[mrk] = source.markers[mrk];
}
for (int ind=0;ind<=INDIC_MAX;ind++) {
for (int ind=0; ind<=INDIC_MAX; ind++) {
indicators[ind] = source.indicators[ind];
}
@ -122,7 +122,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
caretcolour.desired = source.caretcolour.desired;
additionalCaretColour.desired = source.additionalCaretColour.desired;
showCaretLineBackground = source.showCaretLineBackground;
showCaretLineBackgroundAlways = source.showCaretLineBackgroundAlways;
showCaretLineBackgroundAlways = source.showCaretLineBackgroundAlways;
caretLineBackground.desired = source.caretLineBackground.desired;
caretLineAlpha = source.caretLineAlpha;
edgecolour.desired = source.edgecolour.desired;
@ -132,7 +132,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
someStylesProtected = false;
leftMarginWidth = source.leftMarginWidth;
rightMarginWidth = source.rightMarginWidth;
for (int i=0;i < margins; i++) {
for (int i=0; i < margins; i++) {
ms[i] = source.ms[i];
}
symbolMargin = source.symbolMargin;
@ -140,6 +140,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
fixedColumnWidth = source.fixedColumnWidth;
zoomLevel = source.zoomLevel;
viewWhitespace = source.viewWhitespace;
whitespaceSize = source.whitespaceSize;
viewIndentationGuides = source.viewIndentationGuides;
viewEOL = source.viewEOL;
showMarkedLines = source.showMarkedLines;
@ -206,7 +207,7 @@ void ViewStyle::Init(size_t stylesSize_) {
caretcolour.desired = ColourDesired(0, 0, 0);
additionalCaretColour.desired = ColourDesired(0x7f, 0x7f, 0x7f);
showCaretLineBackground = false;
showCaretLineBackgroundAlways = false;
showCaretLineBackgroundAlways = false;
caretLineBackground.desired = ColourDesired(0xff, 0xff, 0);
caretLineAlpha = SC_ALPHA_NOALPHA;
edgecolour.desired = ColourDesired(0xc0, 0xc0, 0xc0);
@ -244,10 +245,11 @@ void ViewStyle::Init(size_t stylesSize_) {
}
zoomLevel = 0;
viewWhitespace = wsInvisible;
whitespaceSize = 1;
viewIndentationGuides = ivNone;
viewEOL = false;
showMarkedLines = true;
extraFontFlag = false;
extraFontFlag = 0;
extraAscent = 0;
extraDescent = 0;
marginStyleOffset = 0;
@ -257,14 +259,14 @@ void ViewStyle::Init(size_t stylesSize_) {
void ViewStyle::RefreshColourPalette(Palette &pal, bool want) {
unsigned int i;
for (i=0;i<stylesSize;i++) {
for (i=0; i<stylesSize; i++) {
pal.WantFind(styles[i].fore, want);
pal.WantFind(styles[i].back, want);
}
for (i=0;i<(sizeof(indicators)/sizeof(indicators[0]));i++) {
for (i=0; i<(sizeof(indicators)/sizeof(indicators[0])); i++) {
pal.WantFind(indicators[i].fore, want);
}
for (i=0;i<(sizeof(markers)/sizeof(markers[0]));i++) {
for (i=0; i<(sizeof(markers)/sizeof(markers[0])); i++) {
markers[i].RefreshColourPalette(pal, want);
}
pal.WantFind(selforeground, want);

View File

@ -92,13 +92,14 @@ public:
int fixedColumnWidth;
int zoomLevel;
WhiteSpaceVisibility viewWhitespace;
int whitespaceSize;
IndentView viewIndentationGuides;
bool viewEOL;
bool showMarkedLines;
ColourPair caretcolour;
ColourPair additionalCaretColour;
bool showCaretLineBackground;
bool showCaretLineBackgroundAlways;
bool showCaretLineBackgroundAlways;
ColourPair caretLineBackground;
int caretLineAlpha;
ColourPair edgecolour;
@ -106,7 +107,7 @@ public:
int caretStyle;
int caretWidth;
bool someStylesProtected;
bool extraFontFlag;
int extraFontFlag;
int extraAscent;
int extraDescent;
int marginStyleOffset;

View File

@ -7,7 +7,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <ctype.h>
#include <stdio.h>
#include "Platform.h"
@ -28,7 +28,7 @@ bool WindowAccessor::InternalIsLeadByte(char ch) {
if (SC_CP_UTF8 == codePage)
// For lexing, all characters >= 0x80 are treated the
// same so none is considered a lead byte.
return false;
return false;
else
return Platform::IsDBCSLeadByte(codePage, ch);
}
@ -75,10 +75,10 @@ int WindowAccessor::LevelAt(int line) {
return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0);
}
int WindowAccessor::Length() {
if (lenDoc == -1)
int WindowAccessor::Length() {
if (lenDoc == -1)
lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0);
return lenDoc;
return lenDoc;
}
int WindowAccessor::GetLineState(int line) {
@ -129,7 +129,7 @@ void WindowAccessor::Flush() {
startPos = extremePosition;
lenDoc = -1;
if (validLen > 0) {
Platform::SendScintillaPointer(id, SCI_SETSTYLINGEX, validLen,
Platform::SendScintillaPointer(id, SCI_SETSTYLINGEX, validLen,
styleBuf);
validLen = 0;
}
@ -138,12 +138,12 @@ void WindowAccessor::Flush() {
int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) {
int end = Length();
int spaceFlags = 0;
// Determines the indentation level of the current line and also checks for consistent
// Determines the indentation level of the current line and also checks for consistent
// indentation compared to the previous line.
// Indentation is judged consistent when the indentation whitespace of each line lines
// Indentation is judged consistent when the indentation whitespace of each line lines
// the same or the indentation of one line is a prefix of the other.
int pos = LineStart(line);
char ch = (*this)[pos];
int indent = 0;
@ -170,11 +170,11 @@ int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsC
}
ch = (*this)[++pos];
}
*flags = spaceFlags;
indent += SC_FOLDLEVELBASE;
// if completely empty line or the start of a comment...
if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) )
if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)))
return indent | SC_FOLDLEVELWHITEFLAG;
else
return indent;

View File

@ -38,7 +38,7 @@ static size_t MeasureLength(const char *s) {
return i;
}
ColourAllocated XPM::ColourFromCode(int ch) {
ColourAllocated XPM::ColourFromCode(int ch) const {
return colourCodeTable[ch]->allocated;
#ifdef SLOW
for (int i=0; i<nColours; i++) {
@ -62,7 +62,7 @@ XPM::XPM(const char *textForm) :
Init(textForm);
}
XPM::XPM(const char * const *linesForm) :
XPM::XPM(const char *const *linesForm) :
data(0), codes(0), colours(0), lines(0) {
Init(linesForm);
}
@ -88,7 +88,7 @@ void XPM::Init(const char *textForm) {
}
}
void XPM::Init(const char * const *linesForm) {
void XPM::Init(const char *const *linesForm) {
Clear();
height = 1;
width = 1;
@ -185,7 +185,7 @@ void XPM::Draw(Surface *surface, PRectangle &rc) {
// Centre the pixmap
int startY = rc.top + (rc.Height() - height) / 2;
int startX = rc.left + (rc.Width() - width) / 2;
for (int y=0;y<height;y++) {
for (int y=0; y<height; y++) {
int prevCode = 0;
int xStartRun = 0;
for (int x=0; x<width; x++) {

View File

@ -24,16 +24,16 @@ class XPM {
char codeTransparent;
char *codes;
ColourPair *colours;
ColourAllocated ColourFromCode(int ch);
ColourAllocated ColourFromCode(int ch) const;
void FillRun(Surface *surface, int code, int startX, int y, int x);
char **lines;
ColourPair *colourCodeTable[256];
public:
XPM(const char *textForm);
XPM(const char * const *linesForm);
XPM(const char *const *linesForm);
~XPM();
void Init(const char *textForm);
void Init(const char * const *linesForm);
void Init(const char *const *linesForm);
void Clear();
/// Similar to same named method in ViewStyle:
void RefreshColourPalette(Palette &pal, bool want);
@ -43,9 +43,9 @@ public:
void Draw(Surface *surface, PRectangle &rc);
char **InLinesForm() { return lines; }
void SetId(int pid_) { pid = pid_; }
int GetId() { return pid; }
int GetHeight() { return height; }
int GetWidth() { return width; }
int GetId() const { return pid; }
int GetHeight() const { return height; }
int GetWidth() const { return width; }
static const char **LinesFormFromTextForm(const char *textForm);
};

View File

@ -43,8 +43,8 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SciLexer_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX /O1 /I "..\include" /I "..\src" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCI_LEXER" /D "_CRT_SECURE_NO_WARNINGS" /Fr /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD CPP /nologo /G6 /MT /W3 /GX /O1 /I "..\include" /I "..\src" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCI_LEXER" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
# SUBTRACT CPP /Fr /YX /Yc /Yu
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@ -298,6 +298,10 @@ SOURCE=..\src\LexMagik.cxx
# End Source File
# Begin Source File
SOURCE=..\src\LexMarkdown.cxx
# End Source File
# Begin Source File
SOURCE=..\src\LexMatlab.cxx
# End Source File
# Begin Source File

View File

@ -1 +1 @@
201
212

View File

@ -22,6 +22,7 @@
#include "PlatformRes.h"
#include "UniConversion.h"
#include "XPM.h"
#include "FontQuality.h"
#ifndef IDC_HAND
#define IDC_HAND MAKEINTRESOURCE(32649)
@ -179,13 +180,35 @@ void Palette::Allocate(Window &) {
}
}
static void SetLogFont(LOGFONTA &lf, const char *faceName, int characterSet, int size, bool bold, bool italic) {
#ifndef CLEARTYPE_QUALITY
#define CLEARTYPE_QUALITY 5
#endif
static BYTE Win32MapFontQuality(int extraFontFlag) {
switch (extraFontFlag & SC_EFF_QUALITY_MASK) {
case SC_EFF_QUALITY_NON_ANTIALIASED:
return NONANTIALIASED_QUALITY;
case SC_EFF_QUALITY_ANTIALIASED:
return ANTIALIASED_QUALITY;
case SC_EFF_QUALITY_LCD_OPTIMIZED:
return CLEARTYPE_QUALITY;
default:
return SC_EFF_QUALITY_DEFAULT;
}
}
static void SetLogFont(LOGFONTA &lf, const char *faceName, int characterSet, int size, bool bold, bool italic, int extraFontFlag) {
memset(&lf, 0, sizeof(lf));
// The negative is to allow for leading
lf.lfHeight = -(abs(size));
lf.lfWeight = bold ? FW_BOLD : FW_NORMAL;
lf.lfItalic = static_cast<BYTE>(italic ? 1 : 0);
lf.lfCharSet = static_cast<BYTE>(characterSet);
lf.lfQuality = Win32MapFontQuality(extraFontFlag);
strncpy(lf.lfFaceName, faceName, sizeof(lf.lfFaceName));
}
@ -194,10 +217,11 @@ static void SetLogFont(LOGFONTA &lf, const char *faceName, int characterSet, int
* If one font is the same as another, its hash will be the same, but if the hash is the
* same then they may still be different.
*/
static int HashFont(const char *faceName, int characterSet, int size, bool bold, bool italic) {
static int HashFont(const char *faceName, int characterSet, int size, bool bold, bool italic, int extraFontFlag) {
return
size ^
(characterSet << 10) ^
((extraFontFlag & SC_EFF_QUALITY_MASK) << 9) ^
(bold ? 0x10000000 : 0) ^
(italic ? 0x20000000 : 0) ^
faceName[0];
@ -208,33 +232,34 @@ class FontCached : Font {
int usage;
LOGFONTA lf;
int hash;
FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_);
FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_, int extraFontFlag_);
~FontCached() {}
bool SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_);
bool SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_, int extraFontFlag_);
virtual void Release();
static FontCached *first;
public:
static FontID FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_);
static FontID FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_, int extraFontFlag_);
static void ReleaseId(FontID fid_);
};
FontCached *FontCached::first = 0;
FontCached::FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) :
FontCached::FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_, int extraFontFlag_) :
next(0), usage(0), hash(0) {
SetLogFont(lf, faceName_, characterSet_, size_, bold_, italic_);
hash = HashFont(faceName_, characterSet_, size_, bold_, italic_);
SetLogFont(lf, faceName_, characterSet_, size_, bold_, italic_, extraFontFlag_);
hash = HashFont(faceName_, characterSet_, size_, bold_, italic_, extraFontFlag_);
fid = ::CreateFontIndirectA(&lf);
usage = 1;
}
bool FontCached::SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) {
bool FontCached::SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_, int extraFontFlag_) {
return
(lf.lfHeight == -(abs(size_))) &&
(lf.lfWeight == (bold_ ? FW_BOLD : FW_NORMAL)) &&
(lf.lfItalic == static_cast<BYTE>(italic_ ? 1 : 0)) &&
(lf.lfCharSet == characterSet_) &&
(lf.lfQuality == Win32MapFontQuality(extraFontFlag_)) &&
0 == strcmp(lf.lfFaceName,faceName_);
}
@ -244,19 +269,19 @@ void FontCached::Release() {
fid = 0;
}
FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) {
FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_, int extraFontFlag_) {
FontID ret = 0;
::EnterCriticalSection(&crPlatformLock);
int hashFind = HashFont(faceName_, characterSet_, size_, bold_, italic_);
int hashFind = HashFont(faceName_, characterSet_, size_, bold_, italic_, extraFontFlag_);
for (FontCached *cur=first; cur; cur=cur->next) {
if ((cur->hash == hashFind) &&
cur->SameAs(faceName_, characterSet_, size_, bold_, italic_)) {
cur->SameAs(faceName_, characterSet_, size_, bold_, italic_, extraFontFlag_)) {
cur->usage++;
ret = cur->fid;
}
}
if (ret == 0) {
FontCached *fc = new FontCached(faceName_, characterSet_, size_, bold_, italic_);
FontCached *fc = new FontCached(faceName_, characterSet_, size_, bold_, italic_, extraFontFlag_);
if (fc) {
fc->next = first;
first = fc;
@ -296,14 +321,15 @@ Font::~Font() {
#define FONTS_CACHED
void Font::Create(const char *faceName, int characterSet, int size,
bool bold, bool italic, bool) {
bool bold, bool italic, int extraFontFlag) {
Release();
#ifndef FONTS_CACHED
LOGFONT lf;
SetLogFont(lf, faceName, characterSet, size, bold, italic);
SetLogFont(lf, faceName, characterSet, size, bold, italic, extraFontFlag);
fid = ::CreateFontIndirect(&lf);
#else
fid = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic);
if (faceName)
fid = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic, extraFontFlag);
#endif
}
@ -346,8 +372,8 @@ class SurfaceImpl : public Surface {
void SetFont(Font &font_);
// Private so SurfaceImpl objects can not be copied
SurfaceImpl(const SurfaceImpl &) : Surface() {}
SurfaceImpl &operator=(const SurfaceImpl &) { return *this; }
SurfaceImpl(const SurfaceImpl &);
SurfaceImpl &operator=(const SurfaceImpl &);
public:
SurfaceImpl();
virtual ~SurfaceImpl();
@ -591,6 +617,18 @@ static void AllFour(DWORD *pixels, int width, int height, int x, int y, DWORD va
#define AC_SRC_ALPHA 0x01
#endif
static DWORD dwordFromBGRA(byte b, byte g, byte r, byte a) {
union {
byte pixVal[4];
DWORD val;
} converter;
converter.pixVal[0] = b;
converter.pixVal[1] = g;
converter.pixVal[2] = r;
converter.pixVal[3] = a;
return converter.val;
}
void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill,
ColourAllocated outline, int alphaOutline, int /* flags*/ ) {
if (AlphaBlendFn && rc.Width() > 0) {
@ -606,18 +644,17 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated
HBITMAP hbmOld = SelectBitmap(hMemDC, hbmMem);
byte pixVal[4] = {0};
DWORD valEmpty = *(reinterpret_cast<DWORD *>(pixVal));
pixVal[0] = static_cast<byte>(GetBValue(fill.AsLong()) * alphaFill / 255);
pixVal[1] = static_cast<byte>(GetGValue(fill.AsLong()) * alphaFill / 255);
pixVal[2] = static_cast<byte>(GetRValue(fill.AsLong()) * alphaFill / 255);
pixVal[3] = static_cast<byte>(alphaFill);
DWORD valFill = *(reinterpret_cast<DWORD *>(pixVal));
pixVal[0] = static_cast<byte>(GetBValue(outline.AsLong()) * alphaOutline / 255);
pixVal[1] = static_cast<byte>(GetGValue(outline.AsLong()) * alphaOutline / 255);
pixVal[2] = static_cast<byte>(GetRValue(outline.AsLong()) * alphaOutline / 255);
pixVal[3] = static_cast<byte>(alphaOutline);
DWORD valOutline = *(reinterpret_cast<DWORD *>(pixVal));
DWORD valEmpty = dwordFromBGRA(0,0,0,0);
DWORD valFill = dwordFromBGRA(
static_cast<byte>(GetBValue(fill.AsLong()) * alphaFill / 255),
static_cast<byte>(GetGValue(fill.AsLong()) * alphaFill / 255),
static_cast<byte>(GetRValue(fill.AsLong()) * alphaFill / 255),
static_cast<byte>(alphaFill));
DWORD valOutline = dwordFromBGRA(
static_cast<byte>(GetBValue(outline.AsLong()) * alphaOutline / 255),
static_cast<byte>(GetGValue(outline.AsLong()) * alphaOutline / 255),
static_cast<byte>(GetRValue(outline.AsLong()) * alphaOutline / 255),
static_cast<byte>(alphaOutline));
DWORD *pixels = reinterpret_cast<DWORD *>(image);
for (int y=0; y<height; y++) {
for (int x=0; x<width; x++) {
@ -1257,8 +1294,8 @@ class ListBoxX : public ListBox {
int MinClientWidth() const;
int TextOffset() const;
Point GetClientExtent() const;
Point MinTrackSize() const;
Point MaxTrackSize() const;
POINT MinTrackSize() const;
POINT MaxTrackSize() const;
void SetRedraw(bool on);
void OnDoubleClick();
void ResizeToCursor();
@ -1604,19 +1641,21 @@ int ListBoxX::MinClientWidth() const {
return 12 * (aveCharWidth+aveCharWidth/3);
}
Point ListBoxX::MinTrackSize() const {
POINT ListBoxX::MinTrackSize() const {
PRectangle rc(0, 0, MinClientWidth(), ItemHeight());
AdjustWindowRect(&rc);
return Point(rc.Width(), rc.Height());
POINT ret = {rc.Width(), rc.Height()};
return ret;
}
Point ListBoxX::MaxTrackSize() const {
POINT ListBoxX::MaxTrackSize() const {
PRectangle rc(0, 0,
maxCharWidth * maxItemCharacters + TextInset.x * 2 +
TextOffset() + ::GetSystemMetrics(SM_CXVSCROLL),
ItemHeight() * lti.Count());
AdjustWindowRect(&rc);
return Point(rc.Width(), rc.Height());
POINT ret = {rc.Width(), rc.Height()};
return ret;
}
void ListBoxX::SetRedraw(bool on) {
@ -1663,8 +1702,8 @@ void ListBoxX::ResizeToCursor() {
break;
}
Point ptMin = MinTrackSize();
Point ptMax = MaxTrackSize();
POINT ptMin = MinTrackSize();
POINT ptMax = MaxTrackSize();
// We don't allow the left edge to move at present, but just in case
rc.left = Platform::Maximum(Platform::Minimum(rc.left, rcPreSize.right - ptMin.x), rcPreSize.right - ptMax.x);
rc.top = Platform::Maximum(Platform::Minimum(rc.top, rcPreSize.bottom - ptMin.y), rcPreSize.bottom - ptMax.y);
@ -1924,8 +1963,8 @@ LRESULT ListBoxX::WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam
case WM_GETMINMAXINFO: {
MINMAXINFO *minMax = reinterpret_cast<MINMAXINFO*>(lParam);
*reinterpret_cast<Point*>(&minMax->ptMaxTrackSize) = MaxTrackSize();
*reinterpret_cast<Point*>(&minMax->ptMinTrackSize) = MinTrackSize();
minMax->ptMaxTrackSize = MaxTrackSize();
minMax->ptMinTrackSize = MinTrackSize();
}
break;
@ -2089,8 +2128,13 @@ public:
// Use GetProcAddress to get a pointer to the relevant function.
virtual Function FindFunction(const char *name) {
if (h != NULL) {
return static_cast<Function>(
(void *)(::GetProcAddress(h, name)));
// C++ standard doesn't like casts betwen function pointers and void pointers so use a union
union {
FARPROC fp;
Function f;
} fnConv;
fnConv.fp = ::GetProcAddress(h, name);
return fnConv.f;
} else
return NULL;
}

Some files were not shown because too many files have changed in this diff Show More