[UPDATE] Update Scintilla from v1.78 to v2.01.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@525 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
43a49d0b54
commit
c84437b0d1
@ -209,6 +209,7 @@ FunctionEnd
|
||||
!insertmacro MUI_LANGUAGE "Basque"
|
||||
!insertmacro MUI_LANGUAGE "Luxembourgish"
|
||||
!insertmacro MUI_LANGUAGE "Afrikaans"
|
||||
!insertmacro MUI_LANGUAGE "Uzbek"
|
||||
|
||||
;!insertmacro MUI_LANGUAGE "Latvian"
|
||||
;!insertmacro MUI_LANGUAGE "Macedonian"
|
||||
@ -219,7 +220,6 @@ FunctionEnd
|
||||
;!insertmacro MUI_LANGUAGE "Bosnian"
|
||||
;!insertmacro MUI_LANGUAGE "Kurdish"
|
||||
;!insertmacro MUI_LANGUAGE "Irish"
|
||||
;!insertmacro MUI_LANGUAGE "Uzbek"
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
|
||||
@ -302,6 +302,7 @@ LangString langFileName ${LANG_GALICIAN} "galician.xml"
|
||||
LangString langFileName ${LANG_BASQUE} "basque.xml"
|
||||
LangString langFileName ${LANG_LUXEMBOURGISH} "luxembourgish.xml"
|
||||
LangString langFileName ${LANG_AFRIKAANS} "afrikaans.xml"
|
||||
LangString langFileName ${LANG_UZBEK} "uzbek.xml"
|
||||
|
||||
|
||||
;--------------------------------
|
||||
|
@ -7129,6 +7129,13 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||
_mainEditView.execute(SCI_SETZOOM, svp1._zoom);
|
||||
_subEditView.execute(SCI_SETZOOM, svp2._zoom);
|
||||
|
||||
_mainEditView.execute(SCI_SETMULTIPLESELECTION, true);
|
||||
_subEditView.execute(SCI_SETMULTIPLESELECTION, true);
|
||||
_mainEditView.execute(SCI_SETADDITIONALSELECTIONTYPING, true);
|
||||
_subEditView.execute(SCI_SETADDITIONALSELECTIONTYPING, true);
|
||||
_mainEditView.execute(SCI_SETVIRTUALSPACEOPTIONS, SCVS_RECTANGULARSELECTION);
|
||||
_subEditView.execute(SCI_SETVIRTUALSPACEOPTIONS, SCVS_RECTANGULARSELECTION);
|
||||
|
||||
TabBarPlus::doDragNDrop(true);
|
||||
|
||||
if (_toReduceTabBar)
|
||||
|
@ -261,6 +261,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
||||
{
|
||||
switch (Message)
|
||||
{
|
||||
/*
|
||||
case WM_CHAR :
|
||||
{
|
||||
if (execute(SCI_SELECTIONISRECTANGLE) && !(::GetKeyState(VK_LCONTROL) & 0x80000000))
|
||||
@ -290,6 +291,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
||||
}
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
case WM_MOUSEHWHEEL :
|
||||
{
|
||||
|
@ -66,9 +66,6 @@ BOOL CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
|
||||
ColumnModeInfo colInfos = (*_ppEditView)->getColumnModeSelectInfo();
|
||||
(*_ppEditView)->columnReplace(colInfos, str);
|
||||
(*_ppEditView)->execute(SCI_SETCURRENTPOS,colInfos[colInfos.size()-1].second);
|
||||
|
||||
//(*_ppEditView)->execute(SCI_SETSEL, colInfos[0].first, colInfos[colInfos.size()-1].second);
|
||||
//(*_ppEditView)->execute(SCI_SETSELECTIONMODE, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -18,9 +18,9 @@
|
||||
#ifndef RESOURCE_H
|
||||
#define RESOURCE_H
|
||||
|
||||
#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v5.4.5")
|
||||
#define VERSION_VALUE TEXT("5.45\0") // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
|
||||
#define VERSION_DIGITALVALUE 5, 4, 5, 0
|
||||
#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v5.5")
|
||||
#define VERSION_VALUE TEXT("5.5\0") // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
|
||||
#define VERSION_DIGITALVALUE 5, 5, 0, 0
|
||||
|
||||
#ifdef UNICODE
|
||||
#define UNICODE_ANSI_MODE TEXT("(UNICODE)")
|
||||
|
@ -9,7 +9,7 @@
|
||||
<meta name="generator" content="SciTE" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
|
||||
<title>Scintilla and SciTE</title>
|
||||
<title>Scintilla Documentation</title>
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
<h1>Scintilla Documentation</h1>
|
||||
|
||||
<p>Last edited 28/April/2009 NH</p>
|
||||
<p>Last edited 7/August/2009 NH</p>
|
||||
|
||||
<p>There is <a class="jump" href="Design.html">an overview of the internal design of
|
||||
Scintilla</a>.<br />
|
||||
@ -174,100 +174,106 @@
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#SelectionAndInformation">Selection and information</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#MultipleSelectionAndVirtualSpace">Multiple Selection and Virtual Space</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#ScrollingAndAutomaticScrolling">Scrolling and automatic
|
||||
scrolling</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#WhiteSpace">White space</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#WhiteSpace">White space</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#Cursor">Cursor</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#MouseCapture">Mouse capture</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#LineEndings">Line endings</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#LineEndings">Line endings</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#Styling">Styling</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#StyleDefinition">Style definition</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#CaretAndSelectionStyles">Caret, selection, and hotspot styles</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#CaretAndSelectionStyles">Caret, selection, and hotspot styles</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#Margins">Margins</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#Annotations">Annotations</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#OtherSettings">Other settings</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#OtherSettings">Other settings</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#BraceHighlighting">Brace highlighting</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#TabsAndIndentationGuides">Tabs and Indentation
|
||||
Guides</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#Markers">Markers</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#Markers">Markers</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#Indicators">Indicators</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#Autocompletion">Autocompletion</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#UserLists">User lists</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#UserLists">User lists</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#CallTips">Call tips</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#KeyboardCommands">Keyboard commands</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#KeyBindings">Key bindings</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
<td>o <a class="toc" href="#Printing">Printing</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
<td>o <a class="toc" href="#Folding">Folding</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
<td>o <a class="toc" href="#LongLines">Long lines</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
<td>o <a class="toc" href="#GTK">GTK+</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#BuildingScintilla">Building Scintilla</a></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -878,8 +884,34 @@ 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>. Not currently used but will be in the future. To clear the error
|
||||
status call <code>SCI_SETSTATUS(0)</code>.</p>
|
||||
<code>SCI_GETSTATUS</code>.
|
||||
To clear the error status call <code>SCI_SETSTATUS(0)</code>.
|
||||
The currently defined statuses are:
|
||||
|
||||
<table cellpadding="1" cellspacing="2" border="0" summary="Status values">
|
||||
<tbody valign="top">
|
||||
<tr>
|
||||
<th align="left">SC_STATUS_OK</th>
|
||||
<td>0</td>
|
||||
<td>No failures</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th align="left">SC_STATUS_FAILURE</th>
|
||||
<td>1</td>
|
||||
<td>Generic failure</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th align="left">SC_STATUS_BADALLOC</th>
|
||||
<td>2</td>
|
||||
<td>Memory is exhausted</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</p>
|
||||
|
||||
<h2 id="UndoAndRedo">Undo and Redo</h2>
|
||||
|
||||
@ -1006,6 +1038,9 @@ struct TextToFind {
|
||||
<a class="message" href="#SCI_FINDCOLUMN">SCI_FINDCOLUMN(int line, int column)</a><br />
|
||||
<a class="message" href="#SCI_POSITIONFROMPOINT">SCI_POSITIONFROMPOINT(int x, int y)</a><br />
|
||||
<a class="message" href="#SCI_POSITIONFROMPOINTCLOSE">SCI_POSITIONFROMPOINTCLOSE(int x, int
|
||||
y)</a><br />
|
||||
<a class="message" href="#SCI_CHARPOSITIONFROMPOINT">SCI_CHARPOSITIONFROMPOINT(int x, int y)</a><br />
|
||||
<a class="message" href="#SCI_CHARPOSITIONFROMPOINTCLOSE">SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int
|
||||
y)</a><br />
|
||||
<a class="message" href="#SCI_POINTXFROMPOSITION">SCI_POINTXFROMPOSITION(<unused>, int
|
||||
position)</a><br />
|
||||
@ -1172,16 +1207,18 @@ struct TextToFind {
|
||||
href="#SCI_POSITIONFROMLINE"><code>SCI_POSITIONFROMLINE(line)</code></a>.</p>
|
||||
<b id="SCI_GETSELTEXT">SCI_GETSELTEXT(<unused>, char *text)</b><br />
|
||||
This copies the currently selected text and a terminating 0 byte to the <code>text</code>
|
||||
buffer. The buffer must be at least
|
||||
<code>SCI_GETSELECTIONEND()-SCI_GETSELECTIONSTART()+1</code> bytes long. <br />
|
||||
If the text argument is 0 then the length that should be allocated
|
||||
to store the entire selection is returned.<br />
|
||||
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
|
||||
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></code></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>
|
||||
</code></p>
|
||||
|
||||
<p><b id="SCI_GETCURLINE">SCI_GETCURLINE(int textLen, char *text)</b><br />
|
||||
This retrieves the text of the line containing the caret and returns the position within the
|
||||
@ -1205,12 +1242,15 @@ struct TextToFind {
|
||||
<b id="SCI_GETSELECTIONMODE">SCI_GETSELECTIONMODE</b><br />
|
||||
The two functions set and get the selection mode, which can be
|
||||
stream (<code>SC_SEL_STREAM</code>=0) or
|
||||
rectangular (<code>SC_SEL_RECTANGLE</code>=1)
|
||||
or by lines (<code>SC_SEL_LINES</code>=2).
|
||||
rectangular (<code>SC_SEL_RECTANGLE</code>=1) or
|
||||
by lines (<code>SC_SEL_LINES</code>=2)
|
||||
or thin rectangular (<code>SC_SEL_THIN</code>=3).
|
||||
When set in these modes, regular caret moves will extend or reduce the selection,
|
||||
until the mode is cancelled by a call with same value or with <code>SCI_CANCEL</code>.
|
||||
The get function returns the current mode even if the selection was made by mouse
|
||||
or with regular extended moves.</p>
|
||||
or with regular extended moves.
|
||||
<code>SC_SEL_THIN</code> is the mode after a rectangular selection has been typed into and ensures
|
||||
that no characters are selected.</p>
|
||||
|
||||
<p><b id="SCI_GETLINESELSTARTPOSITION">SCI_GETLINESELSTARTPOSITION(int line)</b><br />
|
||||
<b id="SCI_GETLINESELENDPOSITION">SCI_GETLINESELENDPOSITION(int line)</b><br />
|
||||
@ -1343,6 +1383,13 @@ struct TextToFind {
|
||||
<code>SCI_POSITIONFROMPOINTCLOSE</code> is similar but returns -1 if the point is outside the
|
||||
window or not close to any characters.</p>
|
||||
|
||||
<p><b id="SCI_CHARPOSITIONFROMPOINT">SCI_CHARPOSITIONFROMPOINT(int x, int y)</b><br />
|
||||
<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
|
||||
inter-character positions.</p>
|
||||
|
||||
<p><b id="SCI_POINTXFROMPOSITION">SCI_POINTXFROMPOSITION(<unused>, int pos)</b><br />
|
||||
<b id="SCI_POINTYFROMPOSITION">SCI_POINTYFROMPOSITION(<unused>, int pos)</b><br />
|
||||
These messages return the x and y display pixel location of text at position <code>pos</code>
|
||||
@ -1359,6 +1406,203 @@ struct TextToFind {
|
||||
user and this value is then used when moving vertically such as by using the up and down keys.
|
||||
This message sets the current x position of the caret as the remembered value.</p>
|
||||
|
||||
<h2 id="MultipleSelectionAndVirtualSpace">Multiple Selection and Virtual Space</h2>
|
||||
|
||||
<code>
|
||||
<a class="message" href="#SCI_SETMULTIPLESELECTION">SCI_SETMULTIPLESELECTION(bool multipleSelection)</a><br />
|
||||
<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_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 />
|
||||
<a class="message" href="#SCI_GETRECTANGULARSELECTIONMODIFIER">SCI_GETRECTANGULARSELECTIONMODIFIER</a><br />
|
||||
<br />
|
||||
|
||||
<a class="message" href="#SCI_GETSELECTIONS">SCI_GETSELECTIONS</a><br />
|
||||
<a class="message" href="#SCI_CLEARSELECTIONS">SCI_CLEARSELECTIONS</a><br />
|
||||
<a class="message" href="#SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor)</a><br />
|
||||
<a class="message" href="#SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor)</a><br />
|
||||
<a class="message" href="#SCI_SETMAINSELECTION">SCI_SETMAINSELECTION(int selection)</a><br />
|
||||
<a class="message" href="#SCI_GETMAINSELECTION">SCI_GETMAINSELECTION</a><br />
|
||||
<br />
|
||||
|
||||
<a class="message" href="#SCI_SETSELECTIONNCARET">SCI_SETSELECTIONNCARET(int selection, int pos)</a><br />
|
||||
<a class="message" href="#SCI_GETSELECTIONNCARET">SCI_GETSELECTIONNCARET(int selection)</a><br />
|
||||
<a class="message" href="#SCI_SETSELECTIONNCARETVIRTUALSPACE">SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, int space)</a><br />
|
||||
<a class="message" href="#SCI_GETSELECTIONNCARETVIRTUALSPACE">SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection)</a><br />
|
||||
<a class="message" href="#SCI_SETSELECTIONNANCHOR">SCI_SETSELECTIONNANCHOR(int selection, int posAnchor)</a><br />
|
||||
<a class="message" href="#SCI_GETSELECTIONNANCHOR">SCI_GETSELECTIONNANCHOR(int selection)</a><br />
|
||||
<a class="message" href="#SCI_SETSELECTIONNANCHORVIRTUALSPACE">SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, int space)</a><br />
|
||||
<a class="message" href="#SCI_GETSELECTIONNANCHORVIRTUALSPACE">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection)</a><br />
|
||||
<a class="message" href="#SCI_SETSELECTIONNSTART">SCI_SETSELECTIONNSTART(int selection, int pos)</a><br />
|
||||
<a class="message" href="#SCI_GETSELECTIONNSTART">SCI_GETSELECTIONNSTART(int selection)</a><br />
|
||||
<a class="message" href="#SCI_SETSELECTIONNEND">SCI_SETSELECTIONNEND(int selection, int pos)</a><br />
|
||||
<a class="message" href="#SCI_GETSELECTIONNEND">SCI_GETSELECTIONNEND(int selection)</a><br />
|
||||
<br />
|
||||
|
||||
<a class="message" href="#SCI_SETRECTANGULARSELECTIONCARET">SCI_SETRECTANGULARSELECTIONCARET(int pos)</a><br />
|
||||
<a class="message" href="#SCI_GETRECTANGULARSELECTIONCARET">SCI_GETRECTANGULARSELECTIONCARET</a><br />
|
||||
<a class="message" href="#SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(int space)</a><br />
|
||||
<a class="message" href="#SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE</a><br />
|
||||
<a class="message" href="#SCI_SETRECTANGULARSELECTIONANCHOR">SCI_SETRECTANGULARSELECTIONANCHOR(int posAnchor)</a><br />
|
||||
<a class="message" href="#SCI_GETRECTANGULARSELECTIONANCHOR">SCI_GETRECTANGULARSELECTIONANCHOR</a><br />
|
||||
<a class="message" href="#SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(int space)</a><br />
|
||||
<a class="message" href="#SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE</a><br />
|
||||
<br />
|
||||
|
||||
<a class="message" href="#SCI_SETADDITIONALSELALPHA">SCI_SETADDITIONALSELALPHA(int alpha)</a><br />
|
||||
<a class="message" href="#SCI_GETADDITIONALSELALPHA">SCI_GETADDITIONALSELALPHA</a><br />
|
||||
<a class="message" href="#SCI_SETADDITIONALSELFORE">SCI_SETADDITIONALSELFORE(int <a class="jump" href="#colour">colour<a>)</a><br />
|
||||
<a class="message" href="#SCI_SETADDITIONALSELBACK">SCI_SETADDITIONALSELBACK(int <a class="jump" href="#colour">colour<a>)</a><br />
|
||||
<a class="message" href="#SCI_SETADDITIONALCARETFORE">SCI_SETADDITIONALCARETFORE(int <a class="jump" href="#colour">colour<a>)</a><br />
|
||||
<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 />
|
||||
<br />
|
||||
|
||||
<a class="message" href="#SCI_SWAPMAINANCHORCARET">SCI_SWAPMAINANCHORCARET</a><br />
|
||||
<a class="message" href="#SCI_ROTATESELECTION">SCI_ROTATESELECTION</a><br />
|
||||
|
||||
<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.
|
||||
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.
|
||||
There is always at least one selection.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Rectangular selections are handled as multiple selections although the original rectangular range is remembered so that
|
||||
subsequent operations may be handled differently for rectangular selections. For example, pasting a rectangular selection
|
||||
places each piece in a vertical column.
|
||||
</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
|
||||
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
|
||||
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>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETMULTIPLESELECTION">SCI_SETMULTIPLESELECTION(bool multipleSelection)</b><br />
|
||||
<b id="SCI_GETMULTIPLESELECTION">SCI_GETMULTIPLESELECTION</b><br />
|
||||
Enable or disable multiple selection.</p>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETADDITIONALSELECTIONTYPING">SCI_SETADDITIONALSELECTIONTYPING(bool additionalSelectionTyping)</b><br />
|
||||
<b id="SCI_GETADDITIONALSELECTIONTYPING">SCI_GETADDITIONALSELECTIONTYPING</b><br />
|
||||
Whether typing, backspace, or delete works with multiple selections simultaneously.</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
|
||||
<code>SCVS_USERACCESSIBLE</code>=2 which can be set independently.
|
||||
<code>SCVS_NONE</code>=0, the default, disables all use of virtual space.</p>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETRECTANGULARSELECTIONMODIFIER">SCI_SETRECTANGULARSELECTIONMODIFIER(int modifier)</b><br />
|
||||
<b id="SCI_GETRECTANGULARSELECTIONMODIFIER">SCI_GETRECTANGULARSELECTIONMODIFIER</b><br />
|
||||
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
|
||||
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>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor)</b><br />
|
||||
Set a single selection from <code>anchor</code> to <code>caret</code> as the only selection.</p>
|
||||
|
||||
<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
|
||||
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>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETMAINSELECTION">SCI_SETMAINSELECTION(int selection)</b><br />
|
||||
<b id="SCI_GETMAINSELECTION">SCI_GETMAINSELECTION</b><br />
|
||||
One of the selections is the main selection which is used to determine what range of text is automatically visible.
|
||||
The main selection may be displayed in different colours or with a differently styled caret.
|
||||
Only an already existing selection can be made main.</p>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETSELECTIONNCARET">SCI_SETSELECTIONNCARET(int selection, int pos)</b><br />
|
||||
<b id="SCI_GETSELECTIONNCARET">SCI_GETSELECTIONNCARET(int selection)</b><br />
|
||||
<b id="SCI_SETSELECTIONNCARETVIRTUALSPACE">SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, int space)</b><br />
|
||||
<b id="SCI_GETSELECTIONNCARETVIRTUALSPACE">SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection)</b><br />
|
||||
<b id="SCI_SETSELECTIONNANCHOR">SCI_SETSELECTIONNANCHOR(int selection, int posAnchor)</b><br />
|
||||
<b id="SCI_GETSELECTIONNANCHOR">SCI_GETSELECTIONNANCHOR(int selection)</b><br />
|
||||
<b id="SCI_SETSELECTIONNANCHORVIRTUALSPACE">SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, int space)</b><br />
|
||||
<b id="SCI_GETSELECTIONNANCHORVIRTUALSPACE">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection)</b><br />
|
||||
Set or query the position and amount of virtual space for the caret and anchor of each already existing selection.</p>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETSELECTIONNSTART">SCI_SETSELECTIONNSTART(int selection, int pos)</b><br />
|
||||
<b id="SCI_GETSELECTIONNSTART">SCI_GETSELECTIONNSTART(int selection)</b><br />
|
||||
<b id="SCI_SETSELECTIONNEND">SCI_SETSELECTIONNEND(int selection, int pos)</b><br />
|
||||
<b id="SCI_GETSELECTIONNEND">SCI_GETSELECTIONNEND(int selection)</b><br />
|
||||
Set or query the start and end position of each already existing selection.
|
||||
Mostly of use to query each range for its text.</p>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETRECTANGULARSELECTIONCARET">SCI_SETRECTANGULARSELECTIONCARET(int pos)</b><br />
|
||||
<b id="SCI_GETRECTANGULARSELECTIONCARET">SCI_GETRECTANGULARSELECTIONCARET</b><br />
|
||||
<b id="SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(int space)</b><br />
|
||||
<b id="SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE</b><br />
|
||||
<b id="SCI_SETRECTANGULARSELECTIONANCHOR">SCI_SETRECTANGULARSELECTIONANCHOR(int posAnchor)</b><br />
|
||||
<b id="SCI_GETRECTANGULARSELECTIONANCHOR">SCI_GETRECTANGULARSELECTIONANCHOR</b><br />
|
||||
<b id="SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(int space)</b><br />
|
||||
<b id="SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE</b><br />
|
||||
Set or query the position and amount of virtual space for the caret and anchor of the rectangular selection.
|
||||
After setting the rectangular selection, this is broken down into multiple selections, one for each line.</p>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETADDITIONALSELALPHA">SCI_SETADDITIONALSELALPHA(int alpha)</b><br />
|
||||
<b id="SCI_GETADDITIONALSELALPHA">SCI_GETADDITIONALSELALPHA</b><br />
|
||||
<b id="SCI_SETADDITIONALSELFORE">SCI_SETADDITIONALSELFORE(int <a class="jump" href="#colour">colour</a>)</b><br />
|
||||
<b id="SCI_SETADDITIONALSELBACK">SCI_SETADDITIONALSELBACK(int <a class="jump" href="#colour">colour</a>)</b><br />
|
||||
Modify the appearence of additional selections so that they can be differentiated from the main selection which has its appearence set with
|
||||
<a class="message" href="#SCI_SETSELALPHA"><code>SCI_SETSELALPHA</code></a>,
|
||||
<a class="message" href="#SCI_GETSELALPHA"><code>SCI_GETSELALPHA</code></a>,
|
||||
<a class="message" href="#SCI_SETSELFORE"><code>SCI_SETSELFORE</code></a>, and
|
||||
<a class="message" href="#SCI_SETSELBACK"><code>SCI_SETSELBACK</code></a>.</p>
|
||||
|
||||
<p>
|
||||
<b id="SCI_SETADDITIONALCARETFORE">SCI_SETADDITIONALCARETFORE(int <a class="jump" href="#colour">colour</a>)</b><br />
|
||||
<b id="SCI_GETADDITIONALCARETFORE">SCI_GETADDITIONALCARETFORE</b><br />
|
||||
<b id="SCI_SETADDITIONALCARETSBLINK">SCI_SETADDITIONALCARETSBLINK(bool additionalCaretsBlink)</b><br />
|
||||
<b id="SCI_GETADDITIONALCARETSBLINK">SCI_GETADDITIONALCARETSBLINK</b><br />
|
||||
Modify the appearence of additional carets so that they can be differentiated from the main caret which has its appearence set with
|
||||
<a class="message" href="#SCI_SETCARETFORE"><code>SCI_SETCARETFORE</code></a>,
|
||||
<a class="message" href="#SCI_GETCARETFORE"><code>SCI_GETCARETFORE</code></a>,
|
||||
<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_SWAPMAINANCHORCARET">SCI_SWAPMAINANCHORCARET</b><br />
|
||||
<b id="SCI_ROTATESELECTION">SCI_ROTATESELECTION</b><br />
|
||||
These commands may be assigned to keys to make it possible to manipulate multiple selections.
|
||||
<code>SCI_SWAPMAINANCHORCARET</code> moves the caret to the opposite end of the main selection.
|
||||
<code>SCI_ROTATESELECTION</code> makes the next selection be the main selection.
|
||||
</p>
|
||||
|
||||
<h2 id="ScrollingAndAutomaticScrolling">Scrolling and automatic scrolling</h2>
|
||||
<code><a class="message" href="#SCI_LINESCROLL">SCI_LINESCROLL(int column, int line)</a><br />
|
||||
<a class="message" href="#SCI_SCROLLCARET">SCI_SCROLLCARET</a><br />
|
||||
@ -1714,7 +1958,7 @@ struct TextToFind {
|
||||
|
||||
<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 useful for languages in which white space is
|
||||
White space can be made visible which may be useful for languages in which white space is
|
||||
significant, such as Python. Space characters appear as small centred dots and tab characters
|
||||
as light arrows pointing to the right. There are also ways to control the display of <a
|
||||
class="jump" href="#LineEndings">end of line characters</a>. The two messages set and get the
|
||||
@ -2067,7 +2311,7 @@ struct TextToFind {
|
||||
<a class="message" href="#SCI_STYLEGETFORE">SCI_STYLEGETFORE(int styleNumber)</a><br />
|
||||
<a class="message" href="#SCI_STYLESETBACK">SCI_STYLESETBACK(int styleNumber, int
|
||||
colour)</a><br />
|
||||
<a class="message" href="#SCI_STYLEGETBACK">SCI_STYLESETBACK(int styleNumber)</a><br />
|
||||
<a class="message" href="#SCI_STYLEGETBACK">SCI_STYLEGETBACK(int styleNumber)</a><br />
|
||||
<a class="message" href="#SCI_STYLESETEOLFILLED">SCI_STYLESETEOLFILLED(int styleNumber, bool
|
||||
eolFilled)</a><br />
|
||||
<a class="message" href="#SCI_STYLEGETEOLFILLED">SCI_STYLEGETEOLFILLED(int styleNumber)</a><br />
|
||||
@ -2588,7 +2832,7 @@ struct TextToFind {
|
||||
|
||||
<td>2</td>
|
||||
|
||||
<td>Annotations are indented 40 pixels and are surrounded by a box.</td>
|
||||
<td>Annotations are indented to match the text and are surrounded by a box.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -2768,7 +3012,7 @@ struct TextToFind {
|
||||
|
||||
<p><b id="SCI_BRACEBADLIGHT">SCI_BRACEBADLIGHT(int pos1)</b><br />
|
||||
If there is no matching brace then the <a class="jump" href="#StyleDefinition">brace
|
||||
badlighting style</a>, style <code>BRACE_BADLIGHT</code> (35), can be used to show the brace
|
||||
badlighting style</a>, style <code>STYLE_BRACEBAD</code> (35), can be used to show the brace
|
||||
that is unmatched. Using a position of <code>INVALID_POSITION</code> (-1) removes the
|
||||
highlight.</p>
|
||||
|
||||
@ -2965,11 +3209,12 @@ struct TextToFind {
|
||||
<code>SC_MARK_SMALLRECT</code>, <code>SC_MARK_SHORTARROW</code>, <code>SC_MARK_EMPTY</code>,
|
||||
<code>SC_MARK_ARROWDOWN</code>, <code>SC_MARK_MINUS</code>, <code>SC_MARK_PLUS</code>,
|
||||
<code>SC_MARK_ARROWS</code>, <code>SC_MARK_DOTDOTDOT</code>, <code>SC_MARK_EMPTY</code>,
|
||||
<code>SC_MARK_BACKGROUND</code>, <code>SC_MARK_LEFTRECT</code>
|
||||
and <code>SC_MARK_FULLRECT</code>.</p>
|
||||
<code>SC_MARK_BACKGROUND</code>, <code>SC_MARK_LEFTRECT</code>,
|
||||
<code>SC_MARK_FULLRECT</code>, and <code>SC_MARK_UNDERLINE</code>.</p>
|
||||
|
||||
<p>The <code>SC_MARK_BACKGROUND</code> marker changes the background colour of the line only.
|
||||
The <code>SC_MARK_FULLRECT</code> symbol mirrors this, changing only the margin background colour.
|
||||
<code>SC_MARK_UNDERLINE</code> draws an underline across the text.
|
||||
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>
|
||||
@ -3130,7 +3375,7 @@ struct TextToFind {
|
||||
<p><b id="SCI_MARKERSETALPHA">SCI_MARKERSETALPHA(int markerNumber, int <a class="jump"
|
||||
href="#alpha">alpha</a>)</b><br />
|
||||
When markers are drawn in the content area, either because there is no margin for them or
|
||||
they are of SC_MARK_BACKGROUND type, they may be drawn translucently by
|
||||
they are of <code>SC_MARK_BACKGROUND</code> or <code>SC_MARK_UNDERLINE</code> types, they may be drawn translucently by
|
||||
setting an alpha value.</p>
|
||||
|
||||
<p><b id="SCI_MARKERADD">SCI_MARKERADD(int line, int markerNumber)</b><br />
|
||||
@ -4516,6 +4761,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
<a class="message" href="#SCI_GETWRAPVISUALFLAGS">SCI_GETWRAPVISUALFLAGS</a><br />
|
||||
<a class="message" href="#SCI_SETWRAPVISUALFLAGSLOCATION">SCI_SETWRAPVISUALFLAGSLOCATION(int wrapVisualFlagsLocation)</a><br />
|
||||
<a class="message" href="#SCI_GETWRAPVISUALFLAGSLOCATION">SCI_GETWRAPVISUALFLAGSLOCATION</a><br />
|
||||
<a class="message" href="#SCI_SETWRAPINDENTMODE">SCI_SETWRAPINDENTMODE(int indentMode)</a><br />
|
||||
<a class="message" href="#SCI_GETWRAPINDENTMODE">SCI_GETWRAPINDENTMODE</a><br />
|
||||
<a class="message" href="#SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT(int indent)</a><br />
|
||||
<a class="message" href="#SCI_GETWRAPSTARTINDENT">SCI_GETWRAPSTARTINDENT</a><br />
|
||||
<a class="message" href="#SCI_SETLAYOUTCACHE">SCI_SETLAYOUTCACHE(int cacheMode)</a><br />
|
||||
@ -4535,7 +4782,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
|
||||
<p>For wrapped lines Scintilla can draw visual flags (little arrows) at end of a a subline of a
|
||||
wrapped line and at begin of the next subline. These can be enabled individually, but if Scintilla
|
||||
draws the visual flag at begin of the next subline this subline will be indented by one char.
|
||||
draws the visual flag at the beginning of the next subline this subline will be indented by one char.
|
||||
Independent from drawing a visual flag at the begin the subline can have an indention.</p>
|
||||
|
||||
<p>Much of the time used by Scintilla is spent on laying out and drawing text. The same text
|
||||
@ -4606,7 +4853,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
|
||||
<p><b id="SCI_SETWRAPVISUALFLAGSLOCATION">SCI_SETWRAPVISUALFLAGSLOCATION(int wrapVisualFlagsLocation)</b><br />
|
||||
<b id="SCI_GETWRAPVISUALFLAGSLOCATION">SCI_GETWRAPVISUALFLAGSLOCATION</b><br />
|
||||
You can set wether the visual flags to indicate a line is wrapped are drawn near the border or near the text.
|
||||
You can set whether the visual flags to indicate a line is wrapped are drawn near the border or near the text.
|
||||
Bits set in wrapVisualFlagsLocation set the location to near the text for the corresponding visual flag.
|
||||
|
||||
<table cellpadding="1" cellspacing="2" border="0" summary="Wrap visual flags locations">
|
||||
@ -4634,7 +4881,45 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
<tr>
|
||||
<td align="left"><code>SC_WRAPVISUALFLAGLOC_START_BY_TEXT</code></td>
|
||||
<td align="center">2</td>
|
||||
<td>Visual flag at begin of subline drawn near text</td>
|
||||
<td>Visual flag at beginning of subline drawn near text</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<p><b id="SCI_SETWRAPINDENTMODE">SCI_SETWRAPINDENTMODE(int indentMode)</b><br />
|
||||
<b id="SCI_GETWRAPINDENTMODE">SCI_GETWRAPINDENTMODE</b><br />
|
||||
Wrapped sublines can be indented to the position of their first subline or one more indent level.
|
||||
The default is <code>SC_WRAPINDENT_FIXED</code>.
|
||||
The modes are:
|
||||
|
||||
<table cellpadding="1" cellspacing="2" border="0" summary="Wrap visual flags locations">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th align="left">Symbol</th>
|
||||
<th>Value</th>
|
||||
<th align="left">Effect</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<tbody valign="top">
|
||||
<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
|
||||
<a class="message" href="#SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="left"><code>SC_WRAPINDENT_SAME</code></td>
|
||||
<td align="center">1</td>
|
||||
<td>Wrapped sublines are aligned to first subline indent</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="left"><code>SC_WRAPINDENT_INDENT</code></td>
|
||||
<td align="center">2</td>
|
||||
<td>Wrapped sublines are aligned to first subline indent plus one more level of indentation</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -4643,7 +4928,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
<p><b id="SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT(int indent)</b><br />
|
||||
<b id="SCI_GETWRAPSTARTINDENT">SCI_GETWRAPSTARTINDENT</b><br />
|
||||
<code>SCI_SETWRAPSTARTINDENT</code> sets the size of indentation of sublines for
|
||||
wrapped lines in terms of the width of a space in
|
||||
wrapped lines in terms of the average character width in
|
||||
<a class="message" href="#StyleDefinition"><code>STYLE_DEFAULT</code></a>.
|
||||
There are no limits on indent sizes, but values less than 0 or large values may have
|
||||
undesirable effects.<br />
|
||||
|
@ -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/scintilla178.zip?download">
|
||||
<font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla201.zip?download">
|
||||
Windows</a>
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scintilla178.tgz?download">
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scintilla201.tgz?download">
|
||||
GTK+/Linux</a>
|
||||
</font>
|
||||
</td>
|
||||
@ -41,7 +41,7 @@
|
||||
containing very few restrictions.
|
||||
</p>
|
||||
<h3>
|
||||
Release 1.78
|
||||
Release 2.01
|
||||
</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/scintilla178.zip?download">zip format</a> (960K) commonly used on Windows</li>
|
||||
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla178.tgz?download">tgz format</a> (800K) commonly used on Linux and compatible operating systems</li>
|
||||
<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>
|
||||
</ul>
|
||||
Instructions for building on both Windows and Linux are included in the readme file.
|
||||
<h4>
|
||||
|
@ -332,6 +332,13 @@
|
||||
<td>James Moffatt</td>
|
||||
</tr><tr>
|
||||
<td>Yuzhou Xin</td>
|
||||
<td>Nic Jansma</td>
|
||||
<td>Evan Jones</td>
|
||||
<td>Mike Lischke</td>
|
||||
</tr><tr>
|
||||
<td>Eric Kidd</td>
|
||||
<td>maXmo</td>
|
||||
<td>David Severwright</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
@ -343,6 +350,198 @@
|
||||
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scite201.zip?download">Release 2.01</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Released on 19 August 2009.
|
||||
</li>
|
||||
<li>
|
||||
Fix to positioning rectangular paste when viewing line ends.
|
||||
</li>
|
||||
<li>
|
||||
Don't insert new lines and indentation for line ends at end of rectangular paste.
|
||||
</li>
|
||||
<li>
|
||||
When not in additional selection typing mode, cutting a rectangular selection removes all of the selected text.
|
||||
</li>
|
||||
<li>
|
||||
Rectangular selections are copied to the clipboard in document order, not in the order of selection.
|
||||
</li>
|
||||
<li>
|
||||
SCI_SETCURRENTPOS and SCI_SETANCHOR work in rectangular mode.
|
||||
</li>
|
||||
<li>
|
||||
On GTK+, drag and drop to a later position in the document now drops at the position.
|
||||
</li>
|
||||
<li>
|
||||
Fix bug where missing property did not use default value.
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scite200.zip?download">Release 2.0</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Released on 11 August 2009.
|
||||
</li>
|
||||
<li>
|
||||
Multiple pieces of text can be selected simultaneously by holding control whil dragging the mouse.
|
||||
Typing, backspace and delete may affect all selections together.
|
||||
</li>
|
||||
<li>
|
||||
Virtual space allows selecting beyond the last character on a line.
|
||||
</li>
|
||||
<li>
|
||||
SciTE on GTK+ path bar is now optional and defaults to off.
|
||||
</li>
|
||||
<li>
|
||||
MagikSF lexer recognises numbers correctly.
|
||||
</li>
|
||||
<li>
|
||||
Folding of Python comments and blank lines improved. Bug #210240.
|
||||
</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.
|
||||
</li>
|
||||
<li>
|
||||
Resource leak fixed in SciTE for Windows when printing fails. Bug #2816524.
|
||||
</li>
|
||||
<li>
|
||||
Bug fixed on Windows where the system caret was destroyed during destruction when another window
|
||||
was using the system caret. Bug #2830223.
|
||||
</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.
|
||||
</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.
|
||||
</li>
|
||||
<li>
|
||||
Bug fixed where EN_CHANGE notification was sent when performing a paste operation in a
|
||||
read-only document. Bug #2825485.
|
||||
</li>
|
||||
<li>
|
||||
Refactored code so that Scintilla exposes less of its internal implementation and uses the C++ standard
|
||||
library for some basic collections. Projects that linked to Scintilla's SString or PropSet classes
|
||||
should copy this code from a previous version of Scintilla or from SciTE.
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scite179.zip?download">Release 1.79</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Released on 1 July 2009.
|
||||
</li>
|
||||
<li>
|
||||
Memory exhaustion and other exceptions handled by placing an error value into the
|
||||
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
|
||||
memory since Scintilla may not be in a stable state.
|
||||
</li>
|
||||
<li>
|
||||
Deprecated APIs removed. The symbols removed are:
|
||||
<ul>
|
||||
<li>SCI_SETCARETPOLICY</li>
|
||||
<li> CARET_CENTER</li>
|
||||
<li> CARET_XEVEN</li>
|
||||
<li> CARET_XJUMPS</li>
|
||||
<li> SC_FOLDFLAG_BOX</li>
|
||||
<li> SC_FOLDLEVELBOXHEADERFLAG</li>
|
||||
<li> SC_FOLDLEVELBOXFOOTERFLAG</li>
|
||||
<li> SC_FOLDLEVELCONTRACTED</li>
|
||||
<li> SC_FOLDLEVELUNINDENT</li>
|
||||
<li> SCN_POSCHANGED</li>
|
||||
<li> SCN_CHECKBRACE</li>
|
||||
<li> SCLEX_ASP</li>
|
||||
<li> SCLEX_PHP</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Cocoa platform added.
|
||||
</li>
|
||||
<li>
|
||||
Names of struct types in Scintilla.h now start with "Sci_" to avoid possible clashes with platform
|
||||
definitions. Currently, the old names still work but these will be phased out.
|
||||
</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.
|
||||
</li>
|
||||
<li>
|
||||
APIs added for finding the character at a point rather than an inter-character position. Feature #2646738.
|
||||
</li>
|
||||
<li>
|
||||
A new marker SC_MARK_BACKGROUND_UNDERLINE is drawn in the text area as an underline
|
||||
the full width of the window.
|
||||
</li>
|
||||
<li>
|
||||
Batch file lexer understands variables surrounded by '!'.
|
||||
</li>
|
||||
<li>
|
||||
CAML lexer also supports SML.
|
||||
</li>
|
||||
<li>
|
||||
D lexer handles string and numeric literals more accurately. Feature #2793782.
|
||||
</li>
|
||||
<li>
|
||||
Forth lexer is now case-insensitive and better supports numbers like $hex and %binary. Feature #2804894.
|
||||
</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.
|
||||
</li>
|
||||
<li>
|
||||
Pascal lexer bug fixed to prevent hang when 'interface' near beginning of file. Bug #2802863.
|
||||
</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.
|
||||
</li>
|
||||
<li>
|
||||
XML lexer fixes bug where Unicode entities like '&—' were broken into fragments. Bug #2804760.
|
||||
</li>
|
||||
<li>
|
||||
SciTE on GTK+ enables scrolling the tab bar on recent versions of GTK+. Feature #2061821.
|
||||
</li>
|
||||
<li>
|
||||
SciTE on Windows allows tab bar tabs to be reordered by drag and drop.
|
||||
</li>
|
||||
<li>
|
||||
Unit test script for Scintilla on Windows included with source code.
|
||||
</li>
|
||||
<li>
|
||||
User defined menu items are now localised when there is a matching translation.
|
||||
</li>
|
||||
<li>
|
||||
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.
|
||||
</li>
|
||||
<li>
|
||||
Folding bugs introduced in 1.78 fixed. Some of the fix was generic and there was also a specific fix for C++.
|
||||
</li>
|
||||
<li>
|
||||
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.
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scite178.zip?download">Release 1.78</a>
|
||||
</h3>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<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="20090428" />
|
||||
<meta name="Date.Modified" content="20090819" />
|
||||
<style type="text/css">
|
||||
.versionlist {
|
||||
color: #FFCC99;
|
||||
@ -36,8 +36,8 @@
|
||||
GTK+</font>
|
||||
</td>
|
||||
<td width="40%" align="right">
|
||||
<font color="#FFCC99" size="3"> Release version 1.78<br />
|
||||
Site last modified April 28 2009</font>
|
||||
<font color="#FFCC99" size="3"> Release version 2.01<br />
|
||||
Site last modified August 19 2009</font>
|
||||
</td>
|
||||
<td width="20%">
|
||||
|
||||
@ -52,6 +52,23 @@
|
||||
</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
|
||||
@ -68,40 +85,6 @@
|
||||
<span class="versionlist">Version 1.76 fixes some minor bugs.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<span class="versionlist">Version 1.75 displays invalid UTF-8 bytes as hexadecimal and
|
||||
can show indentation guides on completely empty lines.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<span class="versionlist">Version 1.74 runs natively on OS X.
|
||||
Indicators are separated from the style buffer so there can be more indicators.
|
||||
Wide lines are faster.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<span class="versionlist">Version 1.73 allows style changes to be made during text modification events.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<span class="versionlist">Version 1.72 is more efficient at handling per-line information.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<span class="versionlist">Version 1.71 has some internationalisation fixes.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<span class="versionlist">Version 1.70 allows, on GTK+, approximate character set conversions
|
||||
for pasting and uses internationalised input at all times.</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
|
||||
<tr>
|
||||
@ -160,8 +143,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 95, NT 4.0, Windows 2000, and on Fedora 8
|
||||
with GTK+ 2.12. <a href="http://www.scintilla.org/SciTEImage.html">Here is a screenshot of
|
||||
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
|
||||
SciTE.</a><br />
|
||||
</p>
|
||||
<p>
|
||||
|
@ -173,8 +173,8 @@ static FontHandle *PFont(Font &f) {
|
||||
return reinterpret_cast<FontHandle *>(f.GetID());
|
||||
}
|
||||
|
||||
static GtkWidget *PWidget(WindowID id) {
|
||||
return reinterpret_cast<GtkWidget *>(id);
|
||||
static GtkWidget *PWidget(WindowID wid) {
|
||||
return reinterpret_cast<GtkWidget *>(wid);
|
||||
}
|
||||
|
||||
static GtkWidget *PWidget(Window &w) {
|
||||
@ -421,7 +421,7 @@ class FontCached : Font {
|
||||
static FontCached *first;
|
||||
public:
|
||||
static FontID FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_);
|
||||
static void ReleaseId(FontID id_);
|
||||
static void ReleaseId(FontID fid_);
|
||||
};
|
||||
|
||||
FontCached *FontCached::first = 0;
|
||||
@ -430,7 +430,7 @@ FontCached::FontCached(const char *faceName_, int characterSet_, int size_, bool
|
||||
next(0), usage(0), hash(0) {
|
||||
::SetLogFont(lf, faceName_, characterSet_, size_, bold_, italic_);
|
||||
hash = HashFont(faceName_, characterSet_, size_, bold_, italic_);
|
||||
id = CreateNewFont(faceName_, characterSet_, size_, bold_, italic_);
|
||||
fid = CreateNewFont(faceName_, characterSet_, size_, bold_, italic_);
|
||||
usage = 1;
|
||||
}
|
||||
|
||||
@ -444,9 +444,9 @@ bool FontCached::SameAs(const char *faceName_, int characterSet_, int size_, boo
|
||||
}
|
||||
|
||||
void FontCached::Release() {
|
||||
if (id)
|
||||
if (fid)
|
||||
delete PFont(*this);
|
||||
id = 0;
|
||||
fid = 0;
|
||||
}
|
||||
|
||||
FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) {
|
||||
@ -457,7 +457,7 @@ FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int si
|
||||
if ((cur->hash == hashFind) &&
|
||||
cur->SameAs(faceName_, characterSet_, size_, bold_, italic_)) {
|
||||
cur->usage++;
|
||||
ret = cur->id;
|
||||
ret = cur->fid;
|
||||
}
|
||||
}
|
||||
if (ret == 0) {
|
||||
@ -465,18 +465,18 @@ FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int si
|
||||
if (fc) {
|
||||
fc->next = first;
|
||||
first = fc;
|
||||
ret = fc->id;
|
||||
ret = fc->fid;
|
||||
}
|
||||
}
|
||||
FontMutexUnlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void FontCached::ReleaseId(FontID id_) {
|
||||
void FontCached::ReleaseId(FontID fid_) {
|
||||
FontMutexLock();
|
||||
FontCached **pcur = &first;
|
||||
for (FontCached *cur = first; cur; cur = cur->next) {
|
||||
if (cur->id == id_) {
|
||||
if (cur->fid == fid_) {
|
||||
cur->usage--;
|
||||
if (cur->usage == 0) {
|
||||
*pcur = cur->next;
|
||||
@ -661,20 +661,20 @@ FontID FontCached::CreateNewFont(const char *fontName, int characterSet,
|
||||
return new FontHandle(newid);
|
||||
}
|
||||
|
||||
Font::Font() : id(0) {}
|
||||
Font::Font() : fid(0) {}
|
||||
|
||||
Font::~Font() {}
|
||||
|
||||
void Font::Create(const char *faceName, int characterSet, int size,
|
||||
bool bold, bool italic, bool) {
|
||||
Release();
|
||||
id = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic);
|
||||
fid = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic);
|
||||
}
|
||||
|
||||
void Font::Release() {
|
||||
if (id)
|
||||
FontCached::ReleaseId(id);
|
||||
id = 0;
|
||||
if (fid)
|
||||
FontCached::ReleaseId(fid);
|
||||
fid = 0;
|
||||
}
|
||||
|
||||
// Required on OS X
|
||||
@ -1057,6 +1057,19 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int , ColourAllocated , int , Co
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
static guint32 u32FromRGBA(guint8 r, guint8 g, guint8 b, guint8 a) {
|
||||
union {
|
||||
guint8 pixVal[4];
|
||||
guint32 val;
|
||||
} converter;
|
||||
converter.pixVal[0] = r;
|
||||
converter.pixVal[1] = g;
|
||||
converter.pixVal[2] = b;
|
||||
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 (gc && drawable && rc.Width() > 0) {
|
||||
@ -1067,18 +1080,11 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated
|
||||
// Make a 32 bit deep pixbuf with alpha
|
||||
GdkPixbuf *pixalpha = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
|
||||
|
||||
guint8 pixVal[4] = {0};
|
||||
guint32 valEmpty = *(reinterpret_cast<guint32 *>(pixVal));
|
||||
pixVal[0] = GetRValue(fill.AsLong());
|
||||
pixVal[1] = GetGValue(fill.AsLong());
|
||||
pixVal[2] = GetBValue(fill.AsLong());
|
||||
pixVal[3] = alphaFill;
|
||||
guint32 valFill = *(reinterpret_cast<guint32 *>(pixVal));
|
||||
pixVal[0] = GetRValue(outline.AsLong());
|
||||
pixVal[1] = GetGValue(outline.AsLong());
|
||||
pixVal[2] = GetBValue(outline.AsLong());
|
||||
pixVal[3] = alphaOutline;
|
||||
guint32 valOutline = *(reinterpret_cast<guint32 *>(pixVal));
|
||||
guint32 valEmpty = u32FromRGBA(0,0,0,0);
|
||||
guint32 valFill = u32FromRGBA(GetRValue(fill.AsLong()),
|
||||
GetGValue(fill.AsLong()), GetBValue(fill.AsLong()), alphaFill);
|
||||
guint32 valOutline = u32FromRGBA(GetRValue(outline.AsLong()),
|
||||
GetGValue(outline.AsLong()), GetBValue(outline.AsLong()), alphaOutline);
|
||||
guint32 *pixels = reinterpret_cast<guint32 *>(gdk_pixbuf_get_pixels(pixalpha));
|
||||
int stride = gdk_pixbuf_get_rowstride(pixalpha) / 4;
|
||||
for (int yr=0; yr<height; yr++) {
|
||||
@ -1106,6 +1112,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated
|
||||
g_object_unref(pixalpha);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) {
|
||||
@ -1735,24 +1742,24 @@ Surface *Surface::Allocate() {
|
||||
Window::~Window() {}
|
||||
|
||||
void Window::Destroy() {
|
||||
if (id)
|
||||
gtk_widget_destroy(GTK_WIDGET(id));
|
||||
id = 0;
|
||||
if (wid)
|
||||
gtk_widget_destroy(GTK_WIDGET(wid));
|
||||
wid = 0;
|
||||
}
|
||||
|
||||
bool Window::HasFocus() {
|
||||
return GTK_WIDGET_HAS_FOCUS(id);
|
||||
return GTK_WIDGET_HAS_FOCUS(wid);
|
||||
}
|
||||
|
||||
PRectangle Window::GetPosition() {
|
||||
// Before any size allocated pretend its 1000 wide so not scrolled
|
||||
PRectangle rc(0, 0, 1000, 1000);
|
||||
if (id) {
|
||||
rc.left = PWidget(id)->allocation.x;
|
||||
rc.top = PWidget(id)->allocation.y;
|
||||
if (PWidget(id)->allocation.width > 20) {
|
||||
rc.right = rc.left + PWidget(id)->allocation.width;
|
||||
rc.bottom = rc.top + PWidget(id)->allocation.height;
|
||||
if (wid) {
|
||||
rc.left = PWidget(wid)->allocation.x;
|
||||
rc.top = PWidget(wid)->allocation.y;
|
||||
if (PWidget(wid)->allocation.width > 20) {
|
||||
rc.right = rc.left + PWidget(wid)->allocation.width;
|
||||
rc.bottom = rc.top + PWidget(wid)->allocation.height;
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
@ -1765,18 +1772,18 @@ void Window::SetPosition(PRectangle rc) {
|
||||
alloc.y = rc.top;
|
||||
alloc.width = rc.Width();
|
||||
alloc.height = rc.Height();
|
||||
gtk_widget_size_allocate(PWidget(id), &alloc);
|
||||
gtk_widget_size_allocate(PWidget(wid), &alloc);
|
||||
#else
|
||||
|
||||
gtk_widget_set_uposition(id, rc.left, rc.top);
|
||||
gtk_widget_set_usize(id, rc.right - rc.left, rc.bottom - rc.top);
|
||||
gtk_widget_set_uposition(wid, rc.left, rc.top);
|
||||
gtk_widget_set_usize(wid, rc.right - rc.left, rc.bottom - rc.top);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Window::SetPositionRelative(PRectangle rc, Window relativeTo) {
|
||||
int ox = 0;
|
||||
int oy = 0;
|
||||
gdk_window_get_origin(PWidget(relativeTo.id)->window, &ox, &oy);
|
||||
gdk_window_get_origin(PWidget(relativeTo.wid)->window, &ox, &oy);
|
||||
ox += rc.left;
|
||||
if (ox < 0)
|
||||
ox = 0;
|
||||
@ -1797,9 +1804,9 @@ void Window::SetPositionRelative(PRectangle rc, Window relativeTo) {
|
||||
oy = screenHeight - sizey;
|
||||
|
||||
#if GTK_MAJOR_VERSION >= 2
|
||||
gtk_window_move(GTK_WINDOW(PWidget(id)), ox, oy);
|
||||
gtk_window_move(GTK_WINDOW(PWidget(wid)), ox, oy);
|
||||
#else
|
||||
gtk_widget_set_uposition(PWidget(id), ox, oy);
|
||||
gtk_widget_set_uposition(PWidget(wid), ox, oy);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
@ -1809,9 +1816,9 @@ void Window::SetPositionRelative(PRectangle rc, Window relativeTo) {
|
||||
alloc.y = rc.top + oy;
|
||||
alloc.width = rc.right - rc.left;
|
||||
alloc.height = rc.bottom - rc.top;
|
||||
gtk_widget_size_allocate(id, &alloc);
|
||||
gtk_widget_size_allocate(wid, &alloc);
|
||||
#endif
|
||||
gtk_widget_set_usize(PWidget(id), sizex, sizey);
|
||||
gtk_widget_set_usize(PWidget(wid), sizex, sizey);
|
||||
}
|
||||
|
||||
PRectangle Window::GetClientPosition() {
|
||||
@ -1821,18 +1828,18 @@ PRectangle Window::GetClientPosition() {
|
||||
|
||||
void Window::Show(bool show) {
|
||||
if (show)
|
||||
gtk_widget_show(PWidget(id));
|
||||
gtk_widget_show(PWidget(wid));
|
||||
}
|
||||
|
||||
void Window::InvalidateAll() {
|
||||
if (id) {
|
||||
gtk_widget_queue_draw(PWidget(id));
|
||||
if (wid) {
|
||||
gtk_widget_queue_draw(PWidget(wid));
|
||||
}
|
||||
}
|
||||
|
||||
void Window::InvalidateRectangle(PRectangle rc) {
|
||||
if (id) {
|
||||
gtk_widget_queue_draw_area(PWidget(id),
|
||||
if (wid) {
|
||||
gtk_widget_queue_draw_area(PWidget(wid),
|
||||
rc.left, rc.top,
|
||||
rc.right - rc.left, rc.bottom - rc.top);
|
||||
}
|
||||
@ -1875,13 +1882,13 @@ void Window::SetCursor(Cursor curs) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (PWidget(id)->window)
|
||||
gdk_window_set_cursor(PWidget(id)->window, gdkCurs);
|
||||
if (PWidget(wid)->window)
|
||||
gdk_window_set_cursor(PWidget(wid)->window, gdkCurs);
|
||||
gdk_cursor_destroy(gdkCurs);
|
||||
}
|
||||
|
||||
void Window::SetTitle(const char *s) {
|
||||
gtk_window_set_title(GTK_WINDOW(id), s);
|
||||
gtk_window_set_title(GTK_WINDOW(wid), s);
|
||||
}
|
||||
|
||||
/* Returns rectangle of monitor pt is on, both rect and pt are in Window's
|
||||
@ -1890,7 +1897,7 @@ PRectangle Window::GetMonitorRect(Point pt) {
|
||||
gint x_offset, y_offset;
|
||||
pt = pt;
|
||||
|
||||
gdk_window_get_origin(PWidget(id)->window, &x_offset, &y_offset);
|
||||
gdk_window_get_origin(PWidget(wid)->window, &x_offset, &y_offset);
|
||||
|
||||
// gtk 2.2+
|
||||
#if GTK_MAJOR_VERSION > 2 || (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 2)
|
||||
@ -1899,7 +1906,7 @@ PRectangle Window::GetMonitorRect(Point pt) {
|
||||
gint monitor_num;
|
||||
GdkRectangle rect;
|
||||
|
||||
screen = gtk_widget_get_screen(PWidget(id));
|
||||
screen = gtk_widget_get_screen(PWidget(wid));
|
||||
monitor_num = gdk_screen_get_monitor_at_point(screen, pt.x + x_offset, pt.y + y_offset);
|
||||
gdk_screen_get_monitor_geometry(screen, monitor_num, &rect);
|
||||
rect.x -= x_offset;
|
||||
@ -1957,6 +1964,9 @@ class ListBoxX : public ListBox {
|
||||
int current;
|
||||
#endif
|
||||
void *pixhash;
|
||||
#if GTK_MAJOR_VERSION >= 2
|
||||
GtkCellRenderer* pixbuf_renderer;
|
||||
#endif
|
||||
int lineHeight;
|
||||
XPMSet xset;
|
||||
bool unicodeMode;
|
||||
@ -1971,6 +1981,9 @@ public:
|
||||
doubleClickAction(NULL), doubleClickActionData(NULL) {
|
||||
#if GTK_MAJOR_VERSION < 2
|
||||
current = 0;
|
||||
#endif
|
||||
#if GTK_MAJOR_VERSION >= 2
|
||||
pixbuf_renderer = 0;
|
||||
#endif
|
||||
}
|
||||
virtual ~ListBoxX() {
|
||||
@ -2021,12 +2034,16 @@ static void SelectionAC(GtkWidget *, gint row, gint,
|
||||
#endif
|
||||
|
||||
static gboolean ButtonPress(GtkWidget *, GdkEventButton* ev, gpointer p) {
|
||||
ListBoxX* lb = reinterpret_cast<ListBoxX*>(p);
|
||||
if (ev->type == GDK_2BUTTON_PRESS && lb->doubleClickAction != NULL) {
|
||||
lb->doubleClickAction(lb->doubleClickActionData);
|
||||
return TRUE;
|
||||
}
|
||||
try {
|
||||
ListBoxX* lb = reinterpret_cast<ListBoxX*>(p);
|
||||
if (ev->type == GDK_2BUTTON_PRESS && lb->doubleClickAction != NULL) {
|
||||
lb->doubleClickAction(lb->doubleClickActionData);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
} catch (...) {
|
||||
// No pointer back to Scintilla to save status
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -2056,7 +2073,7 @@ static void StyleSet(GtkWidget *w, GtkStyle*, void*) {
|
||||
#endif
|
||||
|
||||
void ListBoxX::Create(Window &, int, Point, int, bool) {
|
||||
id = gtk_window_new(GTK_WINDOW_POPUP);
|
||||
wid = gtk_window_new(GTK_WINDOW_POPUP);
|
||||
|
||||
GtkWidget *frame = gtk_frame_new(NULL);
|
||||
gtk_widget_show(frame);
|
||||
@ -2104,12 +2121,13 @@ void ListBoxX::Create(Window &, int, Point, int, bool) {
|
||||
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_title(column, "Autocomplete");
|
||||
|
||||
GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new();
|
||||
gtk_tree_view_column_pack_start(column, renderer, FALSE);
|
||||
gtk_tree_view_column_add_attribute(column, renderer,
|
||||
pixbuf_renderer = gtk_cell_renderer_pixbuf_new();
|
||||
gtk_cell_renderer_set_fixed_size(pixbuf_renderer, 0, -1);
|
||||
gtk_tree_view_column_pack_start(column, pixbuf_renderer, FALSE);
|
||||
gtk_tree_view_column_add_attribute(column, pixbuf_renderer,
|
||||
"pixbuf", PIXBUF_COLUMN);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new();
|
||||
GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
|
||||
gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer), 1);
|
||||
gtk_tree_view_column_pack_start(column, renderer, TRUE);
|
||||
gtk_tree_view_column_add_attribute(column, renderer,
|
||||
@ -2125,7 +2143,7 @@ void ListBoxX::Create(Window &, int, Point, int, bool) {
|
||||
g_signal_connect(G_OBJECT(wid), "button_press_event",
|
||||
G_CALLBACK(ButtonPress), this);
|
||||
#endif
|
||||
gtk_widget_realize(PWidget(id));
|
||||
gtk_widget_realize(PWidget(wid));
|
||||
}
|
||||
|
||||
void ListBoxX::SetFont(Font &scint_font) {
|
||||
@ -2163,7 +2181,7 @@ int ListBoxX::GetVisibleRows() const {
|
||||
PRectangle ListBoxX::GetDesiredRect() {
|
||||
// Before any size allocated pretend its 100 wide so not scrolled
|
||||
PRectangle rc(0, 0, 100, 100);
|
||||
if (id) {
|
||||
if (wid) {
|
||||
int rows = Length();
|
||||
if ((rows == 0) || (rows > desiredVisibleRows))
|
||||
rows = desiredVisibleRows;
|
||||
@ -2211,6 +2229,12 @@ PRectangle ListBoxX::GetDesiredRect() {
|
||||
}
|
||||
|
||||
int ListBoxX::CaretFromEdge() {
|
||||
#if GTK_MAJOR_VERSION >= 2
|
||||
gint renderer_width, renderer_height;
|
||||
gtk_cell_renderer_get_fixed_size(pixbuf_renderer, &renderer_width,
|
||||
&renderer_height);
|
||||
return 4 + renderer_width;
|
||||
#endif
|
||||
return 4 + xset.GetWidth();
|
||||
}
|
||||
|
||||
@ -2297,6 +2321,14 @@ void ListBoxX::Append(char *s, int type) {
|
||||
gtk_list_store_set(GTK_LIST_STORE(store), &iter,
|
||||
PIXBUF_COLUMN, list_image->pixbuf,
|
||||
TEXT_COLUMN, s, -1);
|
||||
|
||||
gint pixbuf_width = gdk_pixbuf_get_width(list_image->pixbuf);
|
||||
gint renderer_height, renderer_width;
|
||||
gtk_cell_renderer_get_fixed_size(pixbuf_renderer,
|
||||
&renderer_width, &renderer_height);
|
||||
if (pixbuf_width > renderer_width)
|
||||
gtk_cell_renderer_set_fixed_size(pixbuf_renderer,
|
||||
pixbuf_width, -1);
|
||||
} else {
|
||||
gtk_list_store_set(GTK_LIST_STORE(store), &iter,
|
||||
TEXT_COLUMN, s, -1);
|
||||
@ -2312,7 +2344,7 @@ void ListBoxX::Append(char *s, int type) {
|
||||
}
|
||||
|
||||
int ListBoxX::Length() {
|
||||
if (id)
|
||||
if (wid)
|
||||
#if GTK_MAJOR_VERSION < 2
|
||||
return GTK_CLIST(list)->rows;
|
||||
#else
|
||||
@ -2534,27 +2566,27 @@ void ListBoxX::SetList(const char *listText, char separator, char typesep) {
|
||||
}
|
||||
}
|
||||
|
||||
Menu::Menu() : id(0) {}
|
||||
Menu::Menu() : mid(0) {}
|
||||
|
||||
void Menu::CreatePopUp() {
|
||||
Destroy();
|
||||
id = gtk_item_factory_new(GTK_TYPE_MENU, "<main>", NULL);
|
||||
mid = gtk_item_factory_new(GTK_TYPE_MENU, "<main>", NULL);
|
||||
}
|
||||
|
||||
void Menu::Destroy() {
|
||||
if (id)
|
||||
if (mid)
|
||||
#if GTK_MAJOR_VERSION < 2
|
||||
gtk_object_unref(GTK_OBJECT(id));
|
||||
gtk_object_unref(GTK_OBJECT(mid));
|
||||
#else
|
||||
g_object_unref(G_OBJECT(id));
|
||||
g_object_unref(G_OBJECT(mid));
|
||||
#endif
|
||||
id = 0;
|
||||
mid = 0;
|
||||
}
|
||||
|
||||
void Menu::Show(Point pt, Window &) {
|
||||
int screenHeight = gdk_screen_height();
|
||||
int screenWidth = gdk_screen_width();
|
||||
GtkItemFactory *factory = reinterpret_cast<GtkItemFactory *>(id);
|
||||
GtkItemFactory *factory = reinterpret_cast<GtkItemFactory *>(mid);
|
||||
GtkWidget *widget = gtk_item_factory_get_widget(factory, "<main>");
|
||||
gtk_widget_show_all(widget);
|
||||
GtkRequisition requisition;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,18 +3,18 @@ PlatGTK.o: PlatGTK.cxx \
|
||||
../src/UniConversion.h ../src/XPM.h Converter.h
|
||||
ScintillaGTK.o: ScintillaGTK.cxx \
|
||||
../include/Scintilla.h ../include/ScintillaWidget.h \
|
||||
../include/SciLexer.h ../include/PropSet.h ../include/SString.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/PositionCache.h ../src/Editor.h ../include/SString.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 \
|
||||
../include/PropSet.h ../include/SString.h ../src/AutoComplete.h
|
||||
../src/CharClassify.h ../src/AutoComplete.h
|
||||
CallTip.o: ../src/CallTip.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/CallTip.h
|
||||
CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \
|
||||
@ -28,10 +28,10 @@ Decoration.o: ../src/Decoration.cxx ../include/Platform.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/SString.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 \
|
||||
@ -42,284 +42,253 @@ Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.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/PositionCache.h ../src/Editor.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/SString.h ../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../include/KeyWords.h ../src/ExternalLexer.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
|
||||
KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/KeyMap.h
|
||||
KeyWords.o: ../src/KeyWords.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.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/SString.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/SString.h \
|
||||
../include/KeyWords.h ../include/SciLexer.h ../include/SString.h
|
||||
LexAPDL.o: ../src/LexAPDL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.h ../include/Accessor.h \
|
||||
../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../src/StyleContext.h ../include/PropSet.h ../include/KeyWords.h \
|
||||
../include/SciLexer.h
|
||||
LexBullant.o: ../src/LexBullant.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
LexBullant.o: ../src/LexBullant.cxx ../include/Platform.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 \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.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 \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.h ../include/Accessor.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/SString.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/SString.h ../include/Accessor.h ../src/StyleContext.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
|
||||
LexGui4Cli.o: ../src/LexGui4Cli.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.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 ../include/SString.h ../include/Accessor.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/SString.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 ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.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
|
||||
LexKix.o: ../src/LexKix.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../include/SString.h
|
||||
LexMSSQL.o: ../src/LexMSSQL.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.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
|
||||
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
|
||||
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
|
||||
LexMPT.o: ../src/LexMPT.cxx ../include/Platform.h ../include/PropSet.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
|
||||
LexMySQL.o: ../src/LexMySQL.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.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/SString.h ../include/Accessor.h \
|
||||
../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h
|
||||
LexNsis.o: ../src/LexNsis.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../include/KeyWords.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
|
||||
LexOpal.o: ../src/LexOpal.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.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 \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.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/SString.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/SString.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/SString.h ../include/Accessor.h ../src/StyleContext.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
|
||||
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
|
||||
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
|
||||
LexPLM.o: ../src/LexPLM.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.h ../include/Accessor.h ../include/KeyWords.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
|
||||
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
|
||||
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
|
||||
LexRuby.o: ../src/LexRuby.cxx ../include/Platform.h ../include/PropSet.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/SString.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/SString.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/SString.h ../include/Accessor.h ../src/StyleContext.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
|
||||
LexSorcus.o: ../src/LexSorcus.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.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/SString.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/SString.h ../include/KeyWords.h ../include/SciLexer.h \
|
||||
../include/SString.h
|
||||
../include/KeyWords.h ../include/SciLexer.h
|
||||
LexSQL.o: ../src/LexSQL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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/SString.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
|
||||
PerLine.o: ../src/PerLine.cxx ../include/Platform.h \
|
||||
@ -330,26 +299,28 @@ PositionCache.o: ../src/PositionCache.cxx ../include/Platform.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/PositionCache.h
|
||||
../src/Decoration.h ../src/Document.h ../src/Selection.h \
|
||||
../src/PositionCache.h
|
||||
PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.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
|
||||
ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../include/SString.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/PositionCache.h ../src/Editor.h \
|
||||
../src/ScintillaBase.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
|
||||
StyleContext.o: ../src/StyleContext.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.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
|
||||
UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h
|
||||
@ -358,6 +329,6 @@ ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.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/SString.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
|
||||
|
@ -40,17 +40,17 @@ 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)
|
||||
CONFIGFLAGS:=$(shell pkg-config --cflags gtk+-2.0)
|
||||
MARSHALLER=scintilla-marshal.o
|
||||
else
|
||||
ifdef GTK1
|
||||
CONFIGFLAGS=$(shell gtk-config --cflags)
|
||||
CONFIGFLAGS:=$(shell gtk-config --cflags)
|
||||
else
|
||||
ifneq (,$(findstring /,$(shell whereis pkg-config)))
|
||||
CONFIGFLAGS=$(shell pkg-config --cflags gtk+-2.0)
|
||||
CONFIGFLAGS:=$(shell pkg-config --cflags gtk+-2.0)
|
||||
MARSHALLER=scintilla-marshal.o
|
||||
else
|
||||
CONFIGFLAGS=$(shell gtk-config --cflags)
|
||||
CONFIGFLAGS:=$(shell gtk-config --cflags)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@ -88,7 +88,7 @@ $(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \
|
||||
CharClassify.o Decoration.o Document.o PerLine.o CallTip.o \
|
||||
ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatGTK.o \
|
||||
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o ViewStyle.o \
|
||||
RESearch.o RunStyles.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
|
||||
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
|
||||
$(MARSHALLER) $(LEXOBJS)
|
||||
$(AR) rc $@ $^
|
||||
$(RANLIB) $@
|
||||
|
@ -62,7 +62,7 @@ ALL_GTK_LIBS=$(GTK_TOP)/gtk+/gtk/gtk-1.3.lib \
|
||||
!ENDIF
|
||||
|
||||
INCLUDEDIRS=-I ../include -I ../src $(GTK_INCLUDES)
|
||||
CXXFLAGS=/TP /W4 -DGTK -D_CRT_SECURE_NO_DEPRECATE=1
|
||||
CXXFLAGS=/TP /W4 -EHsc -DGTK -D_CRT_SECURE_NO_DEPRECATE=1
|
||||
CFLAGS=/W4 -DGTK
|
||||
# For something scary:/Wp64
|
||||
CXXDEBUG=/Zi /Od /MDd -DDEBUG
|
||||
@ -90,7 +90,7 @@ LD=ilink32
|
||||
|
||||
INCLUDEDIRS=-I../include -I../src
|
||||
CXXFLAGS = -v
|
||||
CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT- -x-
|
||||
CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT- -x
|
||||
# Above turns off warnings for clarfying parentheses and inlines with for not expanded
|
||||
CXXDEBUG=-v -DDEBUG
|
||||
CXXNDEBUG=-O1 -DNDEBUG
|
||||
@ -135,6 +135,7 @@ SOBJS=\
|
||||
$(DIR_O)\PropSet.obj \
|
||||
$(DIR_O)\ScintillaBase.obj \
|
||||
$(DIR_O)\ScintillaGTK.obj \
|
||||
$(DIR_O)\Selection.obj \
|
||||
$(DIR_O)\Style.obj \
|
||||
$(DIR_O)\UniConversion.obj \
|
||||
$(DIR_O)\ViewStyle.obj \
|
||||
@ -245,6 +246,7 @@ LOBJS=\
|
||||
$(DIR_O)\PropSet.obj \
|
||||
$(DIR_O)\ScintillaBaseL.obj \
|
||||
$(DIR_O)\ScintillaGTKL.obj \
|
||||
$(DIR_O)\Selection.obj \
|
||||
$(DIR_O)\Style.obj \
|
||||
$(DIR_O)\StyleContext.obj \
|
||||
$(DIR_O)\UniConversion.obj \
|
||||
@ -307,11 +309,11 @@ $(DIR_O)\ScintillaGTKS.obj: ScintillaGTK.cxx
|
||||
|
||||
# All lexers depend on this set of headers
|
||||
LEX_HEADERS=..\include\Platform.h ..\include\PropSet.h \
|
||||
..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h \
|
||||
..\include\Accessor.h ..\include\KeyWords.h \
|
||||
..\include\Scintilla.h ..\include\SciLexer.h ..\src\StyleContext.h
|
||||
|
||||
$(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../src/AutoComplete.h
|
||||
../include/PropSet.h ../src/AutoComplete.h
|
||||
|
||||
$(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/CallTip.h
|
||||
@ -331,7 +333,7 @@ $(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \
|
||||
../src/Document.h ../src/RESearch.h
|
||||
|
||||
$(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../src/SVector.h \
|
||||
../include/PropSet.h ../src/SVector.h \
|
||||
../include/Accessor.h ../src/DocumentAccessor.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/CellBuffer.h ../include/Scintilla.h \
|
||||
../src/CharClassify.h ../src/Document.h
|
||||
@ -341,11 +343,11 @@ $(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintill
|
||||
../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \
|
||||
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
|
||||
../src/Document.h ../src/Editor.h ../src/PositionCache.h
|
||||
../src/Document.h ../src/Editor.h ../src/Selection.h ../src/PositionCache.h
|
||||
|
||||
$(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../include/KeyWords.h ../src/ExternalLexer.h
|
||||
|
||||
$(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \
|
||||
@ -356,7 +358,7 @@ $(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintill
|
||||
../src/KeyMap.h
|
||||
|
||||
$(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
|
||||
#++Autogenerated -- run src/LexGen.py to regenerate
|
||||
@ -530,10 +532,9 @@ $(DIR_O)\PositionCache.obj: ../src/Editor.cxx ../include/Platform.h ../include/S
|
||||
../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \
|
||||
../src/RunStyles.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/Editor.h ../src/PositionCache.h
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h ../src/Selection.h ../src/PositionCache.h
|
||||
|
||||
$(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h
|
||||
$(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h
|
||||
|
||||
$(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h
|
||||
|
||||
@ -542,55 +543,58 @@ $(DIR_O)\RunStyles.obj: ../src/RunStyles.cxx ../include/Platform.h \
|
||||
../src/RunStyles.h
|
||||
|
||||
$(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../include/SString.h \
|
||||
../include/Scintilla.h ../include/PropSet.h \
|
||||
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.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/Document.h \
|
||||
../src/Editor.h ../src/ScintillaBase.h
|
||||
../src/Editor.h ../src/Selection.h ../src/ScintillaBase.h
|
||||
|
||||
$(DIR_O)\ScintillaBaseL.obj: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../include/SString.h \
|
||||
../include/Scintilla.h ../include/PropSet.h \
|
||||
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.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/Document.h \
|
||||
../src/Editor.h ../src/ScintillaBase.h
|
||||
../src/Editor.h ../src/Selection.h ../src/ScintillaBase.h
|
||||
|
||||
$(DIR_O)\ScintillaGTK.obj: ScintillaGTK.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Document.h ../src/Editor.h ../src/ScintillaBase.h \
|
||||
../src/UniConversion.h
|
||||
../src/Selection.h ../src/UniConversion.h
|
||||
|
||||
$(DIR_O)\ScintillaGTKL.obj: ScintillaGTK.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Document.h ../src/Editor.h ../src/ScintillaBase.h \
|
||||
../src/UniConversion.h
|
||||
../src/Selection.h ../src/UniConversion.h
|
||||
|
||||
$(DIR_O)\ScintillaGTKS.obj: ScintillaGTK.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Document.h ../src/Editor.h ../src/ScintillaBase.h \
|
||||
../src/UniConversion.h
|
||||
../src/Selection.h ../src/UniConversion.h
|
||||
|
||||
$(DIR_O)\Selection.obj: ../src/Selection.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Selection.h
|
||||
|
||||
$(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Style.h
|
||||
|
||||
$(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../src/StyleContext.h
|
||||
|
||||
$(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h
|
||||
@ -601,7 +605,7 @@ $(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \
|
||||
../src/Style.h ../src/ViewStyle.h
|
||||
|
||||
$(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/WindowAccessor.h ../include/Scintilla.h
|
||||
|
||||
$(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h
|
||||
|
@ -90,7 +90,11 @@ class Face:
|
||||
elif featureType == "cat":
|
||||
currentCategory = featureVal
|
||||
elif featureType == "val":
|
||||
name, value = featureVal.split("=", 1)
|
||||
try:
|
||||
name, value = featureVal.split("=", 1)
|
||||
except ValueError:
|
||||
print("Failure %s" % featureVal)
|
||||
raise
|
||||
self.features[name] = {
|
||||
"FeatureType": featureType,
|
||||
"Category": currentCategory,
|
||||
|
@ -9,6 +9,29 @@
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
/**
|
||||
*/
|
||||
class WordList {
|
||||
public:
|
||||
// Each word contains at least one character - a empty word acts as sentinel at the end.
|
||||
char **words;
|
||||
char *list;
|
||||
int len;
|
||||
bool onlyLineEnds; ///< Delimited by any white space or only line ends
|
||||
bool sorted;
|
||||
int starts[256];
|
||||
WordList(bool onlyLineEnds_ = false) :
|
||||
words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_),
|
||||
sorted(false)
|
||||
{}
|
||||
~WordList() { Clear(); }
|
||||
operator bool() { return len ? true : false; }
|
||||
void Clear();
|
||||
void Set(const char *s);
|
||||
bool InList(const char *s);
|
||||
bool InListAbbreviated(const char *s, const char marker);
|
||||
};
|
||||
|
||||
typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler);
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
** Interface to platform facilities. Also includes some basic utilities.
|
||||
** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows.
|
||||
**/
|
||||
// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef PLATFORM_H
|
||||
@ -14,16 +14,6 @@
|
||||
// PLAT_WIN = Win32 API on Win32 OS
|
||||
// PLAT_WX is wxWindows on any supported platform
|
||||
|
||||
//*******************************************************//
|
||||
|
||||
// TODO: add your specific platform header here:
|
||||
|
||||
// Win32 example:
|
||||
#include <windows.h>
|
||||
|
||||
//*******************************************************//
|
||||
|
||||
|
||||
#define PLAT_GTK 0
|
||||
#define PLAT_GTK_WIN32 0
|
||||
#define PLAT_MACOSX 0
|
||||
@ -48,7 +38,8 @@
|
||||
#define PLAT_GTK_WIN32 1
|
||||
#endif
|
||||
|
||||
#elif defined(MACOSX)
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
#undef PLAT_MACOSX
|
||||
#define PLAT_MACOSX 1
|
||||
|
||||
@ -292,13 +283,13 @@ public:
|
||||
*/
|
||||
class Font {
|
||||
protected:
|
||||
FontID id;
|
||||
FontID fid;
|
||||
#if PLAT_WX
|
||||
int ascent;
|
||||
#endif
|
||||
// Private so Font objects can not be copied
|
||||
Font(const Font &) {}
|
||||
Font &operator=(const Font &) { id=0; return *this; }
|
||||
Font &operator=(const Font &) { fid=0; return *this; }
|
||||
public:
|
||||
Font();
|
||||
virtual ~Font();
|
||||
@ -307,9 +298,9 @@ public:
|
||||
bool bold, bool italic, bool extraFontFlag=false);
|
||||
virtual void Release();
|
||||
|
||||
FontID GetID() { return id; }
|
||||
FontID GetID() { return fid; }
|
||||
// Alias another font - caller guarantees not to Release
|
||||
void SetID(FontID id_) { id = id_; }
|
||||
void SetID(FontID fid_) { fid = fid_; }
|
||||
friend class Surface;
|
||||
friend class SurfaceImpl;
|
||||
};
|
||||
@ -380,31 +371,31 @@ typedef void (*CallBackAction)(void*);
|
||||
*/
|
||||
class Window {
|
||||
protected:
|
||||
WindowID id;
|
||||
WindowID wid;
|
||||
#if PLAT_MACOSX
|
||||
void *windowRef;
|
||||
void *control;
|
||||
#endif
|
||||
public:
|
||||
Window() : id(0), cursorLast(cursorInvalid) {
|
||||
Window() : wid(0), cursorLast(cursorInvalid) {
|
||||
#if PLAT_MACOSX
|
||||
windowRef = 0;
|
||||
control = 0;
|
||||
#endif
|
||||
}
|
||||
Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {
|
||||
Window(const Window &source) : wid(source.wid), cursorLast(cursorInvalid) {
|
||||
#if PLAT_MACOSX
|
||||
windowRef = 0;
|
||||
control = 0;
|
||||
#endif
|
||||
}
|
||||
virtual ~Window();
|
||||
Window &operator=(WindowID id_) {
|
||||
id = id_;
|
||||
Window &operator=(WindowID wid_) {
|
||||
wid = wid_;
|
||||
return *this;
|
||||
}
|
||||
WindowID GetID() const { return id; }
|
||||
bool Created() const { return id != 0; }
|
||||
WindowID GetID() const { return wid; }
|
||||
bool Created() const { return wid != 0; }
|
||||
void Destroy();
|
||||
bool HasFocus();
|
||||
PRectangle GetPosition();
|
||||
@ -461,10 +452,10 @@ public:
|
||||
* Menu management.
|
||||
*/
|
||||
class Menu {
|
||||
MenuID id;
|
||||
MenuID mid;
|
||||
public:
|
||||
Menu();
|
||||
MenuID GetID() { return id; }
|
||||
MenuID GetID() { return mid; }
|
||||
void CreatePopUp();
|
||||
void Destroy();
|
||||
void Show(Point pt, Window &w);
|
||||
|
@ -1,104 +1,26 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file PropSet.h
|
||||
** A Java style properties file module.
|
||||
** An interface to the methods needed for access to property sets inside lexers.
|
||||
**/
|
||||
// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef PROPSET_H
|
||||
#define PROPSET_H
|
||||
#include "SString.h"
|
||||
|
||||
bool EqualCaseInsensitive(const char *a, const char *b);
|
||||
|
||||
bool isprefix(const char *target, const char *prefix);
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
struct Property {
|
||||
unsigned int hash;
|
||||
char *key;
|
||||
char *val;
|
||||
Property *next;
|
||||
Property() : hash(0), key(0), val(0), next(0) {}
|
||||
};
|
||||
|
||||
/**
|
||||
*/
|
||||
class PropSet {
|
||||
protected:
|
||||
enum { hashRoots=31 };
|
||||
Property *props[hashRoots];
|
||||
Property *enumnext;
|
||||
int enumhash;
|
||||
static unsigned int HashString(const char *s, size_t len) {
|
||||
unsigned int ret = 0;
|
||||
while (len--) {
|
||||
ret <<= 4;
|
||||
ret ^= *s;
|
||||
s++;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
class PropertyGet {
|
||||
public:
|
||||
PropSet *superPS;
|
||||
PropSet();
|
||||
~PropSet();
|
||||
void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1);
|
||||
void Set(const char *keyVal);
|
||||
void Unset(const char *key, int lenKey=-1);
|
||||
void SetMultiple(const char *s);
|
||||
SString Get(const char *key) const;
|
||||
SString GetExpanded(const char *key) const;
|
||||
SString Expand(const char *withVars, int maxExpands=100) const;
|
||||
int GetInt(const char *key, int defaultValue=0) const;
|
||||
void Clear();
|
||||
char *ToString() const; // Caller must delete[] the return value
|
||||
|
||||
private:
|
||||
// copy-value semantics not implemented
|
||||
PropSet(const PropSet ©);
|
||||
void operator=(const PropSet &assign);
|
||||
virtual char *ToString() const=0; // Caller must delete[] the return value
|
||||
virtual int GetInt(const char *key, int defaultValue=0) const=0;
|
||||
virtual ~PropertyGet() {}
|
||||
};
|
||||
|
||||
/**
|
||||
*/
|
||||
class WordList {
|
||||
public:
|
||||
// Each word contains at least one character - a empty word acts as sentinel at the end.
|
||||
char **words;
|
||||
char *list;
|
||||
int len;
|
||||
bool onlyLineEnds; ///< Delimited by any white space or only line ends
|
||||
bool sorted;
|
||||
int starts[256];
|
||||
WordList(bool onlyLineEnds_ = false) :
|
||||
words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_),
|
||||
sorted(false)
|
||||
{}
|
||||
~WordList() { Clear(); }
|
||||
operator bool() { return len ? true : false; }
|
||||
void Clear();
|
||||
void Set(const char *s);
|
||||
bool InList(const char *s);
|
||||
bool InListAbbreviated(const char *s, const char marker);
|
||||
};
|
||||
|
||||
inline bool IsAlphabetic(unsigned int ch) {
|
||||
return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z'));
|
||||
}
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Visual C++ doesn't like the private copy idiom for disabling
|
||||
// the default copy constructor and operator=, but it's fine.
|
||||
#pragma warning(disable: 4511 4512)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -118,7 +118,6 @@
|
||||
#define SCLEX_AUTOMATIC 1000
|
||||
|
||||
//For All lexer
|
||||
//#define SCE_UNIVERSAL_SELECT_STYLE 30
|
||||
#define SCE_UNIVERSAL_FOUND_STYLE 31
|
||||
#define SCE_UNIVERSAL_FOUND_STYLE_2 29
|
||||
#define SCE_UNIVERSAL_FOUND_STYLE_INC 28
|
||||
@ -184,6 +183,11 @@
|
||||
#define SCE_D_COMMENTLINEDOC 15
|
||||
#define SCE_D_COMMENTDOCKEYWORD 16
|
||||
#define SCE_D_COMMENTDOCKEYWORDERROR 17
|
||||
#define SCE_D_STRINGB 18
|
||||
#define SCE_D_STRINGR 19
|
||||
#define SCE_D_WORD5 20
|
||||
#define SCE_D_WORD6 21
|
||||
#define SCE_D_WORD7 22
|
||||
|
||||
#define SCE_SEARCHRESULT_DEFAULT 0
|
||||
#define SCE_SEARCHRESULT_SEARCH_HEADER 1
|
||||
@ -980,6 +984,7 @@
|
||||
#define SCE_CAML_OPERATOR 7
|
||||
#define SCE_CAML_NUMBER 8
|
||||
#define SCE_CAML_CHAR 9
|
||||
#define SCE_CAML_WHITE 10
|
||||
#define SCE_CAML_STRING 11
|
||||
#define SCE_CAML_COMMENT 12
|
||||
#define SCE_CAML_COMMENT1 13
|
||||
@ -1317,6 +1322,7 @@
|
||||
#define SCE_MYSQL_USER1 18
|
||||
#define SCE_MYSQL_USER2 19
|
||||
#define SCE_MYSQL_USER3 20
|
||||
#define SCE_MYSQL_HIDDENCOMMAND 21
|
||||
#define SCE_PO_DEFAULT 0
|
||||
#define SCE_PO_COMMENT 1
|
||||
#define SCE_PO_MSGID 2
|
||||
@ -1383,8 +1389,6 @@
|
||||
#define SCE_SML_COMMENT1 13
|
||||
#define SCE_SML_COMMENT2 14
|
||||
#define SCE_SML_COMMENT3 15
|
||||
#define SCLEX_ASP 29
|
||||
#define SCLEX_PHP 30
|
||||
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
|
||||
|
||||
#endif
|
||||
|
@ -26,7 +26,7 @@ int Scintilla_LinkLexers();
|
||||
* hold a pointer and sptr_t, a signed integer large enough to hold a pointer.
|
||||
* May need to be changed for 64 bit platforms. */
|
||||
#if defined(_WIN32)
|
||||
#include <BaseTsd.h>
|
||||
#include <basetsd.h>
|
||||
#endif
|
||||
#ifdef MAXULONG_PTR
|
||||
typedef ULONG_PTR uptr_t;
|
||||
@ -120,6 +120,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SC_MARK_FULLRECT 26
|
||||
#define SC_MARK_LEFTRECT 27
|
||||
#define SC_MARK_AVAILABLE 28
|
||||
#define SC_MARK_UNDERLINE 29
|
||||
#define SC_MARK_CHARACTER 10000
|
||||
#define SC_MARKNUM_FOLDEREND 25
|
||||
#define SC_MARKNUM_FOLDEROPENMID 26
|
||||
@ -251,8 +252,10 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_INDICGETFORE 2083
|
||||
#define SCI_INDICSETUNDER 2510
|
||||
#define SCI_INDICGETUNDER 2511
|
||||
|
||||
#define SCI_GETCARETLINEVISIBLEALWAYS 3095
|
||||
#define SCI_SETCARETLINEVISIBLEALWAYS 3096
|
||||
|
||||
#define SCI_SETWHITESPACEFORE 2084
|
||||
#define SCI_SETWHITESPACEBACK 2085
|
||||
#define SCI_SETSTYLEBITS 2090
|
||||
@ -445,6 +448,11 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_GETWRAPVISUALFLAGSLOCATION 2463
|
||||
#define SCI_SETWRAPSTARTINDENT 2464
|
||||
#define SCI_GETWRAPSTARTINDENT 2465
|
||||
#define SC_WRAPINDENT_FIXED 0
|
||||
#define SC_WRAPINDENT_SAME 1
|
||||
#define SC_WRAPINDENT_INDENT 2
|
||||
#define SCI_SETWRAPINDENTMODE 2472
|
||||
#define SCI_GETWRAPINDENTMODE 2473
|
||||
#define SC_CACHE_NONE 0
|
||||
#define SC_CACHE_CARET 1
|
||||
#define SC_CACHE_PAGE 2
|
||||
@ -560,6 +568,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_GETMODEVENTMASK 2378
|
||||
#define SCI_SETFOCUS 2380
|
||||
#define SCI_GETFOCUS 2381
|
||||
#define SC_STATUS_OK 0
|
||||
#define SC_STATUS_FAILURE 1
|
||||
#define SC_STATUS_BADALLOC 2
|
||||
#define SCI_SETSTATUS 2382
|
||||
#define SCI_GETSTATUS 2383
|
||||
#define SCI_SETMOUSEDOWNCAPTURES 2384
|
||||
@ -610,6 +621,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SC_SEL_STREAM 0
|
||||
#define SC_SEL_RECTANGLE 1
|
||||
#define SC_SEL_LINES 2
|
||||
#define SC_SEL_THIN 3
|
||||
#define SCI_SETSELECTIONMODE 2422
|
||||
#define SCI_GETSELECTIONMODE 2423
|
||||
#define SCI_GETLINESELSTARTPOSITION 2424
|
||||
@ -704,6 +716,55 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_ANNOTATIONGETSTYLEOFFSET 2551
|
||||
#define UNDO_MAY_COALESCE 1
|
||||
#define SCI_ADDUNDOACTION 2560
|
||||
#define SCI_CHARPOSITIONFROMPOINT 2561
|
||||
#define SCI_CHARPOSITIONFROMPOINTCLOSE 2562
|
||||
#define SCI_SETMULTIPLESELECTION 2563
|
||||
#define SCI_GETMULTIPLESELECTION 2564
|
||||
#define SCI_SETADDITIONALSELECTIONTYPING 2565
|
||||
#define SCI_GETADDITIONALSELECTIONTYPING 2566
|
||||
#define SCI_SETADDITIONALCARETSBLINK 2567
|
||||
#define SCI_GETADDITIONALCARETSBLINK 2568
|
||||
#define SCI_GETSELECTIONS 2570
|
||||
#define SCI_CLEARSELECTIONS 2571
|
||||
#define SCI_SETSELECTION 2572
|
||||
#define SCI_ADDSELECTION 2573
|
||||
#define SCI_SETMAINSELECTION 2574
|
||||
#define SCI_GETMAINSELECTION 2575
|
||||
#define SCI_SETSELECTIONNCARET 2576
|
||||
#define SCI_GETSELECTIONNCARET 2577
|
||||
#define SCI_SETSELECTIONNANCHOR 2578
|
||||
#define SCI_GETSELECTIONNANCHOR 2579
|
||||
#define SCI_SETSELECTIONNCARETVIRTUALSPACE 2580
|
||||
#define SCI_GETSELECTIONNCARETVIRTUALSPACE 2581
|
||||
#define SCI_SETSELECTIONNANCHORVIRTUALSPACE 2582
|
||||
#define SCI_GETSELECTIONNANCHORVIRTUALSPACE 2583
|
||||
#define SCI_SETSELECTIONNSTART 2584
|
||||
#define SCI_GETSELECTIONNSTART 2585
|
||||
#define SCI_SETSELECTIONNEND 2586
|
||||
#define SCI_GETSELECTIONNEND 2587
|
||||
#define SCI_SETRECTANGULARSELECTIONCARET 2588
|
||||
#define SCI_GETRECTANGULARSELECTIONCARET 2589
|
||||
#define SCI_SETRECTANGULARSELECTIONANCHOR 2590
|
||||
#define SCI_GETRECTANGULARSELECTIONANCHOR 2591
|
||||
#define SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE 2592
|
||||
#define SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE 2593
|
||||
#define SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2594
|
||||
#define SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2595
|
||||
#define SCVS_NONE 0
|
||||
#define SCVS_RECTANGULARSELECTION 1
|
||||
#define SCVS_USERACCESSIBLE 2
|
||||
#define SCI_SETVIRTUALSPACEOPTIONS 2596
|
||||
#define SCI_GETVIRTUALSPACEOPTIONS 2597
|
||||
#define SCI_SETRECTANGULARSELECTIONMODIFIER 2598
|
||||
#define SCI_GETRECTANGULARSELECTIONMODIFIER 2599
|
||||
#define SCI_SETADDITIONALSELFORE 2600
|
||||
#define SCI_SETADDITIONALSELBACK 2601
|
||||
#define SCI_SETADDITIONALSELALPHA 2602
|
||||
#define SCI_GETADDITIONALSELALPHA 2603
|
||||
#define SCI_SETADDITIONALCARETFORE 2604
|
||||
#define SCI_GETADDITIONALCARETFORE 2605
|
||||
#define SCI_ROTATESELECTION 2606
|
||||
#define SCI_SWAPMAINANCHORCARET 2607
|
||||
#define SCI_STARTRECORD 3001
|
||||
#define SCI_STOPRECORD 3002
|
||||
#define SCI_SETLEXER 4001
|
||||
@ -766,6 +827,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCMOD_SHIFT 1
|
||||
#define SCMOD_CTRL 2
|
||||
#define SCMOD_ALT 4
|
||||
#define SCMOD_SUPER 8
|
||||
#define SCN_STYLENEEDED 2000
|
||||
#define SCN_CHARADDED 2001
|
||||
#define SCN_SAVEPOINTREACHED 2002
|
||||
@ -804,38 +866,44 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
struct CharacterRange {
|
||||
struct Sci_CharacterRange {
|
||||
long cpMin;
|
||||
long cpMax;
|
||||
};
|
||||
|
||||
struct TextRange {
|
||||
struct CharacterRange chrg;
|
||||
struct Sci_TextRange {
|
||||
struct Sci_CharacterRange chrg;
|
||||
char *lpstrText;
|
||||
};
|
||||
|
||||
struct TextToFind {
|
||||
struct CharacterRange chrg;
|
||||
struct Sci_TextToFind {
|
||||
struct Sci_CharacterRange chrg;
|
||||
char *lpstrText;
|
||||
struct CharacterRange chrgText;
|
||||
struct Sci_CharacterRange chrgText;
|
||||
};
|
||||
|
||||
#define CharacterRange Sci_CharacterRange
|
||||
#define TextRange Sci_TextRange
|
||||
#define TextToFind Sci_TextToFind
|
||||
|
||||
#ifdef PLATFORM_H
|
||||
|
||||
/* This structure is used in printing and requires some of the graphics types
|
||||
* from Platform.h. Not needed by most client code. */
|
||||
|
||||
struct RangeToFormat {
|
||||
struct Sci_RangeToFormat {
|
||||
SurfaceID hdc;
|
||||
SurfaceID hdcTarget;
|
||||
PRectangle rc;
|
||||
PRectangle rcPage;
|
||||
CharacterRange chrg;
|
||||
Sci_CharacterRange chrg;
|
||||
};
|
||||
|
||||
#define RangeToFormat Sci_RangeToFormat
|
||||
|
||||
#endif
|
||||
|
||||
struct NotifyHeader {
|
||||
struct Sci_NotifyHeader {
|
||||
/* Compatible with Windows NMHDR.
|
||||
* hwndFrom is really an environment specific window handle or pointer
|
||||
* but most clients of Scintilla.h do not have this type visible. */
|
||||
@ -844,13 +912,15 @@ struct NotifyHeader {
|
||||
unsigned int code;
|
||||
};
|
||||
|
||||
#define NotifyHeader Sci_NotifyHeader
|
||||
|
||||
struct SCNotification {
|
||||
struct NotifyHeader nmhdr;
|
||||
struct Sci_NotifyHeader nmhdr;
|
||||
int position; /* SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND */
|
||||
int ch; /* SCN_CHARADDED, SCN_KEY */
|
||||
int modifiers; /* SCN_KEY */
|
||||
int modificationType; /* SCN_MODIFIED */
|
||||
const char *text; // SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */
|
||||
const char *text; /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */
|
||||
int length; /* SCN_MODIFIED */
|
||||
int linesAdded; /* SCN_MODIFIED */
|
||||
int message; /* SCN_MACRORECORD */
|
||||
@ -881,26 +951,4 @@ struct SearchResultMarkings {
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Deprecation section listing all API features that are deprecated and
|
||||
* will be removed completely in a future version.
|
||||
* To enable these features define INCLUDE_DEPRECATED_FEATURES */
|
||||
|
||||
#ifdef INCLUDE_DEPRECATED_FEATURES
|
||||
|
||||
#define SCI_SETCARETPOLICY 2369
|
||||
#define CARET_CENTER 0x02
|
||||
#define CARET_XEVEN 0x08
|
||||
#define CARET_XJUMPS 0x10
|
||||
|
||||
#define SC_FOLDFLAG_BOX 0x0001
|
||||
#define SC_FOLDLEVELBOXHEADERFLAG 0x4000
|
||||
#define SC_FOLDLEVELBOXFOOTERFLAG 0x8000
|
||||
#define SC_FOLDLEVELCONTRACTED 0x10000
|
||||
#define SC_FOLDLEVELUNINDENT 0x20000
|
||||
|
||||
#define SCN_POSCHANGED 2012
|
||||
#define SCN_CHECKBRACE 2007
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -270,6 +270,7 @@ val SC_MARK_PIXMAP=25
|
||||
val SC_MARK_FULLRECT=26
|
||||
val SC_MARK_LEFTRECT=27
|
||||
val SC_MARK_AVAILABLE=28
|
||||
val SC_MARK_UNDERLINE=29
|
||||
|
||||
val SC_MARK_CHARACTER=10000
|
||||
|
||||
@ -476,10 +477,10 @@ set void StyleSetCharacterSet=2066(int style, int characterSet)
|
||||
# Set a style to be a hotspot or not.
|
||||
set void StyleSetHotSpot=2409(int style, bool hotspot)
|
||||
|
||||
# Set the foreground colour of the selection and whether to use this setting.
|
||||
# Set the foreground colour of the main and additional selections and whether to use this setting.
|
||||
fun void SetSelFore=2067(bool useSetting, colour fore)
|
||||
|
||||
# Set the background colour of the selection and whether to use this setting.
|
||||
# Set the background colour of the main and additional selections and whether to use this setting.
|
||||
fun void SetSelBack=2068(bool useSetting, colour back)
|
||||
|
||||
# Get the alpha of the selection.
|
||||
@ -1130,6 +1131,17 @@ set void SetWrapStartIndent=2464(int indent,)
|
||||
# Retrive the start indent for wrapped lines.
|
||||
get int GetWrapStartIndent=2465(,)
|
||||
|
||||
enu WrapIndentMode=SC_WRAPINDENT_
|
||||
val SC_WRAPINDENT_FIXED=0
|
||||
val SC_WRAPINDENT_SAME=1
|
||||
val SC_WRAPINDENT_INDENT=2
|
||||
|
||||
# Sets how wrapped sublines are placed. Default is fixed.
|
||||
set void SetWrapIndentMode=2472(int mode,)
|
||||
|
||||
# Retrieve how wrapped sublines are placed. Default is fixed.
|
||||
get int GetWrapIndentMode=2473(,)
|
||||
|
||||
enu LineCache=SC_CACHE_
|
||||
val SC_CACHE_NONE=0
|
||||
val SC_CACHE_CARET=1
|
||||
@ -1476,6 +1488,11 @@ set void SetFocus=2380(bool focus,)
|
||||
# Get internal focus flag.
|
||||
get bool GetFocus=2381(,)
|
||||
|
||||
enu Status=SC_STATUS_
|
||||
val SC_STATUS_OK=0
|
||||
val SC_STATUS_FAILURE=1
|
||||
val SC_STATUS_BADALLOC=2
|
||||
|
||||
# Change error status - 0 = OK.
|
||||
set void SetStatus=2382(int statusCode,)
|
||||
# Get error status.
|
||||
@ -1620,8 +1637,9 @@ enu SelectionMode=SC_SEL_
|
||||
val SC_SEL_STREAM=0
|
||||
val SC_SEL_RECTANGLE=1
|
||||
val SC_SEL_LINES=2
|
||||
val SC_SEL_THIN=3
|
||||
|
||||
# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or
|
||||
# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or
|
||||
# by lines (SC_SEL_LINES).
|
||||
set void SetSelectionMode=2422(int mode,)
|
||||
|
||||
@ -1902,6 +1920,123 @@ val UNDO_MAY_COALESCE=1
|
||||
# Add a container action to the undo stack
|
||||
fun void AddUndoAction=2560(int token, int flags)
|
||||
|
||||
# Find the position of a character from a point within the window.
|
||||
fun position CharPositionFromPoint=2561(int x, int y)
|
||||
|
||||
# Find the position of a character from a point within the window.
|
||||
# Return INVALID_POSITION if not close to text.
|
||||
fun position CharPositionFromPointClose=2562(int x, int y)
|
||||
|
||||
# Set whether multiple selections can be made
|
||||
set void SetMultipleSelection=2563(bool multipleSelection,)
|
||||
|
||||
# Whether multiple selections can be made
|
||||
get bool GetMultipleSelection=2564(,)
|
||||
|
||||
# Set whether typing can be performed into multiple selections
|
||||
set void SetAdditionalSelectionTyping=2565(bool additionalSelectionTyping,)
|
||||
|
||||
# Whether typing can be performed into multiple selections
|
||||
get bool GetAdditionalSelectionTyping=2566(,)
|
||||
|
||||
# Set whether additional carets will blink
|
||||
set void SetAdditionalCaretsBlink=2567(bool additionalCaretsBlink,)
|
||||
|
||||
# Whether additional carets will blink
|
||||
get bool GetAdditionalCaretsBlink=2568(,)
|
||||
|
||||
# How many selections are there?
|
||||
get int GetSelections=2570(,)
|
||||
|
||||
# Clear selections to a single empty stream selection
|
||||
fun void ClearSelections=2571(,)
|
||||
|
||||
# Set a simple selection
|
||||
fun int SetSelection=2572(int caret,int anchor)
|
||||
|
||||
# Add a selection
|
||||
fun int AddSelection=2573(int caret,int anchor)
|
||||
|
||||
# Set the main selection
|
||||
set void SetMainSelection=2574(int selection,)
|
||||
|
||||
# Which selection is the main selection
|
||||
get int GetMainSelection=2575(,)
|
||||
|
||||
set void SetSelectionNCaret=2576(int selection, position pos)
|
||||
get position GetSelectionNCaret=2577(int selection,)
|
||||
set void SetSelectionNAnchor=2578(int selection, position posAnchor)
|
||||
get position GetSelectionNAnchor=2579(int selection,)
|
||||
set void SetSelectionNCaretVirtualSpace=2580(int selection, int space)
|
||||
get int GetSelectionNCaretVirtualSpace=2581(int selection,)
|
||||
set void SetSelectionNAnchorVirtualSpace=2582(int selection, int space)
|
||||
get int GetSelectionNAnchorVirtualSpace=2583(int selection,)
|
||||
|
||||
# Sets the position that starts the selection - this becomes the anchor.
|
||||
set void SetSelectionNStart=2584(int selection, position pos)
|
||||
|
||||
# Returns the position at the start of the selection.
|
||||
get position GetSelectionNStart=2585(,)
|
||||
|
||||
# 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(,)
|
||||
|
||||
set void SetRectangularSelectionCaret=2588(position pos,)
|
||||
get position GetRectangularSelectionCaret=2589(,)
|
||||
set void SetRectangularSelectionAnchor=2590(position posAnchor,)
|
||||
get position GetRectangularSelectionAnchor=2591(,)
|
||||
set void SetRectangularSelectionCaretVirtualSpace=2592(int space,)
|
||||
get int GetRectangularSelectionCaretVirtualSpace=2593(,)
|
||||
set void SetRectangularSelectionAnchorVirtualSpace=2594(int space,)
|
||||
get int GetRectangularSelectionAnchorVirtualSpace=2595(,)
|
||||
|
||||
enu VirtualSpace=SCVS_
|
||||
val SCVS_NONE=0
|
||||
val SCVS_RECTANGULARSELECTION=1
|
||||
val SCVS_USERACCESSIBLE=2
|
||||
|
||||
set void SetVirtualSpaceOptions=2596(int virtualSpaceOptions,)
|
||||
get int GetVirtualSpaceOptions=2597(,)
|
||||
|
||||
# On GTK+, allow selecting the modifier key to use for mouse-based
|
||||
# rectangular selection. Often the window manager requires Alt+Mouse Drag
|
||||
# for moving windows.
|
||||
# Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER.
|
||||
|
||||
set void SetRectangularSelectionModifier=2598(int modifier,)
|
||||
|
||||
# Get the modifier key used for rectangular selection.
|
||||
get int GetRectangularSelectionModifier=2599(,)
|
||||
|
||||
# Set the foreground colour of additional selections.
|
||||
# Must have previously called SetSelFore with non-zero first argument for this to have an effect.
|
||||
set void SetAdditionalSelFore=2600(colour fore,)
|
||||
|
||||
# Set the background colour of additional selections.
|
||||
# Must have previously called SetSelBack with non-zero first argument for this to have an effect.
|
||||
set void SetAdditionalSelBack=2601(colour back,)
|
||||
|
||||
# Set the alpha of the selection.
|
||||
set void SetAdditionalSelAlpha=2602(int alpha,)
|
||||
|
||||
# Get the alpha of the selection.
|
||||
get int GetAdditionalSelAlpha=2603(,)
|
||||
|
||||
# Set the foreground colour of additional carets.
|
||||
set void SetAdditionalCaretFore=2604(colour fore,)
|
||||
|
||||
# Get the foreground colour of additional carets.
|
||||
get colour GetAdditionalCaretFore=2605(,)
|
||||
|
||||
# Set the main selection to the next selection.
|
||||
fun void RotateSelection=2606(,)
|
||||
|
||||
# Swap that caret and anchor of the main selection.
|
||||
fun void SwapMainAnchorCaret=2607(,)
|
||||
|
||||
# Start notifying the container of all key presses and commands.
|
||||
fun void StartRecord=3001(,)
|
||||
|
||||
@ -2011,6 +2146,7 @@ val SCMOD_NORM=0
|
||||
val SCMOD_SHIFT=1
|
||||
val SCMOD_CTRL=2
|
||||
val SCMOD_ALT=4
|
||||
val SCMOD_SUPER=8
|
||||
|
||||
################################################
|
||||
# For SciLexer.h
|
||||
@ -2177,6 +2313,11 @@ val SCE_D_IDENTIFIER=14
|
||||
val SCE_D_COMMENTLINEDOC=15
|
||||
val SCE_D_COMMENTDOCKEYWORD=16
|
||||
val SCE_D_COMMENTDOCKEYWORDERROR=17
|
||||
val SCE_D_STRINGB=18
|
||||
val SCE_D_STRINGR=19
|
||||
val SCE_D_WORD5=20
|
||||
val SCE_D_WORD6=21
|
||||
val SCE_D_WORD7=22
|
||||
# Lexical states for SCLEX_TCL
|
||||
lex TCL=SCLEX_TCL SCE_TCL_
|
||||
val SCE_TCL_DEFAULT=0
|
||||
@ -3061,6 +3202,7 @@ val SCE_CAML_LINENUM=6
|
||||
val SCE_CAML_OPERATOR=7
|
||||
val SCE_CAML_NUMBER=8
|
||||
val SCE_CAML_CHAR=9
|
||||
val SCE_CAML_WHITE=10
|
||||
val SCE_CAML_STRING=11
|
||||
val SCE_CAML_COMMENT=12
|
||||
val SCE_CAML_COMMENT1=13
|
||||
@ -3438,6 +3580,7 @@ val SCE_MYSQL_QUOTEDIDENTIFIER=17
|
||||
val SCE_MYSQL_USER1=18
|
||||
val SCE_MYSQL_USER2=19
|
||||
val SCE_MYSQL_USER3=20
|
||||
val SCE_MYSQL_HIDDENCOMMAND=21
|
||||
# Lexical state for SCLEX_PO
|
||||
lex Po=SCLEX_PO SCE_PO_
|
||||
val SCE_PO_DEFAULT=0
|
||||
@ -3544,26 +3687,3 @@ evt void IndicatorClick=2023(int modifiers, int position)
|
||||
evt void IndicatorRelease=2024(int modifiers, int position)
|
||||
evt void AutoCCancelled=2025(void)
|
||||
evt void AutoCCharDeleted=2026(void)
|
||||
|
||||
cat Deprecated
|
||||
|
||||
# CARET_POLICY changed in 1.47
|
||||
fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
|
||||
val CARET_CENTER=0x02
|
||||
val CARET_XEVEN=0x08
|
||||
val CARET_XJUMPS=0x10
|
||||
|
||||
# The old name for SCN_UPDATEUI
|
||||
val SCN_CHECKBRACE=2007
|
||||
evt void PosChanged=2012(int position)
|
||||
|
||||
# Box folding support
|
||||
val SC_FOLDFLAG_BOX=0x0001
|
||||
val SC_FOLDLEVELBOXHEADERFLAG=0x4000
|
||||
val SC_FOLDLEVELBOXFOOTERFLAG=0x8000
|
||||
val SC_FOLDLEVELCONTRACTED=0x10000
|
||||
val SC_FOLDLEVELUNINDENT=0x20000
|
||||
|
||||
# SCLEX_HTML should be used in preference to these.
|
||||
val SCLEX_ASP=29
|
||||
val SCLEX_PHP=30
|
||||
|
@ -12,13 +12,14 @@ namespace Scintilla {
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
class WindowAccessor : public Accessor {
|
||||
// Private so WindowAccessor objects can not be copied
|
||||
WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {}
|
||||
WindowAccessor &operator=(const WindowAccessor &) { return *this; }
|
||||
protected:
|
||||
WindowID id;
|
||||
PropSet &props;
|
||||
PropertyGet &props;
|
||||
int lenDoc;
|
||||
|
||||
char styleBuf[bufferSize];
|
||||
@ -30,7 +31,7 @@ protected:
|
||||
bool InternalIsLeadByte(char ch);
|
||||
void Fill(int position);
|
||||
public:
|
||||
WindowAccessor(WindowID id_, PropSet &props_) :
|
||||
WindowAccessor(WindowID id_, PropertyGet &props_) :
|
||||
Accessor(), id(id_), props(props_),
|
||||
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "CharClassify.h"
|
||||
#include "AutoComplete.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
|
@ -256,9 +256,8 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,
|
||||
clickPlace = 0;
|
||||
if (val)
|
||||
delete []val;
|
||||
val = 0;
|
||||
val = new char[strlen(defn) + 1];
|
||||
if (!val)
|
||||
return PRectangle();
|
||||
strcpy(val, defn);
|
||||
codePage = codePage_;
|
||||
Surface *surfaceMeasure = Surface::Allocate();
|
||||
|
@ -21,7 +21,7 @@
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
LineVector::LineVector() : starts(256) {
|
||||
LineVector::LineVector() : starts(256), perLine(0) {
|
||||
Init();
|
||||
}
|
||||
|
||||
@ -31,6 +31,9 @@ LineVector::~LineVector() {
|
||||
|
||||
void LineVector::Init() {
|
||||
starts.DeleteAll();
|
||||
if (perLine) {
|
||||
perLine->Init();
|
||||
}
|
||||
}
|
||||
|
||||
void LineVector::SetPerLine(PerLine *pl) {
|
||||
@ -59,7 +62,7 @@ void LineVector::RemoveLine(int line) {
|
||||
}
|
||||
}
|
||||
|
||||
int LineVector::LineFromPosition(int pos) {
|
||||
int LineVector::LineFromPosition(int pos) const {
|
||||
return starts.PartitionFromPosition(pos);
|
||||
}
|
||||
|
||||
@ -147,8 +150,6 @@ void UndoHistory::EnsureUndoRoom() {
|
||||
// Run out of undo nodes so extend the array
|
||||
int lenActionsNew = lenActions * 2;
|
||||
Action *actionsNew = new Action[lenActionsNew];
|
||||
if (!actionsNew)
|
||||
return;
|
||||
for (int act = 0; act <= currentAction; act++)
|
||||
actionsNew[act].Grab(&actions[act]);
|
||||
delete []actions;
|
||||
|
@ -16,6 +16,7 @@ namespace Scintilla {
|
||||
class PerLine {
|
||||
public:
|
||||
virtual ~PerLine() {}
|
||||
virtual void Init()=0;
|
||||
virtual void InsertLine(int)=0;
|
||||
virtual void RemoveLine(int)=0;
|
||||
};
|
||||
@ -42,7 +43,7 @@ public:
|
||||
int Lines() const {
|
||||
return starts.Partitions();
|
||||
}
|
||||
int LineFromPosition(int pos);
|
||||
int LineFromPosition(int pos) const;
|
||||
int LineStart(int line) const {
|
||||
return starts.PositionFromPartition(line);
|
||||
}
|
||||
@ -157,7 +158,7 @@ public:
|
||||
void SetPerLine(PerLine *pl);
|
||||
int Lines() const;
|
||||
int LineStart(int line) const;
|
||||
int LineFromPosition(int pos) { return lv.LineFromPosition(pos); }
|
||||
int LineFromPosition(int pos) const { return lv.LineFromPosition(pos); }
|
||||
void InsertLine(int line, int position);
|
||||
void RemoveLine(int line);
|
||||
const char *InsertString(int position, const char *s, int insertLength, bool &startSequence);
|
||||
|
@ -5,6 +5,7 @@
|
||||
// Copyright 2006 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "CharClassify.h"
|
||||
@ -41,3 +42,37 @@ void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int CompareCaseInsensitive(const char *a, const char *b) {
|
||||
while (*a && *b) {
|
||||
if (*a != *b) {
|
||||
char upperA = MakeUpperCase(*a);
|
||||
char upperB = MakeUpperCase(*b);
|
||||
if (upperA != upperB)
|
||||
return upperA - upperB;
|
||||
}
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
// Either *a or *b is nul
|
||||
return *a - *b;
|
||||
}
|
||||
|
||||
int CompareNCaseInsensitive(const char *a, const char *b, size_t len) {
|
||||
while (*a && *b && len) {
|
||||
if (*a != *b) {
|
||||
char upperA = MakeUpperCase(*a);
|
||||
char upperB = MakeUpperCase(*b);
|
||||
if (upperA != upperB)
|
||||
return upperA - upperB;
|
||||
}
|
||||
a++;
|
||||
b++;
|
||||
len--;
|
||||
}
|
||||
if (len == 0)
|
||||
return 0;
|
||||
else
|
||||
// Either *a or *b is nul
|
||||
return *a - *b;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/** @file CharClassify.h
|
||||
** Character classifications used by Document and RESearch.
|
||||
**/
|
||||
// Copyright 2006 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Copyright 2006-2009 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef CHARCLASSIFY_H
|
||||
@ -22,4 +22,16 @@ private:
|
||||
enum { maxChar=256 };
|
||||
unsigned char charClass[maxChar]; // not type cc to save space
|
||||
};
|
||||
|
||||
// These functions are implemented because each platform calls them something different.
|
||||
int CompareCaseInsensitive(const char *a, const char *b);
|
||||
int CompareNCaseInsensitive(const char *a, const char *b, size_t len);
|
||||
|
||||
inline char MakeUpperCase(char ch) {
|
||||
if (ch < 'a' || ch > 'z')
|
||||
return ch;
|
||||
else
|
||||
return static_cast<char>(ch - 'a' + 'A');
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -100,6 +100,13 @@ Document::~Document() {
|
||||
regex = 0;
|
||||
}
|
||||
|
||||
void Document::Init() {
|
||||
for (int j=0; j<ldSize; j++) {
|
||||
if (perLineData[j])
|
||||
perLineData[j]->Init();
|
||||
}
|
||||
}
|
||||
|
||||
void Document::InsertLine(int line) {
|
||||
for (int j=0; j<ldSize; j++) {
|
||||
if (perLineData[j])
|
||||
@ -202,15 +209,19 @@ int Document::LineEnd(int line) const {
|
||||
}
|
||||
}
|
||||
|
||||
int Document::LineFromPosition(int pos) {
|
||||
int Document::LineFromPosition(int pos) const {
|
||||
return cb.LineFromPosition(pos);
|
||||
}
|
||||
|
||||
int Document::LineEndPosition(int position) {
|
||||
int Document::LineEndPosition(int position) const {
|
||||
return LineEnd(LineFromPosition(position));
|
||||
}
|
||||
|
||||
int Document::VCHomePosition(int position) {
|
||||
bool Document::IsLineEndPosition(int position) const {
|
||||
return LineEnd(LineFromPosition(position)) == position;
|
||||
}
|
||||
|
||||
int Document::VCHomePosition(int position) const {
|
||||
int line = LineFromPosition(position);
|
||||
int startPosition = LineStart(line);
|
||||
int endLine = LineEnd(line);
|
||||
@ -750,10 +761,9 @@ void Document::SetLineIndentation(int line, int indent) {
|
||||
CreateIndentation(linebuf, sizeof(linebuf), indent, tabInChars, !useTabs);
|
||||
int thisLineStart = LineStart(line);
|
||||
int indentPos = GetLineIndentPosition(line);
|
||||
BeginUndoAction();
|
||||
UndoGroup ug(this);
|
||||
DeleteChars(thisLineStart, indentPos - thisLineStart);
|
||||
InsertCString(thisLineStart, linebuf);
|
||||
EndUndoAction();
|
||||
}
|
||||
}
|
||||
|
||||
@ -860,7 +870,7 @@ char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int e
|
||||
}
|
||||
|
||||
void Document::ConvertLineEnds(int eolModeSet) {
|
||||
BeginUndoAction();
|
||||
UndoGroup ug(this);
|
||||
|
||||
for (int pos = 0; pos < Length(); pos++) {
|
||||
if (cb.CharAt(pos) == '\r') {
|
||||
@ -895,7 +905,6 @@ void Document::ConvertLineEnds(int eolModeSet) {
|
||||
}
|
||||
}
|
||||
|
||||
EndUndoAction();
|
||||
}
|
||||
|
||||
bool Document::IsWhiteLine(int line) const {
|
||||
@ -1058,16 +1067,6 @@ bool Document::IsWordAt(int start, int end) {
|
||||
return IsWordStartAt(start) && IsWordEndAt(end);
|
||||
}
|
||||
|
||||
// The comparison and case changing functions here assume ASCII
|
||||
// or extended ASCII such as the normal Windows code page.
|
||||
|
||||
static inline char MakeUpperCase(char ch) {
|
||||
if (ch < 'a' || ch > 'z')
|
||||
return ch;
|
||||
else
|
||||
return static_cast<char>(ch - 'a' + 'A');
|
||||
}
|
||||
|
||||
static inline char MakeLowerCase(char ch) {
|
||||
if (ch < 'A' || ch > 'Z')
|
||||
return ch;
|
||||
@ -1367,8 +1366,6 @@ bool Document::AddWatcher(DocWatcher *watcher, void *userData) {
|
||||
return false;
|
||||
}
|
||||
WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers + 1];
|
||||
if (!pwNew)
|
||||
return false;
|
||||
for (int j = 0; j < lenWatchers; j++)
|
||||
pwNew[j] = watchers[j];
|
||||
pwNew[lenWatchers].watcher = watcher;
|
||||
@ -1389,8 +1386,6 @@ bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) {
|
||||
lenWatchers = 0;
|
||||
} else {
|
||||
WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers];
|
||||
if (!pwNew)
|
||||
return false;
|
||||
for (int j = 0; j < lenWatchers - 1; j++) {
|
||||
pwNew[j] = (j < i) ? watchers[j] : watchers[j + 1];
|
||||
}
|
||||
@ -1751,8 +1746,6 @@ const char *BuiltinRegex::SubstituteByPosition(Document* doc, const char *text,
|
||||
}
|
||||
}
|
||||
substituted = new char[lenResult + 1];
|
||||
if (!substituted)
|
||||
return 0;
|
||||
char *o = substituted;
|
||||
for (int j = 0; j < *length; j++) {
|
||||
if (text[j] == '\\') {
|
||||
|
@ -175,10 +175,11 @@ public:
|
||||
int AddRef();
|
||||
int Release();
|
||||
|
||||
virtual void Init();
|
||||
virtual void InsertLine(int line);
|
||||
virtual void RemoveLine(int line);
|
||||
|
||||
int LineFromPosition(int pos);
|
||||
int LineFromPosition(int pos) const;
|
||||
int ClampPositionIntoDocument(int pos);
|
||||
bool IsCrLf(int pos);
|
||||
int LenChar(int pos);
|
||||
@ -237,8 +238,9 @@ public:
|
||||
int LineFromHandle(int markerHandle);
|
||||
int LineStart(int line) const;
|
||||
int LineEnd(int line) const;
|
||||
int LineEndPosition(int position);
|
||||
int VCHomePosition(int position);
|
||||
int LineEndPosition(int position) const;
|
||||
bool IsLineEndPosition(int position) const;
|
||||
int VCHomePosition(int position) const;
|
||||
|
||||
int SetLevel(int line, int level);
|
||||
int GetLevel(int line);
|
||||
@ -318,6 +320,27 @@ private:
|
||||
void NotifyModified(DocModification mh);
|
||||
};
|
||||
|
||||
class UndoGroup {
|
||||
Document *pdoc;
|
||||
bool groupNeeded;
|
||||
public:
|
||||
UndoGroup(Document *pdoc_, bool groupNeeded_=true) :
|
||||
pdoc(pdoc_), groupNeeded(groupNeeded_) {
|
||||
if (groupNeeded) {
|
||||
pdoc->BeginUndoAction();
|
||||
}
|
||||
}
|
||||
~UndoGroup() {
|
||||
if (groupNeeded) {
|
||||
pdoc->EndUndoAction();
|
||||
}
|
||||
}
|
||||
bool Needed() const {
|
||||
return groupNeeded;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* To optimise processing of document modifications by DocWatchers, a hint is passed indicating the
|
||||
* scope of the change.
|
||||
|
@ -14,6 +14,7 @@ class Document;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
class DocumentAccessor : public Accessor {
|
||||
// Private so DocumentAccessor objects can not be copied
|
||||
DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {}
|
||||
@ -21,7 +22,7 @@ class DocumentAccessor : public Accessor {
|
||||
|
||||
protected:
|
||||
Document *pdoc;
|
||||
PropSet &props;
|
||||
PropertyGet &props;
|
||||
WindowID id;
|
||||
int lenDoc;
|
||||
|
||||
@ -37,7 +38,7 @@ protected:
|
||||
void Fill(int position);
|
||||
|
||||
public:
|
||||
DocumentAccessor(Document *pdoc_, PropSet &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),
|
||||
startSeg(0), startPosStyling(0),
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -78,14 +78,11 @@ public:
|
||||
}
|
||||
void Copy(const char *s_, int len_, int codePage_, int characterSet_, bool rectangular_, bool lineCopy_) {
|
||||
delete []s;
|
||||
s = 0;
|
||||
s = new char[len_];
|
||||
if (s) {
|
||||
len = len_;
|
||||
for (int i = 0; i < len_; i++) {
|
||||
s[i] = s_[i];
|
||||
}
|
||||
} else {
|
||||
len = 0;
|
||||
len = len_;
|
||||
for (int i = 0; i < len_; i++) {
|
||||
s[i] = s_[i];
|
||||
}
|
||||
codePage = codePage_;
|
||||
characterSet = characterSet_;
|
||||
@ -125,7 +122,6 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
bool hasFocus;
|
||||
bool hideSelection;
|
||||
bool inOverstrike;
|
||||
int errorStatus;
|
||||
bool mouseDownCaptures;
|
||||
|
||||
/** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to
|
||||
@ -144,6 +140,11 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
bool verticalScrollBarVisible;
|
||||
bool endAtLastLine;
|
||||
bool caretSticky;
|
||||
bool multipleSelection;
|
||||
bool additionalSelectionTyping;
|
||||
bool additionalCaretsBlink;
|
||||
|
||||
int virtualSpaceOptions;
|
||||
|
||||
Surface *pixmapLine;
|
||||
Surface *pixmapSelMargin;
|
||||
@ -172,13 +173,11 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
Point ptMouseLast;
|
||||
enum { ddNone, ddInitial, ddDragging } inDragDrop;
|
||||
bool dropWentOutside;
|
||||
int posDrag;
|
||||
int posDrop;
|
||||
SelectionPosition posDrag;
|
||||
SelectionPosition posDrop;
|
||||
int lastXChosen;
|
||||
int lineAnchor;
|
||||
int originalAnchorPos;
|
||||
int currentPos;
|
||||
int anchor;
|
||||
int targetStart;
|
||||
int targetEnd;
|
||||
int searchFlags;
|
||||
@ -200,11 +199,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
int modEventMask;
|
||||
|
||||
SelectionText drag;
|
||||
enum selTypes { noSel, selStream, selRectangle, selLines };
|
||||
selTypes selType;
|
||||
bool moveExtendsSelection;
|
||||
int xStartSelect; ///< x position of start of rectangular selection
|
||||
int xEndSelect; ///< x position of end of rectangular selection
|
||||
Selection sel;
|
||||
bool primarySelection;
|
||||
|
||||
int caretXPolicy;
|
||||
@ -236,7 +231,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
int wrapVisualFlags;
|
||||
int wrapVisualFlagsLocation;
|
||||
int wrapVisualStartIndent;
|
||||
int actualWrapVisualStartIndent;
|
||||
int wrapAddIndent; // This will be added to initial indent of line
|
||||
int wrapIndentMode; // SC_WRAPINDENT_FIXED, _SAME, _INDENT
|
||||
|
||||
bool convertPastes;
|
||||
|
||||
@ -259,10 +255,14 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
int LinesOnScreen();
|
||||
int LinesToScroll();
|
||||
int MaxScrollPos();
|
||||
SelectionPosition ClampPositionIntoDocument(SelectionPosition sp) const;
|
||||
Point LocationFromPosition(SelectionPosition pos);
|
||||
Point LocationFromPosition(int pos);
|
||||
int XFromPosition(int pos);
|
||||
int PositionFromLocation(Point pt);
|
||||
int PositionFromLocationClose(Point pt);
|
||||
int XFromPosition(SelectionPosition sp);
|
||||
SelectionPosition SPositionFromLocation(Point pt, bool canReturnInvalid=false, bool charPosition=false, bool virtualSpace=true);
|
||||
int PositionFromLocation(Point pt, bool canReturnInvalid=false, bool charPosition=false);
|
||||
SelectionPosition SPositionFromLineX(int lineDoc, int x);
|
||||
int PositionFromLineX(int line, int x);
|
||||
int LineFromLocation(Point pt);
|
||||
void SetTopLine(int topLineNew);
|
||||
@ -274,20 +274,30 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
PRectangle RectangleFromRange(int start, int end);
|
||||
void InvalidateRange(int start, int end);
|
||||
|
||||
bool UserVirtualSpace() const {
|
||||
return ((virtualSpaceOptions & SCVS_USERACCESSIBLE) != 0);
|
||||
}
|
||||
int CurrentPosition();
|
||||
bool SelectionEmpty();
|
||||
int SelectionStart();
|
||||
int SelectionEnd();
|
||||
SelectionPosition SelectionStart();
|
||||
SelectionPosition SelectionEnd();
|
||||
void SetRectangularRange();
|
||||
void InvalidateSelection(int currentPos_, int anchor_, bool invalidateWholeSelection);
|
||||
void InvalidateSelection(SelectionRange newMain, bool invalidateWholeSelection=false);
|
||||
void SetSelection(SelectionPosition currentPos_, SelectionPosition anchor_);
|
||||
void SetSelection(int currentPos_, int anchor_);
|
||||
void SetSelection(SelectionPosition currentPos_);
|
||||
void SetSelection(int currentPos_);
|
||||
void SetEmptySelection(SelectionPosition currentPos_);
|
||||
void SetEmptySelection(int currentPos_);
|
||||
bool RangeContainsProtected(int start, int end) const;
|
||||
bool SelectionContainsProtected();
|
||||
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
|
||||
int MovePositionTo(int newPos, selTypes sel=noSel, bool ensureVisible=true);
|
||||
int MovePositionSoVisible(int pos, int moveDir);
|
||||
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true) const;
|
||||
SelectionPosition MovePositionOutsideChar(SelectionPosition pos, int moveDir, bool checkLineEnd=true) const;
|
||||
int MovePositionTo(SelectionPosition newPos, Selection::selTypes sel=Selection::noSel, bool ensureVisible=true);
|
||||
int MovePositionTo(int newPos, Selection::selTypes sel=Selection::noSel, bool ensureVisible=true);
|
||||
SelectionPosition MovePositionSoVisible(SelectionPosition pos, int moveDir);
|
||||
SelectionPosition MovePositionSoVisible(int pos, int moveDir);
|
||||
Point PointMainCaret();
|
||||
void SetLastXChosen();
|
||||
|
||||
void ScrollTo(int line, bool moveThumb=true);
|
||||
@ -312,8 +322,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
LineLayout *RetrieveLineLayout(int lineNumber);
|
||||
void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll,
|
||||
int width=LineLayout::wrapWidthInfinite);
|
||||
ColourAllocated SelectionBackground(ViewStyle &vsDraw);
|
||||
ColourAllocated TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll);
|
||||
ColourAllocated SelectionBackground(ViewStyle &vsDraw, bool main);
|
||||
ColourAllocated TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourAllocated background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll);
|
||||
void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight);
|
||||
void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourAllocated wrapColour);
|
||||
void DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll,
|
||||
@ -325,11 +335,14 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
void DrawAnnotation(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
|
||||
PRectangle rcLine, LineLayout *ll, int subLine);
|
||||
void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart,
|
||||
PRectangle rcLine, LineLayout *ll, int subLine=0);
|
||||
void DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine, int xStart, int offset, int posCaret, PRectangle rcCaret);
|
||||
PRectangle rcLine, 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);
|
||||
void RefreshPixMaps(Surface *surfaceWindow);
|
||||
void Paint(Surface *surfaceWindow, PRectangle rcArea);
|
||||
long FormatRange(bool draw, RangeToFormat *pfr);
|
||||
long FormatRange(bool draw, Sci_RangeToFormat *pfr);
|
||||
int TextWidth(int style, const char *text);
|
||||
|
||||
virtual void SetVerticalScrollPos() = 0;
|
||||
@ -339,13 +352,15 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
void SetScrollBars();
|
||||
void ChangeSize();
|
||||
|
||||
void FilterSelections();
|
||||
int InsertSpace(int position, unsigned int spaces);
|
||||
void AddChar(char ch);
|
||||
virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false);
|
||||
void ClearSelection();
|
||||
void ClearAll();
|
||||
void ClearDocumentStyle();
|
||||
void Cut();
|
||||
void PasteRectangular(int pos, const char *ptr, int len);
|
||||
void PasteRectangular(SelectionPosition pos, const char *ptr, int len);
|
||||
virtual void Copy() = 0;
|
||||
virtual void CopyAllowLine();
|
||||
virtual bool CanPaste();
|
||||
@ -364,7 +379,6 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
virtual void NotifyParent(SCNotification scn) = 0;
|
||||
virtual void NotifyStyleToNeeded(int endStyleNeeded);
|
||||
void NotifyChar(int ch);
|
||||
void NotifyMove(int position);
|
||||
void NotifySavePoint(bool isSavePoint);
|
||||
void NotifyModifyAttempt();
|
||||
virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
|
||||
@ -372,7 +386,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);
|
||||
@ -387,14 +401,14 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
void NotifyStyleNeeded(Document *doc, void *userData, int endPos);
|
||||
void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||
|
||||
void PageMove(int direction, selTypes sel=noSel, bool stuttered = false);
|
||||
void PageMove(int direction, Selection::selTypes sel=Selection::noSel, bool stuttered = false);
|
||||
void ChangeCaseOfSelection(bool makeUpperCase);
|
||||
void LineTranspose();
|
||||
void Duplicate(bool forLine);
|
||||
virtual void CancelModes();
|
||||
void NewLine();
|
||||
void CursorUpOrDown(int direction, selTypes sel=noSel);
|
||||
void ParaUpOrDown(int direction, selTypes sel=noSel);
|
||||
void CursorUpOrDown(int direction, Selection::selTypes sel=Selection::noSel);
|
||||
void ParaUpOrDown(int direction, Selection::selTypes sel=Selection::noSel);
|
||||
int StartEndDisplayLine(int pos, bool start);
|
||||
virtual int KeyCommand(unsigned int iMessage);
|
||||
virtual int KeyDefault(int /* key */, int /*modifiers*/);
|
||||
@ -413,18 +427,16 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
|
||||
virtual void CopyToClipboard(const SelectionText &selectedText) = 0;
|
||||
char *CopyRange(int start, int end);
|
||||
void CopySelectionFromRange(SelectionText *ss, bool allowLineCopy, int start, int end);
|
||||
void CopySelectionRange(SelectionText *ss, bool allowLineCopy=false);
|
||||
void CopyRangeToClipboard(int start, int end);
|
||||
void CopyText(int length, const char *text);
|
||||
void SetDragPosition(int newPos);
|
||||
void SetDragPosition(SelectionPosition newPos);
|
||||
virtual void DisplayCursor(Window::Cursor c);
|
||||
virtual bool DragThreshold(Point ptStart, Point ptNow);
|
||||
virtual void StartDrag();
|
||||
void DropAt(int position, const char *value, bool moving, bool rectangular);
|
||||
/** PositionInSelection returns 0 if position in selection, -1 if position before selection, and 1 if after.
|
||||
* Before means either before any line of selection or before selection on its line, with a similar meaning to after. */
|
||||
int PositionInSelection(int pos);
|
||||
void DropAt(SelectionPosition position, const char *value, bool moving, bool rectangular);
|
||||
/** PositionInSelection returns true if position in selection. */
|
||||
bool PositionInSelection(int pos);
|
||||
bool PointInSelection(Point pt);
|
||||
bool PointInSelMargin(Point pt);
|
||||
void LineSelection(int lineCurrent_, int lineAnchor_);
|
||||
@ -479,6 +491,8 @@ public:
|
||||
virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||
// Public so scintilla_set_id can use it.
|
||||
int ctrlID;
|
||||
// Public so COM methods for drag and drop can set it.
|
||||
int errorStatus;
|
||||
friend class AutoSurface;
|
||||
friend class SelectionLineIterator;
|
||||
};
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
@ -39,7 +41,7 @@ char **WordListsToStrings(WordList *val[]) {
|
||||
dim++;
|
||||
char **wls = new char * [dim + 1];
|
||||
for (int i = 0;i < dim;i++) {
|
||||
SString words;
|
||||
std::string words;
|
||||
words = "";
|
||||
for (int n = 0; n < val[i]->len; n++) {
|
||||
words += val[i]->words[n];
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
void Release();
|
||||
|
||||
LexerLibrary *next;
|
||||
SString m_sModuleName;
|
||||
std::string m_sModuleName;
|
||||
};
|
||||
|
||||
/// LexerManager manages external lexers, contains LexerLibrarys.
|
||||
|
@ -23,6 +23,192 @@
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates an array that points into each word in the string and puts \0 terminators
|
||||
* after each word.
|
||||
*/
|
||||
static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) {
|
||||
int prev = '\n';
|
||||
int words = 0;
|
||||
// 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++) {
|
||||
wordSeparator[i] = false;
|
||||
}
|
||||
wordSeparator['\r'] = true;
|
||||
wordSeparator['\n'] = true;
|
||||
if (!onlyLineEnds) {
|
||||
wordSeparator[' '] = true;
|
||||
wordSeparator['\t'] = true;
|
||||
}
|
||||
for (int j = 0; wordlist[j]; j++) {
|
||||
int curr = static_cast<unsigned char>(wordlist[j]);
|
||||
if (!wordSeparator[curr] && wordSeparator[prev])
|
||||
words++;
|
||||
prev = curr;
|
||||
}
|
||||
char **keywords = new char *[words + 1];
|
||||
if (keywords) {
|
||||
words = 0;
|
||||
prev = '\0';
|
||||
size_t slen = strlen(wordlist);
|
||||
for (size_t k = 0; k < slen; k++) {
|
||||
if (!wordSeparator[static_cast<unsigned char>(wordlist[k])]) {
|
||||
if (!prev) {
|
||||
keywords[words] = &wordlist[k];
|
||||
words++;
|
||||
}
|
||||
} else {
|
||||
wordlist[k] = '\0';
|
||||
}
|
||||
prev = wordlist[k];
|
||||
}
|
||||
keywords[words] = &wordlist[slen];
|
||||
*len = words;
|
||||
} else {
|
||||
*len = 0;
|
||||
}
|
||||
return keywords;
|
||||
}
|
||||
|
||||
void WordList::Clear() {
|
||||
if (words) {
|
||||
delete []list;
|
||||
delete []words;
|
||||
}
|
||||
words = 0;
|
||||
list = 0;
|
||||
len = 0;
|
||||
sorted = false;
|
||||
}
|
||||
|
||||
void WordList::Set(const char *s) {
|
||||
list = new char[strlen(s) + 1];
|
||||
strcpy(list, s);
|
||||
sorted = false;
|
||||
words = ArrayFromWordList(list, &len, onlyLineEnds);
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
static void SortWordList(char **words, unsigned int len) {
|
||||
qsort(reinterpret_cast<void*>(words), len, sizeof(*words),
|
||||
cmpString);
|
||||
}
|
||||
|
||||
bool WordList::InList(const char *s) {
|
||||
if (0 == words)
|
||||
return false;
|
||||
if (!sorted) {
|
||||
sorted = true;
|
||||
SortWordList(words, len);
|
||||
for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
|
||||
starts[k] = -1;
|
||||
for (int l = len - 1; l >= 0; l--) {
|
||||
unsigned char indexChar = words[l][0];
|
||||
starts[indexChar] = l;
|
||||
}
|
||||
}
|
||||
unsigned char firstChar = s[0];
|
||||
int j = starts[firstChar];
|
||||
if (j >= 0) {
|
||||
while ((unsigned char)words[j][0] == firstChar) {
|
||||
if (s[1] == words[j][1]) {
|
||||
const char *a = words[j] + 1;
|
||||
const char *b = s + 1;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
if (!*a && !*b)
|
||||
return true;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
j = starts['^'];
|
||||
if (j >= 0) {
|
||||
while (words[j][0] == '^') {
|
||||
const char *a = words[j] + 1;
|
||||
const char *b = s;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
if (!*a)
|
||||
return true;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** similar to InList, but word s can be a substring of keyword.
|
||||
* eg. the keyword define is defined as def~ine. This means the word must start
|
||||
* with def to be a keyword, but also defi, defin and define are valid.
|
||||
* The marker is ~ in this case.
|
||||
*/
|
||||
bool WordList::InListAbbreviated(const char *s, const char marker) {
|
||||
if (0 == words)
|
||||
return false;
|
||||
if (!sorted) {
|
||||
sorted = true;
|
||||
SortWordList(words, len);
|
||||
for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
|
||||
starts[k] = -1;
|
||||
for (int l = len - 1; l >= 0; l--) {
|
||||
unsigned char indexChar = words[l][0];
|
||||
starts[indexChar] = l;
|
||||
}
|
||||
}
|
||||
unsigned char firstChar = s[0];
|
||||
int j = starts[firstChar];
|
||||
if (j >= 0) {
|
||||
while (words[j][0] == firstChar) {
|
||||
bool isSubword = false;
|
||||
int start = 1;
|
||||
if (words[j][1] == marker) {
|
||||
isSubword = true;
|
||||
start++;
|
||||
}
|
||||
if (s[1] == words[j][start]) {
|
||||
const char *a = words[j] + start;
|
||||
const char *b = s + 1;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
if (*a == marker) {
|
||||
isSubword = true;
|
||||
a++;
|
||||
}
|
||||
b++;
|
||||
}
|
||||
if ((!*a || isSubword) && !*b)
|
||||
return true;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
j = starts['^'];
|
||||
if (j >= 0) {
|
||||
while (words[j][0] == '^') {
|
||||
const char *a = words[j] + 1;
|
||||
const char *b = s;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
if (!*a)
|
||||
return true;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const LexerModule *LexerModule::base = 0;
|
||||
int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1;
|
||||
|
||||
@ -146,7 +332,6 @@ int Scintilla_LinkLexers() {
|
||||
LINK_LEXER(lmAns1);
|
||||
LINK_LEXER(lmAPDL);
|
||||
LINK_LEXER(lmAsm);
|
||||
LINK_LEXER(lmASP);
|
||||
LINK_LEXER(lmASY);
|
||||
LINK_LEXER(lmAU3);
|
||||
LINK_LEXER(lmAVE);
|
||||
@ -199,13 +384,12 @@ 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);
|
||||
LINK_LEXER(lmPB);
|
||||
LINK_LEXER(lmPerl);
|
||||
LINK_LEXER(lmPHP);
|
||||
LINK_LEXER(lmPHPSCRIPT);
|
||||
LINK_LEXER(lmPLM);
|
||||
LINK_LEXER(lmPo);
|
||||
@ -221,7 +405,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);
|
||||
@ -233,7 +417,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);
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Accessor.h"
|
||||
@ -17,7 +19,6 @@
|
||||
#include "PropSet.h"
|
||||
#include "KeyWords.h"
|
||||
#include "SciLexer.h"
|
||||
#include "SString.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -62,8 +63,8 @@ static inline bool IsDelimiterCharacter(int ch);
|
||||
static inline bool IsNumberStartCharacter(int ch);
|
||||
static inline bool IsNumberCharacter(int ch);
|
||||
static inline bool IsSeparatorOrDelimiterCharacter(int ch);
|
||||
static bool IsValidIdentifier(const SString& identifier);
|
||||
static bool IsValidNumber(const SString& number);
|
||||
static bool IsValidIdentifier(const std::string& identifier);
|
||||
static bool IsValidNumber(const std::string& number);
|
||||
static inline bool IsWordStartCharacter(int ch);
|
||||
static inline bool IsWordCharacter(int ch);
|
||||
|
||||
@ -117,7 +118,7 @@ static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostroph
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
|
||||
SString identifier;
|
||||
std::string identifier;
|
||||
|
||||
while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) {
|
||||
identifier += static_cast<char>(tolower(sc.ch));
|
||||
@ -144,7 +145,7 @@ static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostroph
|
||||
static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) {
|
||||
apostropheStartsAttribute = true;
|
||||
|
||||
SString number;
|
||||
std::string number;
|
||||
sc.SetState(SCE_ADA_NUMBER);
|
||||
|
||||
// Get all characters up to a delimiter or a separator, including points, but excluding
|
||||
@ -192,7 +193,7 @@ static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostrophe
|
||||
apostropheStartsAttribute = true;
|
||||
sc.SetState(SCE_ADA_IDENTIFIER);
|
||||
|
||||
SString word;
|
||||
std::string word;
|
||||
|
||||
while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) {
|
||||
word += static_cast<char>(tolower(sc.ch));
|
||||
@ -321,7 +322,7 @@ static inline bool IsSeparatorOrDelimiterCharacter(int ch) {
|
||||
return IsASpace(ch) || IsDelimiterCharacter(ch);
|
||||
}
|
||||
|
||||
static bool IsValidIdentifier(const SString& identifier) {
|
||||
static bool IsValidIdentifier(const std::string& identifier) {
|
||||
// First character can't be '_', so initialize the flag to true
|
||||
bool lastWasUnderscore = true;
|
||||
|
||||
@ -355,8 +356,8 @@ static bool IsValidIdentifier(const SString& identifier) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IsValidNumber(const SString& number) {
|
||||
int hashPos = number.search("#");
|
||||
static bool IsValidNumber(const std::string& number) {
|
||||
size_t hashPos = number.find("#");
|
||||
bool seenDot = false;
|
||||
|
||||
size_t i = 0;
|
||||
@ -366,7 +367,7 @@ static bool IsValidNumber(const SString& number) {
|
||||
return false; // Just in case
|
||||
|
||||
// Decimal number
|
||||
if (hashPos == -1) {
|
||||
if (hashPos == std::string::npos) {
|
||||
bool canBeSpecial = false;
|
||||
|
||||
for (; i < length; i++) {
|
||||
|
@ -474,6 +474,10 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle,
|
||||
lineCurrent++;
|
||||
levelCurrent = levelNext;
|
||||
levelMinCurrent = levelCurrent;
|
||||
if (atEOL && (i == static_cast<unsigned int>(styler.Length()-1))) {
|
||||
// There is an empty line at end of file so give it same level and empty
|
||||
styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);
|
||||
}
|
||||
visibleChars = 0;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/** @file LexCaml.cxx
|
||||
** Lexer for Objective Caml.
|
||||
**/
|
||||
// Copyright 2005 by Robert Roessler <robertr@rftp.com>
|
||||
// Copyright 2005-2009 by Robert Roessler <robertr@rftp.com>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
/* Release History
|
||||
20050204 Initial release.
|
||||
@ -15,6 +15,7 @@
|
||||
20051125 Added 2nd "optional" keywords class.
|
||||
20051129 Support "magic" (read-only) comments for RCaml.
|
||||
20051204 Swtich to using StyleContext infrastructure.
|
||||
20090629 Add full Standard ML '97 support.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -26,6 +27,7 @@
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "PropSetSimple.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
@ -35,7 +37,6 @@
|
||||
// Since the Microsoft __iscsym[f] funcs are not ANSI...
|
||||
inline int iscaml(int c) {return isalnum(c) || c == '_';}
|
||||
inline int iscamlf(int c) {return isalpha(c) || c == '_';}
|
||||
inline int iscamld(int c) {return isdigit(c) || c == '_';}
|
||||
|
||||
static const int baseT[24] = {
|
||||
0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A - L */
|
||||
@ -143,7 +144,7 @@ static void InternalLexOrFold(int foldOrLex, unsigned int startPos, int length,
|
||||
int initStyle, char *words[], WindowID window, char *props)
|
||||
{
|
||||
// create and initialize a WindowAccessor (including contained PropSet)
|
||||
PropSet ps;
|
||||
PropSetSimple ps;
|
||||
ps.SetMultiple(props);
|
||||
WindowAccessor wa(window, ps);
|
||||
// create and initialize WordList(s)
|
||||
@ -179,25 +180,27 @@ void ColouriseCamlDoc(
|
||||
{
|
||||
// initialize styler
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
// set up [initial] state info (terminating states that shouldn't "bleed")
|
||||
int nesting = 0;
|
||||
if (sc.state < SCE_CAML_STRING)
|
||||
sc.state = SCE_CAML_DEFAULT;
|
||||
if (sc.state >= SCE_CAML_COMMENT)
|
||||
nesting = (sc.state & 0x0f) - SCE_CAML_COMMENT;
|
||||
|
||||
int chBase = 0, chToken = 0, chLit = 0;
|
||||
WordList& keywords = *keywordlists[0];
|
||||
WordList& keywords2 = *keywordlists[1];
|
||||
WordList& keywords3 = *keywordlists[2];
|
||||
const bool isSML = keywords.InList("andalso");
|
||||
const int useMagic = styler.GetPropertyInt("lexer.caml.magic", 0);
|
||||
|
||||
// set up [initial] state info (terminating states that shouldn't "bleed")
|
||||
const int state_ = sc.state & 0x0f;
|
||||
if (state_ <= SCE_CAML_CHAR
|
||||
|| (isSML && state_ == SCE_CAML_STRING))
|
||||
sc.state = SCE_CAML_DEFAULT;
|
||||
int nesting = (state_ >= SCE_CAML_COMMENT)? (state_ - SCE_CAML_COMMENT): 0;
|
||||
|
||||
// foreach char in range...
|
||||
while (sc.More()) {
|
||||
// set up [per-char] state info
|
||||
int state2 = -1; // (ASSUME no state change)
|
||||
int state2 = -1; // (ASSUME no state change)
|
||||
int chColor = sc.currentPos - 1;// (ASSUME standard coloring range)
|
||||
bool advance = true; // (ASSUME scanner "eats" 1 char)
|
||||
bool advance = true; // (ASSUME scanner "eats" 1 char)
|
||||
|
||||
// step state machine
|
||||
switch (sc.state & 0x0f) {
|
||||
@ -206,25 +209,38 @@ void ColouriseCamlDoc(
|
||||
// it's wide open; what do we have?
|
||||
if (iscamlf(sc.ch))
|
||||
state2 = SCE_CAML_IDENTIFIER;
|
||||
else if (sc.Match('`') && iscamlf(sc.chNext))
|
||||
else if (!isSML && sc.Match('`') && iscamlf(sc.chNext))
|
||||
state2 = SCE_CAML_TAGNAME;
|
||||
else if (sc.Match('#') && isdigit(sc.chNext))
|
||||
else if (!isSML && sc.Match('#') && isdigit(sc.chNext))
|
||||
state2 = SCE_CAML_LINENUM;
|
||||
else if (isdigit(sc.ch)) {
|
||||
// it's a number, assume base 10
|
||||
state2 = SCE_CAML_NUMBER, chBase = 10;
|
||||
if (sc.Match('0') && strchr("bBoOxX", sc.chNext))
|
||||
chBase = baseT[tolower(sc.chNext) - 'a'], sc.Forward();
|
||||
} else if (sc.Match('\'')) /* (char literal?) */
|
||||
if (sc.Match('0')) {
|
||||
// there MAY be a base specified...
|
||||
const char* baseC = "bBoOxX";
|
||||
if (isSML) {
|
||||
if (sc.chNext == 'w')
|
||||
sc.Forward(); // (consume SML "word" indicator)
|
||||
baseC = "x";
|
||||
}
|
||||
// ... change to specified base AS REQUIRED
|
||||
if (strchr(baseC, sc.chNext))
|
||||
chBase = baseT[tolower(sc.chNext) - 'a'], sc.Forward();
|
||||
}
|
||||
} else if (!isSML && sc.Match('\'')) // (Caml char literal?)
|
||||
state2 = SCE_CAML_CHAR, chLit = 0;
|
||||
else if (sc.Match('\"'))
|
||||
else if (isSML && sc.Match('#', '"')) // (SML char literal?)
|
||||
state2 = SCE_CAML_CHAR, sc.Forward();
|
||||
else if (sc.Match('"'))
|
||||
state2 = SCE_CAML_STRING;
|
||||
else if (sc.Match('(', '*'))
|
||||
state2 = SCE_CAML_COMMENT,
|
||||
sc.ch = ' ', // (make SURE "(*)" isn't seen as a closed comment)
|
||||
sc.Forward();
|
||||
else if (strchr("!?~" /* Caml "prefix-symbol" */
|
||||
"=<>@^|&+-*/$%" /* Caml "infix-symbol" */
|
||||
"()[]{};,:.#", sc.ch)) /* Caml "bracket" or ;,:.# */
|
||||
state2 = SCE_CAML_COMMENT, sc.Forward(), sc.ch = ' '; // (*)...
|
||||
else if (strchr("!?~" /* Caml "prefix-symbol" */
|
||||
"=<>@^|&+-*/$%" /* Caml "infix-symbol" */
|
||||
"()[]{};,:.#", sc.ch) // Caml "bracket" or ;,:.#
|
||||
// SML "extra" ident chars
|
||||
|| (isSML && (sc.Match('\\') || sc.Match('`'))))
|
||||
state2 = SCE_CAML_OPERATOR;
|
||||
break;
|
||||
|
||||
@ -273,9 +289,12 @@ void ColouriseCamlDoc(
|
||||
case SCE_CAML_OPERATOR: {
|
||||
// [try to] interpret as [additional] operator char
|
||||
const char* o = 0;
|
||||
if (iscaml(sc.ch) || isspace(sc.ch) /* ident or whitespace */
|
||||
|| (o = strchr(")]};,\'\"`#", sc.ch),o)/* "termination" chars */
|
||||
|| !strchr("!$%&*+-./:<=>?@^|~", sc.ch)/* "operator" chars */) {
|
||||
if (iscaml(sc.ch) || isspace(sc.ch) // ident or whitespace
|
||||
|| (o = strchr(")]};,\'\"#", sc.ch),o) // "termination" chars
|
||||
|| (!isSML && sc.Match('`')) // Caml extra term char
|
||||
|| (!strchr("!$%&*+-./:<=>?@^|~", sc.ch)// "operator" chars
|
||||
// SML extra ident chars
|
||||
&& !(isSML && (sc.Match('\\') || sc.Match('`'))))) {
|
||||
// check for INCLUSIVE termination
|
||||
if (o && strchr(")]};,", sc.ch)) {
|
||||
if ((sc.Match(')') && sc.chPrev == '(')
|
||||
@ -292,24 +311,27 @@ void ColouriseCamlDoc(
|
||||
|
||||
case SCE_CAML_NUMBER:
|
||||
// [try to] interpret as [additional] numeric literal char
|
||||
// N.B. - improperly accepts "extra" digits in base 2 or 8 literals
|
||||
if (iscamld(sc.ch) || IsADigit(sc.ch, chBase))
|
||||
if ((!isSML && sc.Match('_')) || IsADigit(sc.ch, chBase))
|
||||
break;
|
||||
// how about an integer suffix?
|
||||
if ((sc.Match('l') || sc.Match('L') || sc.Match('n'))
|
||||
&& (iscamld(sc.chPrev) || IsADigit(sc.chPrev, chBase)))
|
||||
if (!isSML && (sc.Match('l') || sc.Match('L') || sc.Match('n'))
|
||||
&& (sc.chPrev == '_' || IsADigit(sc.chPrev, chBase)))
|
||||
break;
|
||||
// or a floating-point literal?
|
||||
if (chBase == 10) {
|
||||
// with a decimal point?
|
||||
if (sc.Match('.') && iscamld(sc.chPrev))
|
||||
if (sc.Match('.')
|
||||
&& ((!isSML && sc.chPrev == '_')
|
||||
|| IsADigit(sc.chPrev, chBase)))
|
||||
break;
|
||||
// with an exponent? (I)
|
||||
if ((sc.Match('e') || sc.Match('E'))
|
||||
&& (iscamld(sc.chPrev) || sc.chPrev == '.'))
|
||||
&& ((!isSML && (sc.chPrev == '.' || sc.chPrev == '_'))
|
||||
|| IsADigit(sc.chPrev, chBase)))
|
||||
break;
|
||||
// with an exponent? (II)
|
||||
if ((sc.Match('+') || sc.Match('-'))
|
||||
if (((!isSML && (sc.Match('+') || sc.Match('-')))
|
||||
|| (isSML && sc.Match('~')))
|
||||
&& (sc.chPrev == 'e' || sc.chPrev == 'E'))
|
||||
break;
|
||||
}
|
||||
@ -318,29 +340,56 @@ void ColouriseCamlDoc(
|
||||
break;
|
||||
|
||||
case SCE_CAML_CHAR:
|
||||
// [try to] interpret as [additional] char literal char
|
||||
if (sc.Match('\\')) {
|
||||
chLit = 1; // (definitely IS a char literal)
|
||||
if (sc.chPrev == '\\')
|
||||
sc.ch = ' '; // (so termination test isn't fooled)
|
||||
// should we be terminating - one way or another?
|
||||
} else if ((sc.Match('\'') && sc.chPrev != '\\') || sc.atLineEnd) {
|
||||
state2 = SCE_CAML_DEFAULT;
|
||||
if (sc.Match('\''))
|
||||
chColor++;
|
||||
else
|
||||
sc.ChangeState(SCE_CAML_IDENTIFIER);
|
||||
// ... maybe a char literal, maybe not
|
||||
} else if (chLit < 1 && sc.currentPos - chToken >= 2)
|
||||
sc.ChangeState(SCE_CAML_IDENTIFIER), advance = false;
|
||||
break;
|
||||
if (!isSML) {
|
||||
// [try to] interpret as [additional] char literal char
|
||||
if (sc.Match('\\')) {
|
||||
chLit = 1; // (definitely IS a char literal)
|
||||
if (sc.chPrev == '\\')
|
||||
sc.ch = ' '; // (...\\')
|
||||
// should we be terminating - one way or another?
|
||||
} else if ((sc.Match('\'') && sc.chPrev != '\\')
|
||||
|| sc.atLineEnd) {
|
||||
state2 = SCE_CAML_DEFAULT;
|
||||
if (sc.Match('\''))
|
||||
chColor++;
|
||||
else
|
||||
sc.ChangeState(SCE_CAML_IDENTIFIER);
|
||||
// ... maybe a char literal, maybe not
|
||||
} else if (chLit < 1 && sc.currentPos - chToken >= 2)
|
||||
sc.ChangeState(SCE_CAML_IDENTIFIER), advance = false;
|
||||
break;
|
||||
}/* else
|
||||
// fall through for SML char literal (handle like string) */
|
||||
|
||||
case SCE_CAML_STRING:
|
||||
// [try to] interpret as [additional] string literal char
|
||||
if (sc.Match('\\') && sc.chPrev == '\\')
|
||||
sc.ch = ' '; // (so '\\' doesn't cause us trouble)
|
||||
else if (sc.Match('\"') && sc.chPrev != '\\')
|
||||
state2 = SCE_CAML_DEFAULT, chColor++;
|
||||
// [try to] interpret as [additional] [SML char/] string literal char
|
||||
if (isSML && sc.Match('\\') && sc.chPrev != '\\' && isspace(sc.chNext))
|
||||
state2 = SCE_CAML_WHITE;
|
||||
else if (sc.Match('\\') && sc.chPrev == '\\')
|
||||
sc.ch = ' '; // (...\\")
|
||||
// should we be terminating - one way or another?
|
||||
else if ((sc.Match('"') && sc.chPrev != '\\')
|
||||
|| (isSML && sc.atLineEnd)) {
|
||||
state2 = SCE_CAML_DEFAULT;
|
||||
if (sc.Match('"'))
|
||||
chColor++;
|
||||
}
|
||||
break;
|
||||
|
||||
case SCE_CAML_WHITE:
|
||||
// [try to] interpret as [additional] SML embedded whitespace char
|
||||
if (sc.Match('\\')) {
|
||||
// style this puppy NOW...
|
||||
state2 = SCE_CAML_STRING, sc.ch = ' ' /* (...\") */, chColor++,
|
||||
styler.ColourTo(chColor, SCE_CAML_WHITE), styler.Flush();
|
||||
// ... then backtrack to determine original SML literal type
|
||||
int p = chColor - 2;
|
||||
for (; p >= 0 && styler.StyleAt(p) == SCE_CAML_WHITE; p--) ;
|
||||
if (p >= 0)
|
||||
state2 = static_cast<int>(styler.StyleAt(p));
|
||||
// take care of state change NOW
|
||||
sc.ChangeState(state2), state2 = -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case SCE_CAML_COMMENT:
|
||||
@ -350,8 +399,7 @@ void ColouriseCamlDoc(
|
||||
// we're IN a comment - does this start a NESTED comment?
|
||||
if (sc.Match('(', '*'))
|
||||
state2 = sc.state + 1, chToken = sc.currentPos,
|
||||
sc.ch = ' ', // (make SURE "(*)" isn't seen as a closed comment)
|
||||
sc.Forward(), nesting++;
|
||||
sc.Forward(), sc.ch = ' ' /* (*)... */, nesting++;
|
||||
// [try to] interpret as [additional] comment char
|
||||
else if (sc.Match(')') && sc.chPrev == '*') {
|
||||
if (nesting)
|
||||
@ -366,7 +414,7 @@ void ColouriseCamlDoc(
|
||||
break;
|
||||
}
|
||||
|
||||
// handle state change and char coloring as required
|
||||
// handle state change and char coloring AS REQUIRED
|
||||
if (state2 >= 0)
|
||||
styler.ColourTo(chColor, sc.state), sc.ChangeState(state2);
|
||||
// move to next char UNLESS re-scanning current char
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
|
@ -25,20 +25,20 @@
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/*/ Nested comments require keeping the value of the nesting level for every
|
||||
position in the document. But since scintilla always styles line by line,
|
||||
we only need to store one value per line. The non-negative number indicates
|
||||
nesting level at the end of the line.
|
||||
/*/
|
||||
/* Nested comments require keeping the value of the nesting level for every
|
||||
position in the document. But since scintilla always styles line by line,
|
||||
we only need to store one value per line. The non-negative number indicates
|
||||
nesting level at the end of the line.
|
||||
*/
|
||||
|
||||
// We use custom qualifiers since it is not clear what D allows.
|
||||
// Underscore, letter, digit and universal alphas from C99 Appendix D.
|
||||
|
||||
static bool IsWordStart(int ch) {
|
||||
return isascii(ch) && (isalpha(ch) || ch == '_');
|
||||
return (isascii(ch) && (isalpha(ch) || ch == '_')) || !isascii(ch);
|
||||
}
|
||||
|
||||
static bool IsWord(int ch) {
|
||||
return isascii(ch) && (isalnum(ch) || ch == '_');
|
||||
return (isascii(ch) && (isalnum(ch) || ch == '_')) || !isascii(ch);
|
||||
}
|
||||
|
||||
static bool IsDoxygen(int ch) {
|
||||
@ -51,311 +51,349 @@ static bool IsDoxygen(int ch) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool IsStringSuffix(int ch) {
|
||||
return ch == 'c' || ch == 'w' || ch == 'd';
|
||||
}
|
||||
|
||||
|
||||
static void ColouriseDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler, bool caseSensitive) {
|
||||
WordList *keywordlists[], Accessor &styler, bool caseSensitive) {
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
WordList &keywords2 = *keywordlists[1];
|
||||
WordList &keywords3 = *keywordlists[2];
|
||||
WordList &keywords4 = *keywordlists[3];
|
||||
WordList &keywords = *keywordlists[0];
|
||||
WordList &keywords2 = *keywordlists[1];
|
||||
WordList &keywords3 = *keywordlists[2]; //doxygen
|
||||
WordList &keywords4 = *keywordlists[3];
|
||||
WordList &keywords5 = *keywordlists[4];
|
||||
WordList &keywords6 = *keywordlists[5];
|
||||
WordList &keywords7 = *keywordlists[6];
|
||||
|
||||
int styleBeforeDCKeyword = SCE_D_DEFAULT;
|
||||
int styleBeforeDCKeyword = SCE_D_DEFAULT;
|
||||
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
|
||||
int curLine = styler.GetLine(startPos);
|
||||
int curNcLevel = curLine > 0? styler.GetLineState(curLine-1): 0;
|
||||
int curLine = styler.GetLine(startPos);
|
||||
int curNcLevel = curLine > 0? styler.GetLineState(curLine-1): 0;
|
||||
bool numFloat = false; // Float literals have '+' and '-' signs
|
||||
bool numHex = false;
|
||||
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
|
||||
if (sc.atLineStart) {
|
||||
if (sc.state == SCE_D_STRING) {
|
||||
// Prevent SCE_D_STRINGEOL from leaking back to previous line which
|
||||
// ends with a line continuation by locking in the state upto this position.
|
||||
sc.SetState(SCE_D_STRING);
|
||||
}
|
||||
curLine = styler.GetLine(sc.currentPos);
|
||||
styler.SetLineState(curLine, curNcLevel);
|
||||
}
|
||||
if (sc.atLineStart) {
|
||||
curLine = styler.GetLine(sc.currentPos);
|
||||
styler.SetLineState(curLine, curNcLevel);
|
||||
}
|
||||
|
||||
// Handle line continuation generically.
|
||||
if (sc.ch == '\\') {
|
||||
if (sc.chNext == '\n' || sc.chNext == '\r') {
|
||||
sc.Forward();
|
||||
if (sc.ch == '\r' && sc.chNext == '\n') {
|
||||
sc.Forward();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// Determine if the current state should terminate.
|
||||
switch (sc.state) {
|
||||
case SCE_D_OPERATOR:
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
break;
|
||||
case SCE_D_NUMBER:
|
||||
// We accept almost anything because of hex. and number suffixes
|
||||
if (isascii(sc.ch) && (isalnum(sc.ch) || sc.ch == '_')) {
|
||||
continue;
|
||||
} else if (sc.ch == '.' && sc.chNext != '.' && !numFloat) {
|
||||
// Don't parse 0..2 as number.
|
||||
numFloat=true;
|
||||
continue;
|
||||
} else if ( ( sc.ch == '-' || sc.ch == '+' ) && ( /*sign and*/
|
||||
( !numHex && ( sc.chPrev == 'e' || sc.chPrev == 'E' ) ) || /*decimal or*/
|
||||
( sc.chPrev == 'p' || sc.chPrev == 'P' ) ) ) { /*hex*/
|
||||
// Parse exponent sign in float literals: 2e+10 0x2e+10
|
||||
continue;
|
||||
} else {
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_IDENTIFIER:
|
||||
if (!IsWord(sc.ch)) {
|
||||
char s[1000];
|
||||
if (caseSensitive) {
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
} else {
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
}
|
||||
if (keywords.InList(s)) {
|
||||
sc.ChangeState(SCE_D_WORD);
|
||||
} else if (keywords2.InList(s)) {
|
||||
sc.ChangeState(SCE_D_WORD2);
|
||||
} else if (keywords4.InList(s)) {
|
||||
sc.ChangeState(SCE_D_TYPEDEF);
|
||||
} else if (keywords5.InList(s)) {
|
||||
sc.ChangeState(SCE_D_WORD5);
|
||||
} else if (keywords6.InList(s)) {
|
||||
sc.ChangeState(SCE_D_WORD6);
|
||||
} else if (keywords7.InList(s)) {
|
||||
sc.ChangeState(SCE_D_WORD7);
|
||||
}
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENT:
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTDOC:
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
} 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 = SCE_D_COMMENTDOC;
|
||||
sc.SetState(SCE_D_COMMENTDOCKEYWORD);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTLINE:
|
||||
if (sc.atLineStart) {
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTLINEDOC:
|
||||
if (sc.atLineStart) {
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
} 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 = SCE_D_COMMENTLINEDOC;
|
||||
sc.SetState(SCE_D_COMMENTDOCKEYWORD);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTDOCKEYWORD:
|
||||
if ((styleBeforeDCKeyword == SCE_D_COMMENTDOC) && sc.Match('*', '/')) {
|
||||
sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR);
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
} else if (!IsDoxygen(sc.ch)) {
|
||||
char s[100];
|
||||
if (caseSensitive) {
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
} else {
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
}
|
||||
if (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) {
|
||||
sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR);
|
||||
}
|
||||
sc.SetState(styleBeforeDCKeyword);
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTNESTED:
|
||||
if (sc.Match('+', '/')) {
|
||||
if (curNcLevel > 0)
|
||||
curNcLevel -= 1;
|
||||
curLine = styler.GetLine(sc.currentPos);
|
||||
styler.SetLineState(curLine, curNcLevel);
|
||||
sc.Forward();
|
||||
if (curNcLevel == 0) {
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
} else if (sc.Match('/','+')) {
|
||||
curNcLevel += 1;
|
||||
curLine = styler.GetLine(sc.currentPos);
|
||||
styler.SetLineState(curLine, curNcLevel);
|
||||
sc.Forward();
|
||||
}
|
||||
break;
|
||||
case SCE_D_STRING:
|
||||
if (sc.ch == '\\') {
|
||||
if (sc.chNext == '"' || sc.chNext == '\\') {
|
||||
sc.Forward();
|
||||
}
|
||||
} else if (sc.ch == '"') {
|
||||
if(IsStringSuffix(sc.chNext))
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_CHARACTER:
|
||||
if (sc.atLineEnd) {
|
||||
sc.ChangeState(SCE_D_STRINGEOL);
|
||||
} else if (sc.ch == '\\') {
|
||||
if (sc.chNext == '\'' || sc.chNext == '\\') {
|
||||
sc.Forward();
|
||||
}
|
||||
} else if (sc.ch == '\'') {
|
||||
// Char has no suffixes
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_STRINGEOL:
|
||||
if (sc.atLineStart) {
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_STRINGB:
|
||||
if (sc.ch == '`') {
|
||||
if(IsStringSuffix(sc.chNext))
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_STRINGR:
|
||||
if (sc.ch == '"') {
|
||||
if(IsStringSuffix(sc.chNext))
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Determine if the current state should terminate.
|
||||
switch (sc.state) {
|
||||
case SCE_D_OPERATOR:
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
break;
|
||||
case SCE_D_NUMBER:
|
||||
// We accept almost anything because of hex. and number suffixes
|
||||
if (!IsWord(sc.ch) && sc.ch != '.') {
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_IDENTIFIER:
|
||||
if (!IsWord(sc.ch)) {
|
||||
char s[1000];
|
||||
if (caseSensitive) {
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
} else {
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
}
|
||||
if (keywords.InList(s)) {
|
||||
sc.ChangeState(SCE_D_WORD);
|
||||
} else if (keywords2.InList(s)) {
|
||||
sc.ChangeState(SCE_D_WORD2);
|
||||
} else if (keywords4.InList(s)) {
|
||||
sc.ChangeState(SCE_D_TYPEDEF);
|
||||
}
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENT:
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTDOC:
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
} 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 = SCE_D_COMMENTDOC;
|
||||
sc.SetState(SCE_D_COMMENTDOCKEYWORD);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTLINE:
|
||||
if (sc.atLineStart) {
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTLINEDOC:
|
||||
if (sc.atLineStart) {
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
} 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 = SCE_D_COMMENTLINEDOC;
|
||||
sc.SetState(SCE_D_COMMENTDOCKEYWORD);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTDOCKEYWORD:
|
||||
if ((styleBeforeDCKeyword == SCE_D_COMMENTDOC) && sc.Match('*', '/')) {
|
||||
sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR);
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
} else if (!IsDoxygen(sc.ch)) {
|
||||
char s[100];
|
||||
if (caseSensitive) {
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
} else {
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
}
|
||||
if (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) {
|
||||
sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR);
|
||||
}
|
||||
sc.SetState(styleBeforeDCKeyword);
|
||||
}
|
||||
break;
|
||||
case SCE_D_COMMENTNESTED:
|
||||
if (sc.Match('+', '/')) {
|
||||
if (curNcLevel > 0)
|
||||
curNcLevel -= 1;
|
||||
curLine = styler.GetLine(sc.currentPos);
|
||||
styler.SetLineState(curLine, curNcLevel);
|
||||
sc.Forward();
|
||||
if (curNcLevel == 0) {
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
}
|
||||
else if (sc.Match('/','+')) {
|
||||
curNcLevel += 1;
|
||||
curLine = styler.GetLine(sc.currentPos);
|
||||
styler.SetLineState(curLine, curNcLevel);
|
||||
sc.Forward();
|
||||
}
|
||||
break;
|
||||
case SCE_D_STRING:
|
||||
if (sc.atLineEnd) {
|
||||
sc.ChangeState(SCE_D_STRINGEOL);
|
||||
} else if (sc.ch == '\\') {
|
||||
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
||||
sc.Forward();
|
||||
}
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_CHARACTER:
|
||||
if (sc.atLineEnd) {
|
||||
sc.ChangeState(SCE_D_STRINGEOL);
|
||||
} else if (sc.ch == '\\') {
|
||||
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
||||
sc.Forward();
|
||||
}
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.ForwardSetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_D_STRINGEOL:
|
||||
if (sc.atLineStart) {
|
||||
sc.SetState(SCE_D_DEFAULT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Determine if a new state should be entered.
|
||||
if (sc.state == SCE_D_DEFAULT) {
|
||||
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
||||
sc.SetState(SCE_D_NUMBER);
|
||||
} else if (IsWordStart(sc.ch)) {
|
||||
sc.SetState(SCE_D_IDENTIFIER);
|
||||
} else if (sc.Match('/','+')) {
|
||||
curNcLevel += 1;
|
||||
curLine = styler.GetLine(sc.currentPos);
|
||||
styler.SetLineState(curLine, curNcLevel);
|
||||
sc.SetState(SCE_D_COMMENTNESTED);
|
||||
sc.Forward();
|
||||
} else if (sc.Match('/', '*')) {
|
||||
if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style
|
||||
sc.SetState(SCE_D_COMMENTDOC);
|
||||
} else {
|
||||
sc.SetState(SCE_D_COMMENT);
|
||||
}
|
||||
sc.Forward(); // Eat the * so it isn't used for the end of the comment
|
||||
} else if (sc.Match('/', '/')) {
|
||||
if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!"))
|
||||
// Support of Qt/Doxygen doc. style
|
||||
sc.SetState(SCE_D_COMMENTLINEDOC);
|
||||
else
|
||||
sc.SetState(SCE_D_COMMENTLINE);
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.SetState(SCE_D_STRING);
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.SetState(SCE_D_CHARACTER);
|
||||
} else if (isoperator(static_cast<char>(sc.ch))) {
|
||||
sc.SetState(SCE_D_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
sc.Complete();
|
||||
// Determine if a new state should be entered.
|
||||
if (sc.state == SCE_D_DEFAULT) {
|
||||
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
||||
sc.SetState(SCE_D_NUMBER);
|
||||
numFloat = sc.ch == '.';
|
||||
// Remember hex literal
|
||||
numHex = sc.ch == '0' && ( sc.chNext == 'x' || sc.chNext == 'X' );
|
||||
} else if ( (sc.ch == 'r' || sc.ch == 'x' || sc.ch == 'q')
|
||||
&& sc.chNext == '"' ) {
|
||||
// Limited support for hex and delimited strings: parse as r""
|
||||
sc.SetState(SCE_D_STRINGR);
|
||||
sc.Forward();
|
||||
} else if (IsWordStart(sc.ch) || sc.ch == '$') {
|
||||
sc.SetState(SCE_D_IDENTIFIER);
|
||||
} else if (sc.Match('/','+')) {
|
||||
curNcLevel += 1;
|
||||
curLine = styler.GetLine(sc.currentPos);
|
||||
styler.SetLineState(curLine, curNcLevel);
|
||||
sc.SetState(SCE_D_COMMENTNESTED);
|
||||
sc.Forward();
|
||||
} else if (sc.Match('/', '*')) {
|
||||
if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style
|
||||
sc.SetState(SCE_D_COMMENTDOC);
|
||||
} else {
|
||||
sc.SetState(SCE_D_COMMENT);
|
||||
}
|
||||
sc.Forward(); // Eat the * so it isn't used for the end of the comment
|
||||
} else if (sc.Match('/', '/')) {
|
||||
if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!"))
|
||||
// Support of Qt/Doxygen doc. style
|
||||
sc.SetState(SCE_D_COMMENTLINEDOC);
|
||||
else
|
||||
sc.SetState(SCE_D_COMMENTLINE);
|
||||
} else if (sc.ch == '"') {
|
||||
sc.SetState(SCE_D_STRING);
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.SetState(SCE_D_CHARACTER);
|
||||
} else if (sc.ch == '`') {
|
||||
sc.SetState(SCE_D_STRINGB);
|
||||
} else if (isoperator(static_cast<char>(sc.ch))) {
|
||||
sc.SetState(SCE_D_OPERATOR);
|
||||
if (sc.ch == '.' && sc.chNext == '.') sc.Forward(); // Range operator
|
||||
}
|
||||
}
|
||||
}
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
static bool IsStreamCommentStyle(int style) {
|
||||
return style == SCE_D_COMMENT ||
|
||||
style == SCE_D_COMMENTDOC ||
|
||||
style == SCE_D_COMMENTDOCKEYWORD ||
|
||||
style == SCE_D_COMMENTDOCKEYWORDERROR;
|
||||
return style == SCE_D_COMMENT ||
|
||||
style == SCE_D_COMMENTDOC ||
|
||||
style == SCE_D_COMMENTDOCKEYWORD ||
|
||||
style == SCE_D_COMMENTDOCKEYWORDERROR;
|
||||
}
|
||||
|
||||
// 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 {".
|
||||
static void FoldDoc(unsigned int startPos, int length, int initStyle, Accessor &styler) {
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||
|
||||
// property lexer.d.fold.at.else
|
||||
// This option enables D folding on a "} else {" line of an if statement.
|
||||
bool foldAtElse = styler.GetPropertyInt("lexer.d.fold.at.else",
|
||||
// property lexer.d.fold.at.else
|
||||
// This option enables D folding on a "} else {" line of an if statement.
|
||||
bool foldAtElse = styler.GetPropertyInt("lexer.d.fold.at.else",
|
||||
styler.GetPropertyInt("fold.at.else", 0)) != 0;
|
||||
unsigned int endPos = startPos + length;
|
||||
int visibleChars = 0;
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
int levelCurrent = SC_FOLDLEVELBASE;
|
||||
if (lineCurrent > 0)
|
||||
levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
|
||||
int levelMinCurrent = levelCurrent;
|
||||
int levelNext = levelCurrent;
|
||||
char chNext = styler[startPos];
|
||||
int styleNext = styler.StyleAt(startPos);
|
||||
int style = initStyle;
|
||||
for (unsigned int i = startPos; i < endPos; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
int stylePrev = style;
|
||||
style = styleNext;
|
||||
styleNext = styler.StyleAt(i + 1);
|
||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
if (foldComment && IsStreamCommentStyle(style)) {
|
||||
if (!IsStreamCommentStyle(stylePrev)) {
|
||||
levelNext++;
|
||||
} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {
|
||||
// Comments don't end at end of line and the next character may be unstyled.
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
if (style == SCE_D_OPERATOR) {
|
||||
if (ch == '{') {
|
||||
// Measure the minimum before a '{' to allow
|
||||
// folding on "} else {"
|
||||
if (levelMinCurrent > levelNext) {
|
||||
levelMinCurrent = levelNext;
|
||||
}
|
||||
levelNext++;
|
||||
} else if (ch == '}') {
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
if (atEOL) {
|
||||
if (foldComment) { // Handle nested comments
|
||||
int nc;
|
||||
nc = styler.GetLineState(lineCurrent);
|
||||
nc -= lineCurrent>0? styler.GetLineState(lineCurrent-1): 0;
|
||||
levelNext += nc;
|
||||
}
|
||||
int levelUse = levelCurrent;
|
||||
if (foldAtElse) {
|
||||
levelUse = levelMinCurrent;
|
||||
}
|
||||
int lev = levelUse | levelNext << 16;
|
||||
if (visibleChars == 0 && foldCompact)
|
||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||
if (levelUse < levelNext)
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
if (lev != styler.LevelAt(lineCurrent)) {
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
}
|
||||
lineCurrent++;
|
||||
levelCurrent = levelNext;
|
||||
levelMinCurrent = levelCurrent;
|
||||
visibleChars = 0;
|
||||
}
|
||||
if (!IsASpace(ch))
|
||||
visibleChars++;
|
||||
}
|
||||
unsigned int endPos = startPos + length;
|
||||
int visibleChars = 0;
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
int levelCurrent = SC_FOLDLEVELBASE;
|
||||
if (lineCurrent > 0)
|
||||
levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
|
||||
int levelMinCurrent = levelCurrent;
|
||||
int levelNext = levelCurrent;
|
||||
char chNext = styler[startPos];
|
||||
int styleNext = styler.StyleAt(startPos);
|
||||
int style = initStyle;
|
||||
for (unsigned int i = startPos; i < endPos; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
int stylePrev = style;
|
||||
style = styleNext;
|
||||
styleNext = styler.StyleAt(i + 1);
|
||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
if (foldComment && IsStreamCommentStyle(style)) {
|
||||
if (!IsStreamCommentStyle(stylePrev)) {
|
||||
levelNext++;
|
||||
} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {
|
||||
// Comments don't end at end of line and the next character may be unstyled.
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
if (style == SCE_D_OPERATOR) {
|
||||
if (ch == '{') {
|
||||
// Measure the minimum before a '{' to allow
|
||||
// folding on "} else {"
|
||||
if (levelMinCurrent > levelNext) {
|
||||
levelMinCurrent = levelNext;
|
||||
}
|
||||
levelNext++;
|
||||
} else if (ch == '}') {
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
if (atEOL) {
|
||||
if (foldComment) { // Handle nested comments
|
||||
int nc;
|
||||
nc = styler.GetLineState(lineCurrent);
|
||||
nc -= lineCurrent>0? styler.GetLineState(lineCurrent-1): 0;
|
||||
levelNext += nc;
|
||||
}
|
||||
int levelUse = levelCurrent;
|
||||
if (foldAtElse) {
|
||||
levelUse = levelMinCurrent;
|
||||
}
|
||||
int lev = levelUse | levelNext << 16;
|
||||
if (visibleChars == 0 && foldCompact)
|
||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||
if (levelUse < levelNext)
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
if (lev != styler.LevelAt(lineCurrent)) {
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
}
|
||||
lineCurrent++;
|
||||
levelCurrent = levelNext;
|
||||
levelMinCurrent = levelCurrent;
|
||||
visibleChars = 0;
|
||||
}
|
||||
if (!IsASpace(ch))
|
||||
visibleChars++;
|
||||
}
|
||||
}
|
||||
|
||||
static void FoldDDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *[], Accessor &styler) {
|
||||
FoldDoc(startPos, length, initStyle, styler);
|
||||
WordList *[], Accessor &styler) {
|
||||
FoldDoc(startPos, length, initStyle, styler);
|
||||
}
|
||||
|
||||
static const char * const dWordLists[] = {
|
||||
"Primary keywords and identifiers",
|
||||
"Secondary keywords and identifiers",
|
||||
"Documentation comment keywords",
|
||||
"Type definitions and aliases",
|
||||
0,
|
||||
};
|
||||
"Primary keywords and identifiers",
|
||||
"Secondary keywords and identifiers",
|
||||
"Documentation comment keywords",
|
||||
"Type definitions and aliases",
|
||||
"Keywords 5",
|
||||
"Keywords 6",
|
||||
"Keywords 7",
|
||||
0,
|
||||
};
|
||||
|
||||
static void ColouriseDDoc(unsigned int startPos, int length,
|
||||
int initStyle, WordList *keywordlists[], Accessor &styler) {
|
||||
ColouriseDoc(startPos, length, initStyle, keywordlists, styler, true);
|
||||
int initStyle, WordList *keywordlists[], Accessor &styler) {
|
||||
ColouriseDoc(startPos, length, initStyle, keywordlists, styler, true);
|
||||
}
|
||||
|
||||
LexerModule lmD(SCLEX_D, ColouriseDDoc, "d", FoldDDoc, dWordLists);
|
||||
|
@ -1,10 +1,8 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file LexCrontab.cxx
|
||||
** Lexer to use with extended crontab files used by a powerful
|
||||
** Windows scheduler/event monitor/automation manager nnCron.
|
||||
** (http://nemtsev.eserv.ru/)
|
||||
/** @file LexForth.cxx
|
||||
** Lexer for FORTH
|
||||
**/
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -17,6 +15,7 @@
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
@ -25,100 +24,29 @@
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
bool is_whitespace(int ch){
|
||||
return ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ';
|
||||
static inline bool IsAWordChar(int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' ||
|
||||
ch == '_' || ch == '?' || ch == '"' || ch == '@' ||
|
||||
ch == '!' || ch == '[' || ch == ']' || ch == '/' ||
|
||||
ch == '+' || ch == '-' || ch == '*' || ch == '<' ||
|
||||
ch == '>' || ch == '=' || ch == ';' || ch == '(' ||
|
||||
ch == ')' );
|
||||
}
|
||||
|
||||
bool is_blank(int ch){
|
||||
return ch == '\t' || ch == ' ';
|
||||
}
|
||||
//#define FORTH_DEBUG
|
||||
#ifdef FORTH_DEBUG
|
||||
static FILE *f_debug;
|
||||
#define log(x) fputs(f_debug,x);
|
||||
#else
|
||||
#define log(x)
|
||||
#endif
|
||||
|
||||
#define STATE_LOCALE
|
||||
#define BL ' '
|
||||
|
||||
static Accessor *st;
|
||||
static int cur_pos,pos1,pos2,pos0,lengthDoc;
|
||||
char *buffer;
|
||||
|
||||
char getChar(bool is_bl){
|
||||
char ch=st->SafeGetCharAt(cur_pos);
|
||||
if(is_bl) if(is_whitespace(ch)) ch=BL;
|
||||
return ch;
|
||||
static inline bool IsAWordStart(int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.');
|
||||
}
|
||||
|
||||
char getCharBL(){
|
||||
char ch=st->SafeGetCharAt(cur_pos);
|
||||
return ch;
|
||||
}
|
||||
bool is_eol(char ch){
|
||||
return ch=='\n' || ch=='\r';
|
||||
static inline bool IsANumChar(int ch) {
|
||||
return (ch < 0x80) && (isxdigit(ch) || ch == '.' || ch == 'e' || ch == 'E' );
|
||||
}
|
||||
|
||||
int parse(char ch, bool skip_eol){
|
||||
// pos1 - start pos of word
|
||||
// pos2 - pos after of word
|
||||
// pos0 - start pos
|
||||
char c=0;
|
||||
int len;
|
||||
bool is_bl=ch==BL;
|
||||
pos0=pos1=pos2=cur_pos;
|
||||
for(;cur_pos<lengthDoc && (c=getChar(is_bl))==ch; cur_pos++){
|
||||
if(is_eol(c) && !skip_eol){
|
||||
pos2=pos1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pos1=cur_pos;
|
||||
pos2=pos1;
|
||||
if(cur_pos==lengthDoc) return 0;
|
||||
for(len=0;cur_pos<lengthDoc && (c=getChar(is_bl))!=ch; cur_pos++){
|
||||
if(is_eol(c) && !skip_eol) break;
|
||||
pos2++;
|
||||
buffer[len++]=c;
|
||||
}
|
||||
if(c==ch) pos2--;
|
||||
buffer[len]='\0';
|
||||
#ifdef FORTH_DEBUG
|
||||
fprintf(f_debug,"parse: %c %s\n",ch,buffer);
|
||||
#endif
|
||||
return len;
|
||||
static inline bool IsASpaceChar(int ch) {
|
||||
return (ch < 0x80) && isspace(ch);
|
||||
}
|
||||
|
||||
bool _is_number(char *s,int base){
|
||||
for(;*s;s++){
|
||||
int digit=((int)*s)-(int)'0';
|
||||
#ifdef FORTH_DEBUG
|
||||
fprintf(f_debug,"digit: %c %d\n",*s,digit);
|
||||
#endif
|
||||
if(digit>9 && base>10) digit-=7;
|
||||
if(digit<0) return false;
|
||||
if(digit>=base) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool is_number(char *s){
|
||||
if(strncmp(s,"0x",2)==0) return _is_number(s+2,16);
|
||||
return _is_number(s,10);
|
||||
}
|
||||
|
||||
static void ColouriseForthDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler)
|
||||
{
|
||||
st=&styler;
|
||||
cur_pos=startPos;
|
||||
lengthDoc = startPos + length;
|
||||
buffer = new char[length];
|
||||
|
||||
#ifdef FORTH_DEBUG
|
||||
f_debug=fopen("c:\\sci.log","at");
|
||||
#endif
|
||||
static void ColouriseForthDoc(unsigned int startPos, int length, int initStyle, WordList *keywordLists[],
|
||||
Accessor &styler) {
|
||||
|
||||
WordList &control = *keywordLists[0];
|
||||
WordList &keyword = *keywordLists[1];
|
||||
@ -127,226 +55,122 @@ static void ColouriseForthDoc(unsigned int startPos, int length, int, WordList *
|
||||
WordList &preword2 = *keywordLists[4];
|
||||
WordList &strings = *keywordLists[5];
|
||||
|
||||
// go through all provided text segment
|
||||
// using the hand-written state machine shown below
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
while(parse(BL,true)!=0){
|
||||
if(pos0!=pos1){
|
||||
styler.ColourTo(pos0,SCE_FORTH_DEFAULT);
|
||||
styler.ColourTo(pos1-1,SCE_FORTH_DEFAULT);
|
||||
}
|
||||
if(strcmp("\\",buffer)==0){
|
||||
styler.ColourTo(pos1,SCE_FORTH_COMMENT);
|
||||
parse(1,false);
|
||||
styler.ColourTo(pos2,SCE_FORTH_COMMENT);
|
||||
}else if(strcmp("(",buffer)==0){
|
||||
styler.ColourTo(pos1,SCE_FORTH_COMMENT);
|
||||
parse(')',true);
|
||||
if(cur_pos<lengthDoc) cur_pos++;
|
||||
styler.ColourTo(cur_pos,SCE_FORTH_COMMENT);
|
||||
}else if(strcmp("[",buffer)==0){
|
||||
styler.ColourTo(pos1,SCE_FORTH_STRING);
|
||||
parse(']',true);
|
||||
if(cur_pos<lengthDoc) cur_pos++;
|
||||
styler.ColourTo(cur_pos,SCE_FORTH_STRING);
|
||||
}else if(strcmp("{",buffer)==0){
|
||||
styler.ColourTo(pos1,SCE_FORTH_LOCALE);
|
||||
parse('}',false);
|
||||
if(cur_pos<lengthDoc) cur_pos++;
|
||||
styler.ColourTo(cur_pos,SCE_FORTH_LOCALE);
|
||||
}else if(strings.InList(buffer)) {
|
||||
styler.ColourTo(pos1,SCE_FORTH_STRING);
|
||||
parse('"',false);
|
||||
if(cur_pos<lengthDoc) cur_pos++;
|
||||
styler.ColourTo(cur_pos,SCE_FORTH_STRING);
|
||||
}else if(control.InList(buffer)) {
|
||||
styler.ColourTo(pos1,SCE_FORTH_CONTROL);
|
||||
styler.ColourTo(pos2,SCE_FORTH_CONTROL);
|
||||
}else if(keyword.InList(buffer)) {
|
||||
styler.ColourTo(pos1,SCE_FORTH_KEYWORD);
|
||||
styler.ColourTo(pos2,SCE_FORTH_KEYWORD);
|
||||
}else if(defword.InList(buffer)) {
|
||||
styler.ColourTo(pos1,SCE_FORTH_KEYWORD);
|
||||
styler.ColourTo(pos2,SCE_FORTH_KEYWORD);
|
||||
parse(BL,false);
|
||||
styler.ColourTo(pos1-1,SCE_FORTH_DEFAULT);
|
||||
styler.ColourTo(pos1,SCE_FORTH_DEFWORD);
|
||||
styler.ColourTo(pos2,SCE_FORTH_DEFWORD);
|
||||
}else if(preword1.InList(buffer)) {
|
||||
styler.ColourTo(pos1,SCE_FORTH_PREWORD1);
|
||||
parse(BL,false);
|
||||
styler.ColourTo(pos2,SCE_FORTH_PREWORD1);
|
||||
}else if(preword2.InList(buffer)) {
|
||||
styler.ColourTo(pos1,SCE_FORTH_PREWORD2);
|
||||
parse(BL,false);
|
||||
styler.ColourTo(pos2,SCE_FORTH_PREWORD2);
|
||||
parse(BL,false);
|
||||
styler.ColourTo(pos1,SCE_FORTH_STRING);
|
||||
styler.ColourTo(pos2,SCE_FORTH_STRING);
|
||||
}else if(is_number(buffer)){
|
||||
styler.ColourTo(pos1,SCE_FORTH_NUMBER);
|
||||
styler.ColourTo(pos2,SCE_FORTH_NUMBER);
|
||||
}
|
||||
}
|
||||
#ifdef FORTH_DEBUG
|
||||
fclose(f_debug);
|
||||
#endif
|
||||
delete []buffer;
|
||||
return;
|
||||
/*
|
||||
if(control.InList(buffer)) {
|
||||
styler.ColourTo(i,SCE_FORTH_CONTROL);
|
||||
} else if(keyword.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_FORTH_KEYWORD );
|
||||
} else if(defword.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_FORTH_DEFWORD );
|
||||
// prev_state=SCE_FORTH_DEFWORD
|
||||
} else if(preword1.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_FORTH_PREWORD1 );
|
||||
// state=SCE_FORTH_PREWORD1;
|
||||
} else if(preword2.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_FORTH_PREWORD2 );
|
||||
} else {
|
||||
styler.ColourTo(i-1,SCE_FORTH_DEFAULT);
|
||||
}
|
||||
*/
|
||||
/*
|
||||
chPrev=' ';
|
||||
for (int i = startPos; i < lengthDoc; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
if(i!=startPos) chPrev=styler.SafeGetCharAt(i - 1);
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
|
||||
if (styler.IsLeadByte(ch)) {
|
||||
chNext = styler.SafeGetCharAt(i + 2);
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
#ifdef FORTH_DEBUG
|
||||
fprintf(f_debug,"%c %d ",ch,state);
|
||||
#endif
|
||||
switch(state) {
|
||||
case SCE_FORTH_DEFAULT:
|
||||
if(is_whitespace(ch)) {
|
||||
// whitespace is simply ignored here...
|
||||
styler.ColourTo(i,SCE_FORTH_DEFAULT);
|
||||
break;
|
||||
} else if( ch == '\\' && is_blank(chNext)) {
|
||||
// signals the start of an one line comment...
|
||||
state = SCE_FORTH_COMMENT;
|
||||
styler.ColourTo(i,SCE_FORTH_COMMENT);
|
||||
} else if( is_whitespace(chPrev) && ch == '(' && is_whitespace(chNext)) {
|
||||
// signals the start of a plain comment...
|
||||
state = SCE_FORTH_COMMENT_ML;
|
||||
styler.ColourTo(i,SCE_FORTH_COMMENT_ML);
|
||||
} else if( isdigit(ch) ) {
|
||||
// signals the start of a number
|
||||
bufferCount = 0;
|
||||
buffer[bufferCount++] = ch;
|
||||
state = SCE_FORTH_NUMBER;
|
||||
} else if( !is_whitespace(ch)) {
|
||||
// signals the start of an identifier
|
||||
bufferCount = 0;
|
||||
buffer[bufferCount++] = ch;
|
||||
state = SCE_FORTH_IDENTIFIER;
|
||||
} else {
|
||||
// style it the default style..
|
||||
styler.ColourTo(i,SCE_FORTH_DEFAULT);
|
||||
}
|
||||
break;
|
||||
for (; sc.More(); sc.Forward())
|
||||
{
|
||||
// Determine if the current state should terminate.
|
||||
if (sc.state == SCE_FORTH_COMMENT) {
|
||||
if (sc.atLineEnd) {
|
||||
sc.SetState(SCE_FORTH_DEFAULT);
|
||||
}
|
||||
}else if (sc.state == SCE_FORTH_COMMENT_ML) {
|
||||
if (sc.ch == ')') {
|
||||
sc.ForwardSetState(SCE_FORTH_DEFAULT);
|
||||
}
|
||||
}else if (sc.state == SCE_FORTH_IDENTIFIER || sc.state == SCE_FORTH_NUMBER) {
|
||||
// handle numbers here too, because what we thought was a number might
|
||||
// turn out to be a keyword e.g. 2DUP
|
||||
if (IsASpaceChar(sc.ch) ) {
|
||||
char s[100];
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
int newState = sc.state == SCE_FORTH_NUMBER ? SCE_FORTH_NUMBER : SCE_FORTH_DEFAULT;
|
||||
if (control.InList(s)) {
|
||||
sc.ChangeState(SCE_FORTH_CONTROL);
|
||||
} else if (keyword.InList(s)) {
|
||||
sc.ChangeState(SCE_FORTH_KEYWORD);
|
||||
} else if (defword.InList(s)) {
|
||||
sc.ChangeState(SCE_FORTH_DEFWORD);
|
||||
} else if (preword1.InList(s)) {
|
||||
sc.ChangeState(SCE_FORTH_PREWORD1);
|
||||
} else if (preword2.InList(s)) {
|
||||
sc.ChangeState(SCE_FORTH_PREWORD2);
|
||||
} else if (strings.InList(s)) {
|
||||
sc.ChangeState(SCE_FORTH_STRING);
|
||||
newState = SCE_FORTH_STRING;
|
||||
}
|
||||
sc.SetState(newState);
|
||||
}
|
||||
if (sc.state == SCE_FORTH_NUMBER) {
|
||||
if (IsASpaceChar(sc.ch)) {
|
||||
sc.SetState(SCE_FORTH_DEFAULT);
|
||||
} else if (!IsANumChar(sc.ch)) {
|
||||
sc.ChangeState(SCE_FORTH_IDENTIFIER);
|
||||
}
|
||||
}
|
||||
}else if (sc.state == SCE_FORTH_STRING) {
|
||||
if (sc.ch == '\"') {
|
||||
sc.ForwardSetState(SCE_FORTH_DEFAULT);
|
||||
}
|
||||
}else if (sc.state == SCE_FORTH_LOCALE) {
|
||||
if (sc.ch == '}') {
|
||||
sc.ForwardSetState(SCE_FORTH_DEFAULT);
|
||||
}
|
||||
}else if (sc.state == SCE_FORTH_DEFWORD) {
|
||||
if (IsASpaceChar(sc.ch)) {
|
||||
sc.SetState(SCE_FORTH_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
case SCE_FORTH_COMMENT:
|
||||
// if we find a newline here,
|
||||
// we simply go to default state
|
||||
// else continue to work on it...
|
||||
if( ch == '\n' || ch == '\r' ) {
|
||||
state = SCE_FORTH_DEFAULT;
|
||||
} else {
|
||||
styler.ColourTo(i,SCE_FORTH_COMMENT);
|
||||
}
|
||||
break;
|
||||
// Determine if a new state should be entered.
|
||||
if (sc.state == SCE_FORTH_DEFAULT) {
|
||||
if (sc.ch == '\\'){
|
||||
sc.SetState(SCE_FORTH_COMMENT);
|
||||
} else if (sc.ch == '(' &&
|
||||
(sc.atLineStart || IsASpaceChar(sc.chPrev)) &&
|
||||
(sc.atLineEnd || IsASpaceChar(sc.chNext))) {
|
||||
sc.SetState(SCE_FORTH_COMMENT_ML);
|
||||
} else if ( (sc.ch == '$' && (isascii(sc.chNext) && isxdigit(sc.chNext))) ) {
|
||||
// number starting with $ is a hex number
|
||||
sc.SetState(SCE_FORTH_NUMBER);
|
||||
while(sc.More() && isascii(sc.chNext) && isxdigit(sc.chNext))
|
||||
sc.Forward();
|
||||
} else if ( (sc.ch == '%' && (isascii(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1'))) ) {
|
||||
// number starting with % is binary
|
||||
sc.SetState(SCE_FORTH_NUMBER);
|
||||
while(sc.More() && isascii(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1'))
|
||||
sc.Forward();
|
||||
} else if ( isascii(sc.ch) &&
|
||||
(isxdigit(sc.ch) || ((sc.ch == '.' || sc.ch == '-') && isascii(sc.chNext) && isxdigit(sc.chNext)) )
|
||||
){
|
||||
sc.SetState(SCE_FORTH_NUMBER);
|
||||
} else if (IsAWordStart(sc.ch)) {
|
||||
sc.SetState(SCE_FORTH_IDENTIFIER);
|
||||
} else if (sc.ch == '{') {
|
||||
sc.SetState(SCE_FORTH_LOCALE);
|
||||
} else if (sc.ch == ':' && isascii(sc.chNext) && isspace(sc.chNext)) {
|
||||
// highlight word definitions e.g. : GCD ( n n -- n ) ..... ;
|
||||
// ^ ^^^
|
||||
sc.SetState(SCE_FORTH_DEFWORD);
|
||||
while(sc.More() && isascii(sc.chNext) && isspace(sc.chNext))
|
||||
sc.Forward();
|
||||
} else if (sc.ch == ';' &&
|
||||
(sc.atLineStart || IsASpaceChar(sc.chPrev)) &&
|
||||
(sc.atLineEnd || IsASpaceChar(sc.chNext)) ) {
|
||||
// mark the ';' that ends a word
|
||||
sc.SetState(SCE_FORTH_DEFWORD);
|
||||
sc.ForwardSetState(SCE_FORTH_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
case SCE_FORTH_COMMENT_ML:
|
||||
if( ch == ')') {
|
||||
state = SCE_FORTH_DEFAULT;
|
||||
} else {
|
||||
styler.ColourTo(i+1,SCE_FORTH_COMMENT_ML);
|
||||
}
|
||||
break;
|
||||
|
||||
case SCE_FORTH_IDENTIFIER:
|
||||
// stay in CONF_IDENTIFIER state until we find a non-alphanumeric
|
||||
if( !is_whitespace(ch) ) {
|
||||
buffer[bufferCount++] = ch;
|
||||
} else {
|
||||
state = SCE_FORTH_DEFAULT;
|
||||
buffer[bufferCount] = '\0';
|
||||
#ifdef FORTH_DEBUG
|
||||
fprintf(f_debug,"\nid %s\n",buffer);
|
||||
#endif
|
||||
|
||||
// check if the buffer contains a keyword,
|
||||
// and highlight it if it is a keyword...
|
||||
// switch(prev_state)
|
||||
// case SCE_FORTH_DEFAULT:
|
||||
if(control.InList(buffer)) {
|
||||
styler.ColourTo(i,SCE_FORTH_CONTROL);
|
||||
} else if(keyword.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_FORTH_KEYWORD );
|
||||
} else if(defword.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_FORTH_DEFWORD );
|
||||
// prev_state=SCE_FORTH_DEFWORD
|
||||
} else if(preword1.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_FORTH_PREWORD1 );
|
||||
// state=SCE_FORTH_PREWORD1;
|
||||
} else if(preword2.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_FORTH_PREWORD2 );
|
||||
} else {
|
||||
styler.ColourTo(i-1,SCE_FORTH_DEFAULT);
|
||||
}
|
||||
// break;
|
||||
// case
|
||||
|
||||
// push back the faulty character
|
||||
chNext = styler[i--];
|
||||
}
|
||||
break;
|
||||
|
||||
case SCE_FORTH_NUMBER:
|
||||
// stay in CONF_NUMBER state until we find a non-numeric
|
||||
if( isdigit(ch) ) {
|
||||
buffer[bufferCount++] = ch;
|
||||
} else {
|
||||
state = SCE_FORTH_DEFAULT;
|
||||
buffer[bufferCount] = '\0';
|
||||
// Colourize here... (normal number)
|
||||
styler.ColourTo(i-1,SCE_FORTH_NUMBER);
|
||||
// push back a character
|
||||
chNext = styler[i--];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef FORTH_DEBUG
|
||||
fclose(f_debug);
|
||||
#endif
|
||||
delete []buffer;
|
||||
*/
|
||||
}
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
static void FoldForthDoc(unsigned int, int, int, WordList *[],
|
||||
Accessor &) {
|
||||
Accessor &) {
|
||||
}
|
||||
|
||||
static const char * const forthWordLists[] = {
|
||||
"control keywords",
|
||||
"keywords",
|
||||
"definition words",
|
||||
"prewords with one argument",
|
||||
"prewords with two arguments",
|
||||
"string definition keywords",
|
||||
0,
|
||||
};
|
||||
"control keywords",
|
||||
"keywords",
|
||||
"definition words",
|
||||
"prewords with one argument",
|
||||
"prewords with two arguments",
|
||||
"string definition keywords",
|
||||
0,
|
||||
};
|
||||
|
||||
LexerModule lmForth(SCLEX_FORTH, ColouriseForthDoc, "forth", FoldForthDoc, forthWordLists);
|
||||
|
||||
|
||||
LexerModule lmForth(SCLEX_FORTH, ColouriseForthDoc, "forth",FoldForthDoc,forthWordLists);
|
||||
|
@ -231,6 +231,7 @@ def RegenerateAll():
|
||||
|
||||
# Find all the lexer source code files
|
||||
lexFilePaths = glob.glob(root + "scintilla/src/Lex*.cxx")
|
||||
sortListInsensitive(lexFilePaths)
|
||||
lexFiles = [os.path.basename(f)[:-4] for f in lexFilePaths]
|
||||
print(lexFiles)
|
||||
lexerModules = []
|
||||
@ -261,6 +262,7 @@ def RegenerateAll():
|
||||
otherProps = ["abbrev.properties", "Embedded.properties", "SciTEGlobal.properties", "SciTE.properties"]
|
||||
if os.path.exists(root + "scite"):
|
||||
propFilePaths = glob.glob(root + "scite/src/*.properties")
|
||||
sortListInsensitive(propFilePaths)
|
||||
propFiles = [os.path.basename(f) for f in propFilePaths if os.path.basename(f) not in otherProps]
|
||||
sortListInsensitive(propFiles)
|
||||
print(propFiles)
|
||||
|
@ -1147,7 +1147,10 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
}
|
||||
if (ch != '#' && !(isascii(ch) && isalnum(ch)) // Should check that '#' follows '&', but it is unlikely anyway...
|
||||
&& ch != '.' && ch != '-' && ch != '_' && ch != ':') { // valid in XML
|
||||
styler.ColourTo(i, SCE_H_TAGUNKNOWN);
|
||||
if (!isascii(ch)) // Possibly start of a multibyte character so don't allow this byte to be in entity style
|
||||
styler.ColourTo(i-1, SCE_H_TAGUNKNOWN);
|
||||
else
|
||||
styler.ColourTo(i, SCE_H_TAGUNKNOWN);
|
||||
state = SCE_H_DEFAULT;
|
||||
}
|
||||
break;
|
||||
@ -1912,299 +1915,6 @@ static void ColouriseHTMLDoc(unsigned int startPos, int length, int initStyle, W
|
||||
ColouriseHyperTextDoc(startPos, length, initStyle, keywordlists, styler, false);
|
||||
}
|
||||
|
||||
static bool isASPScript(int state) {
|
||||
return
|
||||
(state >= SCE_HJA_START && state <= SCE_HJA_REGEX) ||
|
||||
(state >= SCE_HBA_START && state <= SCE_HBA_STRINGEOL) ||
|
||||
(state >= SCE_HPA_DEFAULT && state <= SCE_HPA_IDENTIFIER);
|
||||
}
|
||||
|
||||
static void ColouriseHBAPiece(StyleContext &sc, WordList *keywordlists[]) {
|
||||
WordList &keywordsVBS = *keywordlists[2];
|
||||
if (sc.state == SCE_HBA_WORD) {
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
char s[100];
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
if (keywordsVBS.InList(s)) {
|
||||
if (strcmp(s, "rem") == 0) {
|
||||
sc.ChangeState(SCE_HBA_COMMENTLINE);
|
||||
if (sc.atLineEnd) {
|
||||
sc.SetState(SCE_HBA_DEFAULT);
|
||||
}
|
||||
} else {
|
||||
sc.SetState(SCE_HBA_DEFAULT);
|
||||
}
|
||||
} else {
|
||||
sc.ChangeState(SCE_HBA_IDENTIFIER);
|
||||
sc.SetState(SCE_HBA_DEFAULT);
|
||||
}
|
||||
}
|
||||
} else if (sc.state == SCE_HBA_NUMBER) {
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
sc.SetState(SCE_HBA_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_HBA_STRING) {
|
||||
if (sc.ch == '\"') {
|
||||
sc.ForwardSetState(SCE_HBA_DEFAULT);
|
||||
} else if (sc.ch == '\r' || sc.ch == '\n') {
|
||||
sc.ChangeState(SCE_HBA_STRINGEOL);
|
||||
sc.ForwardSetState(SCE_HBA_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_HBA_COMMENTLINE) {
|
||||
if (sc.ch == '\r' || sc.ch == '\n') {
|
||||
sc.SetState(SCE_HBA_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
if (sc.state == SCE_HBA_DEFAULT) {
|
||||
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
||||
sc.SetState(SCE_HBA_NUMBER);
|
||||
} else if (IsAWordStart(sc.ch)) {
|
||||
sc.SetState(SCE_HBA_WORD);
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.SetState(SCE_HBA_COMMENTLINE);
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.SetState(SCE_HBA_STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ColouriseHTMLPiece(StyleContext &sc, WordList *keywordlists[]) {
|
||||
WordList &keywordsTags = *keywordlists[0];
|
||||
if (sc.state == SCE_H_COMMENT) {
|
||||
if (sc.Match("-->")) {
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_H_ENTITY) {
|
||||
if (sc.ch == ';') {
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
} else if (sc.ch != '#' && (sc.ch < 0x80) && !isalnum(sc.ch) // Should check that '#' follows '&', but it is unlikely anyway...
|
||||
&& sc.ch != '.' && sc.ch != '-' && sc.ch != '_' && sc.ch != ':') { // valid in XML
|
||||
sc.ChangeState(SCE_H_TAGUNKNOWN);
|
||||
sc.SetState(SCE_H_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_H_TAGUNKNOWN) {
|
||||
if (!ishtmlwordchar(sc.ch) && !((sc.ch == '/') && (sc.chPrev == '<')) && sc.ch != '[') {
|
||||
char s[100];
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
if (s[1] == '/') {
|
||||
if (keywordsTags.InList(s + 2)) {
|
||||
sc.ChangeState(SCE_H_TAG);
|
||||
}
|
||||
} else {
|
||||
if (keywordsTags.InList(s + 1)) {
|
||||
sc.ChangeState(SCE_H_TAG);
|
||||
}
|
||||
}
|
||||
if (sc.ch == '>') {
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
} else if (sc.Match('/', '>')) {
|
||||
sc.SetState(SCE_H_TAGEND);
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
} else {
|
||||
sc.SetState(SCE_H_OTHER);
|
||||
}
|
||||
}
|
||||
} else if (sc.state == SCE_H_ATTRIBUTE) {
|
||||
if (!ishtmlwordchar(sc.ch)) {
|
||||
char s[100];
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
if (!keywordsTags.InList(s)) {
|
||||
sc.ChangeState(SCE_H_ATTRIBUTEUNKNOWN);
|
||||
}
|
||||
sc.SetState(SCE_H_OTHER);
|
||||
}
|
||||
} else if (sc.state == SCE_H_OTHER) {
|
||||
if (sc.ch == '>') {
|
||||
sc.SetState(SCE_H_TAG);
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
} else if (sc.Match('/', '>')) {
|
||||
sc.SetState(SCE_H_TAG);
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
} else if (sc.chPrev == '=') {
|
||||
sc.SetState(SCE_H_VALUE);
|
||||
}
|
||||
} else if (sc.state == SCE_H_DOUBLESTRING) {
|
||||
if (sc.ch == '\"') {
|
||||
sc.ForwardSetState(SCE_H_OTHER);
|
||||
}
|
||||
} else if (sc.state == SCE_H_SINGLESTRING) {
|
||||
if (sc.ch == '\'') {
|
||||
sc.ForwardSetState(SCE_H_OTHER);
|
||||
}
|
||||
} else if (sc.state == SCE_H_NUMBER) {
|
||||
if (!IsADigit(sc.ch)) {
|
||||
sc.SetState(SCE_H_OTHER);
|
||||
}
|
||||
}
|
||||
|
||||
if (sc.state == SCE_H_DEFAULT) {
|
||||
if (sc.ch == '<') {
|
||||
if (sc.Match("<!--"))
|
||||
sc.SetState(SCE_H_COMMENT);
|
||||
else
|
||||
sc.SetState(SCE_H_TAGUNKNOWN);
|
||||
} else if (sc.ch == '&') {
|
||||
sc.SetState(SCE_H_ENTITY);
|
||||
}
|
||||
} else if ((sc.state == SCE_H_OTHER) || (sc.state == SCE_H_VALUE)) {
|
||||
if (sc.ch == '\"' && sc.chPrev == '=') {
|
||||
sc.SetState(SCE_H_DOUBLESTRING);
|
||||
} else if (sc.ch == '\'' && sc.chPrev == '=') {
|
||||
sc.SetState(SCE_H_SINGLESTRING);
|
||||
} else if (IsADigit(sc.ch)) {
|
||||
sc.SetState(SCE_H_NUMBER);
|
||||
} else if (sc.ch == '>') {
|
||||
sc.SetState(SCE_H_TAG);
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
} else if (ishtmlwordchar(sc.ch)) {
|
||||
sc.SetState(SCE_H_ATTRIBUTE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ColouriseASPPiece(StyleContext &sc, WordList *keywordlists[]) {
|
||||
// Possibly exit current state to either SCE_H_DEFAULT or SCE_HBA_DEFAULT
|
||||
if ((sc.state == SCE_H_ASPAT || isASPScript(sc.state)) && sc.Match('%', '>')) {
|
||||
sc.SetState(SCE_H_ASP);
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
}
|
||||
|
||||
// Handle some ASP script
|
||||
if (sc.state >= SCE_HBA_START && sc.state <= SCE_HBA_STRINGEOL) {
|
||||
ColouriseHBAPiece(sc, keywordlists);
|
||||
} else if (sc.state >= SCE_H_DEFAULT && sc.state <= SCE_H_SGML_BLOCK_DEFAULT) {
|
||||
ColouriseHTMLPiece(sc, keywordlists);
|
||||
}
|
||||
|
||||
// Enter new sc.state
|
||||
if ((sc.state == SCE_H_DEFAULT) || (sc.state == SCE_H_TAGUNKNOWN)) {
|
||||
if (sc.Match('<', '%')) {
|
||||
if (sc.state == SCE_H_TAGUNKNOWN)
|
||||
sc.ChangeState(SCE_H_ASP);
|
||||
else
|
||||
sc.SetState(SCE_H_ASP);
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
if (sc.ch == '@') {
|
||||
sc.ForwardSetState(SCE_H_ASPAT);
|
||||
} else {
|
||||
if (sc.ch == '=') {
|
||||
sc.Forward();
|
||||
}
|
||||
sc.SetState(SCE_HBA_DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ColouriseASPDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
// Lexer for HTML requires more lexical states (8 bits worth) than most lexers
|
||||
StyleContext sc(startPos, length, initStyle, styler, static_cast<char>(STYLE_MAX));
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
ColouriseASPPiece(sc, keywordlists);
|
||||
}
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
static void ColourisePHPPiece(StyleContext &sc, WordList *keywordlists[]) {
|
||||
// Possibly exit current state to either SCE_H_DEFAULT or SCE_HBA_DEFAULT
|
||||
if (sc.state >= SCE_HPHP_DEFAULT && sc.state <= SCE_HPHP_OPERATOR) {
|
||||
if (!isPHPStringState(sc.state) &&
|
||||
(sc.state != SCE_HPHP_COMMENT) &&
|
||||
(sc.Match('?', '>'))) {
|
||||
sc.SetState(SCE_H_QUESTION);
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_H_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
if (sc.state >= SCE_H_DEFAULT && sc.state <= SCE_H_SGML_BLOCK_DEFAULT) {
|
||||
ColouriseHTMLPiece(sc, keywordlists);
|
||||
}
|
||||
|
||||
// Handle some PHP script
|
||||
if (sc.state == SCE_HPHP_WORD) {
|
||||
if (!IsPhpWordChar(static_cast<char>(sc.ch))) {
|
||||
sc.SetState(SCE_HPHP_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_HPHP_COMMENTLINE) {
|
||||
if (sc.ch == '\r' || sc.ch == '\n') {
|
||||
sc.SetState(SCE_HPHP_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_HPHP_COMMENT) {
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.SetState(SCE_HPHP_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_HPHP_HSTRING) {
|
||||
if (sc.ch == '\"') {
|
||||
sc.ForwardSetState(SCE_HPHP_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_HPHP_SIMPLESTRING) {
|
||||
if (sc.ch == '\'') {
|
||||
sc.ForwardSetState(SCE_HPHP_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_HPHP_VARIABLE) {
|
||||
if (!IsPhpWordChar(static_cast<char>(sc.ch))) {
|
||||
sc.SetState(SCE_HPHP_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_HPHP_OPERATOR) {
|
||||
sc.SetState(SCE_HPHP_DEFAULT);
|
||||
}
|
||||
|
||||
// Enter new sc.state
|
||||
if ((sc.state == SCE_H_DEFAULT) || (sc.state == SCE_H_TAGUNKNOWN)) {
|
||||
if (sc.Match("<?php")) {
|
||||
sc.SetState(SCE_H_QUESTION);
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.SetState(SCE_HPHP_DEFAULT);
|
||||
}
|
||||
}
|
||||
if (sc.state == SCE_HPHP_DEFAULT) {
|
||||
if (IsPhpWordStart(static_cast<char>(sc.ch))) {
|
||||
sc.SetState(SCE_HPHP_WORD);
|
||||
} else if (sc.ch == '#') {
|
||||
sc.SetState(SCE_HPHP_COMMENTLINE);
|
||||
} else if (sc.Match("<!--")) {
|
||||
sc.SetState(SCE_HPHP_COMMENTLINE);
|
||||
} else if (sc.Match('/', '/')) {
|
||||
sc.SetState(SCE_HPHP_COMMENTLINE);
|
||||
} else if (sc.Match('/', '*')) {
|
||||
sc.SetState(SCE_HPHP_COMMENT);
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.SetState(SCE_HPHP_HSTRING);
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.SetState(SCE_HPHP_SIMPLESTRING);
|
||||
} else if (sc.ch == '$' && IsPhpWordStart(static_cast<char>(sc.chNext))) {
|
||||
sc.SetState(SCE_HPHP_VARIABLE);
|
||||
} else if (IsOperator(static_cast<char>(sc.ch))) {
|
||||
sc.SetState(SCE_HPHP_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ColourisePHPDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
// Lexer for HTML requires more lexical states (8 bits worth) than most lexers
|
||||
StyleContext sc(startPos, length, initStyle, styler, static_cast<char>(STYLE_MAX));
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
ColourisePHPPiece(sc, keywordlists);
|
||||
}
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
static void ColourisePHPScriptDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
if (startPos == 0)
|
||||
@ -2234,7 +1944,4 @@ static const char * const phpscriptWordListDesc[] = {
|
||||
|
||||
LexerModule lmHTML(SCLEX_HTML, ColouriseHTMLDoc, "hypertext", 0, htmlWordListDesc, 8);
|
||||
LexerModule lmXML(SCLEX_XML, ColouriseXMLDoc, "xml", 0, htmlWordListDesc, 8);
|
||||
// SCLEX_ASP and SCLEX_PHP should not be used in new code: use SCLEX_HTML instead.
|
||||
LexerModule lmASP(SCLEX_ASP, ColouriseASPDoc, "asp", 0, htmlWordListDesc, 8);
|
||||
LexerModule lmPHP(SCLEX_PHP, ColourisePHPDoc, "php", 0, htmlWordListDesc, 8);
|
||||
LexerModule lmPHPSCRIPT(SCLEX_PHPSCRIPT, ColourisePHPScriptDoc, "phpscript", 0, phpscriptWordListDesc, 8);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "PropSetSimple.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
@ -225,7 +226,7 @@ static const char* LexerName = "haskell";
|
||||
void EXT_LEXER_DECL Lex(unsigned int lexer, unsigned int startPos, int length, int initStyle,
|
||||
char *words[], WindowID window, char *props)
|
||||
{
|
||||
PropSet ps;
|
||||
PropSetSimple ps;
|
||||
ps.SetMultiple(props);
|
||||
WindowAccessor wa(window, ps);
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
|
@ -32,7 +32,7 @@ using namespace Scintilla;
|
||||
static inline bool isLispoperator(char ch) {
|
||||
if (isascii(ch) && isalnum(ch))
|
||||
return false;
|
||||
if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' )
|
||||
if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == '{' || ch == '}')
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@ -100,6 +100,9 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W
|
||||
styler.ColourTo(i - 1, state);
|
||||
radix = -1;
|
||||
state = SCE_LISP_MACRO_DISPATCH;
|
||||
} else if (ch == ':' && isLispwordstart(chNext)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_LISP_SYMBOL;
|
||||
} else if (isLispwordstart(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_LISP_IDENTIFIER;
|
||||
@ -243,9 +246,9 @@ static void FoldLispDoc(unsigned int startPos, int length, int /* initStyle */,
|
||||
styleNext = styler.StyleAt(i + 1);
|
||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
if (style == SCE_LISP_OPERATOR) {
|
||||
if (ch == '(') {
|
||||
if (ch == '(' || ch == '[' || ch == '{') {
|
||||
levelCurrent++;
|
||||
} else if (ch == ')') {
|
||||
} else if (ch == ')' || ch == ']' || ch == '}') {
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,9 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
@ -18,13 +21,12 @@
|
||||
#include "KeyWords.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
#include "SString.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static int GetLotLineState(SString &line) {
|
||||
static int GetLotLineState(std::string &line) {
|
||||
if (line.length()) {
|
||||
// Most of the time the first non-blank character in line determines that line's type
|
||||
// Now finds the first non-blank character
|
||||
@ -54,13 +56,13 @@ static int GetLotLineState(SString &line) {
|
||||
|
||||
default: // Any other line
|
||||
// Checks for message at the end of lot file
|
||||
if (line.contains("PASSED")) {
|
||||
if (line.find("PASSED") != std::string::npos) {
|
||||
return SCE_LOT_PASS;
|
||||
}
|
||||
else if (line.contains("FAILED")) {
|
||||
else if (line.find("FAILED") != std::string::npos) {
|
||||
return SCE_LOT_FAIL;
|
||||
}
|
||||
else if (line.contains("ABORTED")) {
|
||||
else if (line.find("ABORTED") != std::string::npos) {
|
||||
return SCE_LOT_ABORT;
|
||||
}
|
||||
else {
|
||||
@ -78,8 +80,8 @@ static void ColourizeLotDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
styler.StartSegment(startPos);
|
||||
bool atLineStart = true;// Arms the 'at line start' flag
|
||||
char chNext = styler.SafeGetCharAt(startPos);
|
||||
SString line("");
|
||||
line.setsizegrowth(256); // Lot lines are less than 256 chars long most of the time. This should avoid reallocations
|
||||
std::string line("");
|
||||
line.reserve(256); // Lot lines are less than 256 chars long most of the time. This should avoid reallocations
|
||||
|
||||
// Styles LOT document
|
||||
unsigned int i; // Declared here because it's used after the for loop
|
||||
|
@ -62,7 +62,7 @@ static inline bool IsAlphaSym(int ch) {
|
||||
* \return True if ch is a character, False otherwise
|
||||
*/
|
||||
static inline bool IsAlNum(int ch) {
|
||||
return ((ch > '0' && ch < '9') || IsAlpha(ch));
|
||||
return ((ch >= '0' && ch <= '9') || IsAlpha(ch));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,11 +1,14 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file LexMySQL.cxx
|
||||
** Lexer for MySQL
|
||||
**/
|
||||
// Adopted from LexSQL.cxx by Anders Karlsson <anders@mysql.com>
|
||||
// Original work by Neil Hodgson <neilh@scintilla.org>
|
||||
// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
/**
|
||||
* Scintilla source code edit control
|
||||
* @file LexMySQL.cxx
|
||||
* Lexer for MySQL
|
||||
*
|
||||
* Improved by Mike Lischke <mike.lischke@sun.com>
|
||||
* Adopted from LexSQL.cxx by Anders Karlsson <anders@mysql.com>
|
||||
* Original work by Neil Hodgson <neilh@scintilla.org>
|
||||
* Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>
|
||||
* The License.txt file describes the conditions under which this software may be distributed.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -49,287 +52,432 @@ static inline bool IsANumberChar(int ch) {
|
||||
ch == '.' || ch == '-' || ch == '+');
|
||||
}
|
||||
|
||||
static void ColouriseMySQLDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
WordList &major_keywords = *keywordlists[0];
|
||||
WordList &keywords = *keywordlists[1];
|
||||
WordList &database_objects = *keywordlists[2];
|
||||
WordList &functions = *keywordlists[3];
|
||||
WordList &system_variables = *keywordlists[4];
|
||||
WordList &procedure_keywords = *keywordlists[5];
|
||||
WordList &kw_user1 = *keywordlists[6];
|
||||
WordList &kw_user2 = *keywordlists[7];
|
||||
WordList &kw_user3 = *keywordlists[8];
|
||||
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
// Determine if the current state should terminate.
|
||||
switch (sc.state) {
|
||||
case SCE_MYSQL_OPERATOR:
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
break;
|
||||
case SCE_MYSQL_NUMBER:
|
||||
// We stop the number definition on non-numerical non-dot non-eE non-sign char
|
||||
if (!IsANumberChar(sc.ch)) {
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_IDENTIFIER:
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
int nextState = SCE_MYSQL_DEFAULT;
|
||||
char s[1000];
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
if (major_keywords.InList(s)) {
|
||||
sc.ChangeState(SCE_MYSQL_MAJORKEYWORD);
|
||||
} else if (keywords.InList(s)) {
|
||||
sc.ChangeState(SCE_MYSQL_KEYWORD);
|
||||
} else if (database_objects.InList(s)) {
|
||||
sc.ChangeState(SCE_MYSQL_DATABASEOBJECT);
|
||||
} else if (functions.InList(s)) {
|
||||
sc.ChangeState(SCE_MYSQL_FUNCTION);
|
||||
} else if (procedure_keywords.InList(s)) {
|
||||
sc.ChangeState(SCE_MYSQL_PROCEDUREKEYWORD);
|
||||
} else if (kw_user1.InList(s)) {
|
||||
sc.ChangeState(SCE_MYSQL_USER1);
|
||||
} else if (kw_user2.InList(s)) {
|
||||
sc.ChangeState(SCE_MYSQL_USER2);
|
||||
} else if (kw_user3.InList(s)) {
|
||||
sc.ChangeState(SCE_MYSQL_USER3);
|
||||
}
|
||||
sc.SetState(nextState);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_VARIABLE:
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_SYSTEMVARIABLE:
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
char s[1000];
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
// Check for known system variables here.
|
||||
if (system_variables.InList(&s[2])) {
|
||||
sc.ChangeState(SCE_MYSQL_KNOWNSYSTEMVARIABLE);
|
||||
}
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_QUOTEDIDENTIFIER:
|
||||
if (sc.ch == 0x60) {
|
||||
if (sc.chNext == 0x60) {
|
||||
sc.Forward(); // Ignore it
|
||||
} else {
|
||||
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_COMMENT:
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_COMMENTLINE:
|
||||
if (sc.atLineStart) {
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_SQSTRING:
|
||||
if (sc.ch == '\\') {
|
||||
// Escape sequence
|
||||
sc.Forward();
|
||||
} else if (sc.ch == '\'') {
|
||||
if (sc.chNext == '\'') {
|
||||
sc.Forward();
|
||||
} else {
|
||||
sc.ChangeState(SCE_MYSQL_STRING);
|
||||
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_DQSTRING:
|
||||
if (sc.ch == '\\') {
|
||||
// Escape sequence
|
||||
sc.Forward();
|
||||
} else if (sc.ch == '\"') {
|
||||
if (sc.chNext == '\"') {
|
||||
sc.Forward();
|
||||
} else {
|
||||
sc.ChangeState(SCE_MYSQL_STRING);
|
||||
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Determine if a new state should be entered.
|
||||
if (sc.state == SCE_MYSQL_DEFAULT) {
|
||||
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
||||
sc.SetState(SCE_MYSQL_NUMBER);
|
||||
} else if (IsAWordStart(sc.ch)) {
|
||||
sc.SetState(SCE_MYSQL_IDENTIFIER);
|
||||
// Note that the order of SYSTEMVARIABLE and VARIABLE is important here.
|
||||
} else if (sc.ch == 0x40 && sc.chNext == 0x40) {
|
||||
sc.SetState(SCE_MYSQL_SYSTEMVARIABLE);
|
||||
sc.Forward(); // Skip past the second at-sign.
|
||||
} else if (sc.ch == 0x40) {
|
||||
sc.SetState(SCE_MYSQL_VARIABLE);
|
||||
} else if (sc.ch == 0x60) {
|
||||
sc.SetState(SCE_MYSQL_QUOTEDIDENTIFIER);
|
||||
} else if (sc.Match('/', '*')) {
|
||||
sc.SetState(SCE_MYSQL_COMMENT);
|
||||
sc.Forward(); // Eat the * so it isn't used for the end of the comment
|
||||
} else if (sc.Match('-', '-') || sc.Match('#')) {
|
||||
sc.SetState(SCE_MYSQL_COMMENTLINE);
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.SetState(SCE_MYSQL_SQSTRING);
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.SetState(SCE_MYSQL_DQSTRING);
|
||||
} else if (isoperator(static_cast<char>(sc.ch))) {
|
||||
sc.SetState(SCE_MYSQL_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
sc.Complete();
|
||||
/**
|
||||
* Check if the current content context represent a keyword and set the context state if so.
|
||||
*/
|
||||
static void CheckForKeyword(StyleContext& sc, WordList* keywordlists[])
|
||||
{
|
||||
int length = sc.LengthCurrent() + 1; // +1 for the next char
|
||||
char* s = new char[length];
|
||||
sc.GetCurrentLowered(s, length);
|
||||
if (keywordlists[0]->InList(s))
|
||||
sc.ChangeState(SCE_MYSQL_MAJORKEYWORD);
|
||||
else
|
||||
if (keywordlists[1]->InList(s))
|
||||
sc.ChangeState(SCE_MYSQL_KEYWORD);
|
||||
else
|
||||
if (keywordlists[2]->InList(s))
|
||||
sc.ChangeState(SCE_MYSQL_DATABASEOBJECT);
|
||||
else
|
||||
if (keywordlists[3]->InList(s))
|
||||
sc.ChangeState(SCE_MYSQL_FUNCTION);
|
||||
else
|
||||
if (keywordlists[5]->InList(s))
|
||||
sc.ChangeState(SCE_MYSQL_PROCEDUREKEYWORD);
|
||||
else
|
||||
if (keywordlists[6]->InList(s))
|
||||
sc.ChangeState(SCE_MYSQL_USER1);
|
||||
else
|
||||
if (keywordlists[7]->InList(s))
|
||||
sc.ChangeState(SCE_MYSQL_USER2);
|
||||
else
|
||||
if (keywordlists[8]->InList(s))
|
||||
sc.ChangeState(SCE_MYSQL_USER3);
|
||||
delete [] s;
|
||||
}
|
||||
|
||||
static bool IsStreamCommentStyle(int style) {
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
static void ColouriseMySQLDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler)
|
||||
{
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
|
||||
for (; sc.More(); sc.Forward())
|
||||
{
|
||||
// Determine if the current state should terminate.
|
||||
switch (sc.state)
|
||||
{
|
||||
case SCE_MYSQL_OPERATOR:
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
break;
|
||||
case SCE_MYSQL_NUMBER:
|
||||
// We stop the number definition on non-numerical non-dot non-eE non-sign char.
|
||||
if (!IsANumberChar(sc.ch))
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
break;
|
||||
case SCE_MYSQL_IDENTIFIER:
|
||||
// Switch from identifier to keyword state and open a new state for the new char.
|
||||
if (!IsAWordChar(sc.ch))
|
||||
{
|
||||
CheckForKeyword(sc, keywordlists);
|
||||
|
||||
// Additional check for function keywords needed.
|
||||
// A function name must be followed by an opening parenthesis.
|
||||
if (sc.state == SCE_MYSQL_FUNCTION && sc.ch != '(')
|
||||
sc.ChangeState(SCE_MYSQL_DEFAULT);
|
||||
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_VARIABLE:
|
||||
if (!IsAWordChar(sc.ch))
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
break;
|
||||
case SCE_MYSQL_SYSTEMVARIABLE:
|
||||
if (!IsAWordChar(sc.ch))
|
||||
{
|
||||
int length = sc.LengthCurrent() + 1;
|
||||
char* s = new char[length];
|
||||
sc.GetCurrentLowered(s, length);
|
||||
|
||||
// Check for known system variables here.
|
||||
if (keywordlists[4]->InList(&s[2]))
|
||||
sc.ChangeState(SCE_MYSQL_KNOWNSYSTEMVARIABLE);
|
||||
delete [] s;
|
||||
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_QUOTEDIDENTIFIER:
|
||||
if (sc.ch == '`')
|
||||
{
|
||||
if (sc.chNext == '`')
|
||||
sc.Forward(); // Ignore it
|
||||
else
|
||||
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_COMMENT:
|
||||
case SCE_MYSQL_HIDDENCOMMAND:
|
||||
if (sc.Match('*', '/'))
|
||||
{
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_COMMENTLINE:
|
||||
if (sc.atLineStart)
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
break;
|
||||
case SCE_MYSQL_SQSTRING:
|
||||
if (sc.ch == '\\')
|
||||
sc.Forward(); // Escape sequence
|
||||
else
|
||||
if (sc.ch == '\'')
|
||||
{
|
||||
// End of single quoted string reached?
|
||||
if (sc.chNext == '\'')
|
||||
sc.Forward();
|
||||
else
|
||||
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_DQSTRING:
|
||||
if (sc.ch == '\\')
|
||||
sc.Forward(); // Escape sequence
|
||||
else
|
||||
if (sc.ch == '\"')
|
||||
{
|
||||
// End of single quoted string reached?
|
||||
if (sc.chNext == '\"')
|
||||
sc.Forward();
|
||||
else
|
||||
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Determine if a new state should be entered.
|
||||
if (sc.state == SCE_MYSQL_DEFAULT)
|
||||
{
|
||||
switch (sc.ch)
|
||||
{
|
||||
case '@':
|
||||
if (sc.chNext == '@')
|
||||
{
|
||||
sc.SetState(SCE_MYSQL_SYSTEMVARIABLE);
|
||||
sc.Forward(2); // Skip past @@.
|
||||
}
|
||||
else
|
||||
if (IsAWordStart(sc.ch))
|
||||
{
|
||||
sc.SetState(SCE_MYSQL_VARIABLE);
|
||||
sc.Forward(); // Skip past @.
|
||||
}
|
||||
else
|
||||
sc.SetState(SCE_MYSQL_OPERATOR);
|
||||
break;
|
||||
case '`':
|
||||
sc.SetState(SCE_MYSQL_QUOTEDIDENTIFIER);
|
||||
break;
|
||||
case '#':
|
||||
sc.SetState(SCE_MYSQL_COMMENTLINE);
|
||||
break;
|
||||
case '\'':
|
||||
sc.SetState(SCE_MYSQL_SQSTRING);
|
||||
break;
|
||||
case '\"':
|
||||
sc.SetState(SCE_MYSQL_DQSTRING);
|
||||
break;
|
||||
default:
|
||||
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)))
|
||||
sc.SetState(SCE_MYSQL_NUMBER);
|
||||
else
|
||||
if (IsAWordStart(sc.ch))
|
||||
sc.SetState(SCE_MYSQL_IDENTIFIER);
|
||||
else
|
||||
if (sc.Match('/', '*'))
|
||||
{
|
||||
sc.SetState(SCE_MYSQL_COMMENT);
|
||||
|
||||
// Skip comment introducer and check for hidden command.
|
||||
sc.Forward(2);
|
||||
if (sc.ch == '!')
|
||||
{
|
||||
sc.ChangeState(SCE_MYSQL_HIDDENCOMMAND);
|
||||
sc.Forward();
|
||||
}
|
||||
}
|
||||
else
|
||||
if (sc.Match("--"))
|
||||
{
|
||||
// Special MySQL single line comment.
|
||||
sc.SetState(SCE_MYSQL_COMMENTLINE);
|
||||
sc.Forward(2);
|
||||
|
||||
// Check the third character too. It must be a space or EOL.
|
||||
if (sc.ch != ' ' && sc.ch != '\n' && sc.ch != '\r')
|
||||
sc.ChangeState(SCE_MYSQL_OPERATOR);
|
||||
}
|
||||
else
|
||||
if (isoperator(static_cast<char>(sc.ch)))
|
||||
sc.SetState(SCE_MYSQL_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do a final check for keywords if we currently have an identifier, to highlight them
|
||||
// also at the end of a line.
|
||||
if (sc.state == SCE_MYSQL_IDENTIFIER)
|
||||
{
|
||||
CheckForKeyword(sc, keywordlists);
|
||||
|
||||
// Additional check for function keywords needed.
|
||||
// A function name must be followed by an opening parenthesis.
|
||||
if (sc.state == SCE_MYSQL_FUNCTION && sc.ch != '(')
|
||||
sc.ChangeState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Helper function to determine if we have a foldable comment currently.
|
||||
*/
|
||||
static bool IsStreamCommentStyle(int style)
|
||||
{
|
||||
return style == SCE_MYSQL_COMMENT;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Code copied from StyleContext and modified to work here. Should go into Accessor as a
|
||||
* companion to Match()...
|
||||
*/
|
||||
bool MatchIgnoreCase(Accessor &styler, int currentPos, const char *s)
|
||||
{
|
||||
for (int n = 0; *s; n++)
|
||||
{
|
||||
if (*s != tolower(styler.SafeGetCharAt(currentPos + n)))
|
||||
return false;
|
||||
s++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
// 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.
|
||||
static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *[], Accessor &styler) {
|
||||
static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler)
|
||||
{
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||
bool foldOnlyBegin = styler.GetPropertyInt("fold.sql.only.begin", 0) != 0;
|
||||
|
||||
unsigned int endPos = startPos + length;
|
||||
int visibleChars = 0;
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
int levelCurrent = SC_FOLDLEVELBASE;
|
||||
if (lineCurrent > 0) {
|
||||
if (lineCurrent > 0)
|
||||
levelCurrent = styler.LevelAt(lineCurrent - 1) >> 16;
|
||||
}
|
||||
int levelNext = levelCurrent;
|
||||
char chNext = styler[startPos];
|
||||
|
||||
int styleNext = styler.StyleAt(startPos);
|
||||
int style = initStyle;
|
||||
bool endFound = false;
|
||||
|
||||
bool endFound = false;
|
||||
bool whenFound = false;
|
||||
bool elseFound = false;
|
||||
for (unsigned int i = startPos; i < endPos; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
|
||||
char nextChar = styler.SafeGetCharAt(startPos);
|
||||
for (unsigned int i = startPos; length > 0; i++, length--)
|
||||
{
|
||||
int stylePrev = style;
|
||||
style = styleNext;
|
||||
styleNext = styler.StyleAt(i + 1);
|
||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
if (foldComment && IsStreamCommentStyle(style)) {
|
||||
if (!IsStreamCommentStyle(stylePrev)) {
|
||||
levelNext++;
|
||||
} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {
|
||||
// Comments don't end at end of line and the next character may be unstyled.
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
if (foldComment && (style == SCE_MYSQL_COMMENTLINE)) {
|
||||
// MySQL needs -- comments to be followed by space or control char
|
||||
if ((ch == '-') && (chNext == '-')) {
|
||||
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||
char chNext3 = styler.SafeGetCharAt(i + 3);
|
||||
if (chNext2 == '{' || chNext3 == '{') {
|
||||
levelNext++;
|
||||
} else if (chNext2 == '}' || chNext3 == '}') {
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (style == SCE_MYSQL_OPERATOR) {
|
||||
if (ch == '(') {
|
||||
levelNext++;
|
||||
} else if (ch == ')') {
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
|
||||
// Style new keywords here.
|
||||
if ((style == SCE_MYSQL_MAJORKEYWORD && stylePrev != SCE_MYSQL_MAJORKEYWORD)
|
||||
|| (style == SCE_MYSQL_KEYWORD && stylePrev != SCE_MYSQL_KEYWORD)
|
||||
|| (style == SCE_MYSQL_PROCEDUREKEYWORD && stylePrev != SCE_MYSQL_PROCEDUREKEYWORD)) {
|
||||
const int MAX_KW_LEN = 6; // Maximum length of folding keywords
|
||||
char s[MAX_KW_LEN + 2];
|
||||
unsigned int j = 0;
|
||||
for (; j < MAX_KW_LEN + 1; j++) {
|
||||
if (!iswordchar(styler[i + j])) {
|
||||
break;
|
||||
}
|
||||
s[j] = static_cast<char>(tolower(styler[i + j]));
|
||||
}
|
||||
if (j == MAX_KW_LEN + 1) {
|
||||
// Keyword too long, don't test it
|
||||
s[0] = '\0';
|
||||
} else {
|
||||
s[j] = '\0';
|
||||
}
|
||||
if (!foldOnlyBegin && endFound && (strcmp(s, "if") == 0 || strcmp(s, "while") == 0 || strcmp(s, "loop") == 0)) {
|
||||
endFound = false;
|
||||
levelNext--;
|
||||
if (levelNext < SC_FOLDLEVELBASE) {
|
||||
levelNext = SC_FOLDLEVELBASE;
|
||||
}
|
||||
// Note that else is special here. It may or may be followed by an if then, but in aly case the level stays the
|
||||
// same. When followed by a if .. then, the level will be increased later, if not, at eol.
|
||||
} else if (!foldOnlyBegin && strcmp(s, "else") == 0) {
|
||||
levelNext--;
|
||||
elseFound = true;
|
||||
} else if (!foldOnlyBegin && strcmp(s, "then") == 0) {
|
||||
if(whenFound) {
|
||||
whenFound = false;
|
||||
} else {
|
||||
levelNext++;
|
||||
}
|
||||
} else if (strcmp(s, "if") == 0) {
|
||||
elseFound = false;
|
||||
} else if (strcmp(s, "when") == 0) {
|
||||
whenFound = true;
|
||||
} else if (strcmp(s, "begin") == 0) {
|
||||
levelNext++;
|
||||
} else if (!foldOnlyBegin && (strcmp(s, "loop") == 0 || strcmp(s, "repeat") == 0
|
||||
|| strcmp(s, "while") == 0)) {
|
||||
if(endFound) {
|
||||
endFound = false;
|
||||
} else {
|
||||
levelNext++;
|
||||
}
|
||||
} else if (strcmp(s, "end") == 0) {
|
||||
// Multiple END in a row are counted multiple times!
|
||||
if (endFound) {
|
||||
levelNext--;
|
||||
if (levelNext < SC_FOLDLEVELBASE) {
|
||||
levelNext = SC_FOLDLEVELBASE;
|
||||
}
|
||||
}
|
||||
endFound = true;
|
||||
whenFound = false;
|
||||
}
|
||||
}
|
||||
// Handle this for a trailing end withiut an if / while etc, as in the case of a begin.
|
||||
if (endFound) {
|
||||
char currentChar = nextChar;
|
||||
nextChar = styler.SafeGetCharAt(i + 1);
|
||||
bool atEOL = (currentChar == '\r' && nextChar != '\n') || (currentChar == '\n');
|
||||
|
||||
switch (style)
|
||||
{
|
||||
case SCE_MYSQL_COMMENT:
|
||||
if (foldComment)
|
||||
{
|
||||
// Multiline comment style /* .. */.
|
||||
if (IsStreamCommentStyle(style))
|
||||
{
|
||||
// Increase level if we just start a foldable comment.
|
||||
if (!IsStreamCommentStyle(stylePrev))
|
||||
levelNext++;
|
||||
else
|
||||
// If we are in the middle of a foldable comment check if it ends now.
|
||||
// Don't end at the line end, though.
|
||||
if (!IsStreamCommentStyle(styleNext) && !atEOL)
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_COMMENTLINE:
|
||||
if (foldComment)
|
||||
{
|
||||
// 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, "--"))
|
||||
{
|
||||
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||
char chNext3 = styler.SafeGetCharAt(i + 3);
|
||||
if (chNext2 == '{' || chNext3 == '{')
|
||||
levelNext++;
|
||||
else
|
||||
if (chNext2 == '}' || chNext3 == '}')
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_MYSQL_HIDDENCOMMAND:
|
||||
if (style != stylePrev)
|
||||
levelNext++;
|
||||
else
|
||||
if (style != styleNext)
|
||||
levelNext--;
|
||||
break;
|
||||
case SCE_MYSQL_OPERATOR:
|
||||
if (currentChar == '(')
|
||||
levelNext++;
|
||||
else
|
||||
if (currentChar == ')')
|
||||
levelNext--;
|
||||
break;
|
||||
case SCE_MYSQL_MAJORKEYWORD:
|
||||
case SCE_MYSQL_KEYWORD:
|
||||
case SCE_MYSQL_FUNCTION:
|
||||
case SCE_MYSQL_PROCEDUREKEYWORD:
|
||||
// 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");
|
||||
|
||||
if (!foldOnlyBegin && endFound && (ifFound || whileFound || loopFound))
|
||||
{
|
||||
endFound = false;
|
||||
levelNext--;
|
||||
if (levelNext < SC_FOLDLEVELBASE)
|
||||
levelNext = SC_FOLDLEVELBASE;
|
||||
|
||||
// Note that "else" is special here. It may or may not be followed by an "if .. then",
|
||||
// but in any case the level stays the same. When followed by an "if .. then" the level
|
||||
// will be increased later, if not, then at eol.
|
||||
}
|
||||
else
|
||||
if (!foldOnlyBegin && MatchIgnoreCase(styler, startPos, "else"))
|
||||
{
|
||||
levelNext--;
|
||||
elseFound = true;
|
||||
}
|
||||
else
|
||||
if (!foldOnlyBegin && thenFound)
|
||||
{
|
||||
if (whenFound)
|
||||
whenFound = false;
|
||||
else
|
||||
levelNext++;
|
||||
}
|
||||
else
|
||||
if (ifFound)
|
||||
elseFound = false;
|
||||
else
|
||||
if (MatchIgnoreCase(styler, startPos, "when"))
|
||||
whenFound = true;
|
||||
else
|
||||
{
|
||||
if (beginFound)
|
||||
levelNext++;
|
||||
else
|
||||
if (!foldOnlyBegin && (loopFound || repeatFound || whileFound))
|
||||
{
|
||||
if (endFound)
|
||||
endFound = false;
|
||||
else
|
||||
levelNext++;
|
||||
}
|
||||
else
|
||||
if (MatchIgnoreCase(styler, startPos, "end"))
|
||||
{
|
||||
// Multiple "end" in a row are counted multiple times!
|
||||
if (endFound)
|
||||
{
|
||||
levelNext--;
|
||||
if (levelNext < SC_FOLDLEVELBASE)
|
||||
levelNext = SC_FOLDLEVELBASE;
|
||||
}
|
||||
endFound = true;
|
||||
whenFound = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Handle the case of a trailing end without an if / while etc, as in the case of a begin.
|
||||
if (endFound)
|
||||
{
|
||||
endFound = false;
|
||||
levelNext--;
|
||||
if (levelNext < SC_FOLDLEVELBASE) {
|
||||
levelNext = SC_FOLDLEVELBASE;
|
||||
}
|
||||
if (levelNext < SC_FOLDLEVELBASE)
|
||||
levelNext = SC_FOLDLEVELBASE;
|
||||
}
|
||||
if (atEOL) {
|
||||
if(elseFound)
|
||||
|
||||
if (atEOL)
|
||||
{
|
||||
if (elseFound)
|
||||
{
|
||||
levelNext++;
|
||||
elseFound = false;
|
||||
elseFound = false;
|
||||
}
|
||||
|
||||
int levelUse = levelCurrent;
|
||||
int lev = levelUse | levelNext << 16;
|
||||
@ -337,21 +485,23 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle,
|
||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||
if (levelUse < levelNext)
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
if (lev != styler.LevelAt(lineCurrent)) {
|
||||
if (lev != styler.LevelAt(lineCurrent))
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
}
|
||||
|
||||
lineCurrent++;
|
||||
levelCurrent = levelNext;
|
||||
visibleChars = 0;
|
||||
endFound = false;
|
||||
whenFound = false;
|
||||
}
|
||||
if (!isspacechar(ch)) {
|
||||
|
||||
if (!isspacechar(currentChar))
|
||||
visibleChars++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
static const char * const mysqlWordListDesc[] = {
|
||||
"Major Keywords",
|
||||
"Keywords",
|
||||
@ -361,7 +511,8 @@ static const char * const mysqlWordListDesc[] = {
|
||||
"Procedure keywords",
|
||||
"User Keywords 1",
|
||||
"User Keywords 2",
|
||||
"User Keywords 3"
|
||||
"User Keywords 3",
|
||||
0
|
||||
};
|
||||
|
||||
LexerModule lmMySQL(SCLEX_MYSQL, ColouriseMySQLDoc, "mysql", FoldMySQLDoc, mysqlWordListDesc);
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
|
@ -424,9 +424,9 @@ static bool IsCommentLine(int line, Accessor &styler) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static void FoldBoxObjCDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
|
||||
static void FoldObjCDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
WordList &keywords4 = *keywordlists[3];
|
||||
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
@ -439,7 +439,6 @@ static void FoldBoxObjCDoc(unsigned int startPos, int length, int initStyle, Wor
|
||||
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
|
||||
int levelCurrent = levelPrev;
|
||||
int levelPrevPrev;
|
||||
int levelFlags = 0;
|
||||
int levelUnindent = 0;
|
||||
char chNext = styler[startPos];
|
||||
int styleNext = styler.StyleAt(startPos);
|
||||
@ -468,18 +467,6 @@ static void FoldBoxObjCDoc(unsigned int startPos, int length, int initStyle, Wor
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (foldComment && (style == SCE_C_COMMENTLINE)) {
|
||||
if ((ch == '/') && (chNext == '/')) {
|
||||
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||
if (chNext2 == '{') {
|
||||
levelCurrent++;
|
||||
} else if (chNext2 == '}') {
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {
|
||||
if (ch == '#') {
|
||||
unsigned int j = i + 1;
|
||||
@ -533,40 +520,28 @@ static void FoldBoxObjCDoc(unsigned int startPos, int length, int initStyle, Wor
|
||||
|
||||
/* Check for fold header keyword at beginning of word */
|
||||
if ((style == SCE_C_WORD || style == SCE_C_COMMENT || style == SCE_C_COMMENTLINE)
|
||||
&&
|
||||
(style != stylePrev)) {
|
||||
&& (style != stylePrev)) {
|
||||
if (matchKeyword(i, keywords4, styler, KEYWORD_BOXHEADER)) {
|
||||
int line;
|
||||
/* Loop backwards all empty or comment lines */
|
||||
// Loop backwards all empty or comment lines
|
||||
for (line = lineCurrent - 1;
|
||||
line >= 0
|
||||
&&
|
||||
levelCurrent == (styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK)
|
||||
&&
|
||||
(styler.LevelAt(line) & SC_FOLDLEVELBOXFOOTERFLAG) == 0
|
||||
&&
|
||||
IsCommentLine(line, styler);
|
||||
line--) {
|
||||
/* just loop backwards */;
|
||||
// just loop backwards;
|
||||
}
|
||||
|
||||
line++;
|
||||
/* Set Box header flag (if the previous line has no footer line) */
|
||||
if ((styler.LevelAt(line) & SC_FOLDLEVELBOXFOOTERFLAG) == 0) {
|
||||
if (line == lineCurrent) {
|
||||
/* in current line */
|
||||
levelFlags |= SC_FOLDLEVELBOXHEADERFLAG;
|
||||
} else {
|
||||
/* at top of all preceding comment lines */
|
||||
styler.SetLevel(line, styler.LevelAt(line)
|
||||
| SC_FOLDLEVELBOXHEADERFLAG);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (line == lineCurrent) {
|
||||
// in current line
|
||||
} else {
|
||||
// at top of all preceding comment lines
|
||||
styler.SetLevel(line, styler.LevelAt(line));
|
||||
}
|
||||
|
||||
if (matchKeyword(i, keywords4, styler, KEYWORD_FOLDCONTRACTED)) {
|
||||
levelFlags |= SC_FOLDLEVELCONTRACTED;
|
||||
}
|
||||
}
|
||||
|
||||
if (atEOL) {
|
||||
@ -581,32 +556,15 @@ static void FoldBoxObjCDoc(unsigned int startPos, int length, int initStyle, Wor
|
||||
lev = levelPrev;
|
||||
if (visibleChars == 0 && foldCompact)
|
||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||
// Produce additional footer line (e.g. after closed if)
|
||||
if (visibleChars == 0
|
||||
&&
|
||||
(levelPrev < levelPrevPrev))
|
||||
lev |= SC_FOLDLEVELBOXFOOTERFLAG;
|
||||
|
||||
// Produce footer line at line before (special handling for '} else {'
|
||||
if (levelPrev < levelPrevPrev) {
|
||||
styler.SetLevel(lineCurrent - 1,
|
||||
styler.LevelAt(lineCurrent - 1) | SC_FOLDLEVELBOXFOOTERFLAG);
|
||||
styler.SetLevel(lineCurrent - 1, styler.LevelAt(lineCurrent - 1));
|
||||
}
|
||||
// Mark the fold header (the line that is always visible)
|
||||
if ((levelCurrent > levelPrev) && (visibleChars > 0))
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
// Show a footer line at end of fold
|
||||
if (levelCurrent < levelPrev)
|
||||
lev |= SC_FOLDLEVELBOXFOOTERFLAG;
|
||||
/* Show a footer line at the end of each procedure (level == SC_FOLDLEVELBASE) */
|
||||
if ((levelPrev == SC_FOLDLEVELBASE)
|
||||
&&
|
||||
(levelPrevPrev > SC_FOLDLEVELBASE)
|
||||
&&
|
||||
(visibleChars == 0)) {
|
||||
lev |= SC_FOLDLEVELBOXFOOTERFLAG;
|
||||
}
|
||||
|
||||
lev |= levelFlags;
|
||||
if (lev != styler.LevelAt(lineCurrent)) {
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
}
|
||||
@ -616,7 +574,6 @@ static void FoldBoxObjCDoc(unsigned int startPos, int length, int initStyle, Wor
|
||||
levelPrev = levelCurrent;
|
||||
levelUnindent = 0;
|
||||
visibleChars = 0;
|
||||
levelFlags = 0;
|
||||
firstLine = false;
|
||||
}
|
||||
|
||||
@ -628,115 +585,6 @@ static void FoldBoxObjCDoc(unsigned int startPos, int length, int initStyle, Wor
|
||||
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
|
||||
}
|
||||
|
||||
static void FoldNoBoxObjCDoc(unsigned int startPos, int length, int initStyle,
|
||||
Accessor &styler) {
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0;
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||
unsigned int endPos = startPos + length;
|
||||
int visibleChars = 0;
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
|
||||
int levelCurrent = levelPrev;
|
||||
char chNext = styler[startPos];
|
||||
int styleNext = styler.StyleAt(startPos);
|
||||
int style = initStyle;
|
||||
for (unsigned int i = startPos; i < endPos; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
int stylePrev = style;
|
||||
style = styleNext;
|
||||
styleNext = styler.StyleAt(i + 1);
|
||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
if (foldComment && IsStreamCommentStyle(style)) {
|
||||
if (!IsStreamCommentStyle(stylePrev)) {
|
||||
levelCurrent++;
|
||||
} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {
|
||||
// Comments don't end at end of line and the next character may be unstyled.
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
/*if (foldComment && (style == SCE_C_COMMENTLINE)) {
|
||||
if ((ch == '/') && (chNext == '/')) {
|
||||
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||
if (chNext2 == '{') {
|
||||
levelCurrent++;
|
||||
} else if (chNext2 == '}') {
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {
|
||||
if (ch == '#') {
|
||||
unsigned int j = i + 1;
|
||||
while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {
|
||||
j++;
|
||||
}
|
||||
if (styler.Match(j, "region") || styler.Match(j, "if")) {
|
||||
levelCurrent++;
|
||||
} else if (styler.Match(j, "end")) {
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (style == SCE_C_OPERATOR) {
|
||||
if (ch == '{') {
|
||||
levelCurrent++;
|
||||
} else if (ch == '}') {
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
|
||||
if (style == SCE_OBJC_DIRECTIVE)
|
||||
{
|
||||
if (ch == '@')
|
||||
{
|
||||
unsigned int j = i + 1;
|
||||
if (styler.Match(j, "interface") || styler.Match(j, "implementation") || styler.Match(j, "protocol"))
|
||||
{
|
||||
levelCurrent++;
|
||||
}
|
||||
else if (styler.Match(j, "end"))
|
||||
{
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (atEOL) {
|
||||
int lev = levelPrev;
|
||||
if (visibleChars == 0 && foldCompact)
|
||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||
if ((levelCurrent > levelPrev) && (visibleChars > 0))
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
if (lev != styler.LevelAt(lineCurrent)) {
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
}
|
||||
lineCurrent++;
|
||||
levelPrev = levelCurrent;
|
||||
visibleChars = 0;
|
||||
}
|
||||
if (!isspacechar(ch))
|
||||
visibleChars++;
|
||||
}
|
||||
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
|
||||
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
|
||||
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
|
||||
}
|
||||
|
||||
static void FoldObjCDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
|
||||
int foldFlags = styler.GetPropertyInt("fold.flags") ;
|
||||
bool foldBox = ((foldFlags & SC_FOLDFLAG_BOX) == SC_FOLDFLAG_BOX);
|
||||
|
||||
if (foldBox) {
|
||||
FoldBoxObjCDoc(startPos, length, initStyle, keywordlists, styler);
|
||||
} else {
|
||||
FoldNoBoxObjCDoc(startPos, length, initStyle, styler);
|
||||
}
|
||||
}
|
||||
|
||||
static const char * const cppWordLists[] = {
|
||||
"Primary keywords and identifiers",
|
||||
"Secondary keywords and identifiers",
|
||||
@ -750,12 +598,4 @@ static void ColouriseObjCDocSensitive(unsigned int startPos, int length, int ini
|
||||
ColouriseObjCDoc(startPos, length, initStyle, keywordlists, styler, true);
|
||||
}
|
||||
|
||||
/*
|
||||
static void ColouriseCppDocInsensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
ColouriseCppDoc(startPos, length, initStyle, keywordlists, styler, false);
|
||||
}
|
||||
*/
|
||||
LexerModule lmObjC(SCLEX_OBJC, ColouriseObjCDocSensitive, "cpp", FoldObjCDoc, cppWordLists);
|
||||
//LexerModule lmCPPNoCase(SCLEX_CPPNOCASE, ColouriseCppDocInsensitive, "cppnocase", FoldCppDoc, cppWordLists);
|
||||
//LexerModule lmTCL(SCLEX_TCL, ColouriseCppDocSensitive, "tcl", FoldCppDoc, cppWordLists);
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
@ -213,6 +214,7 @@ static void ColouriseBatchLine(
|
||||
// No need to Reset Offset
|
||||
// Check for Special Keyword in list, External Command / Program, or Default Text
|
||||
} else if ((wordBuffer[0] != '%') &&
|
||||
(wordBuffer[0] != '!') &&
|
||||
(!IsBOperator(wordBuffer[0])) &&
|
||||
(continueProcessing)) {
|
||||
// Check for Special Keyword
|
||||
@ -249,6 +251,7 @@ static void ColouriseBatchLine(
|
||||
// Read up to %, Operator or Separator
|
||||
while ((wbo < wbl) &&
|
||||
(wordBuffer[wbo] != '%') &&
|
||||
(wordBuffer[wbo] != '!') &&
|
||||
(!IsBOperator(wordBuffer[wbo])) &&
|
||||
(!IsBSeparator(wordBuffer[wbo]))) {
|
||||
wbo++;
|
||||
@ -298,6 +301,7 @@ static void ColouriseBatchLine(
|
||||
// Read up to %, Operator or Separator
|
||||
while ((wbo < wbl) &&
|
||||
(wordBuffer[wbo] != '%') &&
|
||||
(wordBuffer[wbo] != '!') &&
|
||||
(!IsBOperator(wordBuffer[wbo])) &&
|
||||
(!IsBSeparator(wordBuffer[wbo]))) {
|
||||
wbo++;
|
||||
@ -370,6 +374,29 @@ static void ColouriseBatchLine(
|
||||
// Reset Offset to re-process remainder of word
|
||||
offset -= (wbl - 3);
|
||||
}
|
||||
// Check for Environment Variable (!x...!)
|
||||
} else if (wordBuffer[0] == '!') {
|
||||
// Colorize Default Text
|
||||
styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);
|
||||
wbo++;
|
||||
// Search to end of word for second ! (can be a long path)
|
||||
while ((wbo < wbl) &&
|
||||
(wordBuffer[wbo] != '!') &&
|
||||
(!IsBOperator(wordBuffer[wbo])) &&
|
||||
(!IsBSeparator(wordBuffer[wbo]))) {
|
||||
wbo++;
|
||||
}
|
||||
if (wordBuffer[wbo] == '!') {
|
||||
wbo++;
|
||||
// Check for External Command / Program
|
||||
if (cmdLoc == offset - wbl) {
|
||||
cmdLoc = offset - (wbl - wbo);
|
||||
}
|
||||
// Colorize Environment Variable
|
||||
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);
|
||||
// Reset Offset to re-process remainder of word
|
||||
offset -= (wbl - wbo);
|
||||
}
|
||||
// Check for Operator
|
||||
} else if (IsBOperator(wordBuffer[0])) {
|
||||
// Colorize Default Text
|
||||
@ -417,6 +444,7 @@ static void ColouriseBatchLine(
|
||||
// Read up to %, Operator or Separator
|
||||
while ((wbo < wbl) &&
|
||||
(wordBuffer[wbo] != '%') &&
|
||||
(wordBuffer[wbo] != '!') &&
|
||||
(!IsBOperator(wordBuffer[wbo])) &&
|
||||
(!IsBSeparator(wordBuffer[wbo]))) {
|
||||
wbo++;
|
||||
|
@ -414,7 +414,7 @@ static unsigned int SkipWhiteSpace(unsigned int currentPos, unsigned int endPos,
|
||||
}
|
||||
|
||||
static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,
|
||||
unsigned int startPos, unsigned int endPos,
|
||||
int startPos, unsigned int endPos,
|
||||
unsigned int lastStart, unsigned int currentPos, Accessor &styler) {
|
||||
char s[100];
|
||||
GetRangeLowered(lastStart, currentPos, styler, s, sizeof(s));
|
||||
@ -471,7 +471,7 @@ static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCur
|
||||
} else if (strcmp(s, "interface") == 0) {
|
||||
// "interface" keyword requires special handling...
|
||||
bool ignoreKeyword = true;
|
||||
unsigned int j = lastStart - 1;
|
||||
int j = lastStart - 1;
|
||||
char ch = styler.SafeGetCharAt(j);
|
||||
while ((j >= startPos) && (IsASpaceOrTab(ch) || ch == '\r' || ch == '\n' ||
|
||||
IsStreamCommentStyle(styler.StyleAt(j)))) {
|
||||
|
@ -963,6 +963,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
||||
bool hereDocSpace = false; // for: SCALAR [whitespace] '<<'
|
||||
unsigned int bk = (sc.currentPos > 0) ? sc.currentPos - 1: 0;
|
||||
unsigned int bkend;
|
||||
sc.Complete();
|
||||
styler.Flush();
|
||||
if (styler.StyleAt(bk) == SCE_PL_DEFAULT)
|
||||
hereDocSpace = true;
|
||||
@ -1142,6 +1143,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
||||
}
|
||||
backFlag = BACK_NONE;
|
||||
} else if (sc.ch == '(' && sc.currentPos > 0) { // '(' or subroutine prototype
|
||||
sc.Complete();
|
||||
if (styleCheckSubPrototype(styler, sc.currentPos - 1)) {
|
||||
sc.SetState(SCE_PL_SUB_PROTOTYPE);
|
||||
backFlag = BACK_NONE;
|
||||
|
@ -416,6 +416,8 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
|
||||
// This option enables folding multi-line quoted strings when using the Python lexer.
|
||||
const bool foldQuotes = styler.GetPropertyInt("fold.quotes.python") != 0;
|
||||
|
||||
const bool foldCompact = styler.GetPropertyInt("fold.compact") != 0;
|
||||
|
||||
// Backtrack to previous non-blank line so we can determine indent level
|
||||
// for any white space lines (needed esp. within triple quoted strings)
|
||||
// and so we can fix any preceding fold level (which is why we go back
|
||||
@ -514,12 +516,21 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
|
||||
while (--skipLine > lineCurrent) {
|
||||
int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, NULL);
|
||||
|
||||
if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)
|
||||
skipLevel = levelBeforeComments;
|
||||
if (foldCompact) {
|
||||
if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)
|
||||
skipLevel = levelBeforeComments;
|
||||
|
||||
int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;
|
||||
int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;
|
||||
|
||||
styler.SetLevel(skipLine, skipLevel | whiteFlag);
|
||||
styler.SetLevel(skipLine, skipLevel | whiteFlag);
|
||||
} else {
|
||||
if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments &&
|
||||
!(skipLineIndent & SC_FOLDLEVELWHITEFLAG) &&
|
||||
!IsCommentLine(skipLine, styler))
|
||||
skipLevel = levelBeforeComments;
|
||||
|
||||
styler.SetLevel(skipLine, skipLevel);
|
||||
}
|
||||
}
|
||||
|
||||
// Set fold header on non-quote/non-comment line
|
||||
|
@ -3,6 +3,7 @@
|
||||
** Lexer for SML.
|
||||
**/
|
||||
// Copyright 2009 by James Moffatt and Yuzhou Xin
|
||||
// Modified from LexCaml.cxx by Robert Roessler <robertr@rftp.com> Copyright 2005
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Accessor.h"
|
||||
@ -17,7 +19,6 @@
|
||||
#include "PropSet.h"
|
||||
#include "KeyWords.h"
|
||||
#include "SciLexer.h"
|
||||
#include "SString.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -75,7 +76,7 @@ static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute
|
||||
|
||||
static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) {
|
||||
apostropheStartsAttribute = true;
|
||||
SString number;
|
||||
std::string number;
|
||||
sc.SetState(SCE_SPICE_NUMBER);
|
||||
// Get all characters up to a delimiter or a separator, including points, but excluding
|
||||
// double points (ranges).
|
||||
@ -104,7 +105,7 @@ static void ColouriseWhiteSpace(StyleContext& sc, bool& ) {
|
||||
static void ColouriseWord(StyleContext& sc, WordList& keywords, WordList& keywords2, WordList& keywords3, bool& apostropheStartsAttribute) {
|
||||
apostropheStartsAttribute = true;
|
||||
sc.SetState(SCE_SPICE_IDENTIFIER);
|
||||
SString word;
|
||||
std::string word;
|
||||
while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) {
|
||||
word += static_cast<char>(tolower(sc.ch));
|
||||
sc.Forward();
|
||||
|
@ -31,6 +31,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#include "KeyWords.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
#include "CharClassify.h"
|
||||
|
||||
#define KEYWORD_BOXHEADER 1
|
||||
#define KEYWORD_FOLDCONTRACTED 2
|
||||
@ -55,6 +56,7 @@ static int cmpString(const void *a1, const void *a2) {
|
||||
static int cmpStringNoCase(const void *a1, const void *a2) {
|
||||
// Can't work out the correct incantation to use modern casts here
|
||||
return CompareCaseInsensitive(*(char**)(a1), *(char**)(a2));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -154,7 +154,8 @@ 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
|
||||
|
||||
} else if (markType == SC_MARK_VLINE) {
|
||||
|
@ -153,7 +153,7 @@ public:
|
||||
return pos;
|
||||
}
|
||||
|
||||
int PartitionFromPosition(int pos) {
|
||||
int PartitionFromPosition(int pos) const {
|
||||
if (body->Length() <= 1)
|
||||
return 0;
|
||||
if (pos >= (PositionFromPartition(body->Length()-1)))
|
||||
|
@ -125,6 +125,10 @@ void MarkerHandleSet::CombineWith(MarkerHandleSet *other) {
|
||||
}
|
||||
|
||||
LineMarkers::~LineMarkers() {
|
||||
Init();
|
||||
}
|
||||
|
||||
void LineMarkers::Init() {
|
||||
for (int line = 0; line < markers.Length(); line++) {
|
||||
delete markers[line];
|
||||
markers[line] = 0;
|
||||
@ -184,11 +188,14 @@ int LineMarkers::AddMark(int line, int markerNum, int lines) {
|
||||
// No existing markers so allocate one element per line
|
||||
markers.InsertValue(0, lines, 0);
|
||||
}
|
||||
if (line >= markers.Length()) {
|
||||
return -1;
|
||||
}
|
||||
if (!markers[line]) {
|
||||
// Need new structure to hold marker handle
|
||||
markers[line] = new MarkerHandleSet();
|
||||
if (!markers[line])
|
||||
return - 1;
|
||||
return -1;
|
||||
}
|
||||
markers[line]->InsertHandle(handleCurrent, markerNum);
|
||||
|
||||
@ -227,6 +234,10 @@ void LineMarkers::DeleteMarkFromHandle(int markerHandle) {
|
||||
LineLevels::~LineLevels() {
|
||||
}
|
||||
|
||||
void LineLevels::Init() {
|
||||
levels.DeleteAll();
|
||||
}
|
||||
|
||||
void LineLevels::InsertLine(int line) {
|
||||
if (levels.Length()) {
|
||||
int level = SC_FOLDLEVELBASE;
|
||||
@ -243,7 +254,9 @@ void LineLevels::RemoveLine(int line) {
|
||||
// to line before to avoid a temporary disappearence causing expansion.
|
||||
int firstHeader = levels[line] & SC_FOLDLEVELHEADERFLAG;
|
||||
levels.Delete(line);
|
||||
if (line > 0)
|
||||
if (line == levels.Length()-1) // Last line loses the header flag
|
||||
levels[line-1] &= ~SC_FOLDLEVELHEADERFLAG;
|
||||
else if (line > 0)
|
||||
levels[line-1] |= firstHeader;
|
||||
}
|
||||
}
|
||||
@ -281,6 +294,10 @@ int LineLevels::GetLevel(int line) {
|
||||
LineState::~LineState() {
|
||||
}
|
||||
|
||||
void LineState::Init() {
|
||||
lineStates.DeleteAll();
|
||||
}
|
||||
|
||||
void LineState::InsertLine(int line) {
|
||||
if (lineStates.Length()) {
|
||||
lineStates.EnsureLength(line);
|
||||
@ -339,6 +356,10 @@ LineAnnotation::~LineAnnotation() {
|
||||
ClearAll();
|
||||
}
|
||||
|
||||
void LineAnnotation::Init() {
|
||||
ClearAll();
|
||||
}
|
||||
|
||||
void LineAnnotation::InsertLine(int line) {
|
||||
if (annotations.Length()) {
|
||||
annotations.Insert(line, 0);
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
LineMarkers() : handleCurrent(0) {
|
||||
}
|
||||
virtual ~LineMarkers();
|
||||
virtual void Init();
|
||||
virtual void InsertLine(int line);
|
||||
virtual void RemoveLine(int line);
|
||||
|
||||
@ -64,6 +65,7 @@ class LineLevels : public PerLine {
|
||||
SplitVector<int> levels;
|
||||
public:
|
||||
virtual ~LineLevels();
|
||||
virtual void Init();
|
||||
virtual void InsertLine(int line);
|
||||
virtual void RemoveLine(int line);
|
||||
|
||||
@ -79,6 +81,7 @@ public:
|
||||
LineState() {
|
||||
}
|
||||
virtual ~LineState();
|
||||
virtual void Init();
|
||||
virtual void InsertLine(int line);
|
||||
virtual void RemoveLine(int line);
|
||||
|
||||
@ -93,6 +96,7 @@ public:
|
||||
LineAnnotation() {
|
||||
}
|
||||
virtual ~LineAnnotation();
|
||||
virtual void Init();
|
||||
virtual void InsertLine(int line);
|
||||
virtual void RemoveLine(int line);
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
@ -28,6 +30,7 @@
|
||||
#include "CharClassify.h"
|
||||
#include "Decoration.h"
|
||||
#include "Document.h"
|
||||
#include "Selection.h"
|
||||
#include "PositionCache.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
@ -46,11 +49,11 @@ LineLayout::LineLayout(int maxLineLength_) :
|
||||
inCache(false),
|
||||
maxLineLength(-1),
|
||||
numCharsInLine(0),
|
||||
numCharsBeforeEOL(0),
|
||||
validity(llInvalid),
|
||||
xHighlightGuide(0),
|
||||
highlightColumn(0),
|
||||
selStart(0),
|
||||
selEnd(0),
|
||||
psel(NULL),
|
||||
containsCaret(false),
|
||||
edgeColumn(0),
|
||||
chars(0),
|
||||
@ -61,7 +64,8 @@ LineLayout::LineLayout(int maxLineLength_) :
|
||||
hsStart(0),
|
||||
hsEnd(0),
|
||||
widthLine(wrapWidthInfinite),
|
||||
lines(1) {
|
||||
lines(1),
|
||||
wrapIndent(0) {
|
||||
Resize(maxLineLength_);
|
||||
}
|
||||
|
||||
@ -114,12 +118,7 @@ int LineLayout::LineLastVisible(int line) const {
|
||||
if (line < 0) {
|
||||
return 0;
|
||||
} else if ((line >= lines-1) || !lineStarts) {
|
||||
int startLine = LineStart(line);
|
||||
int endLine = numCharsInLine;
|
||||
while ((endLine > startLine) && IsEOLChar(chars[endLine-1])) {
|
||||
endLine--;
|
||||
}
|
||||
return endLine;
|
||||
return numCharsBeforeEOL;
|
||||
} else {
|
||||
return lineStarts[line+1];
|
||||
}
|
||||
@ -134,8 +133,6 @@ void LineLayout::SetLineStart(int line, int start) {
|
||||
if ((line >= lenLineStarts) && (line != 0)) {
|
||||
int newMaxLines = line + 20;
|
||||
int *newLineStarts = new int[newMaxLines];
|
||||
if (!newLineStarts)
|
||||
return;
|
||||
for (int i = 0; i < newMaxLines; i++) {
|
||||
if (i < lenLineStarts)
|
||||
newLineStarts[i] = lineStarts[i];
|
||||
@ -200,6 +197,10 @@ int LineLayout::FindBefore(int x, int lower, int upper) const {
|
||||
return lower;
|
||||
}
|
||||
|
||||
int LineLayout::EndLineStyle() const {
|
||||
return styles[numCharsBeforeEOL > 0 ? numCharsBeforeEOL-1 : 0];
|
||||
}
|
||||
|
||||
LineLayoutCache::LineLayoutCache() :
|
||||
level(0), length(0), size(0), cache(0),
|
||||
allInvalidated(false), styleClock(-1), useCount(0) {
|
||||
@ -411,9 +412,13 @@ BreakFinder::BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posL
|
||||
nextBreak--;
|
||||
}
|
||||
|
||||
if (ll->selStart != ll->selEnd) {
|
||||
Insert(ll->selStart - posLineStart - 1);
|
||||
Insert(ll->selEnd - posLineStart - 1);
|
||||
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);
|
||||
}
|
||||
|
||||
Insert(ll->edgeColumn - 1);
|
||||
@ -440,6 +445,10 @@ int BreakFinder::First() {
|
||||
return nextBreak;
|
||||
}
|
||||
|
||||
static bool IsTrailByte(int ch) {
|
||||
return (ch >= 0x80) && (ch < (0x80 + 0x40));
|
||||
}
|
||||
|
||||
int BreakFinder::Next() {
|
||||
if (subBreak == -1) {
|
||||
int prev = nextBreak;
|
||||
@ -472,15 +481,20 @@ int BreakFinder::Next() {
|
||||
} else {
|
||||
int lastGoodBreak = -1;
|
||||
int lastOKBreak = -1;
|
||||
int lastUTF8Break = -1;
|
||||
int j;
|
||||
for (j = subBreak + 1; j <= nextBreak; j++) {
|
||||
if (IsSpaceOrTab(ll->chars[j - 1]) && !IsSpaceOrTab(ll->chars[j])) {
|
||||
lastGoodBreak = j;
|
||||
}
|
||||
if (ll->chars[j] < 'A') {
|
||||
if (static_cast<unsigned char>(ll->chars[j]) < 'A') {
|
||||
lastOKBreak = j;
|
||||
}
|
||||
if (((j - subBreak) >= lengthEachSubdivision) && ((lastGoodBreak >= 0) || (lastOKBreak >= 0))) {
|
||||
if (utf8 && !IsTrailByte(static_cast<unsigned char>(ll->chars[j]))) {
|
||||
lastUTF8Break = j;
|
||||
}
|
||||
if (((j - subBreak) >= lengthEachSubdivision) &&
|
||||
((lastGoodBreak >= 0) || (lastOKBreak >= 0) || (lastUTF8Break >= 0))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -488,6 +502,8 @@ int BreakFinder::Next() {
|
||||
subBreak = lastGoodBreak;
|
||||
} else if (lastOKBreak >= 0) {
|
||||
subBreak = lastOKBreak;
|
||||
} else if (lastUTF8Break >= 0) {
|
||||
subBreak = lastUTF8Break;
|
||||
} else {
|
||||
subBreak = nextBreak;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/** @file PositionCache.h
|
||||
** Classes for caching layout information.
|
||||
**/
|
||||
// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef POSITIONCACHE_H
|
||||
@ -30,11 +30,11 @@ public:
|
||||
enum { wrapWidthInfinite = 0x7ffffff };
|
||||
int maxLineLength;
|
||||
int numCharsInLine;
|
||||
int numCharsBeforeEOL;
|
||||
enum validLevel { llInvalid, llCheckTextAndStyle, llPositions, llLines } validity;
|
||||
int xHighlightGuide;
|
||||
bool highlightColumn;
|
||||
int selStart;
|
||||
int selEnd;
|
||||
Selection *psel;
|
||||
bool containsCaret;
|
||||
int edgeColumn;
|
||||
char *chars;
|
||||
@ -51,6 +51,7 @@ public:
|
||||
// Wrapped line support
|
||||
int widthLine;
|
||||
int lines;
|
||||
int wrapIndent; // In pixels
|
||||
|
||||
LineLayout(int maxLineLength_);
|
||||
virtual ~LineLayout();
|
||||
@ -65,6 +66,7 @@ public:
|
||||
char bracesMatchStyle, int xHighlight);
|
||||
void RestoreBracesHighlight(Range rangeLine, Position braces[]);
|
||||
int FindBefore(int x, int lower, int upper) const;
|
||||
int EndLineStyle() const;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -11,370 +11,53 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Visual C++ doesn't like unreachable code or long decorated names in its own headers.
|
||||
#pragma warning(disable: 4018 4100 4245 4511 4512 4663 4702 4786)
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "PropSetSimple.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// The comparison and case changing functions here assume ASCII
|
||||
// or extended ASCII such as the normal Windows code page.
|
||||
typedef std::map<std::string, std::string> mapss;
|
||||
|
||||
static inline char MakeUpperCase(char ch) {
|
||||
if (ch < 'a' || ch > 'z')
|
||||
return ch;
|
||||
else
|
||||
return static_cast<char>(ch - 'a' + 'A');
|
||||
PropSetSimple::PropSetSimple() {
|
||||
mapss *props = new mapss;
|
||||
impl = static_cast<void *>(props);
|
||||
}
|
||||
|
||||
static inline bool IsLetter(char ch) {
|
||||
return ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'));
|
||||
PropSetSimple::~PropSetSimple() {
|
||||
mapss *props = static_cast<mapss *>(impl);
|
||||
delete props;
|
||||
impl = 0;
|
||||
}
|
||||
|
||||
inline bool IsASpace(unsigned int ch) {
|
||||
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
||||
}
|
||||
|
||||
int CompareCaseInsensitive(const char *a, const char *b) {
|
||||
while (*a && *b) {
|
||||
if (*a != *b) {
|
||||
char upperA = MakeUpperCase(*a);
|
||||
char upperB = MakeUpperCase(*b);
|
||||
if (upperA != upperB)
|
||||
return upperA - upperB;
|
||||
}
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
// Either *a or *b is nul
|
||||
return *a - *b;
|
||||
}
|
||||
|
||||
int CompareNCaseInsensitive(const char *a, const char *b, size_t len) {
|
||||
while (*a && *b && len) {
|
||||
if (*a != *b) {
|
||||
char upperA = MakeUpperCase(*a);
|
||||
char upperB = MakeUpperCase(*b);
|
||||
if (upperA != upperB)
|
||||
return upperA - upperB;
|
||||
}
|
||||
a++;
|
||||
b++;
|
||||
len--;
|
||||
}
|
||||
if (len == 0)
|
||||
return 0;
|
||||
else
|
||||
// Either *a or *b is nul
|
||||
return *a - *b;
|
||||
}
|
||||
|
||||
bool EqualCaseInsensitive(const char *a, const char *b) {
|
||||
return 0 == CompareCaseInsensitive(a, b);
|
||||
}
|
||||
|
||||
// Since the CaseInsensitive functions declared in SString
|
||||
// are implemented here, I will for now put the non-inline
|
||||
// implementations of the SString members here as well, so
|
||||
// that I can quickly see what effect this has.
|
||||
|
||||
SString::SString(int i) : sizeGrowth(sizeGrowthDefault) {
|
||||
char number[32];
|
||||
sprintf(number, "%0d", i);
|
||||
s = StringAllocate(number);
|
||||
sSize = sLen = (s) ? strlen(s) : 0;
|
||||
}
|
||||
|
||||
SString::SString(double d, int precision) : sizeGrowth(sizeGrowthDefault) {
|
||||
char number[32];
|
||||
sprintf(number, "%.*f", precision, d);
|
||||
s = StringAllocate(number);
|
||||
sSize = sLen = (s) ? strlen(s) : 0;
|
||||
}
|
||||
|
||||
bool SString::grow(lenpos_t lenNew) {
|
||||
while (sizeGrowth * 6 < lenNew) {
|
||||
sizeGrowth *= 2;
|
||||
}
|
||||
char *sNew = new char[lenNew + sizeGrowth + 1];
|
||||
if (sNew) {
|
||||
if (s) {
|
||||
memcpy(sNew, s, sLen);
|
||||
delete []s;
|
||||
}
|
||||
s = sNew;
|
||||
s[sLen] = '\0';
|
||||
sSize = lenNew + sizeGrowth;
|
||||
}
|
||||
return sNew != 0;
|
||||
}
|
||||
|
||||
SString &SString::assign(const char *sOther, lenpos_t sSize_) {
|
||||
if (!sOther) {
|
||||
sSize_ = 0;
|
||||
} else if (sSize_ == measure_length) {
|
||||
sSize_ = strlen(sOther);
|
||||
}
|
||||
if (sSize > 0 && sSize_ <= sSize) { // Does not allocate new buffer if the current is big enough
|
||||
if (s && sSize_) {
|
||||
memcpy(s, sOther, sSize_);
|
||||
}
|
||||
s[sSize_] = '\0';
|
||||
sLen = sSize_;
|
||||
} else {
|
||||
delete []s;
|
||||
s = StringAllocate(sOther, sSize_);
|
||||
if (s) {
|
||||
sSize = sSize_; // Allow buffer bigger than real string, thus providing space to grow
|
||||
sLen = sSize_;
|
||||
} else {
|
||||
sSize = sLen = 0;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool SString::operator==(const SString &sOther) const {
|
||||
if ((s == 0) && (sOther.s == 0))
|
||||
return true;
|
||||
if ((s == 0) || (sOther.s == 0))
|
||||
return false;
|
||||
return strcmp(s, sOther.s) == 0;
|
||||
}
|
||||
|
||||
bool SString::operator==(const char *sOther) const {
|
||||
if ((s == 0) && (sOther == 0))
|
||||
return true;
|
||||
if ((s == 0) || (sOther == 0))
|
||||
return false;
|
||||
return strcmp(s, sOther) == 0;
|
||||
}
|
||||
|
||||
SString SString::substr(lenpos_t subPos, lenpos_t subLen) const {
|
||||
if (subPos >= sLen) {
|
||||
return SString(); // return a null string if start index is out of bounds
|
||||
}
|
||||
if ((subLen == measure_length) || (subPos + subLen > sLen)) {
|
||||
subLen = sLen - subPos; // can't substr past end of source string
|
||||
}
|
||||
return SString(s, subPos, subPos + subLen);
|
||||
}
|
||||
|
||||
SString &SString::lowercase(lenpos_t subPos, lenpos_t subLen) {
|
||||
if ((subLen == measure_length) || (subPos + subLen > sLen)) {
|
||||
subLen = sLen - subPos; // don't apply past end of string
|
||||
}
|
||||
for (lenpos_t i = subPos; i < subPos + subLen; i++) {
|
||||
if (s[i] < 'A' || s[i] > 'Z')
|
||||
continue;
|
||||
else
|
||||
s[i] = static_cast<char>(s[i] - 'A' + 'a');
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
SString &SString::uppercase(lenpos_t subPos, lenpos_t subLen) {
|
||||
if ((subLen == measure_length) || (subPos + subLen > sLen)) {
|
||||
subLen = sLen - subPos; // don't apply past end of string
|
||||
}
|
||||
for (lenpos_t i = subPos; i < subPos + subLen; i++) {
|
||||
if (s[i] < 'a' || s[i] > 'z')
|
||||
continue;
|
||||
else
|
||||
s[i] = static_cast<char>(s[i] - 'a' + 'A');
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
SString &SString::append(const char *sOther, lenpos_t sLenOther, char sep) {
|
||||
if (!sOther) {
|
||||
return *this;
|
||||
}
|
||||
if (sLenOther == measure_length) {
|
||||
sLenOther = strlen(sOther);
|
||||
}
|
||||
int lenSep = 0;
|
||||
if (sLen && sep) { // Only add a separator if not empty
|
||||
lenSep = 1;
|
||||
}
|
||||
lenpos_t lenNew = sLen + sLenOther + lenSep;
|
||||
// Conservative about growing the buffer: don't do it, unless really needed
|
||||
if ((lenNew < sSize) || (grow(lenNew))) {
|
||||
if (lenSep) {
|
||||
s[sLen] = sep;
|
||||
sLen++;
|
||||
}
|
||||
memcpy(&s[sLen], sOther, sLenOther);
|
||||
sLen += sLenOther;
|
||||
s[sLen] = '\0';
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
SString &SString::insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther) {
|
||||
if (!sOther || pos > sLen) {
|
||||
return *this;
|
||||
}
|
||||
if (sLenOther == measure_length) {
|
||||
sLenOther = strlen(sOther);
|
||||
}
|
||||
lenpos_t lenNew = sLen + sLenOther;
|
||||
// Conservative about growing the buffer: don't do it, unless really needed
|
||||
if ((lenNew < sSize) || grow(lenNew)) {
|
||||
lenpos_t moveChars = sLen - pos + 1;
|
||||
for (lenpos_t i = moveChars; i > 0; i--) {
|
||||
s[pos + sLenOther + i - 1] = s[pos + i - 1];
|
||||
}
|
||||
memcpy(s + pos, sOther, sLenOther);
|
||||
sLen = lenNew;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove @a len characters from the @a pos position, included.
|
||||
* Characters at pos + len and beyond replace characters at pos.
|
||||
* If @a len is 0, or greater than the length of the string
|
||||
* starting at @a pos, the string is just truncated at @a pos.
|
||||
*/
|
||||
void SString::remove(lenpos_t pos, lenpos_t len) {
|
||||
if (pos >= sLen) {
|
||||
return;
|
||||
}
|
||||
if (len < 1 || pos + len >= sLen) {
|
||||
s[pos] = '\0';
|
||||
sLen = pos;
|
||||
} else {
|
||||
for (lenpos_t i = pos; i < sLen - len + 1; i++) {
|
||||
s[i] = s[i+len];
|
||||
}
|
||||
sLen -= len;
|
||||
}
|
||||
}
|
||||
|
||||
bool SString::startswith(const char *prefix) {
|
||||
lenpos_t lenPrefix = strlen(prefix);
|
||||
if (lenPrefix > sLen) {
|
||||
return false;
|
||||
}
|
||||
return strncmp(s, prefix, lenPrefix) == 0;
|
||||
}
|
||||
|
||||
bool SString::endswith(const char *suffix) {
|
||||
lenpos_t lenSuffix = strlen(suffix);
|
||||
if (lenSuffix > sLen) {
|
||||
return false;
|
||||
}
|
||||
return strncmp(s + sLen - lenSuffix, suffix, lenSuffix) == 0;
|
||||
}
|
||||
|
||||
int SString::search(const char *sFind, lenpos_t start) const {
|
||||
if (start < sLen) {
|
||||
const char *sFound = strstr(s + start, sFind);
|
||||
if (sFound) {
|
||||
return sFound - s;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int SString::substitute(char chFind, char chReplace) {
|
||||
int c = 0;
|
||||
char *t = s;
|
||||
while (t) {
|
||||
t = strchr(t, chFind);
|
||||
if (t) {
|
||||
*t = chReplace;
|
||||
t++;
|
||||
c++;
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
int SString::substitute(const char *sFind, const char *sReplace) {
|
||||
int c = 0;
|
||||
lenpos_t lenFind = strlen(sFind);
|
||||
lenpos_t lenReplace = strlen(sReplace);
|
||||
int posFound = search(sFind);
|
||||
while (posFound >= 0) {
|
||||
remove(posFound, lenFind);
|
||||
insert(posFound, sReplace, lenReplace);
|
||||
posFound = search(sFind, posFound + lenReplace);
|
||||
c++;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
char *SContainer::StringAllocate(lenpos_t len) {
|
||||
if (len != measure_length) {
|
||||
return new char[len + 1];
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
char *SContainer::StringAllocate(const char *s, lenpos_t len) {
|
||||
if (s == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (len == measure_length) {
|
||||
len = strlen(s);
|
||||
}
|
||||
char *sNew = new char[len + 1];
|
||||
if (sNew) {
|
||||
memcpy(sNew, s, len);
|
||||
sNew[len] = '\0';
|
||||
}
|
||||
return sNew;
|
||||
}
|
||||
|
||||
// End SString functions
|
||||
|
||||
PropSet::PropSet() {
|
||||
superPS = 0;
|
||||
for (int root = 0; root < hashRoots; root++)
|
||||
props[root] = 0;
|
||||
}
|
||||
|
||||
PropSet::~PropSet() {
|
||||
superPS = 0;
|
||||
Clear();
|
||||
}
|
||||
|
||||
void PropSet::Set(const char *key, const char *val, int lenKey, int lenVal) {
|
||||
void PropSetSimple::Set(const char *key, const char *val, int lenKey, int lenVal) {
|
||||
mapss *props = static_cast<mapss *>(impl);
|
||||
if (!*key) // Empty keys are not supported
|
||||
return;
|
||||
if (lenKey == -1)
|
||||
lenKey = static_cast<int>(strlen(key));
|
||||
if (lenVal == -1)
|
||||
lenVal = static_cast<int>(strlen(val));
|
||||
unsigned int hash = HashString(key, lenKey);
|
||||
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
|
||||
if ((hash == p->hash) &&
|
||||
((strlen(p->key) == static_cast<unsigned int>(lenKey)) &&
|
||||
(0 == strncmp(p->key, key, lenKey)))) {
|
||||
// Replace current value
|
||||
delete [](p->val);
|
||||
p->val = StringDup(val, lenVal);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Not found
|
||||
Property *pNew = new Property;
|
||||
if (pNew) {
|
||||
pNew->hash = hash;
|
||||
pNew->key = StringDup(key, lenKey);
|
||||
pNew->val = StringDup(val, lenVal);
|
||||
pNew->next = props[hash % hashRoots];
|
||||
props[hash % hashRoots] = pNew;
|
||||
}
|
||||
(*props)[std::string(key, lenKey)] = std::string(val, lenVal);
|
||||
}
|
||||
|
||||
void PropSet::Set(const char *keyVal) {
|
||||
while (IsASpace(*keyVal))
|
||||
static bool IsASpaceCharacter(unsigned int ch) {
|
||||
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
||||
}
|
||||
|
||||
void PropSetSimple::Set(const char *keyVal) {
|
||||
while (IsASpaceCharacter(*keyVal))
|
||||
keyVal++;
|
||||
const char *endVal = keyVal;
|
||||
while (*endVal && (*endVal != '\n'))
|
||||
@ -387,34 +70,7 @@ void PropSet::Set(const char *keyVal) {
|
||||
}
|
||||
}
|
||||
|
||||
void PropSet::Unset(const char *key, int lenKey) {
|
||||
if (!*key) // Empty keys are not supported
|
||||
return;
|
||||
if (lenKey == -1)
|
||||
lenKey = static_cast<int>(strlen(key));
|
||||
unsigned int hash = HashString(key, lenKey);
|
||||
Property *pPrev = NULL;
|
||||
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
|
||||
if ((hash == p->hash) &&
|
||||
((strlen(p->key) == static_cast<unsigned int>(lenKey)) &&
|
||||
(0 == strncmp(p->key, key, lenKey)))) {
|
||||
if (pPrev)
|
||||
pPrev->next = p->next;
|
||||
else
|
||||
props[hash % hashRoots] = p->next;
|
||||
if (p == enumnext)
|
||||
enumnext = p->next; // Not that anyone should mix enum and Set / Unset.
|
||||
delete [](p->key);
|
||||
delete [](p->val);
|
||||
delete p;
|
||||
return;
|
||||
} else {
|
||||
pPrev = p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PropSet::SetMultiple(const char *s) {
|
||||
void PropSetSimple::SetMultiple(const char *s) {
|
||||
const char *eol = strchr(s, '\n');
|
||||
while (eol) {
|
||||
Set(s);
|
||||
@ -424,16 +80,11 @@ void PropSet::SetMultiple(const char *s) {
|
||||
Set(s);
|
||||
}
|
||||
|
||||
SString PropSet::Get(const char *key) const {
|
||||
unsigned int hash = HashString(key, strlen(key));
|
||||
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
|
||||
if ((hash == p->hash) && (0 == strcmp(p->key, key))) {
|
||||
return p->val;
|
||||
}
|
||||
}
|
||||
if (superPS) {
|
||||
// Failed here, so try in base property set
|
||||
return superPS->Get(key);
|
||||
const char *PropSetSimple::Get(const char *key) const {
|
||||
mapss *props = static_cast<mapss *>(impl);
|
||||
mapss::const_iterator keyPos = props->find(std::string(key));
|
||||
if (keyPos != props->end()) {
|
||||
return keyPos->second.c_str();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
@ -456,300 +107,70 @@ struct VarChain {
|
||||
const VarChain *link;
|
||||
};
|
||||
|
||||
static int ExpandAllInPlace(const PropSet &props, SString &withVars, int maxExpands, const VarChain &blankVars = VarChain()) {
|
||||
int varStart = withVars.search("$(");
|
||||
while ((varStart >= 0) && (maxExpands > 0)) {
|
||||
int varEnd = withVars.search(")", varStart+2);
|
||||
if (varEnd < 0) {
|
||||
static int ExpandAllInPlace(const PropSetSimple &props, std::string &withVars, int maxExpands, const VarChain &blankVars) {
|
||||
size_t varStart = withVars.find("$(");
|
||||
while ((varStart != std::string::npos) && (maxExpands > 0)) {
|
||||
size_t varEnd = withVars.find(")", varStart+2);
|
||||
if (varEnd == std::string::npos) {
|
||||
break;
|
||||
}
|
||||
|
||||
// For consistency, when we see '$(ab$(cde))', expand the inner variable first,
|
||||
// regardless whether there is actually a degenerate variable named 'ab$(cde'.
|
||||
int innerVarStart = withVars.search("$(", varStart+2);
|
||||
while ((innerVarStart > varStart) && (innerVarStart < varEnd)) {
|
||||
size_t innerVarStart = withVars.find("$(", varStart+2);
|
||||
while ((innerVarStart != std::string::npos) && (innerVarStart > varStart) && (innerVarStart < varEnd)) {
|
||||
varStart = innerVarStart;
|
||||
innerVarStart = withVars.search("$(", varStart+2);
|
||||
innerVarStart = withVars.find("$(", varStart+2);
|
||||
}
|
||||
|
||||
SString var(withVars.c_str(), varStart + 2, varEnd);
|
||||
SString val = props.Get(var.c_str());
|
||||
std::string var(withVars.c_str(), varStart + 2, varEnd - varStart - 2);
|
||||
std::string val = props.Get(var.c_str());
|
||||
|
||||
if (blankVars.contains(var.c_str())) {
|
||||
val.clear(); // treat blankVar as an empty string (e.g. to block self-reference)
|
||||
val = ""; // treat blankVar as an empty string (e.g. to block self-reference)
|
||||
}
|
||||
|
||||
if (--maxExpands >= 0) {
|
||||
maxExpands = ExpandAllInPlace(props, val, maxExpands, VarChain(var.c_str(), &blankVars));
|
||||
}
|
||||
|
||||
withVars.remove(varStart, varEnd-varStart+1);
|
||||
withVars.erase(varStart, varEnd-varStart+1);
|
||||
withVars.insert(varStart, val.c_str(), val.length());
|
||||
|
||||
varStart = withVars.search("$(");
|
||||
varStart = withVars.find("$(");
|
||||
}
|
||||
|
||||
return maxExpands;
|
||||
}
|
||||
|
||||
SString PropSet::GetExpanded(const char *key) const {
|
||||
SString val = Get(key);
|
||||
char *PropSetSimple::Expanded(const char *key) const {
|
||||
std::string val = Get(key);
|
||||
ExpandAllInPlace(*this, val, 100, VarChain(key));
|
||||
return val;
|
||||
}
|
||||
|
||||
SString PropSet::Expand(const char *withVars, int maxExpands) const {
|
||||
SString val = withVars;
|
||||
ExpandAllInPlace(*this, val, maxExpands);
|
||||
return val;
|
||||
}
|
||||
|
||||
int PropSet::GetInt(const char *key, int defaultValue) const {
|
||||
SString val = GetExpanded(key);
|
||||
if (val.length())
|
||||
return val.value();
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
bool isprefix(const char *target, const char *prefix) {
|
||||
while (*target && *prefix) {
|
||||
if (*target != *prefix)
|
||||
return false;
|
||||
target++;
|
||||
prefix++;
|
||||
}
|
||||
if (*prefix)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
void PropSet::Clear() {
|
||||
for (int root = 0; root < hashRoots; root++) {
|
||||
Property *p = props[root];
|
||||
while (p) {
|
||||
Property *pNext = p->next;
|
||||
p->hash = 0;
|
||||
delete []p->key;
|
||||
p->key = 0;
|
||||
delete []p->val;
|
||||
p->val = 0;
|
||||
delete p;
|
||||
p = pNext;
|
||||
}
|
||||
props[root] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
char *PropSet::ToString() const {
|
||||
size_t len=0;
|
||||
for (int r = 0; r < hashRoots; r++) {
|
||||
for (Property *p = props[r]; p; p = p->next) {
|
||||
len += strlen(p->key) + 1;
|
||||
len += strlen(p->val) + 1;
|
||||
}
|
||||
}
|
||||
if (len == 0)
|
||||
len = 1; // Return as empty string
|
||||
char *ret = new char [len];
|
||||
if (ret) {
|
||||
char *w = ret;
|
||||
for (int root = 0; root < hashRoots; root++) {
|
||||
for (Property *p = props[root]; p; p = p->next) {
|
||||
strcpy(w, p->key);
|
||||
w += strlen(p->key);
|
||||
*w++ = '=';
|
||||
strcpy(w, p->val);
|
||||
w += strlen(p->val);
|
||||
*w++ = '\n';
|
||||
}
|
||||
}
|
||||
ret[len-1] = '\0';
|
||||
}
|
||||
char *ret = new char [val.size() + 1];
|
||||
strcpy(ret, val.c_str());
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array that points into each word in the string and puts \0 terminators
|
||||
* after each word.
|
||||
*/
|
||||
static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) {
|
||||
int prev = '\n';
|
||||
int words = 0;
|
||||
// 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++) {
|
||||
wordSeparator[i] = false;
|
||||
char *PropSetSimple::ToString() const {
|
||||
mapss *props = static_cast<mapss *>(impl);
|
||||
std::string sval;
|
||||
for (mapss::const_iterator it=props->begin(); it != props->end(); it++) {
|
||||
sval += it->first;
|
||||
sval += "=";
|
||||
sval += it->second;
|
||||
sval += "\n";
|
||||
}
|
||||
wordSeparator['\r'] = true;
|
||||
wordSeparator['\n'] = true;
|
||||
if (!onlyLineEnds) {
|
||||
wordSeparator[' '] = true;
|
||||
wordSeparator['\t'] = true;
|
||||
}
|
||||
for (int j = 0; wordlist[j]; j++) {
|
||||
int curr = static_cast<unsigned char>(wordlist[j]);
|
||||
if (!wordSeparator[curr] && wordSeparator[prev])
|
||||
words++;
|
||||
prev = curr;
|
||||
}
|
||||
char **keywords = new char *[words + 1];
|
||||
if (keywords) {
|
||||
words = 0;
|
||||
prev = '\0';
|
||||
size_t slen = strlen(wordlist);
|
||||
for (size_t k = 0; k < slen; k++) {
|
||||
if (!wordSeparator[static_cast<unsigned char>(wordlist[k])]) {
|
||||
if (!prev) {
|
||||
keywords[words] = &wordlist[k];
|
||||
words++;
|
||||
}
|
||||
} else {
|
||||
wordlist[k] = '\0';
|
||||
}
|
||||
prev = wordlist[k];
|
||||
}
|
||||
keywords[words] = &wordlist[slen];
|
||||
*len = words;
|
||||
} else {
|
||||
*len = 0;
|
||||
}
|
||||
return keywords;
|
||||
char *ret = new char [sval.size() + 1];
|
||||
strcpy(ret, sval.c_str());
|
||||
return ret;
|
||||
}
|
||||
|
||||
void WordList::Clear() {
|
||||
if (words) {
|
||||
delete []list;
|
||||
delete []words;
|
||||
int PropSetSimple::GetInt(const char *key, int defaultValue) const {
|
||||
char *val = Expanded(key);
|
||||
if (val) {
|
||||
int retVal = val[0] ? atoi(val) : defaultValue;
|
||||
delete []val;
|
||||
return retVal;
|
||||
}
|
||||
words = 0;
|
||||
list = 0;
|
||||
len = 0;
|
||||
sorted = false;
|
||||
}
|
||||
|
||||
void WordList::Set(const char *s) {
|
||||
list = StringDup(s);
|
||||
sorted = false;
|
||||
words = ArrayFromWordList(list, &len, onlyLineEnds);
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
static void SortWordList(char **words, unsigned int len) {
|
||||
qsort(reinterpret_cast<void*>(words), len, sizeof(*words),
|
||||
cmpString);
|
||||
}
|
||||
|
||||
bool WordList::InList(const char *s) {
|
||||
if (0 == words)
|
||||
return false;
|
||||
if (!sorted) {
|
||||
sorted = true;
|
||||
SortWordList(words, len);
|
||||
for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
|
||||
starts[k] = -1;
|
||||
for (int l = len - 1; l >= 0; l--) {
|
||||
unsigned char indexChar = words[l][0];
|
||||
starts[indexChar] = l;
|
||||
}
|
||||
}
|
||||
unsigned char firstChar = s[0];
|
||||
int j = starts[firstChar];
|
||||
if (j >= 0) {
|
||||
while ((unsigned char)words[j][0] == firstChar) {
|
||||
if (s[1] == words[j][1]) {
|
||||
const char *a = words[j] + 1;
|
||||
const char *b = s + 1;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
if (!*a && !*b)
|
||||
return true;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
j = starts['^'];
|
||||
if (j >= 0) {
|
||||
while (words[j][0] == '^') {
|
||||
const char *a = words[j] + 1;
|
||||
const char *b = s;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
if (!*a)
|
||||
return true;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** similar to InList, but word s can be a substring of keyword.
|
||||
* eg. the keyword define is defined as def~ine. This means the word must start
|
||||
* with def to be a keyword, but also defi, defin and define are valid.
|
||||
* The marker is ~ in this case.
|
||||
*/
|
||||
bool WordList::InListAbbreviated(const char *s, const char marker) {
|
||||
if (0 == words)
|
||||
return false;
|
||||
if (!sorted) {
|
||||
sorted = true;
|
||||
SortWordList(words, len);
|
||||
for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
|
||||
starts[k] = -1;
|
||||
for (int l = len - 1; l >= 0; l--) {
|
||||
unsigned char indexChar = words[l][0];
|
||||
starts[indexChar] = l;
|
||||
}
|
||||
}
|
||||
unsigned char firstChar = s[0];
|
||||
int j = starts[firstChar];
|
||||
if (j >= 0) {
|
||||
while (words[j][0] == firstChar) {
|
||||
bool isSubword = false;
|
||||
int start = 1;
|
||||
if (words[j][1] == marker) {
|
||||
isSubword = true;
|
||||
start++;
|
||||
}
|
||||
if (s[1] == words[j][start]) {
|
||||
const char *a = words[j] + start;
|
||||
const char *b = s + 1;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
if (*a == marker) {
|
||||
isSubword = true;
|
||||
a++;
|
||||
}
|
||||
b++;
|
||||
}
|
||||
if ((!*a || isSubword) && !*b)
|
||||
return true;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
j = starts['^'];
|
||||
if (j >= 0) {
|
||||
while (words[j][0] == '^') {
|
||||
const char *a = words[j] + 1;
|
||||
const char *b = s;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
if (!*a)
|
||||
return true;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return defaultValue;
|
||||
}
|
||||
|
@ -198,6 +198,8 @@
|
||||
* matches: foo-foo fo-fo fob-fob foobar-foobar ...
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "RESearch.h"
|
||||
|
||||
|
@ -23,7 +23,6 @@ class SVector {
|
||||
int *v; ///< The vector
|
||||
unsigned int size; ///< Number of elements allocated
|
||||
unsigned int len; ///< Number of elements used in vector
|
||||
bool allocFailure; ///< A memory allocation call has failed
|
||||
|
||||
/** Internally allocate more elements than the user wants
|
||||
* to avoid thrashing the memory allocator. */
|
||||
@ -33,12 +32,8 @@ class SVector {
|
||||
else
|
||||
newSize = (newSize * 3) / 2;
|
||||
int* newv = new int[newSize];
|
||||
if (!newv) {
|
||||
allocFailure = true;
|
||||
return;
|
||||
}
|
||||
size = newSize;
|
||||
unsigned int i=0;
|
||||
unsigned int i=0;
|
||||
for (; i<len; i++) {
|
||||
newv[i] = v[i];
|
||||
}
|
||||
@ -51,7 +46,6 @@ class SVector {
|
||||
|
||||
public:
|
||||
SVector() {
|
||||
allocFailure = false;
|
||||
v = 0;
|
||||
len = 0;
|
||||
size = 0;
|
||||
@ -61,33 +55,27 @@ public:
|
||||
}
|
||||
/// Constructor from another vector.
|
||||
SVector(const SVector &other) {
|
||||
allocFailure = false;
|
||||
v = 0;
|
||||
len = 0;
|
||||
size = 0;
|
||||
if (other.Length() > 0) {
|
||||
SizeTo(other.Length());
|
||||
if (!allocFailure) {
|
||||
for (int i=0;i<other.Length();i++)
|
||||
v[i] = other.v[i];
|
||||
len = other.Length();
|
||||
}
|
||||
for (int i=0;i<other.Length();i++)
|
||||
v[i] = other.v[i];
|
||||
len = other.Length();
|
||||
}
|
||||
}
|
||||
/// Copy constructor.
|
||||
SVector &operator=(const SVector &other) {
|
||||
if (this != &other) {
|
||||
delete []v;
|
||||
allocFailure = false;
|
||||
v = 0;
|
||||
len = 0;
|
||||
size = 0;
|
||||
if (other.Length() > 0) {
|
||||
SizeTo(other.Length());
|
||||
if (!allocFailure) {
|
||||
for (int i=0;i<other.Length();i++)
|
||||
v[i] = other.v[i];
|
||||
}
|
||||
for (int i=0;i<other.Length();i++)
|
||||
v[i] = other.v[i];
|
||||
len = other.Length();
|
||||
}
|
||||
}
|
||||
|
@ -10,10 +10,13 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "PropSet.h"
|
||||
#include "PropSetSimple.h"
|
||||
#ifdef SCI_LEXER
|
||||
#include "SciLexer.h"
|
||||
#include "Accessor.h"
|
||||
@ -36,6 +39,7 @@
|
||||
#include "CharClassify.h"
|
||||
#include "Decoration.h"
|
||||
#include "Document.h"
|
||||
#include "Selection.h"
|
||||
#include "PositionCache.h"
|
||||
#include "Editor.h"
|
||||
#include "ScintillaBase.h"
|
||||
@ -190,7 +194,7 @@ int ScintillaBase::KeyCommand(unsigned int iMessage) {
|
||||
ct.CallTipCancel();
|
||||
}
|
||||
if ((iMessage == SCI_DELETEBACK) || (iMessage == SCI_DELETEBACKNOTLINE)) {
|
||||
if (currentPos <= ct.posStartCallTip) {
|
||||
if (sel.MainCaret() <= ct.posStartCallTip) {
|
||||
ct.CallTipCancel();
|
||||
}
|
||||
}
|
||||
@ -212,24 +216,24 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
|
||||
const char *typeSep = strchr(list, ac.GetTypesep());
|
||||
size_t lenInsert = (typeSep) ? (typeSep-list) : strlen(list);
|
||||
if (ac.ignoreCase) {
|
||||
SetEmptySelection(currentPos - lenEntered);
|
||||
pdoc->DeleteChars(currentPos, lenEntered);
|
||||
SetEmptySelection(currentPos);
|
||||
pdoc->InsertString(currentPos, list, lenInsert);
|
||||
SetEmptySelection(currentPos + lenInsert);
|
||||
SetEmptySelection(sel.MainCaret() - lenEntered);
|
||||
pdoc->DeleteChars(sel.MainCaret(), lenEntered);
|
||||
SetEmptySelection(sel.MainCaret());
|
||||
pdoc->InsertString(sel.MainCaret(), list, lenInsert);
|
||||
SetEmptySelection(sel.MainCaret() + lenInsert);
|
||||
} else {
|
||||
SetEmptySelection(currentPos);
|
||||
pdoc->InsertString(currentPos, list + lenEntered, lenInsert - lenEntered);
|
||||
SetEmptySelection(currentPos + lenInsert - lenEntered);
|
||||
SetEmptySelection(sel.MainCaret());
|
||||
pdoc->InsertString(sel.MainCaret(), list + lenEntered, lenInsert - lenEntered);
|
||||
SetEmptySelection(sel.MainCaret() + lenInsert - lenEntered);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
ac.Start(wMain, idAutoComplete, currentPos, LocationFromPosition(currentPos),
|
||||
ac.Start(wMain, idAutoComplete, sel.MainCaret(), PointMainCaret(),
|
||||
lenEntered, vs.lineHeight, IsUnicodeMode());
|
||||
|
||||
PRectangle rcClient = GetClientRectangle();
|
||||
Point pt = LocationFromPosition(currentPos - lenEntered);
|
||||
Point pt = LocationFromPosition(sel.MainCaret() - lenEntered);
|
||||
PRectangle rcPopupBounds = wMain.GetMonitorRect(pt);
|
||||
if (rcPopupBounds.Height() == 0)
|
||||
rcPopupBounds = rcClient;
|
||||
@ -239,7 +243,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
|
||||
if (pt.x >= rcClient.right - widthLB) {
|
||||
HorizontalScrollTo(xOffset + pt.x - rcClient.right + widthLB);
|
||||
Redraw();
|
||||
pt = LocationFromPosition(currentPos);
|
||||
pt = PointMainCaret();
|
||||
}
|
||||
PRectangle rcac;
|
||||
rcac.left = pt.x - ac.lb->CaretFromEdge();
|
||||
@ -305,7 +309,7 @@ void ScintillaBase::AutoCompleteMoveToCurrentWord() {
|
||||
char wordCurrent[1000];
|
||||
int i;
|
||||
int startWord = ac.posStart - ac.startLen;
|
||||
for (i = startWord; i < currentPos && i - startWord < 1000; i++)
|
||||
for (i = startWord; i < sel.MainCaret() && i - startWord < 1000; i++)
|
||||
wordCurrent[i - startWord] = pdoc->CharAt(i);
|
||||
wordCurrent[Platform::Minimum(i - startWord, 999)] = '\0';
|
||||
ac.Select(wordCurrent);
|
||||
@ -322,9 +326,9 @@ void ScintillaBase::AutoCompleteCharacterAdded(char ch) {
|
||||
}
|
||||
|
||||
void ScintillaBase::AutoCompleteCharacterDeleted() {
|
||||
if (currentPos < ac.posStart - ac.startLen) {
|
||||
if (sel.MainCaret() < ac.posStart - ac.startLen) {
|
||||
AutoCompleteCancel();
|
||||
} else if (ac.cancelAtStartPos && (currentPos <= ac.posStart)) {
|
||||
} else if (ac.cancelAtStartPos && (sel.MainCaret() <= ac.posStart)) {
|
||||
AutoCompleteCancel();
|
||||
} else {
|
||||
AutoCompleteMoveToCurrentWord();
|
||||
@ -349,7 +353,6 @@ void ScintillaBase::AutoCompleteCompleted() {
|
||||
|
||||
ac.Show(false);
|
||||
|
||||
listSelected = selected;
|
||||
SCNotification scn = {0};
|
||||
scn.nmhdr.code = listType > 0 ? SCN_USERLISTSELECTION : SCN_AUTOCSELECTION;
|
||||
scn.message = 0;
|
||||
@ -357,7 +360,7 @@ void ScintillaBase::AutoCompleteCompleted() {
|
||||
scn.listType = listType;
|
||||
Position firstPos = ac.posStart - ac.startLen;
|
||||
scn.lParam = firstPos;
|
||||
scn.text = listSelected.c_str();
|
||||
scn.text = selected;
|
||||
NotifyParent(scn);
|
||||
|
||||
if (!ac.Active())
|
||||
@ -367,22 +370,20 @@ void ScintillaBase::AutoCompleteCompleted() {
|
||||
if (listType > 0)
|
||||
return;
|
||||
|
||||
Position endPos = currentPos;
|
||||
Position endPos = sel.MainCaret();
|
||||
if (ac.dropRestOfWord)
|
||||
endPos = pdoc->ExtendWordSelect(endPos, 1, true);
|
||||
if (endPos < firstPos)
|
||||
return;
|
||||
pdoc->BeginUndoAction();
|
||||
UndoGroup ug(pdoc);
|
||||
if (endPos != firstPos) {
|
||||
pdoc->DeleteChars(firstPos, endPos - firstPos);
|
||||
}
|
||||
SetEmptySelection(ac.posStart);
|
||||
if (item != -1) {
|
||||
SString piece = selected;
|
||||
pdoc->InsertCString(firstPos, piece.c_str());
|
||||
SetEmptySelection(firstPos + static_cast<int>(piece.length()));
|
||||
pdoc->InsertCString(firstPos, selected);
|
||||
SetEmptySelection(firstPos + static_cast<int>(strlen(selected)));
|
||||
}
|
||||
pdoc->EndUndoAction();
|
||||
}
|
||||
|
||||
int ScintillaBase::AutoCompleteGetCurrent() {
|
||||
@ -401,7 +402,7 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) {
|
||||
if (ct.UseStyleCallTip()) {
|
||||
ct.SetForeBack(vs.styles[STYLE_CALLTIP].fore, vs.styles[STYLE_CALLTIP].back);
|
||||
}
|
||||
PRectangle rc = ct.CallTipStart(currentPos, pt,
|
||||
PRectangle rc = ct.CallTipStart(sel.MainCaret(), pt,
|
||||
defn,
|
||||
vs.styles[ctStyle].fontName,
|
||||
vs.styles[ctStyle].sizeZoomed,
|
||||
@ -436,10 +437,10 @@ void ScintillaBase::ContextMenu(Point pt) {
|
||||
AddToPopUp("Undo", idcmdUndo, writable && pdoc->CanUndo());
|
||||
AddToPopUp("Redo", idcmdRedo, writable && pdoc->CanRedo());
|
||||
AddToPopUp("");
|
||||
AddToPopUp("Cut", idcmdCut, writable && currentPos != anchor);
|
||||
AddToPopUp("Copy", idcmdCopy, currentPos != anchor);
|
||||
AddToPopUp("Cut", idcmdCut, writable && !sel.Empty());
|
||||
AddToPopUp("Copy", idcmdCopy, !sel.Empty());
|
||||
AddToPopUp("Paste", idcmdPaste, writable && WndProc(SCI_CANPASTE, 0, 0));
|
||||
AddToPopUp("Delete", idcmdDelete, writable && currentPos != anchor);
|
||||
AddToPopUp("Delete", idcmdDelete, writable && !sel.Empty());
|
||||
AddToPopUp("");
|
||||
AddToPopUp("Select All", idcmdSelectAll);
|
||||
popup.Show(pt, wMain);
|
||||
@ -706,24 +707,23 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara
|
||||
break;
|
||||
|
||||
case SCI_GETPROPERTY: {
|
||||
SString val = props.Get(reinterpret_cast<const char *>(wParam));
|
||||
const int n = val.length();
|
||||
const char *val = props.Get(reinterpret_cast<const char *>(wParam));
|
||||
const int n = strlen(val);
|
||||
if (lParam != 0) {
|
||||
char *ptr = reinterpret_cast<char *>(lParam);
|
||||
memcpy(ptr, val.c_str(), n);
|
||||
ptr[n] = '\0'; // terminate
|
||||
strcpy(ptr, val);
|
||||
}
|
||||
return n; // Not including NUL
|
||||
}
|
||||
|
||||
case SCI_GETPROPERTYEXPANDED: {
|
||||
SString val = props.GetExpanded(reinterpret_cast<const char *>(wParam));
|
||||
const int n = val.length();
|
||||
char *val = props.Expanded(reinterpret_cast<const char *>(wParam));
|
||||
const int n = strlen(val);
|
||||
if (lParam != 0) {
|
||||
char *ptr = reinterpret_cast<char *>(lParam);
|
||||
memcpy(ptr, val.c_str(), n);
|
||||
ptr[n] = '\0'; // terminate
|
||||
strcpy(ptr, val);
|
||||
}
|
||||
delete []val;
|
||||
return n; // Not including NUL
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,6 @@ protected:
|
||||
CallTip ct;
|
||||
|
||||
int listType; ///< 0 is an autocomplete list
|
||||
SString listSelected; ///< Receives listbox selected string
|
||||
int maxListWidth; /// Maximum width of list, in average character widths
|
||||
|
||||
bool performingStyle; ///< Prevent reentrance
|
||||
@ -49,7 +48,7 @@ protected:
|
||||
#ifdef SCI_LEXER
|
||||
int lexLanguage;
|
||||
const LexerModule *lexCurrent;
|
||||
PropSet props;
|
||||
PropSetSimple props;
|
||||
enum {numWordLists=KEYWORDSET_MAX+1};
|
||||
WordList *keyWordLists[numWordLists+1];
|
||||
void SetLexer(uptr_t wParam);
|
||||
|
@ -92,10 +92,13 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
|
||||
|
||||
selforeset = source.selforeset;
|
||||
selforeground.desired = source.selforeground.desired;
|
||||
selAdditionalForeground.desired = source.selAdditionalForeground.desired;
|
||||
selbackset = source.selbackset;
|
||||
selbackground.desired = source.selbackground.desired;
|
||||
selAdditionalBackground.desired = source.selAdditionalBackground.desired;
|
||||
selbackground2.desired = source.selbackground2.desired;
|
||||
selAlpha = source.selAlpha;
|
||||
selAdditionalAlpha = source.selAdditionalAlpha;
|
||||
selEOLFilled = source.selEOLFilled;
|
||||
|
||||
foldmarginColourSet = source.foldmarginColourSet;
|
||||
@ -117,8 +120,9 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
|
||||
selbar.desired = source.selbar.desired;
|
||||
selbarlight.desired = source.selbarlight.desired;
|
||||
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;
|
||||
@ -177,10 +181,13 @@ void ViewStyle::Init(size_t stylesSize_) {
|
||||
|
||||
selforeset = false;
|
||||
selforeground.desired = ColourDesired(0xff, 0, 0);
|
||||
selAdditionalForeground.desired = ColourDesired(0xff, 0, 0);
|
||||
selbackset = true;
|
||||
selbackground.desired = ColourDesired(0xc0, 0xc0, 0xc0);
|
||||
selAdditionalBackground.desired = ColourDesired(0xd7, 0xd7, 0xd7);
|
||||
selbackground2.desired = ColourDesired(0xb0, 0xb0, 0xb0);
|
||||
selAlpha = SC_ALPHA_NOALPHA;
|
||||
selAdditionalAlpha = SC_ALPHA_NOALPHA;
|
||||
selEOLFilled = false;
|
||||
|
||||
foldmarginColourSet = false;
|
||||
@ -197,8 +204,9 @@ void ViewStyle::Init(size_t stylesSize_) {
|
||||
styles[STYLE_LINENUMBER].fore.desired = ColourDesired(0, 0, 0);
|
||||
styles[STYLE_LINENUMBER].back.desired = Platform::Chrome();
|
||||
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);
|
||||
@ -260,7 +268,9 @@ void ViewStyle::RefreshColourPalette(Palette &pal, bool want) {
|
||||
markers[i].RefreshColourPalette(pal, want);
|
||||
}
|
||||
pal.WantFind(selforeground, want);
|
||||
pal.WantFind(selAdditionalForeground, want);
|
||||
pal.WantFind(selbackground, want);
|
||||
pal.WantFind(selAdditionalBackground, want);
|
||||
pal.WantFind(selbackground2, want);
|
||||
|
||||
pal.WantFind(foldmarginColour, want);
|
||||
@ -271,6 +281,7 @@ void ViewStyle::RefreshColourPalette(Palette &pal, bool want) {
|
||||
pal.WantFind(selbar, want);
|
||||
pal.WantFind(selbarlight, want);
|
||||
pal.WantFind(caretcolour, want);
|
||||
pal.WantFind(additionalCaretColour, want);
|
||||
pal.WantFind(caretLineBackground, want);
|
||||
pal.WantFind(edgecolour, want);
|
||||
pal.WantFind(hotspotForeground, want);
|
||||
|
@ -58,10 +58,13 @@ public:
|
||||
unsigned int spaceWidth;
|
||||
bool selforeset;
|
||||
ColourPair selforeground;
|
||||
ColourPair selAdditionalForeground;
|
||||
bool selbackset;
|
||||
ColourPair selbackground;
|
||||
ColourPair selAdditionalBackground;
|
||||
ColourPair selbackground2;
|
||||
int selAlpha;
|
||||
int selAdditionalAlpha;
|
||||
bool selEOLFilled;
|
||||
bool whitespaceForegroundSet;
|
||||
ColourPair whitespaceForeground;
|
||||
@ -93,8 +96,9 @@ public:
|
||||
bool viewEOL;
|
||||
bool showMarkedLines;
|
||||
ColourPair caretcolour;
|
||||
ColourPair additionalCaretColour;
|
||||
bool showCaretLineBackground;
|
||||
bool showCaretLineBackgroundAlways;
|
||||
bool showCaretLineBackgroundAlways;
|
||||
ColourPair caretLineBackground;
|
||||
int caretLineAlpha;
|
||||
ColourPair edgecolour;
|
||||
|
@ -45,7 +45,7 @@ void WindowAccessor::Fill(int position) {
|
||||
if (endPos > lenDoc)
|
||||
endPos = lenDoc;
|
||||
|
||||
TextRange tr = {{startPos, endPos}, buf};
|
||||
Sci_TextRange tr = {{startPos, endPos}, buf};
|
||||
Platform::SendScintillaPointer(id, SCI_GETTEXTRANGE, 0, &tr);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace Scintilla {
|
||||
* Hold a pixmap in XPM format.
|
||||
*/
|
||||
class XPM {
|
||||
int id; // Assigned by container
|
||||
int pid; // Assigned by container
|
||||
int height;
|
||||
int width;
|
||||
int nColours;
|
||||
@ -42,8 +42,8 @@ public:
|
||||
/// Decompose image into runs and use FillRectangle for each run
|
||||
void Draw(Surface *surface, PRectangle &rc);
|
||||
char **InLinesForm() { return lines; }
|
||||
void SetId(int id_) { id = id_; }
|
||||
int GetId() { return id; }
|
||||
void SetId(int pid_) { pid = pid_; }
|
||||
int GetId() { return pid; }
|
||||
int GetHeight() { return height; }
|
||||
int GetWidth() { return width; }
|
||||
static const char **LinesFormFromTextForm(const char *textForm);
|
||||
|
@ -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 /W4 /O1 /I "..\include" /I "..\src" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCI_LEXER" /FD /c
|
||||
# SUBTRACT CPP /Fr /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" /Fr /FD /c
|
||||
# SUBTRACT CPP /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"
|
||||
@ -70,7 +70,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SciLexer_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /G6 /MTd /W4 /Gm /GX /ZI /Od /I "..\include" /I "..\src" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCI_LEXER" /FR /FD /GZ /c
|
||||
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\src" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCI_LEXER" /D "_CRT_SECURE_NO_WARNINGS" /FR /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
@ -506,6 +506,10 @@ SOURCE=..\win32\ScintRes.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\Selection.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\Style.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -1 +1 @@
|
||||
178
|
||||
201
|
||||
|
@ -216,7 +216,7 @@ class FontCached : Font {
|
||||
static FontCached *first;
|
||||
public:
|
||||
static FontID FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_);
|
||||
static void ReleaseId(FontID id_);
|
||||
static void ReleaseId(FontID fid_);
|
||||
};
|
||||
|
||||
FontCached *FontCached::first = 0;
|
||||
@ -225,7 +225,7 @@ FontCached::FontCached(const char *faceName_, int characterSet_, int size_, bool
|
||||
next(0), usage(0), hash(0) {
|
||||
SetLogFont(lf, faceName_, characterSet_, size_, bold_, italic_);
|
||||
hash = HashFont(faceName_, characterSet_, size_, bold_, italic_);
|
||||
id = ::CreateFontIndirectA(&lf);
|
||||
fid = ::CreateFontIndirectA(&lf);
|
||||
usage = 1;
|
||||
}
|
||||
|
||||
@ -239,9 +239,9 @@ bool FontCached::SameAs(const char *faceName_, int characterSet_, int size_, boo
|
||||
}
|
||||
|
||||
void FontCached::Release() {
|
||||
if (id)
|
||||
::DeleteObject(id);
|
||||
id = 0;
|
||||
if (fid)
|
||||
::DeleteObject(fid);
|
||||
fid = 0;
|
||||
}
|
||||
|
||||
FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) {
|
||||
@ -252,7 +252,7 @@ FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int si
|
||||
if ((cur->hash == hashFind) &&
|
||||
cur->SameAs(faceName_, characterSet_, size_, bold_, italic_)) {
|
||||
cur->usage++;
|
||||
ret = cur->id;
|
||||
ret = cur->fid;
|
||||
}
|
||||
}
|
||||
if (ret == 0) {
|
||||
@ -260,18 +260,18 @@ FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int si
|
||||
if (fc) {
|
||||
fc->next = first;
|
||||
first = fc;
|
||||
ret = fc->id;
|
||||
ret = fc->fid;
|
||||
}
|
||||
}
|
||||
::LeaveCriticalSection(&crPlatformLock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void FontCached::ReleaseId(FontID id_) {
|
||||
void FontCached::ReleaseId(FontID fid_) {
|
||||
::EnterCriticalSection(&crPlatformLock);
|
||||
FontCached **pcur=&first;
|
||||
for (FontCached *cur=first; cur; cur=cur->next) {
|
||||
if (cur->id == id_) {
|
||||
if (cur->fid == fid_) {
|
||||
cur->usage--;
|
||||
if (cur->usage == 0) {
|
||||
*pcur = cur->next;
|
||||
@ -287,7 +287,7 @@ void FontCached::ReleaseId(FontID id_) {
|
||||
}
|
||||
|
||||
Font::Font() {
|
||||
id = 0;
|
||||
fid = 0;
|
||||
}
|
||||
|
||||
Font::~Font() {
|
||||
@ -301,21 +301,21 @@ void Font::Create(const char *faceName, int characterSet, int size,
|
||||
#ifndef FONTS_CACHED
|
||||
LOGFONT lf;
|
||||
SetLogFont(lf, faceName, characterSet, size, bold, italic);
|
||||
id = ::CreateFontIndirect(&lf);
|
||||
fid = ::CreateFontIndirect(&lf);
|
||||
#else
|
||||
id = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic);
|
||||
fid = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Font::Release() {
|
||||
#ifndef FONTS_CACHED
|
||||
if (id)
|
||||
::DeleteObject(id);
|
||||
if (fid)
|
||||
::DeleteObject(fid);
|
||||
#else
|
||||
if (id)
|
||||
FontCached::ReleaseId(id);
|
||||
if (fid)
|
||||
FontCached::ReleaseId(fid);
|
||||
#endif
|
||||
id = 0;
|
||||
fid = 0;
|
||||
}
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
@ -969,28 +969,28 @@ Window::~Window() {
|
||||
}
|
||||
|
||||
void Window::Destroy() {
|
||||
if (id)
|
||||
::DestroyWindow(reinterpret_cast<HWND>(id));
|
||||
id = 0;
|
||||
if (wid)
|
||||
::DestroyWindow(reinterpret_cast<HWND>(wid));
|
||||
wid = 0;
|
||||
}
|
||||
|
||||
bool Window::HasFocus() {
|
||||
return ::GetFocus() == id;
|
||||
return ::GetFocus() == wid;
|
||||
}
|
||||
|
||||
PRectangle Window::GetPosition() {
|
||||
RECT rc;
|
||||
::GetWindowRect(reinterpret_cast<HWND>(id), &rc);
|
||||
::GetWindowRect(reinterpret_cast<HWND>(wid), &rc);
|
||||
return PRectangle(rc.left, rc.top, rc.right, rc.bottom);
|
||||
}
|
||||
|
||||
void Window::SetPosition(PRectangle rc) {
|
||||
::SetWindowPos(reinterpret_cast<HWND>(id),
|
||||
::SetWindowPos(reinterpret_cast<HWND>(wid),
|
||||
0, rc.left, rc.top, rc.Width(), rc.Height(), SWP_NOZORDER|SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
void Window::SetPositionRelative(PRectangle rc, Window w) {
|
||||
LONG style = ::GetWindowLong(reinterpret_cast<HWND>(id), GWL_STYLE);
|
||||
LONG style = ::GetWindowLong(reinterpret_cast<HWND>(wid), GWL_STYLE);
|
||||
if (style & WS_POPUP) {
|
||||
RECT rcOther;
|
||||
::GetWindowRect(reinterpret_cast<HWND>(w.GetID()), &rcOther);
|
||||
@ -1017,25 +1017,25 @@ void Window::SetPositionRelative(PRectangle rc, Window w) {
|
||||
|
||||
PRectangle Window::GetClientPosition() {
|
||||
RECT rc={0,0,0,0};
|
||||
if (id)
|
||||
::GetClientRect(reinterpret_cast<HWND>(id), &rc);
|
||||
if (wid)
|
||||
::GetClientRect(reinterpret_cast<HWND>(wid), &rc);
|
||||
return PRectangle(rc.left, rc.top, rc.right, rc.bottom);
|
||||
}
|
||||
|
||||
void Window::Show(bool show) {
|
||||
if (show)
|
||||
::ShowWindow(reinterpret_cast<HWND>(id), SW_SHOWNOACTIVATE);
|
||||
::ShowWindow(reinterpret_cast<HWND>(wid), SW_SHOWNOACTIVATE);
|
||||
else
|
||||
::ShowWindow(reinterpret_cast<HWND>(id), SW_HIDE);
|
||||
::ShowWindow(reinterpret_cast<HWND>(wid), SW_HIDE);
|
||||
}
|
||||
|
||||
void Window::InvalidateAll() {
|
||||
::InvalidateRect(reinterpret_cast<HWND>(id), NULL, FALSE);
|
||||
::InvalidateRect(reinterpret_cast<HWND>(wid), NULL, FALSE);
|
||||
}
|
||||
|
||||
void Window::InvalidateRectangle(PRectangle rc) {
|
||||
RECT rcw = RectFromPRectangle(rc);
|
||||
::InvalidateRect(reinterpret_cast<HWND>(id), &rcw, FALSE);
|
||||
::InvalidateRect(reinterpret_cast<HWND>(wid), &rcw, FALSE);
|
||||
}
|
||||
|
||||
static LRESULT Window_SendMessage(Window *w, UINT msg, WPARAM wParam=0, LPARAM lParam=0) {
|
||||
@ -1089,7 +1089,7 @@ void Window::SetCursor(Cursor curs) {
|
||||
}
|
||||
|
||||
void Window::SetTitle(const char *s) {
|
||||
::SetWindowTextA(reinterpret_cast<HWND>(id), s);
|
||||
::SetWindowTextA(reinterpret_cast<HWND>(wid), s);
|
||||
}
|
||||
|
||||
/* Returns rectangle of monitor pt is on, both rect and pt are in Window's
|
||||
@ -1329,7 +1329,7 @@ void ListBoxX::Create(Window &parent_, int ctrlID_, Point location_, int lineHei
|
||||
HWND hwndParent = reinterpret_cast<HWND>(parent->GetID());
|
||||
HINSTANCE hinstanceParent = GetWindowInstance(hwndParent);
|
||||
// Window created as popup so not clipped within parent client area
|
||||
id = ::CreateWindowEx(
|
||||
wid = ::CreateWindowEx(
|
||||
WS_EX_WINDOWEDGE, ListBoxX_ClassName, TEXT(""),
|
||||
WS_POPUP | WS_THICKFRAME,
|
||||
100,100, 150,80, hwndParent,
|
||||
@ -1555,36 +1555,34 @@ void ListBoxX::SetList(const char *list, char separator, char typesep) {
|
||||
Clear();
|
||||
int size = strlen(list) + 1;
|
||||
char *words = new char[size];
|
||||
if (words) {
|
||||
lti.SetWords(words);
|
||||
memcpy(words, list, size);
|
||||
char *startword = words;
|
||||
char *numword = NULL;
|
||||
int i = 0;
|
||||
for (; words[i]; i++) {
|
||||
if (words[i] == separator) {
|
||||
words[i] = '\0';
|
||||
if (numword)
|
||||
*numword = '\0';
|
||||
AppendListItem(startword, numword);
|
||||
startword = words + i + 1;
|
||||
numword = NULL;
|
||||
} else if (words[i] == typesep) {
|
||||
numword = words + i;
|
||||
}
|
||||
}
|
||||
if (startword) {
|
||||
lti.SetWords(words);
|
||||
memcpy(words, list, size);
|
||||
char *startword = words;
|
||||
char *numword = NULL;
|
||||
int i = 0;
|
||||
for (; words[i]; i++) {
|
||||
if (words[i] == separator) {
|
||||
words[i] = '\0';
|
||||
if (numword)
|
||||
*numword = '\0';
|
||||
AppendListItem(startword, numword);
|
||||
startword = words + i + 1;
|
||||
numword = NULL;
|
||||
} else if (words[i] == typesep) {
|
||||
numword = words + i;
|
||||
}
|
||||
}
|
||||
if (startword) {
|
||||
if (numword)
|
||||
*numword = '\0';
|
||||
AppendListItem(startword, numword);
|
||||
}
|
||||
|
||||
// Finally populate the listbox itself with the correct number of items
|
||||
int count = lti.Count();
|
||||
::SendMessage(lb, LB_INITSTORAGE, count, 0);
|
||||
for (int j=0; j<count; j++) {
|
||||
::SendMessage(lb, LB_ADDSTRING, 0, j+1);
|
||||
}
|
||||
// Finally populate the listbox itself with the correct number of items
|
||||
int count = lti.Count();
|
||||
::SendMessage(lb, LB_INITSTORAGE, count, 0);
|
||||
for (int j=0; j<count; j++) {
|
||||
::SendMessage(lb, LB_ADDSTRING, 0, j+1);
|
||||
}
|
||||
SetRedraw(true);
|
||||
}
|
||||
@ -1809,53 +1807,57 @@ void ListBoxX::Paint(HDC hDC) {
|
||||
}
|
||||
|
||||
LRESULT PASCAL ListBoxX::ControlWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
switch (uMsg) {
|
||||
case WM_ERASEBKGND:
|
||||
return TRUE;
|
||||
try {
|
||||
switch (uMsg) {
|
||||
case WM_ERASEBKGND:
|
||||
return TRUE;
|
||||
|
||||
case WM_PAINT: {
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC = ::BeginPaint(hWnd, &ps);
|
||||
ListBoxX *lbx = reinterpret_cast<ListBoxX *>(PointerFromWindow(::GetParent(hWnd)));
|
||||
if (lbx)
|
||||
lbx->Paint(hDC);
|
||||
::EndPaint(hWnd, &ps);
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_MOUSEACTIVATE:
|
||||
// This prevents the view activating when the scrollbar is clicked
|
||||
return MA_NOACTIVATE;
|
||||
|
||||
case WM_LBUTTONDOWN: {
|
||||
// We must take control of selection to prevent the ListBox activating
|
||||
// the popup
|
||||
LRESULT lResult = ::SendMessage(hWnd, LB_ITEMFROMPOINT, 0, lParam);
|
||||
int item = LOWORD(lResult);
|
||||
if (HIWORD(lResult) == 0 && item >= 0) {
|
||||
::SendMessage(hWnd, LB_SETCURSEL, item, 0);
|
||||
case WM_PAINT: {
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC = ::BeginPaint(hWnd, &ps);
|
||||
ListBoxX *lbx = reinterpret_cast<ListBoxX *>(PointerFromWindow(::GetParent(hWnd)));
|
||||
if (lbx)
|
||||
lbx->Paint(hDC);
|
||||
::EndPaint(hWnd, &ps);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
return 0;
|
||||
case WM_MOUSEACTIVATE:
|
||||
// This prevents the view activating when the scrollbar is clicked
|
||||
return MA_NOACTIVATE;
|
||||
|
||||
case WM_LBUTTONDBLCLK: {
|
||||
ListBoxX *lbx = reinterpret_cast<ListBoxX *>(PointerFromWindow(::GetParent(hWnd)));
|
||||
if (lbx) {
|
||||
lbx->OnDoubleClick();
|
||||
case WM_LBUTTONDOWN: {
|
||||
// We must take control of selection to prevent the ListBox activating
|
||||
// the popup
|
||||
LRESULT lResult = ::SendMessage(hWnd, LB_ITEMFROMPOINT, 0, lParam);
|
||||
int item = LOWORD(lResult);
|
||||
if (HIWORD(lResult) == 0 && item >= 0) {
|
||||
::SendMessage(hWnd, LB_SETCURSEL, item, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
WNDPROC prevWndProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
|
||||
if (prevWndProc) {
|
||||
return ::CallWindowProc(prevWndProc, hWnd, uMsg, wParam, lParam);
|
||||
} else {
|
||||
return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
case WM_LBUTTONUP:
|
||||
return 0;
|
||||
|
||||
case WM_LBUTTONDBLCLK: {
|
||||
ListBoxX *lbx = reinterpret_cast<ListBoxX *>(PointerFromWindow(::GetParent(hWnd)));
|
||||
if (lbx) {
|
||||
lbx->OnDoubleClick();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
WNDPROC prevWndProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
|
||||
if (prevWndProc) {
|
||||
return ::CallWindowProc(prevWndProc, hWnd, uMsg, wParam, lParam);
|
||||
} else {
|
||||
return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
} catch (...) {
|
||||
}
|
||||
return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT ListBoxX::WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {
|
||||
@ -2003,22 +2005,22 @@ bool ListBoxX_Unregister() {
|
||||
return ::UnregisterClass(ListBoxX_ClassName, hinstPlatformRes) != 0;
|
||||
}
|
||||
|
||||
Menu::Menu() : id(0) {
|
||||
Menu::Menu() : mid(0) {
|
||||
}
|
||||
|
||||
void Menu::CreatePopUp() {
|
||||
Destroy();
|
||||
id = ::CreatePopupMenu();
|
||||
mid = ::CreatePopupMenu();
|
||||
}
|
||||
|
||||
void Menu::Destroy() {
|
||||
if (id)
|
||||
::DestroyMenu(reinterpret_cast<HMENU>(id));
|
||||
id = 0;
|
||||
if (mid)
|
||||
::DestroyMenu(reinterpret_cast<HMENU>(mid));
|
||||
mid = 0;
|
||||
}
|
||||
|
||||
void Menu::Show(Point pt, Window &w) {
|
||||
::TrackPopupMenu(reinterpret_cast<HMENU>(id),
|
||||
::TrackPopupMenu(reinterpret_cast<HMENU>(mid),
|
||||
0, pt.x - 4, pt.y, 0,
|
||||
reinterpret_cast<HWND>(w.GetID()), NULL);
|
||||
Destroy();
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include "PlatformRes.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1, 7, 8, 0
|
||||
PRODUCTVERSION 1, 7, 8, 0
|
||||
FILEVERSION 2, 0, 1, 0
|
||||
PRODUCTVERSION 2, 0, 1, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
@ -27,12 +27,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0"
|
||||
VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0"
|
||||
VALUE "FileVersion", "1.78\0"
|
||||
VALUE "FileVersion", "2.01\0"
|
||||
VALUE "InternalName", "Scintilla\0"
|
||||
VALUE "LegalCopyright", "Copyright 1998-2009 by Neil Hodgson\0"
|
||||
VALUE "OriginalFilename", "Scintilla.DLL\0"
|
||||
VALUE "ProductName", "Scintilla\0"
|
||||
VALUE "ProductVersion", "1.78\0"
|
||||
VALUE "ProductVersion", "2.01\0"
|
||||
END
|
||||
END
|
||||
END
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
PlatWin.o: PlatWin.cxx ../include/Platform.h PlatformRes.h \
|
||||
../src/UniConversion.h ../src/XPM.h
|
||||
ScintillaWin.o: ScintillaWin.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \
|
||||
../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \
|
||||
@ -9,7 +9,7 @@ ScintillaWin.o: ScintillaWin.cxx ../include/Platform.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h \
|
||||
../src/ScintillaBase.h ../src/UniConversion.h
|
||||
AutoComplete.o: ../src/AutoComplete.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../src/AutoComplete.h
|
||||
../include/PropSet.h ../src/AutoComplete.h
|
||||
CallTip.o: ../src/CallTip.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/CallTip.h
|
||||
CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \
|
||||
@ -27,7 +27,7 @@ Document.o: ../src/Document.cxx ../include/Platform.h \
|
||||
../src/CharClassify.h ../src/Decoration.h ../src/Document.h \
|
||||
../src/RESearch.h
|
||||
DocumentAccessor.o: ../src/DocumentAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../src/SVector.h \
|
||||
../include/PropSet.h ../src/SVector.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 \
|
||||
@ -40,228 +40,226 @@ Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h
|
||||
ExternalLexer.o: ../src/ExternalLexer.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/DocumentAccessor.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
|
||||
KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/KeyMap.h
|
||||
KeyWords.o: ../src/KeyWords.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.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/SString.h \
|
||||
../include/KeyWords.h ../include/SciLexer.h ../include/SString.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexAU3.o: ../src/LexAU3.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexBasic.o: ../src/LexBasic.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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 \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexCmake.o: ../src/LexCmake.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexConf.o: ../src/LexConf.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../include/KeyWords.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/SString.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexCrontab.o: ../src/LexCrontab.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexFortran.o: ../src/LexFortran.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.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/SString.h ../include/Accessor.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 ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.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/SString.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexInno.o: ../src/LexInno.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../include/KeyWords.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../include/SString.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/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexNsis.o: ../src/LexNsis.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../include/KeyWords.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/SString.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
|
||||
LexOthers.o: ../src/LexOthers.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.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/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \
|
||||
../src/StyleContext.h
|
||||
LexPB.o: ../src/LexPB.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexPOV.o: ../src/LexPOV.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.h ../include/KeyWords.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.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/SString.h ../include/KeyWords.h ../include/SciLexer.h \
|
||||
../include/SString.h
|
||||
../include/KeyWords.h ../include/SciLexer.h
|
||||
LexSQL.o: ../src/LexSQL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexTADS3.o: ../src/LexTADS3.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h
|
||||
LexTCL.o: ../src/LexTCL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../include/KeyWords.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.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/SString.h ../include/Accessor.h ../src/StyleContext.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/SString.h ../include/Accessor.h ../src/StyleContext.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
|
||||
PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h
|
||||
PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.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
|
||||
ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../include/SString.h \
|
||||
../include/Scintilla.h ../include/PropSet.h \
|
||||
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \
|
||||
../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \
|
||||
@ -271,7 +269,7 @@ ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
Style.o: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Style.h
|
||||
StyleContext.o: ../src/StyleContext.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../src/StyleContext.h
|
||||
UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h
|
||||
ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.h \
|
||||
@ -279,6 +277,6 @@ ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.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/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/WindowAccessor.h ../include/Scintilla.h
|
||||
XPM.o: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h
|
||||
|
@ -29,12 +29,13 @@ LDFLAGS=-mwindows -lstdc++ -limm32 -lole32 -luuid -mno-cygwin
|
||||
# Add -MMD to get dependencies
|
||||
#CXXFLAGS = -g -pg -pedantic -Os -fno-exceptions -fvtable-thunks -fno-rtti
|
||||
INCLUDEDIRS=-I ../include -I ../src
|
||||
CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic $(INCLUDEDIRS) -Os -fno-exceptions $(THUNKFLAGS) -fno-rtti -mno-cygwin
|
||||
CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic $(INCLUDEDIRS) $(THUNKFLAGS) -fno-rtti -mno-cygwin
|
||||
|
||||
ifdef DEBUG
|
||||
CXXFLAGS=-DDEBUG $(CXXBASEFLAGS)
|
||||
CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS)
|
||||
else
|
||||
CXXFLAGS=-DNDEBUG $(CXXBASEFLAGS)
|
||||
CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS)
|
||||
STRIPFLAG=-s
|
||||
endif
|
||||
|
||||
.cxx.o:
|
||||
@ -67,17 +68,17 @@ LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o LexVHDL.o LexYAML.o
|
||||
SOBJS = ScintillaWin.o ScintillaBase.o Editor.o CharClassify.o Decoration.o \
|
||||
Document.o ContractionState.o CellBuffer.o CallTip.o \
|
||||
ScintRes.o PlatWin.o PositionCache.o KeyMap.o Indicator.o LineMarker.o RESearch.o RunStyles.o \
|
||||
Style.o ViewStyle.o AutoComplete.o UniConversion.o PropSet.o XPM.o PerLine.o
|
||||
Selection.o Style.o ViewStyle.o AutoComplete.o UniConversion.o PropSet.o XPM.o PerLine.o
|
||||
$(COMPONENT): $(SOBJS) Scintilla.def
|
||||
$(DLLWRAP) --add-stdcall-alias --target i386-mingw32 -o $@ $(SOBJS) $(LDFLAGS) -s --relocatable
|
||||
$(DLLWRAP) --add-stdcall-alias --target i386-mingw32 -o $@ $(SOBJS) $(LDFLAGS) $(STRIPFLAG) --relocatable
|
||||
|
||||
LOBJS = ScintillaWinL.o ScintillaBaseL.o Editor.o CharClassify.o Decoration.o \
|
||||
Document.o ContractionState.o CellBuffer.o CallTip.o \
|
||||
ScintRes.o PlatWin.o PositionCache.o KeyMap.o Indicator.o LineMarker.o RESearch.o RunStyles.o \
|
||||
Style.o ViewStyle.o AutoComplete.o UniConversion.o KeyWords.o \
|
||||
Selection.o Style.o ViewStyle.o AutoComplete.o UniConversion.o KeyWords.o \
|
||||
DocumentAccessor.o PropSet.o ExternalLexer.o StyleContext.o XPM.o PerLine.o $(LEXOBJS)
|
||||
$(LEXCOMPONENT): $(LOBJS) Scintilla.def
|
||||
$(DLLWRAP) --add-stdcall-alias --target i386-mingw32 -o $@ $(LOBJS) $(LDFLAGS) -s --relocatable
|
||||
$(DLLWRAP) --add-stdcall-alias --target i386-mingw32 -o $@ $(LOBJS) $(LDFLAGS) $(STRIPFLAG) --relocatable
|
||||
|
||||
$(LEXLIB): $(LEXOBJS)
|
||||
$(AR) rc $@ $^
|
||||
@ -90,12 +91,12 @@ include deps.mak
|
||||
ScintillaBaseL.o: ScintillaBase.cxx Platform.h Scintilla.h SciLexer.h \
|
||||
ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
|
||||
LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \
|
||||
ScintillaBase.h PropSet.h SString.h Accessor.h DocumentAccessor.h \
|
||||
ScintillaBase.h PropSet.h Accessor.h DocumentAccessor.h \
|
||||
KeyWords.h ExternalLexer.h PerLine.h
|
||||
ScintillaWinL.o: ScintillaWin.cxx Platform.h Scintilla.h SciLexer.h \
|
||||
ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
|
||||
LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \
|
||||
ScintillaBase.h PropSet.h SString.h Accessor.h KeyWords.h \
|
||||
ScintillaBase.h PropSet.h Accessor.h KeyWords.h \
|
||||
ExternalLexer.h UniConversion.h PerLine.h
|
||||
ScintillaWinS.o: ScintillaWin.cxx Platform.h Scintilla.h \
|
||||
ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Make file for Scintilla on Windows Visual C++ and Borland C++ version
|
||||
# Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
|
||||
# Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
|
||||
# The License.txt file describes the conditions under which this software may be distributed.
|
||||
# This makefile is for using Visual C++ with nmake or Borland C++ with make depending on
|
||||
# the setting of the VENDOR macro. If no VENDOR is defined n the command line then
|
||||
@ -35,7 +35,7 @@ CC=cl
|
||||
RC=rc
|
||||
LD=link
|
||||
|
||||
CXXFLAGS=-Zi -TP -W4 -Zc:forScope -Zc:wchar_t -D_CRT_SECURE_NO_DEPRECATE=1
|
||||
CXXFLAGS=-Zi -TP -W4 -EHsc -Zc:forScope -Zc:wchar_t -D_CRT_SECURE_NO_DEPRECATE=1
|
||||
# For something scary:-Wp64
|
||||
CXXDEBUG=-Od -MTd -DDEBUG
|
||||
CXXNDEBUG=-O1 -MT -DNDEBUG -GL
|
||||
@ -52,7 +52,7 @@ CC=bcc32
|
||||
RC=brcc32 -r
|
||||
LD=ilink32
|
||||
|
||||
CXXFLAGS=-P -tWM -w -w-prc -w-inl -w-pin -RT- -x-
|
||||
CXXFLAGS=-P -tWM -w -w-prc -w-inl -w-pin -RT-
|
||||
# Above turns off warnings for clarfying parentheses and inlines with for not expanded
|
||||
CXXDEBUG=-Od -v -DDEBUG
|
||||
CXXNDEBUG=-O1 -DNDEBUG
|
||||
@ -105,6 +105,7 @@ SOBJS=\
|
||||
$(DIR_O)\RunStyles.obj \
|
||||
$(DIR_O)\ScintillaBase.obj \
|
||||
$(DIR_O)\ScintillaWin.obj \
|
||||
$(DIR_O)\Selection.obj \
|
||||
$(DIR_O)\Style.obj \
|
||||
$(DIR_O)\UniConversion.obj \
|
||||
$(DIR_O)\ViewStyle.obj \
|
||||
@ -209,6 +210,7 @@ LOBJS=\
|
||||
$(DIR_O)\KeyMap.obj \
|
||||
$(DIR_O)\KeyWords.obj \
|
||||
$(DIR_O)\LineMarker.obj \
|
||||
$(DIR_O)\PerLine.obj \
|
||||
$(DIR_O)\PlatWin.obj \
|
||||
$(DIR_O)\PositionCache.obj \
|
||||
$(DIR_O)\PropSet.obj \
|
||||
@ -216,12 +218,12 @@ LOBJS=\
|
||||
$(DIR_O)\RunStyles.obj \
|
||||
$(DIR_O)\ScintillaBaseL.obj \
|
||||
$(DIR_O)\ScintillaWinL.obj \
|
||||
$(DIR_O)\Selection.obj \
|
||||
$(DIR_O)\Style.obj \
|
||||
$(DIR_O)\StyleContext.obj \
|
||||
$(DIR_O)\UniConversion.obj \
|
||||
$(DIR_O)\ViewStyle.obj \
|
||||
$(DIR_O)\XPM.obj \
|
||||
$(DIR_O)\PerLine.obj \
|
||||
$(LEXOBJS)
|
||||
|
||||
$(DIR_O)\ScintRes.res : ScintRes.rc
|
||||
@ -267,11 +269,11 @@ $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx
|
||||
|
||||
# All lexers depend on this set of headers
|
||||
LEX_HEADERS=..\include\Platform.h ..\include\PropSet.h \
|
||||
..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h \
|
||||
..\include\Accessor.h ..\include\KeyWords.h \
|
||||
..\include\Scintilla.h ..\include\SciLexer.h ..\src\StyleContext.h
|
||||
|
||||
$(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../src/AutoComplete.h
|
||||
../include/PropSet.h ../src/AutoComplete.h
|
||||
$(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/CallTip.h
|
||||
$(DIR_O)\CellBuffer.obj: ../src/CellBuffer.cxx ../include/Platform.h \
|
||||
@ -289,7 +291,7 @@ $(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \
|
||||
../src/CharClassify.h ../src/Decoration.h ../src/Document.h \
|
||||
../src/RESearch.h ../src/PerLine.h
|
||||
$(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../src/SVector.h \
|
||||
../include/PropSet.h ../src/SVector.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 \
|
||||
@ -299,17 +301,17 @@ $(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintill
|
||||
../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \
|
||||
../src/RunStyles.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/Editor.h ../src/PositionCache.h
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h ../src/Selection.h ../src/PositionCache.h
|
||||
$(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../include/KeyWords.h ../src/ExternalLexer.h
|
||||
$(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/Indicator.h
|
||||
$(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/KeyMap.h
|
||||
$(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
|
||||
#++Autogenerated -- run src/LexGen.py to regenerate
|
||||
@ -484,57 +486,58 @@ $(DIR_O)\PositionCache.obj: ../src/Editor.cxx ../include/Platform.h ../include/S
|
||||
../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \
|
||||
../src/RunStyles.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/Editor.h ../src/PositionCache.h
|
||||
$(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h ../src/Selection.h ../src/PositionCache.h
|
||||
$(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h
|
||||
$(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h
|
||||
$(DIR_O)\RunStyles.obj: ../src/RunStyles.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h
|
||||
$(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../include/SString.h \
|
||||
../include/Scintilla.h ../include/PropSet.h \
|
||||
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.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/Editor.h ../src/ScintillaBase.h
|
||||
../src/Document.h ../src/Editor.h ../src/Selection.h ../src/ScintillaBase.h
|
||||
$(DIR_O)\ScintillaBaseL.obj: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../include/SString.h \
|
||||
../include/Scintilla.h ../include/PropSet.h \
|
||||
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.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/Editor.h ../src/ScintillaBase.h
|
||||
../src/Document.h ../src/Editor.h ../src/Selection.h ../src/ScintillaBase.h
|
||||
$(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h \
|
||||
../src/ScintillaBase.h ../src/UniConversion.h
|
||||
../src/ScintillaBase.h ../src/Selection.h ../src/UniConversion.h
|
||||
$(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h \
|
||||
../src/ScintillaBase.h ../src/UniConversion.h
|
||||
../src/ScintillaBase.h ../src/Selection.h ../src/UniConversion.h
|
||||
$(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h \
|
||||
../src/ScintillaBase.h ../src/UniConversion.h
|
||||
../src/ScintillaBase.h ../src/Selection.h ../src/UniConversion.h
|
||||
$(DIR_O)\Selection.obj: ../src/Selection.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Selection.h
|
||||
$(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Style.h
|
||||
$(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../src/StyleContext.h
|
||||
$(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h
|
||||
$(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \
|
||||
@ -542,6 +545,6 @@ $(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \
|
||||
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/ViewStyle.h
|
||||
$(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/WindowAccessor.h ../include/Scintilla.h
|
||||
$(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Make file for Scintilla on Windows Visual C++ and Borland C++ version
|
||||
# Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
|
||||
# Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
|
||||
# The License.txt file describes the conditions under which this software may be distributed.
|
||||
# This makefile is for using Visual C++ with nmake or Borland C++ with make depending on
|
||||
# the setting of the VENDOR macro. If no VENDOR is defined n the command line then
|
||||
@ -36,7 +36,7 @@ RC=rc
|
||||
LD=link
|
||||
|
||||
#-Zc:forScope -Zc:wchar_t
|
||||
CXXFLAGS=-Zi -TP -W4
|
||||
CXXFLAGS=-Zi -TP -W3 -EHsc
|
||||
# For something scary:-Wp64
|
||||
CXXDEBUG=-Od -MTd -DDEBUG
|
||||
CXXNDEBUG=-O1 -MT -DNDEBUG
|
||||
@ -54,7 +54,7 @@ CC=bcc32
|
||||
RC=brcc32 -r
|
||||
LD=ilink32
|
||||
|
||||
CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT- -x-
|
||||
CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT-
|
||||
# Above turns off warnings for clarfying parentheses and inlines with for not expanded
|
||||
CXXDEBUG=-Od -v -DDEBUG
|
||||
CXXNDEBUG=-O1 -DNDEBUG
|
||||
@ -100,7 +100,6 @@ SOBJS=\
|
||||
$(DIR_O)\Indicator.obj \
|
||||
$(DIR_O)\KeyMap.obj \
|
||||
$(DIR_O)\LineMarker.obj \
|
||||
$(DIR_O)\PerLine.obj \
|
||||
$(DIR_O)\PlatWin.obj \
|
||||
$(DIR_O)\PositionCache.obj \
|
||||
$(DIR_O)\PropSet.obj \
|
||||
@ -108,10 +107,12 @@ SOBJS=\
|
||||
$(DIR_O)\RunStyles.obj \
|
||||
$(DIR_O)\ScintillaBase.obj \
|
||||
$(DIR_O)\ScintillaWin.obj \
|
||||
$(DIR_O)\Selection.obj \
|
||||
$(DIR_O)\Style.obj \
|
||||
$(DIR_O)\UniConversion.obj \
|
||||
$(DIR_O)\ViewStyle.obj \
|
||||
$(DIR_O)\XPM.obj
|
||||
$(DIR_O)\XPM.obj \
|
||||
$(DIR_O)\PerLine.obj
|
||||
|
||||
#++Autogenerated -- run src/LexGen.py to regenerate
|
||||
#**LEXOBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\)
|
||||
@ -214,11 +215,12 @@ LOBJS=\
|
||||
$(DIR_O)\PerLine.obj \
|
||||
$(DIR_O)\PlatWin.obj \
|
||||
$(DIR_O)\PositionCache.obj \
|
||||
$(DIR_O)\RunStyles.obj \
|
||||
$(DIR_O)\RESearch.obj \
|
||||
$(DIR_O)\PropSet.obj \
|
||||
$(DIR_O)\RESearch.obj \
|
||||
$(DIR_O)\RunStyles.obj \
|
||||
$(DIR_O)\ScintillaBaseL.obj \
|
||||
$(DIR_O)\ScintillaWinL.obj \
|
||||
$(DIR_O)\Selection.obj \
|
||||
$(DIR_O)\Style.obj \
|
||||
$(DIR_O)\StyleContext.obj \
|
||||
$(DIR_O)\UniConversion.obj \
|
||||
@ -269,11 +271,11 @@ $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx
|
||||
|
||||
# All lexers depend on this set of headers
|
||||
LEX_HEADERS=..\include\Platform.h ..\include\PropSet.h \
|
||||
..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h \
|
||||
..\include\Accessor.h ..\include\KeyWords.h \
|
||||
..\include\Scintilla.h ..\include\SciLexer.h ..\src\StyleContext.h
|
||||
|
||||
$(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../src/AutoComplete.h
|
||||
../include/PropSet.h ../src/AutoComplete.h
|
||||
$(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/CallTip.h
|
||||
$(DIR_O)\CellBuffer.obj: ../src/CellBuffer.cxx ../include/Platform.h \
|
||||
@ -289,9 +291,9 @@ $(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \
|
||||
../src/CharClassify.h ../src/Decoration.h ../src/Document.h \
|
||||
../src/RESearch.h
|
||||
../src/RESearch.h ../src/PerLine.h
|
||||
$(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../src/SVector.h \
|
||||
../include/PropSet.h ../src/SVector.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 \
|
||||
@ -301,17 +303,17 @@ $(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintill
|
||||
../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \
|
||||
../src/RunStyles.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/Editor.h
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h ../src/Selection.h ../src/PositionCache.h
|
||||
$(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
|
||||
../include/SString.h ../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../include/KeyWords.h ../src/ExternalLexer.h
|
||||
$(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/Indicator.h
|
||||
$(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/KeyMap.h
|
||||
$(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
|
||||
#++Autogenerated -- run src/LexGen.py to regenerate
|
||||
@ -476,58 +478,68 @@ $(DIR_O)\LexYAML.obj: ..\src\LexYAML.cxx $(LEX_HEADERS)
|
||||
|
||||
$(DIR_O)\LineMarker.obj: ../src/LineMarker.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h
|
||||
$(DIR_O)\PerLine.obj: ../src/PerLine.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.h ../src/PerLine.h
|
||||
$(DIR_O)\PlatWin.obj: PlatWin.cxx ../include/Platform.h PlatformRes.h \
|
||||
../src/UniConversion.h ../src/XPM.h
|
||||
$(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/SString.h
|
||||
$(DIR_O)\PositionCache.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \
|
||||
../src/RunStyles.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/Editor.h ../src/Selection.h ../src/PositionCache.h
|
||||
$(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h
|
||||
$(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h
|
||||
$(DIR_O)\RunStyles.obj: ../src/RunStyles.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h
|
||||
$(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../include/SString.h \
|
||||
../include/Scintilla.h ../include/PropSet.h \
|
||||
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.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/Editor.h ../src/ScintillaBase.h
|
||||
../src/Document.h ../src/Editor.h ../src/Selection.h ../src/ScintillaBase.h
|
||||
$(DIR_O)\ScintillaBaseL.obj: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../include/SString.h \
|
||||
../include/Scintilla.h ../include/PropSet.h \
|
||||
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.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/Editor.h ../src/ScintillaBase.h
|
||||
../src/Document.h ../src/Editor.h ../src/Selection.h ../src/ScintillaBase.h
|
||||
$(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h \
|
||||
../src/ScintillaBase.h ../src/UniConversion.h
|
||||
../src/ScintillaBase.h ../src/Selection.h ../src/UniConversion.h
|
||||
$(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h \
|
||||
../src/ScintillaBase.h ../src/UniConversion.h
|
||||
../src/ScintillaBase.h ../src/Selection.h ../src/UniConversion.h
|
||||
$(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \
|
||||
../include/Scintilla.h ../src/ContractionState.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.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/CharClassify.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Editor.h \
|
||||
../src/ScintillaBase.h ../src/UniConversion.h
|
||||
../src/ScintillaBase.h ../src/Selection.h ../src/UniConversion.h
|
||||
$(DIR_O)\Selection.obj: ../src/Selection.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Selection.h
|
||||
$(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Style.h
|
||||
$(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../src/StyleContext.h
|
||||
$(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h
|
||||
$(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \
|
||||
@ -535,6 +547,6 @@ $(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \
|
||||
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/ViewStyle.h
|
||||
$(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/SString.h ../include/Accessor.h \
|
||||
../include/PropSet.h ../include/Accessor.h \
|
||||
../include/WindowAccessor.h ../include/Scintilla.h
|
||||
$(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h
|
||||
|
Loading…
Reference in New Issue
Block a user