You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(153) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(46) |
Mar
(12) |
Apr
(4) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(263) |
Mar
(235) |
Apr
(66) |
May
(42) |
Jun
(270) |
Jul
(65) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Markus R. <rol...@us...> - 2007-06-21 17:50:49
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook/include/wx/wxflatnotebook In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21684/wxflatnotebook Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook/include/wx/wxflatnotebook added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-21 17:50:25
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook/include/wx In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21516/wx Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook/include/wx added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-21 17:49:58
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook/include In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21241/include Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook/include added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-21 17:49:58
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21241/src Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook/src added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-21 17:49:20
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21218/wxflatnotebook Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxflatnotebook added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-19 05:20:39
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25686 Modified Files: Tag: RSGEDIT_SCINTILLA rsgedit.vcproj Log Message: - added wxScintilla files to rsgedit Index: rsgedit.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.vcproj,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** rsgedit.vcproj 15 Apr 2007 11:17:53 -0000 1.4 --- rsgedit.vcproj 19 Jun 2007 05:20:35 -0000 1.4.6.1 *************** *** 2,6 **** <VisualStudioProject ProjectType="Visual C++" ! Version="8,00" Name="rsgedit" ProjectGUID="{38B680B0-B535-40F0-B5DB-FC307C40C7D6}" --- 2,6 ---- <VisualStudioProject ProjectType="Visual C++" ! Version="8.00" Name="rsgedit" ProjectGUID="{38B680B0-B535-40F0-B5DB-FC307C40C7D6}" *************** *** 41,46 **** Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\" ! PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H" MinimalRebuild="true" BasicRuntimeChecks="3" --- 41,46 ---- Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\;wxscintilla\include;wxscintilla\src\scintilla\include;wxscintilla\src\scintilla\src" ! PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H;SCI_LEXER" MinimalRebuild="true" BasicRuntimeChecks="3" *************** *** 120,124 **** Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\" ! PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H" RuntimeLibrary="2" UsePrecompiledHeader="0" --- 120,124 ---- Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\" ! PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H;SCI_LEXER" RuntimeLibrary="2" UsePrecompiledHeader="0" *************** *** 175,178 **** --- 175,650 ---- </References> <Files> + <Filter + Name="wxscintilla" + > + <File + RelativePath=".\wxscintilla\src\PlatWX.cpp" + > + </File> + <File + RelativePath=".\wxscintilla\src\PlatWX.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\ScintillaWX.cpp" + > + </File> + <File + RelativePath=".\wxscintilla\src\ScintillaWX.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\wxscintilla.cpp" + > + </File> + <File + RelativePath=".\wxscintilla\include\wx\wxscintilla.h" + > + </File> + <Filter + Name="scintilla" + > + <File + RelativePath=".\wxscintilla\src\scintilla\include\Accessor.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\AutoComplete.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\AutoComplete.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CallTip.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CallTip.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CellBuffer.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CellBuffer.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CharClassify.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CharClassify.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ContractionState.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ContractionState.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Document.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Document.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\DocumentAccessor.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\DocumentAccessor.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Editor.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Editor.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ExternalLexer.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ExternalLexer.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Indicator.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Indicator.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\KeyMap.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\KeyMap.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\KeyWords.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\KeyWords.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAda.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAPDL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAsm.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAsn1.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAU3.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAVE.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexBaan.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexBash.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexBasic.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexBullant.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCaml.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCLW.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexConf.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCPP.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCrontab.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCsound.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCSS.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexEiffel.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexErlang.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexEScript.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexFlagship.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexForth.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexFortran.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexGui4Cli.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexHaskell.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexHTML.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexInno.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexKix.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexLisp.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexLout.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexLua.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMatlab.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMetapost.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMMIXAL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMPT.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMSSQL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexNsis.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexOpal.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexOthers.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPascal.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPB.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPerl.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPOV.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPS.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPython.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexRebol.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexRuby.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexScriptol.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexSmalltalk.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexSpecman.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexSpice.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexSQL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexTADS3.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexTCL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexTeX.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexVB.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexVerilog.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexVHDL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexYAML.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LineMarker.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LineMarker.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\Platform.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\PropSet.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\PropSet.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\RESearch.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\RESearch.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\SciLexer.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\Scintilla.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ScintillaBase.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ScintillaBase.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\ScintillaWidget.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\SString.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Style.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Style.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\StyleContext.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\StyleContext.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\SVector.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\UniConversion.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\UniConversion.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ViewStyle.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ViewStyle.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\WindowAccessor.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\WindowAccessor.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\XPM.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\XPM.h" + > + </File> + </Filter> + </Filter> <File RelativePath=".\aboutDlg.cpp" |
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24867/src/scintilla/src Added Files: Tag: RSGEDIT_SCINTILLA AutoComplete.cxx AutoComplete.h CallTip.cxx CallTip.h CellBuffer.cxx CellBuffer.h CharClassify.cxx CharClassify.h ContractionState.cxx ContractionState.h Document.cxx Document.h DocumentAccessor.cxx DocumentAccessor.h Editor.cxx Editor.h ExternalLexer.cxx ExternalLexer.h Indicator.cxx Indicator.h KeyMap.cxx KeyMap.h KeyWords.cxx LexAPDL.cxx LexAU3.cxx LexAVE.cxx LexAda.cxx LexAsm.cxx LexAsn1.cxx LexBaan.cxx LexBash.cxx LexBasic.cxx LexBullant.cxx LexCLW.cxx LexCPP.cxx LexCSS.cxx LexCaml.cxx LexConf.cxx LexCrontab.cxx LexCsound.cxx LexEScript.cxx LexEiffel.cxx LexErlang.cxx LexFlagship.cxx LexForth.cxx LexFortran.cxx LexGen.py LexGui4Cli.cxx LexHTML.cxx LexHaskell.cxx LexInno.cxx LexKix.cxx LexLisp.cxx LexLout.cxx LexLua.cxx LexMMIXAL.cxx LexMPT.cxx LexMSSQL.cxx LexMatlab.cxx LexMetapost.cxx LexNsis.cxx LexOpal.cxx LexOthers.cxx LexPB.cxx LexPOV.cxx LexPS.cxx LexPascal.cxx LexPerl.cxx LexPython.cxx LexRebol.cxx LexRuby.cxx LexSQL.cxx LexScriptol.cxx LexSmalltalk.cxx LexSpecman.cxx LexSpice.cxx LexTADS3.cxx LexTCL.cxx LexTeX.cxx LexVB.cxx LexVHDL.cxx LexVerilog.cxx LexYAML.cxx LineMarker.cxx LineMarker.h PropSet.cxx RESearch.cxx RESearch.h SVector.h SciTE.properties ScintillaBase.cxx ScintillaBase.h Style.cxx Style.h StyleContext.cxx StyleContext.h UniConversion.cxx UniConversion.h ViewStyle.cxx ViewStyle.h WindowAccessor.cxx XPM.cxx XPM.h Log Message: - added files for Scintilla, a free GTK and Win32 source editing component - added files for wxScintilla, a Scintilla wrapper for wxWidgets --- NEW FILE: KeyMap.cxx --- // Scintilla source code edit control /** @file KeyMap.cxx ** Defines a mapping between keystrokes and commands. **/ // Copyright 1998-2003 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #include "Platform.h" #include "Scintilla.h" #include "KeyMap.h" KeyMap::KeyMap() : kmap(0), len(0), alloc(0) { for (int i = 0; MapDefault[i].key; i++) { AssignCmdKey(MapDefault[i].key, MapDefault[i].modifiers, MapDefault[i].msg); } } KeyMap::~KeyMap() { Clear(); } void KeyMap::Clear() { delete []kmap; kmap = 0; len = 0; alloc = 0; } void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) { if ((len+1) >= alloc) { KeyToCommand *ktcNew = new KeyToCommand[alloc + 5]; if (!ktcNew) return; for (int k = 0; k < len; k++) ktcNew[k] = kmap[k]; alloc += 5; delete []kmap; kmap = ktcNew; } for (int keyIndex = 0; keyIndex < len; keyIndex++) { if ((key == kmap[keyIndex].key) && (modifiers == kmap[keyIndex].modifiers)) { kmap[keyIndex].msg = msg; return; } } kmap[len].key = key; kmap[len].modifiers = modifiers; kmap[len].msg = msg; len++; } unsigned int KeyMap::Find(int key, int modifiers) { for (int i = 0; i < len; i++) { if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) { return kmap[i].msg; } } return 0; } const KeyToCommand KeyMap::MapDefault[] = { {SCK_DOWN, SCI_NORM, SCI_LINEDOWN}, {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND}, {SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN}, {SCK_DOWN, SCI_ASHIFT, SCI_LINEDOWNRECTEXTEND}, {SCK_UP, SCI_NORM, SCI_LINEUP}, {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND}, {SCK_UP, SCI_CTRL, SCI_LINESCROLLUP}, {SCK_UP, SCI_ASHIFT, SCI_LINEUPRECTEXTEND}, {'[', SCI_CTRL, SCI_PARAUP}, {'[', SCI_CSHIFT, SCI_PARAUPEXTEND}, {']', SCI_CTRL, SCI_PARADOWN}, {']', SCI_CSHIFT, SCI_PARADOWNEXTEND}, {SCK_LEFT, SCI_NORM, SCI_CHARLEFT}, {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND}, {SCK_LEFT, SCI_CTRL, SCI_WORDLEFT}, {SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND}, {SCK_LEFT, SCI_ASHIFT, SCI_CHARLEFTRECTEXTEND}, {SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT}, {SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND}, {SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT}, {SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND}, {SCK_RIGHT, SCI_ASHIFT, SCI_CHARRIGHTRECTEXTEND}, {'/', SCI_CTRL, SCI_WORDPARTLEFT}, {'/', SCI_CSHIFT, SCI_WORDPARTLEFTEXTEND}, {'\\', SCI_CTRL, SCI_WORDPARTRIGHT}, {'\\', SCI_CSHIFT, SCI_WORDPARTRIGHTEXTEND}, {SCK_HOME, SCI_NORM, SCI_VCHOME}, {SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND}, {SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART}, {SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND}, {SCK_HOME, SCI_ALT, SCI_HOMEDISPLAY}, // {SCK_HOME, SCI_ASHIFT, SCI_HOMEDISPLAYEXTEND}, {SCK_HOME, SCI_ASHIFT, SCI_VCHOMERECTEXTEND}, {SCK_END, SCI_NORM, SCI_LINEEND}, {SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND}, {SCK_END, SCI_CTRL, SCI_DOCUMENTEND}, {SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND}, {SCK_END, SCI_ALT, SCI_LINEENDDISPLAY}, // {SCK_END, SCI_ASHIFT, SCI_LINEENDDISPLAYEXTEND}, {SCK_END, SCI_ASHIFT, SCI_LINEENDRECTEXTEND}, {SCK_PRIOR, SCI_NORM, SCI_PAGEUP}, {SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND}, {SCK_PRIOR, SCI_ASHIFT, SCI_PAGEUPRECTEXTEND}, {SCK_NEXT, SCI_NORM, SCI_PAGEDOWN}, {SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND}, {SCK_NEXT, SCI_ASHIFT, SCI_PAGEDOWNRECTEXTEND}, {SCK_DELETE, SCI_NORM, SCI_CLEAR}, {SCK_DELETE, SCI_SHIFT, SCI_CUT}, {SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT}, {SCK_DELETE, SCI_CSHIFT, SCI_DELLINERIGHT}, {SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE}, {SCK_INSERT, SCI_SHIFT, SCI_PASTE}, {SCK_INSERT, SCI_CTRL, SCI_COPY}, {SCK_ESCAPE, SCI_NORM, SCI_CANCEL}, {SCK_BACK, SCI_NORM, SCI_DELETEBACK}, {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, {SCK_BACK, SCI_ALT, SCI_UNDO}, {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT}, {'Z', SCI_CTRL, SCI_UNDO}, {'Y', SCI_CTRL, SCI_REDO}, {'X', SCI_CTRL, SCI_CUT}, {'C', SCI_CTRL, SCI_COPY}, {'V', SCI_CTRL, SCI_PASTE}, {'A', SCI_CTRL, SCI_SELECTALL}, {SCK_TAB, SCI_NORM, SCI_TAB}, {SCK_TAB, SCI_SHIFT, SCI_BACKTAB}, {SCK_RETURN, SCI_NORM, SCI_NEWLINE}, {SCK_RETURN, SCI_SHIFT, SCI_NEWLINE}, {SCK_ADD, SCI_CTRL, SCI_ZOOMIN}, {SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT}, {SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM}, //'L', SCI_CTRL, SCI_FORMFEED, {'L', SCI_CTRL, SCI_LINECUT}, {'L', SCI_CSHIFT, SCI_LINEDELETE}, {'T', SCI_CSHIFT, SCI_LINECOPY}, {'T', SCI_CTRL, SCI_LINETRANSPOSE}, {'D', SCI_CTRL, SCI_SELECTIONDUPLICATE}, {'U', SCI_CTRL, SCI_LOWERCASE}, {'U', SCI_CSHIFT, SCI_UPPERCASE}, {0,0,0}, }; --- NEW FILE: LexGui4Cli.cxx --- // Scintilla source code edit control // Copyright 1998-2002 by Neil Hodgson <ne...@sc...> /* This is the Lexer for Gui4Cli, included in SciLexer.dll - by d. Keletsekis, 2/10/2003 To add to SciLexer.dll: 1. Add the values below to INCLUDE\Scintilla.iface 2. Run the include/HFacer.py script 3. Run the src/lexGen.py script val SCE_GC_DEFAULT=0 val SCE_GC_COMMENTLINE=1 val SCE_GC_COMMENTBLOCK=2 val SCE_GC_GLOBAL=3 val SCE_GC_EVENT=4 val SCE_GC_ATTRIBUTE=5 val SCE_GC_CONTROL=6 val SCE_GC_COMMAND=7 val SCE_GC_STRING=8 val SCE_GC_OPERATOR=9 */ #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdio.h> #include <stdarg.h> #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "StyleContext.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" #define debug Platform::DebugPrintf static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch =='\\'); } static inline bool IsAWordStart(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); } inline bool isGCOperator(int ch) { if (isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || ch == '(' || ch == ')' || ch == '=' || ch == '%' || ch == '[' || ch == ']' || ch == '<' || ch == '>' || ch == ',' || ch == ';' || ch == ':') return true; return false; } #define isSpace(x) ((x)==' ' || (x)=='\t') #define isNL(x) ((x)=='\n' || (x)=='\r') #define isSpaceOrNL(x) (isSpace(x) || isNL(x)) #define BUFFSIZE 500 #define isFoldPoint(x) ((styler.LevelAt(x) & SC_FOLDLEVELNUMBERMASK) == 1024) static void colorFirstWord(WordList *keywordlists[], Accessor &styler, StyleContext *sc, char *buff, int length, int) { int c = 0; while (sc->More() && isSpaceOrNL(sc->ch)) { sc->Forward(); } styler.ColourTo(sc->currentPos - 1, sc->state); if (!IsAWordChar(sc->ch)) // comment, marker, etc.. return; while (sc->More() && !isSpaceOrNL(sc->ch) && (c < length-1) && !isGCOperator(sc->ch)) { buff[c] = static_cast<char>(sc->ch); ++c; sc->Forward(); } buff[c] = '\0'; char *p = buff; while (*p) // capitalize.. { if (islower(*p)) *p = static_cast<char>(toupper(*p)); ++p; } WordList &kGlobal = *keywordlists[0]; // keyword lists set by the user WordList &kEvent = *keywordlists[1]; WordList &kAttribute = *keywordlists[2]; WordList &kControl = *keywordlists[3]; WordList &kCommand = *keywordlists[4]; int state = 0; // int level = styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK; // debug ("line = %d, level = %d", line, level); if (kGlobal.InList(buff)) state = SCE_GC_GLOBAL; else if (kAttribute.InList(buff)) state = SCE_GC_ATTRIBUTE; else if (kControl.InList(buff)) state = SCE_GC_CONTROL; else if (kCommand.InList(buff)) state = SCE_GC_COMMAND; else if (kEvent.InList(buff)) state = SCE_GC_EVENT; if (state) { sc->ChangeState(state); styler.ColourTo(sc->currentPos - 1, sc->state); sc->ChangeState(SCE_GC_DEFAULT); } else { sc->ChangeState(SCE_GC_DEFAULT); styler.ColourTo(sc->currentPos - 1, sc->state); } } // Main colorizing function called by Scintilla static void ColouriseGui4CliDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { styler.StartAt(startPos); int quotestart = 0, oldstate, currentline = styler.GetLine(startPos); styler.StartSegment(startPos); bool noforward; char buff[BUFFSIZE+1]; // buffer for command name StyleContext sc(startPos, length, initStyle, styler); buff[0] = '\0'; // cbuff = 0; if (sc.state != SCE_GC_COMMENTBLOCK) // colorize 1st word.. colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); while (sc.More()) { noforward = 0; switch (sc.ch) { case '/': if (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_STRING) break; if (sc.chNext == '/') // line comment { sc.SetState (SCE_GC_COMMENTLINE); sc.Forward(); styler.ColourTo(sc.currentPos, sc.state); } else if (sc.chNext == '*') // block comment { sc.SetState(SCE_GC_COMMENTBLOCK); sc.Forward(); styler.ColourTo(sc.currentPos, sc.state); } else styler.ColourTo(sc.currentPos, sc.state); break; case '*': // end of comment block, or operator.. if (sc.state == SCE_GC_STRING) break; if (sc.state == SCE_GC_COMMENTBLOCK && sc.chNext == '/') { sc.Forward(); styler.ColourTo(sc.currentPos, sc.state); sc.ChangeState (SCE_GC_DEFAULT); } else styler.ColourTo(sc.currentPos, sc.state); break; case '\'': case '\"': // strings.. if (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_COMMENTLINE) break; if (sc.state == SCE_GC_STRING) { if (sc.ch == quotestart) // match same quote char.. { styler.ColourTo(sc.currentPos, sc.state); sc.ChangeState(SCE_GC_DEFAULT); quotestart = 0; } } else { styler.ColourTo(sc.currentPos - 1, sc.state); sc.ChangeState(SCE_GC_STRING); quotestart = sc.ch; } break; case ';': // end of commandline character if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE && sc.state != SCE_GC_STRING) { styler.ColourTo(sc.currentPos - 1, sc.state); styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); sc.ChangeState(SCE_GC_DEFAULT); sc.Forward(); colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); noforward = 1; // don't move forward - already positioned at next char.. } break; case '+': case '-': case '=': case '!': // operators.. case '<': case '>': case '&': case '|': case '$': if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE && sc.state != SCE_GC_STRING) { styler.ColourTo(sc.currentPos - 1, sc.state); styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); sc.ChangeState(SCE_GC_DEFAULT); } break; case '\\': // escape - same as operator, but also mark in strings.. if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE) { oldstate = sc.state; styler.ColourTo(sc.currentPos - 1, sc.state); sc.Forward(); // mark also the next char.. styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); sc.ChangeState(oldstate); } break; case '\n': case '\r': ++currentline; if (sc.state == SCE_GC_COMMENTLINE) { styler.ColourTo(sc.currentPos, sc.state); sc.ChangeState (SCE_GC_DEFAULT); } else if (sc.state != SCE_GC_COMMENTBLOCK) { colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); noforward = 1; // don't move forward - already positioned at next char.. } break; // case ' ': case '\t': // default : } if (!noforward) sc.Forward(); } sc.Complete(); } // Main folding function called by Scintilla - (based on props (.ini) files function) static void FoldGui4Cli(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; unsigned int endPos = startPos + length; int visibleChars = 0; int lineCurrent = styler.GetLine(startPos); char chNext = styler[startPos]; int styleNext = styler.StyleAt(startPos); bool headerPoint = false; for (unsigned int i = startPos; i < endPos; i++) { char ch = chNext; chNext = styler[i+1]; int style = styleNext; styleNext = styler.StyleAt(i + 1); bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); if (style == SCE_GC_EVENT || style == SCE_GC_GLOBAL) { headerPoint = true; // fold at events and globals } if (atEOL) { int lev = SC_FOLDLEVELBASE+1; if (headerPoint) lev = SC_FOLDLEVELBASE; if (visibleChars == 0 && foldCompact) lev |= SC_FOLDLEVELWHITEFLAG; if (headerPoint) lev |= SC_FOLDLEVELHEADERFLAG; if (lev != styler.LevelAt(lineCurrent)) // set level, if not already correct { styler.SetLevel(lineCurrent, lev); } lineCurrent++; // re-initialize our flags visibleChars = 0; headerPoint = false; } if (!(isspacechar(ch))) // || (style == SCE_GC_COMMENTLINE) || (style != SCE_GC_COMMENTBLOCK))) visibleChars++; } int lev = headerPoint ? SC_FOLDLEVELBASE : SC_FOLDLEVELBASE+1; int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; styler.SetLevel(lineCurrent, lev | flagsNext); } // I have no idea what these are for.. probably accessible by some message. static const char * const gui4cliWordListDesc[] = { "Globals", "Events", "Attributes", "Control", "Commands", 0 }; // Declare language & pass our function pointers to Scintilla LexerModule lmGui4Cli(SCLEX_GUI4CLI, ColouriseGui4CliDoc, "gui4cli", FoldGui4Cli, gui4cliWordListDesc); #undef debug --- NEW FILE: LexAsm.cxx --- // Scintilla source code edit control /** @file LexAsm.cxx ** Lexer for Assembler, just for the MASM syntax ** Written by The Black Horus ** Enhancements and NASM stuff by Kein-Hong Man, 2003-10 ** SCE_ASM_COMMENTBLOCK and SCE_ASM_CHARACTER are for future GNU as colouring **/ // Copyright 1998-2003 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdio.h> #include <stdarg.h> #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "StyleContext.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '?'); } static inline bool IsAWordStart(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' || ch == '%' || ch == '@' || ch == '$' || ch == '?'); } static inline bool IsAsmOperator(char ch) { if (isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || ch == '(' || ch == ')' || ch == '=' || ch == '^' || ch == '[' || ch == ']' || ch == '<' || ch == '&' || ch == '>' || ch == ',' || ch == '|' || ch == '~' || ch == '%' || ch == ':') return true; return false; } static void ColouriseAsmDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { WordList &cpuInstruction = *keywordlists[0]; WordList &mathInstruction = *keywordlists[1]; WordList ®isters = *keywordlists[2]; WordList &directive = *keywordlists[3]; WordList &directiveOperand = *keywordlists[4]; WordList &extInstruction = *keywordlists[5]; // Do not leak onto next line if (initStyle == SCE_ASM_STRINGEOL) initStyle = SCE_ASM_DEFAULT; StyleContext sc(startPos, length, initStyle, styler); for (; sc.More(); sc.Forward()) { // Prevent SCE_ASM_STRINGEOL from leaking back to previous line if (sc.atLineStart && (sc.state == SCE_ASM_STRING)) { sc.SetState(SCE_ASM_STRING); } else if (sc.atLineStart && (sc.state == SCE_ASM_CHARACTER)) { sc.SetState(SCE_ASM_CHARACTER); } // 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. if (sc.state == SCE_ASM_OPERATOR) { if (!IsAsmOperator(static_cast<char>(sc.ch))) { sc.SetState(SCE_ASM_DEFAULT); } }else if (sc.state == SCE_ASM_NUMBER) { if (!IsAWordChar(sc.ch)) { sc.SetState(SCE_ASM_DEFAULT); } } else if (sc.state == SCE_ASM_IDENTIFIER) { if (!IsAWordChar(sc.ch) ) { char s[100]; sc.GetCurrentLowered(s, sizeof(s)); if (cpuInstruction.InList(s)) { sc.ChangeState(SCE_ASM_CPUINSTRUCTION); } else if (mathInstruction.InList(s)) { sc.ChangeState(SCE_ASM_MATHINSTRUCTION); } else if (registers.InList(s)) { sc.ChangeState(SCE_ASM_REGISTER); } else if (directive.InList(s)) { sc.ChangeState(SCE_ASM_DIRECTIVE); } else if (directiveOperand.InList(s)) { sc.ChangeState(SCE_ASM_DIRECTIVEOPERAND); } else if (extInstruction.InList(s)) { sc.ChangeState(SCE_ASM_EXTINSTRUCTION); } sc.SetState(SCE_ASM_DEFAULT); } } else if (sc.state == SCE_ASM_COMMENT ) { if (sc.atLineEnd) { sc.SetState(SCE_ASM_DEFAULT); } } else if (sc.state == SCE_ASM_STRING) { if (sc.ch == '\\') { if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { sc.Forward(); } } else if (sc.ch == '\"') { sc.ForwardSetState(SCE_ASM_DEFAULT); } else if (sc.atLineEnd) { sc.ChangeState(SCE_ASM_STRINGEOL); sc.ForwardSetState(SCE_ASM_DEFAULT); } } else if (sc.state == SCE_ASM_CHARACTER) { if (sc.ch == '\\') { if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { sc.Forward(); } } else if (sc.ch == '\'') { sc.ForwardSetState(SCE_ASM_DEFAULT); } else if (sc.atLineEnd) { sc.ChangeState(SCE_ASM_STRINGEOL); sc.ForwardSetState(SCE_ASM_DEFAULT); } } // Determine if a new state should be entered. if (sc.state == SCE_ASM_DEFAULT) { if (sc.ch == ';'){ sc.SetState(SCE_ASM_COMMENT); } else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) { sc.SetState(SCE_ASM_NUMBER); } else if (IsAWordStart(sc.ch)) { sc.SetState(SCE_ASM_IDENTIFIER); } else if (sc.ch == '\"') { sc.SetState(SCE_ASM_STRING); } else if (sc.ch == '\'') { sc.SetState(SCE_ASM_CHARACTER); } else if (IsAsmOperator(static_cast<char>(sc.ch))) { sc.SetState(SCE_ASM_OPERATOR); } } } sc.Complete(); } static const char * const asmWordListDesc[] = { "CPU instructions", "FPU instructions", "Registers", "Directives", "Directive operands", "Extended instructions", 0 }; LexerModule lmAsm(SCLEX_ASM, ColouriseAsmDoc, "asm", 0, asmWordListDesc); --- NEW FILE: CallTip.h --- // Scintilla source code edit control /** @file CallTip.h ** Interface to the call tip control. **/ // Copyright 1998-2001 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #ifndef CALLTIP_H #define CALLTIP_H /** */ class CallTip { int startHighlight; // character offset to start and... int endHighlight; // ...end of highlighted text char *val; Font font; PRectangle rectUp; // rectangle of last up angle in the tip PRectangle rectDown; // rectangle of last down arrow in the tip int lineHeight; // vertical line spacing int offsetMain; // The alignment point of the call tip int tabSize; // Tab size in pixels, <=0 no TAB expand bool useStyleCallTip; // if true, STYLE_CALLTIP should be used // Private so CallTip objects can not be copied CallTip(const CallTip &) {} CallTip &operator=(const CallTip &) { return *this; } void DrawChunk(Surface *surface, int &x, const char *s, int posStart, int posEnd, int ytext, PRectangle rcClient, bool highlight, bool draw); int PaintContents(Surface *surfaceWindow, bool draw); bool IsTabCharacter(char c); int NextTabPos(int x); public: Window wCallTip; Window wDraw; bool inCallTipMode; int posStartCallTip; ColourPair colourBG; ColourPair colourUnSel; ColourPair colourSel; ColourPair colourShade; ColourPair colourLight; int codePage; int clickPlace; CallTip(); ~CallTip(); /// Claim or accept palette entries for the colours required to paint a calltip. void RefreshColourPalette(Palette &pal, bool want); void PaintCT(Surface *surfaceWindow); void MouseClick(Point pt); /// Setup the calltip and return a rectangle of the area required. PRectangle CallTipStart(int pos, Point pt, const char *defn, const char *faceName, int size, int codePage_, int characterSet, Window &wParent); void CallTipCancel(); /// Set a range of characters to be displayed in a highlight style. /// Commonly used to highlight the current parameter. void SetHighlight(int start, int end); /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand. void SetTabSize(int tabSz); /// Used to determine which STYLE_xxxx to use for call tip information bool UseStyleCallTip() const { return useStyleCallTip;} // Modify foreground and background colours void SetForeBack(const ColourPair &fore, const ColourPair &back); }; #endif --- NEW FILE: LexKix.cxx --- // Scintilla source code edit control /** @file LexKix.cxx ** Lexer for KIX-Scripts. **/ // Copyright 2004 by Manfred Becker <ma...@be...> // The License.txt file describes the conditions under which this software may be distributed. #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdio.h> #include <stdarg.h> #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "StyleContext.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" // Extended to accept accented characters static inline bool IsAWordChar(int ch) { return ch >= 0x80 || isalnum(ch) || ch == '_'; } static inline bool IsOperator(const int ch) { return (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '&' || ch == '|' || ch == '<' || ch == '>' || ch == '='); } static void ColouriseKixDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { WordList &keywords = *keywordlists[0]; WordList &keywords2 = *keywordlists[1]; WordList &keywords3 = *keywordlists[2]; // WordList &keywords4 = *keywordlists[3]; styler.StartAt(startPos); StyleContext sc(startPos, length, initStyle, styler); for (; sc.More(); sc.Forward()) { if (sc.state == SCE_KIX_COMMENT) { if (sc.atLineEnd) { sc.SetState(SCE_KIX_DEFAULT); } } else if (sc.state == SCE_KIX_STRING1) { // This is a doubles quotes string if (sc.ch == '\"') { sc.ForwardSetState(SCE_KIX_DEFAULT); } } else if (sc.state == SCE_KIX_STRING2) { // This is a single quote string if (sc.ch == '\'') { sc.ForwardSetState(SCE_KIX_DEFAULT); } } else if (sc.state == SCE_KIX_NUMBER) { if (!IsADigit(sc.ch)) { sc.SetState(SCE_KIX_DEFAULT); } } else if (sc.state == SCE_KIX_VAR) { if (!IsAWordChar(sc.ch)) { sc.SetState(SCE_KIX_DEFAULT); } } else if (sc.state == SCE_KIX_MACRO) { if (!IsAWordChar(sc.ch) && !IsADigit(sc.ch)) { char s[100]; sc.GetCurrentLowered(s, sizeof(s)); if (!keywords3.InList(&s[1])) { sc.ChangeState(SCE_KIX_DEFAULT); } sc.SetState(SCE_KIX_DEFAULT); } } else if (sc.state == SCE_KIX_OPERATOR) { if (!IsOperator(sc.ch)) { sc.SetState(SCE_KIX_DEFAULT); } } else if (sc.state == SCE_KIX_IDENTIFIER) { if (!IsAWordChar(sc.ch)) { char s[100]; sc.GetCurrentLowered(s, sizeof(s)); if (keywords.InList(s)) { sc.ChangeState(SCE_KIX_KEYWORD); } else if (keywords2.InList(s)) { sc.ChangeState(SCE_KIX_FUNCTIONS); } sc.SetState(SCE_KIX_DEFAULT); } } // Determine if a new state should be entered. if (sc.state == SCE_KIX_DEFAULT) { if (sc.ch == ';') { sc.SetState(SCE_KIX_COMMENT); } else if (sc.ch == '\"') { sc.SetState(SCE_KIX_STRING1); } else if (sc.ch == '\'') { sc.SetState(SCE_KIX_STRING2); } else if (sc.ch == '$') { sc.SetState(SCE_KIX_VAR); } else if (sc.ch == '@') { sc.SetState(SCE_KIX_MACRO); } else if (IsADigit(sc.ch) || ((sc.ch == '.' || sc.ch == '&') && IsADigit(sc.chNext))) { sc.SetState(SCE_KIX_NUMBER); } else if (IsOperator(sc.ch)) { sc.SetState(SCE_KIX_OPERATOR); } else if (IsAWordChar(sc.ch)) { sc.SetState(SCE_KIX_IDENTIFIER); } } } sc.Complete(); } LexerModule lmKix(SCLEX_KIX, ColouriseKixDoc, "kix"); --- NEW FILE: Document.h --- // Scintilla source code edit control /** @file Document.h ** Text document that handles notifications, DBCS, styling, words and end of line. **/ // Copyright 1998-2003 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #ifndef DOCUMENT_H #define DOCUMENT_H /** * A Position is a position within a document between two characters or at the beginning or end. * Sometimes used as a character index where it identifies the character after the position. */ typedef int Position; const Position invalidPosition = -1; /** * The range class represents a range of text in a document. * The two values are not sorted as one end may be more significant than the other * as is the case for the selection where the end position is the position of the caret. * If either position is invalidPosition then the range is invalid and most operations will fail. */ class Range { public: Position start; Position end; Range(Position pos=0) : start(pos), end(pos) { }; Range(Position start_, Position end_) : start(start_), end(end_) { }; bool Valid() const { return (start != invalidPosition) && (end != invalidPosition); } // Is the position within the range? bool Contains(Position pos) const { if (start < end) { return (pos >= start && pos <= end); } else { return (pos <= start && pos >= end); } } // Is the character after pos within the range? bool ContainsCharacter(Position pos) const { if (start < end) { return (pos >= start && pos < end); } else { return (pos < start && pos >= end); } } bool Contains(Range other) const { return Contains(other.start) && Contains(other.end); } bool Overlaps(Range other) const { return Contains(other.start) || Contains(other.end) || other.Contains(start) || other.Contains(end); } }; class DocWatcher; class DocModification; class RESearch; /** */ class Document { public: /** Used to pair watcher pointer with user data. */ class WatcherWithUserData { public: DocWatcher *watcher; void *userData; WatcherWithUserData() { watcher = 0; userData = 0; } }; enum charClassification { ccSpace, ccNewLine, ccWord, ccPunctuation }; private: int refCount; CellBuffer cb; CharClassify charClass; char stylingMask; int endStyled; int styleClock; int enteredCount; int enteredReadOnlyCount; WatcherWithUserData *watchers; int lenWatchers; bool matchesValid; RESearch *pre; char *substituted; public: int stylingBits; int stylingBitsMask; int eolMode; /// Can also be SC_CP_UTF8 to enable UTF-8 mode int dbcsCodePage; int tabInChars; int indentInChars; int actualIndentInChars; bool useTabs; bool tabIndents; bool backspaceUnindents; Document(); virtual ~Document(); int AddRef(); int Release(); int LineFromPosition(int pos); int ClampPositionIntoDocument(int pos); bool IsCrLf(int pos); int LenChar(int pos); int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); // Gateways to modifying document void ModifiedAt(int pos); bool DeleteChars(int pos, int len); bool InsertStyledString(int position, char *s, int insertLength); int Undo(); int Redo(); bool CanUndo() { return cb.CanUndo(); } bool CanRedo() { return cb.CanRedo(); } void DeleteUndoHistory() { cb.DeleteUndoHistory(); } bool SetUndoCollection(bool collectUndo) { return cb.SetUndoCollection(collectUndo); } bool IsCollectingUndo() { return cb.IsCollectingUndo(); } void BeginUndoAction() { cb.BeginUndoAction(); } void EndUndoAction() { cb.EndUndoAction(); } void SetSavePoint(); bool IsSavePoint() { return cb.IsSavePoint(); } int GetLineIndentation(int line); void SetLineIndentation(int line, int indent); int GetLineIndentPosition(int line); int GetColumn(int position); int FindColumn(int line, int column); void Indent(bool forwards, int lineBottom, int lineTop); static char *TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode); void ConvertLineEnds(int eolModeSet); void SetReadOnly(bool set) { cb.SetReadOnly(set); } bool IsReadOnly() { return cb.IsReadOnly(); } bool InsertChar(int pos, char ch); bool InsertString(int position, const char *s); bool InsertString(int position, const char *s, size_t insertLength); void ChangeChar(int pos, char ch); void DelChar(int pos); void DelCharBack(int pos); char CharAt(int position) { return cb.CharAt(position); } void GetCharRange(char *buffer, int position, int lengthRetrieve) { cb.GetCharRange(buffer, position, lengthRetrieve); } char StyleAt(int position) { return cb.StyleAt(position); } int GetMark(int line) { return cb.GetMark(line); } int AddMark(int line, int markerNum); void AddMarkSet(int line, int valueSet); void DeleteMark(int line, int markerNum); void DeleteMarkFromHandle(int markerHandle); void DeleteAllMarks(int markerNum); int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); } int LineStart(int line); int LineEnd(int line); int LineEndPosition(int position); int VCHomePosition(int position); int SetLevel(int line, int level); int GetLevel(int line) { return cb.GetLevel(line); } void ClearLevels() { cb.ClearLevels(); } int GetLastChild(int lineParent, int level=-1); int GetFoldParent(int line); void Indent(bool forwards); int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false); int NextWordStart(int pos, int delta); int NextWordEnd(int pos, int delta); int Length() { return cb.Length(); } void Allocate(int newSize) { cb.Allocate(newSize*2); } long FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length); long FindText(int iMessage, unsigned long wParam, long lParam); const char *SubstituteByPosition(const char *text, int *length); int LinesTotal(); void ChangeCase(Range r, bool makeUpperCase); void SetDefaultCharClasses(bool includeWordClass); void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass); void SetStylingBits(int bits); void StartStyling(int position, char mask); bool SetStyleFor(int length, char style); bool SetStyles(int length, char *styles); int GetEndStyled() { return endStyled; } bool EnsureStyledTo(int pos); int GetStyleClock() { return styleClock; } void IncrementStyleClock(); int SetLineState(int line, int state) { return cb.SetLineState(line, state); } int GetLineState(int line) { return cb.GetLineState(line); } int GetMaxLineState() { return cb.GetMaxLineState(); } bool AddWatcher(DocWatcher *watcher, void *userData); bool RemoveWatcher(DocWatcher *watcher, void *userData); const WatcherWithUserData *GetWatchers() const { return watchers; } int GetLenWatchers() const { return lenWatchers; } bool IsWordPartSeparator(char ch); int WordPartLeft(int pos); int WordPartRight(int pos); int ExtendStyleRange(int pos, int delta, bool singleLine = false); bool IsWhiteLine(int line); int ParaUp(int pos); int ParaDown(int pos); int IndentSize() { return actualIndentInChars; } int BraceMatch(int position, int maxReStyle); private: void CheckReadOnly(); CharClassify::cc WordCharClass(unsigned char ch); bool IsWordStartAt(int pos); bool IsWordEndAt(int pos); bool IsWordAt(int start, int end); void NotifyModifyAttempt(); void NotifySavePoint(bool atSavePoint); void NotifyModified(DocModification mh); }; /** * To optimise processing of document modifications by DocWatchers, a hint is passed indicating the * scope of the change. * If the DocWatcher is a document view then this can be used to optimise screen updating. */ class DocModification { public: int modificationType; int position; int length; int linesAdded; /**< Negative if lines deleted. */ const char *text; /**< Only valid for changes to text, not for changes to style. */ int line; int foldLevelNow; int foldLevelPrev; DocModification(int modificationType_, int position_=0, int length_=0, int linesAdded_=0, const char *text_=0, int line_=0) : modificationType(modificationType_), position(position_), length(length_), linesAdded(linesAdded_), text(text_), line(line_), foldLevelNow(0), foldLevelPrev(0) {} DocModification(int modificationType_, const Action &act, int linesAdded_=0) : modificationType(modificationType_), position(act.position), length(act.lenData), linesAdded(linesAdded_), text(act.data), line(0), foldLevelNow(0), foldLevelPrev(0) {} }; /** * A class that wants to receive notifications from a Document must be derived from DocWatcher * and implement the notification methods. It can then be added to the watcher list with AddWatcher. */ class DocWatcher { public: virtual ~DocWatcher() {} virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0; virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; virtual void NotifyDeleted(Document *doc, void *userData) = 0; virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0; }; #endif --- NEW FILE: LexAVE.cxx --- // SciTE - Scintilla based Text Editor /** @file LexAVE.cxx ** Lexer for Avenue. ** ** Written by Alexey Yutkin <yu...@ge...>. **/ // Copyright 1998-2002 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #include <stdio.h> #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "StyleContext.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); } static inline bool IsEnumChar(const int ch) { return (ch < 0x80) && (isalnum(ch)|| ch == '_'); } static inline bool IsANumberChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' ); } inline bool IsAWordStart(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '_'); } inline bool isAveOperator(char ch) { if (isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || ch == '(' || ch == ')' || ch == '=' || ch == '{' || ch == '}' || ch == '[' || ch == ']' || ch == ';' || ch == '<' || ch == '>' || ch == ',' || ch == '.' ) return true; return false; } static void ColouriseAveDoc( unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { WordList &keywords = *keywordlists[0]; WordList &keywords2 = *keywordlists[1]; WordList &keywords3 = *keywordlists[2]; WordList &keywords4 = *keywordlists[3]; WordList &keywords5 = *keywordlists[4]; WordList &keywords6 = *keywordlists[5]; // Do not leak onto next line if (initStyle == SCE_AVE_STRINGEOL) { initStyle = SCE_AVE_DEFAULT; } StyleContext sc(startPos, length, initStyle, styler); for (; sc.More(); sc.Forward()) { if (sc.atLineEnd) { // Update the line state, so it can be seen by next line int currentLine = styler.GetLine(sc.currentPos); styler.SetLineState(currentLine, 0); } if (sc.atLineStart && (sc.state == SCE_AVE_STRING)) { // Prevent SCE_AVE_STRINGEOL from leaking back to previous line sc.SetState(SCE_AVE_STRING); } // Determine if the current state should terminate. if (sc.state == SCE_AVE_OPERATOR) { sc.SetState(SCE_AVE_DEFAULT); } else if (sc.state == SCE_AVE_NUMBER) { if (!IsANumberChar(sc.ch)) { sc.SetState(SCE_AVE_DEFAULT); } } else if (sc.state == SCE_AVE_ENUM) { if (!IsEnumChar(sc.ch)) { sc.SetState(SCE_AVE_DEFAULT); } } else if (sc.state == SCE_AVE_IDENTIFIER) { if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { char s[100]; //sc.GetCurrent(s, sizeof(s)); sc.GetCurrentLowered(s, sizeof(s)); if (keywords.InList(s)) { sc.ChangeState(SCE_AVE_WORD); } else if (keywords2.InList(s)) { sc.ChangeState(SCE_AVE_WORD2); } else if (keywords3.InList(s)) { sc.ChangeState(SCE_AVE_WORD3); } else if (keywords4.InList(s)) { sc.ChangeState(SCE_AVE_WORD4); } else if (keywords5.InList(s)) { sc.ChangeState(SCE_AVE_WORD5); } else if (keywords6.InList(s)) { sc.ChangeState(SCE_AVE_WORD6); } sc.SetState(SCE_AVE_DEFAULT); } } else if (sc.state == SCE_AVE_COMMENT) { if (sc.atLineEnd) { sc.SetState(SCE_AVE_DEFAULT); } } else if (sc.state == SCE_AVE_STRING) { if (sc.ch == '\"') { sc.ForwardSetState(SCE_AVE_DEFAULT); } else if (sc.atLineEnd) { sc.ChangeState(SCE_AVE_STRINGEOL); sc.ForwardSetState(SCE_AVE_DEFAULT); } } // Determine if a new state should be entered. if (sc.state == SCE_AVE_DEFAULT) { if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { sc.SetState(SCE_AVE_NUMBER); } else if (IsAWordStart(sc.ch)) { sc.SetState(SCE_AVE_IDENTIFIER); } else if (sc.Match('\"')) { sc.SetState(SCE_AVE_STRING); } else if (sc.Match('\'')) { sc.SetState(SCE_AVE_COMMENT); sc.Forward(); } else if (isAveOperator(static_cast<char>(sc.ch))) { sc.SetState(SCE_AVE_OPERATOR); } else if (sc.Match('#')) { sc.SetState(SCE_AVE_ENUM); sc.Forward(); } } } sc.Complete(); } static void FoldAveDoc(unsigned int startPos, int length, int /* initStyle */, WordList *[], Accessor &styler) { unsigned int lengthDoc = startPos + length; int visibleChars = 0; int lineCurrent = styler.GetLine(startPos); int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; int levelCurrent = levelPrev; char chNext = static_cast<char>(tolower(styler[startPos])); bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; int styleNext = styler.StyleAt(startPos); char s[10]; for (unsigned int i = startPos; i < lengthDoc; i++) { char ch = static_cast<char>(tolower(chNext)); chNext = static_cast<char>(tolower(styler.SafeGetCharAt(i + 1))); int style = styleNext; styleNext = styler.StyleAt(i + 1); bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); if (style == SCE_AVE_WORD) { if (ch == 't' || ch == 'f' || ch == 'w' || ch == 'e') { for (unsigned int j = 0; j < 6; j++) { if (!iswordchar(styler[i + j])) { break; } s[j] = static_cast<char>(tolower(styler[i + j])); s[j + 1] = '\0'; } if ((strcmp(s, "then") == 0) || (strcmp(s, "for") == 0) || (strcmp(s, "while") == 0)) { levelCurrent++; } if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0)) { // Normally "elseif" and "then" will be on the same line and will cancel // each other out. // As implemented, this does not support fold.at.else. levelCurrent--; } } } else if (style == SCE_AVE_OPERATOR) { if (ch == '{' || ch == '(') { levelCurrent++; } else if (ch == '}' || ch == ')') { 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); } LexerModule lmAVE(SCLEX_AVE, ColouriseAveDoc, "ave", FoldAveDoc); --- NEW FILE: LexPascal.cxx --- // Scintilla source code edit control /** @file LexPascal.cxx ** Lexer for Pascal. ** Written by Laurent le Tynevez ** Updated by Simon Steele <s.s...@pn...> September 2002 ** Updated by Mathias Rauen <sc...@ma...> May 2003 (Delphi adjustments) **/ #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdio.h> #include <stdarg.h> #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" #include "StyleContext.h" static void getRange(unsigned int start, unsigned int end, Accessor &styler, char *s, unsigned int len) { unsigned int i = 0; while ((i < end - start + 1) && (i < len-1)) { s[i] = static_cast<char>(tolower(styler[start + i])); i++; } s[i] = '\0'; } static bool IsStreamCommentStyle(int style) { return style == SCE_C_COMMENT || style == SCE_C_COMMENTDOC || style == SCE_C_COMMENTDOCKEYWORD || style == SCE_C_COMMENTDOCKEYWORDERROR; } static void ColourTo(Accessor &styler, unsigned int end, unsigned int attr, bool bInAsm) { if ((bInAsm) && (attr == SCE_C_OPERATOR || attr == SCE_C_NUMBER || attr == SCE_C_DEFAULT || attr == SCE_C_WORD || attr == SCE_C_IDENTIFIER)) { styler.ColourTo(end, SCE_C_REGEX); } else styler.ColourTo(end, attr); } // returns 1 if the item starts a class definition, and -1 if the word is "end", and 2 if the word is "asm" static int classifyWordPascal(unsigned int start, unsigned int end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, bool bInClass, bool bInAsm) { int ret = 0; WordList& keywords = *keywordlists[0]; WordList& classwords = *keywordlists[1]; char s[100]; getRange(start, end, styler, s, sizeof(s)); char chAttr = SCE_C_IDENTIFIER; if (isdigit(s[0]) || (s[0] == '.') ||(s[0] == '$')) { chAttr = SCE_C_NUMBER; } else { if (s[0] == '#') { chAttr = SCE_C_CHARACTER; } else { if (keywords.InList(s)) { chAttr = SCE_C_WORD; if(strcmp(s, "class") == 0) { ret = 1; } else if (strcmp(s, "asm") == 0) { ret = 2; } else if (strcmp(s, "end") == 0) { ret = -1; } } else if (bInClass) { if (classwords.InList(s)) { chAttr = SCE_C_WORD; } } } } ColourTo(styler, end, chAttr, (bInAsm && ret != -1)); return ret; } static int classifyFoldPointPascal(const char* s) { int lev = 0; if (!(isdigit(s[0]) || (s[0] == '.'))) { if (strcmp(s, "begin") == 0 || strcmp(s, "object") == 0 || strcmp(s, "case") == 0 || strcmp(s, "class") == 0 || strcmp(s, "record") == 0 || strcmp(s, "try") == 0) { lev=1; } else if (strcmp(s, "end") == 0) { lev=-1; } } return lev; } static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { styler.StartAt(startPos); int state = initStyle; if (state == SCE_C_CHARACTER) // Does not leak onto next line state = SCE_C_DEFAULT; char chPrev = ' '; char chNext = styler[startPos]; unsigned int lengthDoc = startPos + length; bool bInClassDefinition; int currentLine = styler.GetLine(startPos); if (currentLine > 0) { styler.SetLineState(currentLine, styler.GetLineState(currentLine-1)); bInClassDefinition = (styler.GetLineState(currentLine) == 1); } else { styler.SetLineState(currentLine, 0); bInClassDefinition = false; } bool bInAsm = (state == SCE_C_REGEX); if (bInAsm) state = SCE_C_DEFAULT; styler.StartSegment(startPos); for (unsigned int i = startPos; i < lengthDoc; i++) { char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) // Avoid triggering two times on Dos/Win // End of line if (state == SCE_C_CHARACTER) { ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } currentLine++; styler.SetLineState(currentLine, (bInClassDefinition ? 1 : 0)); } if (styler.IsLeadByte(ch)) { chNext = styler.SafeGetCharAt(i + 2); chPrev = ' '; i += 1; continue; } if (state == SCE_C_DEFAULT) { if (iswordstart(ch) || ch == '#' || ch == '$' || (ch == '@' && bInAsm)) { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_IDENTIFIER; } else if (ch == '{' && chNext != '$' && chNext != '&') { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_COMMENT; } else if (ch == '(' && chNext == '*' && styler.SafeGetCharAt(i + 2) != '$' && styler.SafeGetCharAt(i + 2) != '&') { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_COMMENTDOC; } else if (ch == '/' && chNext == '/') { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_COMMENTLINE; } else if (ch == '\'') { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_CHARACTER; } else if (ch == '{' && (chNext == '$' || chNext=='&')) { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_PREPROCESSOR; } else if (isoperator(ch)) { ColourTo(styler, i-1, state, bInAsm); ColourTo(styler, i, SCE_C_OPERATOR, bInAsm); } } else if (state == SCE_C_IDENTIFIER) { bool bDoublePoint = ((ch == '.') && (chPrev == '.')); if ((!iswordchar(ch) && ch != '$' && ch != '#' && (ch != '@' || !bInAsm)) || bDoublePoint) { if (bDoublePoint) i--; int lStateChange = classifyWordPascal(styler.GetStartSegment(), i - 1, keywordlists, styler, bInClassDefinition, bInAsm); if(lStateChange == 1) { styler.SetLineState(currentLine, 1); bInClassDefinition = true; } else if(lStateChange == 2) { bInAsm = true; } else if(lStateChange == -1) { styler.SetLineState(currentLine, 0); bInClassDefinition = false; bInAsm = false; } if (bDoublePoint) { i++; ColourTo(styler, i-1, SCE_C_DEFAULT, bInAsm); } state = SCE_C_DEFAULT; chNext = styler.SafeGetCharAt(i + 1); if (ch == '{' && chNext != '$' && chNext != '&') { state = SCE_C_COMMENT; } else if (ch == '(' && chNext == '*' && styler.SafeGetCharAt(i + 2) != '$' && styler.SafeGetCharAt(i + 2) != '&') { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_COMMENTDOC; } else if (ch == '/' && chNext == '/') { state = SCE_C_COMMENTLINE; } else if (ch == '\'') { state = SCE_C_CHARACTER; } else if (isoperator(ch)) { ColourTo(styler, i, SCE_C_OPERATOR, bInAsm); } } } else { if (state == SCE_C_PREPROCESSOR) { if (ch=='}'){ ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } else { if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_DEFAULT; } } } else if (state == SCE_C_COMMENT) { if (ch == '}' ) { ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } } else if (state == SCE_C_COMMENTDOC) { if (ch == ')' && chPrev == '*') { if (((i > styler.GetStartSegment() + 2) || ( (initStyle == SCE_C_COMMENTDOC) && (styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) { ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } } } else if (state == SCE_C_COMMENTLINE) { if (ch == '\r' || ch == '\n') { ColourTo(styler, i-1, state, bInAsm); state = SCE_C_DEFAULT; } } else if (state == SCE_C_CHARACTER) { if (ch == '\'') { ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } } } chPrev = ch; } ColourTo(styler, lengthDoc - 1, state, bInAsm); } static void FoldPascalDoc(unsigned int startPos, int length, int initStyle, WordList *[], 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; int lastStart = 0; 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 (stylePrev == SCE_C_DEFAULT && style == SCE_C_WORD) { // Store last word start point. lastStart = i; } if (stylePrev == SCE_C_WORD) { if(iswordchar(ch) && !iswordchar(chNext)) { char s[100]; getRange(lastStart, i, styler, s, sizeof(s)); levelCurrent += classifyFoldPointPascal(s); } } 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 == '{' && chNext == '$') { unsigned int j=i+2; // skip {$ 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 (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 (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 const char * const pascalWordListDesc[] = { "Keywords", "Classwords", 0 }; LexerModule lmPascal(SCLEX_PASCAL, ColourisePascalDoc, "pascal", FoldPascalDoc, pascalWordListDesc); --- NEW FILE: LexMatlab.cxx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: LexHTML.cxx --- // Scintilla source code edit control /** @file LexHTML.cxx ** Lexer for HTML. **/ // Copyright 1998-2005 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdio.h> #include <stdarg.h> #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "StyleContext.h" #include "KeyWords.h" [...2003 lines suppressed...] "SGML and DTD keywords", 0, }; static const char * const phpscriptWordListDesc[] = { "", //Unused "", //Unused "", //Unused "", //Unused "PHP keywords", "", //Unused 0, }; LexerModule lmHTML(SCLEX_HTML, ColouriseHyperTextDoc, "hypertext", 0, htmlWordListDesc, 7); LexerModule lmXML(SCLEX_XML, ColouriseHyperTextDoc, "xml", 0, htmlWordListDesc, 7); // SCLEX_ASP and SCLEX_PHP should not be used in new code: use SCLEX_HTML instead. LexerModule lmASP(SCLEX_ASP, ColouriseASPDoc, "asp", 0, htmlWordListDesc, 7); LexerModule lmPHP(SCLEX_PHP, ColourisePHPDoc, "php", 0, htmlWordListDesc, 7); LexerModule lmPHPSCRIPT(SCLEX_PHPSCRIPT, ColourisePHPScriptDoc, "phpscript", 0, phpscriptWordListDesc, 7); --- NEW FILE: LexConf.cxx --- // Scintilla source code edit control /** @file LexConf.cxx ** Lexer for Apache Configuration Files. ** ** First working version contributed by Ahmad Zawawi <zeu...@ho...> on October 28, 2000. ** i created this lexer because i needed something pretty when dealing ** when Apache Configuration files... **/ // Copyright 1998-2001 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdio.h> #include <stdarg.h> #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) { int state = SCE_CONF_DEFAULT; char chNext = styler[startPos]; int lengthDoc = startPos + length; // create a buffer large enough to take the largest chunk... char *buffer = new char[length]; int bufferCount = 0; // this assumes that we have 2 keyword list in conf.properties WordList &directives = *keywordLists[0]; WordList ¶ms = *keywordLists[1]; // go through all provided text segment // using the hand-written state machine shown below styler.StartAt(startPos); styler.StartSegment(startPos); for (int i = startPos; i < lengthDoc; i++) { char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); if (styler.IsLeadByte(ch)) { chNext = styler.SafeGetCharAt(i + 2); i++; continue; } switch(state) { case SCE_CONF_DEFAULT: if( ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') { // whitespace is simply ignored here... styler.ColourTo(i,SCE_CONF_DEFAULT); break; } else if( ch == '#' ) { // signals the start of a comment... state = SCE_CONF_COMMENT; styler.ColourTo(i,SCE_CONF_COMMENT); } else if( ch == '.' /*|| ch == '/'*/) { // signals the start of a file... state = SCE_CONF_EXTENSION; styler.ColourTo(i,SCE_CONF_EXTENSION); } else if( ch == '"') { state = SCE_CONF_STRING; styler.ColourTo(i,SCE_CONF_STRING); } else if( ispunct(ch) ) { // signals an operator... // no state jump necessary for this // simple case... styler.ColourTo(i,SCE_CONF_OPERATOR); } else if( isalpha(ch) ) { // signals the start of an identifier bufferCount = 0; buffer[bufferCount++] = static_cast<char>(tolower(ch)); state = SCE_CONF_IDENTIFIER; } else if( isdigit(ch) ) { // signals the start of a number bufferCount = 0; buffer[bufferCount++] = ch; //styler.ColourTo(i,SCE_CONF_NUMBER); state = SCE_CONF_NUMBER; } else { // style it the default style.. styler.ColourTo(i,SCE_CONF_DEFAULT); } break; case SCE_CONF_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_CONF_DEFAULT; } else { styler.ColourTo(i,SCE_CONF_COMMENT); } break; case SCE_CONF_EXTENSION: // if we find a non-alphanumeric char, // we simply go to default state // else we're still dealing with an extension... if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '$') || (ch == '/') || (ch == '.') || (ch == '*') ) { styler.ColourTo(i,SCE_CONF_EXTENSION); } else { state = SCE_CONF_DEFAULT; chNext = styler[i--]; } break; case SCE_CONF_STRING: // if we find the end of a string char, we simply go to default state // else we're still dealing with an string... if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') || (ch == '\n') || (ch == '\r') ) { state = SCE_CONF_DEFAULT; } styler.ColourTo(i,SCE_CONF_STRING); break; case SCE_CONF_IDENTIFIER: // stay in CONF_IDENTIFIER state until we find a non-alphanumeric if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) { buffer[bufferCount++] = static_cast<char>(tolower(ch)); } else { state = SCE_CONF_DEFAULT; buffer[bufferCount] = '\0'; // check if the buffer contains a keyword, and highlight it if it is a keyword... if(directives.InList(buffer)) { styler.ColourTo(i-1,SCE_CONF_DIRECTIVE ); } else if(params.InList(buffer)) { styler.ColourTo(i-1,SCE_CONF_PARAMETER ); } else if(strchr(buffer,'/') || strchr(buffer,'.')) { styler.ColourTo(i-1,SCE_CONF_EXTENSION); } else { styler.ColourTo(i-1,SCE_CONF_DEFAULT); } // push back the faulty character chNext = styler[i--]; } break; case SCE_CONF_NUMBER: // stay in CONF_NUMBER state until we find a non-numeric if( isdigit(ch) || ch == '.') { buffer[bufferCount++] = ch; } else { state = SCE_CONF_DEFAULT; buffer[bufferCount] = '\0'; // Colourize here... if( strchr(buffer,'.') ) { // it is an IP address... styler.ColourTo(i-1,SCE_CONF_IP); } else { // normal number styler.ColourTo(i-1,SCE_CONF_NUMBER); } // push back a character chNext = styler[i--]; } break; } } delete []buffer; } static const char * const confWordListDesc[] = { "Directives", "Parameters", 0 }; LexerModule lmConf(SCLEX_CONF, ColouriseConfDoc, "conf", 0, confWordListDesc); --- NEW FILE: LexLua.cxx --- // Scintilla source code edit control /** @file LexLua.cxx ** Lexer for Lua language. ** ** Written by Paul Winwood. ** Folder by Alexey Yutkin. ** Modified by Marcos E. Wurzius & Philippe Lhoste **/ #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #include <stdio.h> #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "StyleContext.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" // Extended to accept accented characters static inline bool IsAWordChar(int ch) { return ch >= 0x80 || (isalnum(ch) || ch == '.' || ch == '_'); } static inline bool IsAWordStart(int ch) { return ch >= 0x80 || (isalpha(ch) || ch == '_'); } static inline bool IsANum... [truncated message content] |
From: Markus R. <rol...@us...> - 2007-06-19 05:19:52
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla/include In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24867/src/scintilla/include Added Files: Tag: RSGEDIT_SCINTILLA Accessor.h Face.py HFacer.py KeyWords.h Platform.h PropSet.h SString.h SciLexer.h Scintilla.h Scintilla.iface ScintillaWidget.h WindowAccessor.h Log Message: - added files for Scintilla, a free GTK and Win32 source editing component - added files for wxScintilla, a Scintilla wrapper for wxWidgets --- NEW FILE: WindowAccessor.h --- // Scintilla source code edit control /** @file WindowAccessor.h ** Implementation of BufferAccess and StylingAccess on a Scintilla ** rapid easy access to contents of a Scintilla. **/ // Copyright 1998-2001 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. /** */ 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; int lenDoc; char styleBuf[bufferSize]; int validLen; char chFlags; char chWhile; unsigned int startSeg; bool InternalIsLeadByte(char ch); void Fill(int position); public: WindowAccessor(WindowID id_, PropSet &props_) : Accessor(), id(id_), props(props_), lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { } ~WindowAccessor(); bool Match(int pos, const char *s); char StyleAt(int position); int GetLine(int position); int LineStart(int line); int LevelAt(int line); int Length(); void Flush(); int GetLineState(int line); int SetLineState(int line, int state); int GetPropertyInt(const char *key, int defaultValue=0) { return props.GetInt(key, defaultValue); } char *GetProperties() { return props.ToString(); } void StartAt(unsigned int start, char chMask=31); void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; unsigned int GetStartSegment() { return startSeg; } void StartSegment(unsigned int pos); void ColourTo(unsigned int pos, int chAttr); void SetLevel(int line, int level); int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); }; --- NEW FILE: Face.py --- # Module for reading and parsing Scintilla.iface file import string def sanitiseLine(line): if line[-1:] == '\n': line = line[:-1] if string.find(line, "##") != -1: line = line[:string.find(line, "##")] line = string.strip(line) return line def decodeFunction(featureVal): retType, rest = string.split(featureVal, " ", 1) nameIdent, params = string.split(rest, "(") name, value = string.split(nameIdent, "=") params, rest = string.split(params, ")") param1, param2 = string.split(params, ",")[0:2] return retType, name, value, param1, param2 def decodeEvent(featureVal): retType, rest = string.split(featureVal, " ", 1) nameIdent, params = string.split(rest, "(") name, value = string.split(nameIdent, "=") return retType, name, value def decodeParam(p): param = string.strip(p) type = "" name = "" value = "" if " " in param: type, nv = string.split(param, " ") if "=" in nv: name, value = string.split(nv, "=") else: name = nv return type, name, value class Face: def __init__(self): self.order = [] self.features = {} self.values = {} self.events = {} def ReadFromFile(self, name): currentCategory = "" currentComment = [] currentCommentFinished = 0 file = open(name) for line in file.readlines(): line = sanitiseLine(line) if line: if line[0] == "#": if line[1] == " ": if currentCommentFinished: currentComment = [] currentCommentFinished = 0 currentComment.append(line[2:]) else: currentCommentFinished = 1 featureType, featureVal = string.split(line, " ", 1) if featureType in ["fun", "get", "set"]: retType, name, value, param1, param2 = decodeFunction(featureVal) p1 = decodeParam(param1) p2 = decodeParam(param2) self.features[name] = { "FeatureType": featureType, "ReturnType": retType, "Value": value, "Param1Type": p1[0], "Param1Name": p1[1], "Param1Value": p1[2], "Param2Type": p2[0], "Param2Name": p2[1], "Param2Value": p2[2], "Category": currentCategory, "Comment": currentComment } if self.values.has_key(value): raise "Duplicate value " + value + " " + name self.values[value] = 1 self.order.append(name) elif featureType == "evt": retType, name, value = decodeEvent(featureVal) self.features[name] = { "FeatureType": featureType, "ReturnType": retType, "Value": value, "Category": currentCategory, "Comment": currentComment } if self.events.has_key(value): raise "Duplicate event " + value + " " + name self.events[value] = 1 self.order.append(name) elif featureType == "cat": currentCategory = featureVal elif featureType == "val": name, value = string.split(featureVal, "=", 1) self.features[name] = { "FeatureType": featureType, "Category": currentCategory, "Value": value } self.order.append(name) elif featureType == "enu" or featureType == "lex": name, value = string.split(featureVal, "=", 1) self.features[name] = { "FeatureType": featureType, "Category": currentCategory, "Value": value } self.order.append(name) --- NEW FILE: HFacer.py --- # HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface # definition file. # The header files are copied to a temporary file apart from the section between a //++Autogenerated # comment and a //--Autogenerated comment which is generated by the printHFile and printLexHFile # functions. After the temporary file is created, it is copied back to the original file name. import string import sys import os import Face def Contains(s,sub): return string.find(s, sub) != -1 def printLexHFile(f,out): for name in f.order: v = f.features[name] if v["FeatureType"] in ["val"]: if Contains(name, "SCE_") or Contains(name, "SCLEX_"): out.write("#define " + name + " " + v["Value"] + "\n") def printHFile(f,out): for name in f.order: v = f.features[name] if v["Category"] != "Deprecated": if v["FeatureType"] in ["fun", "get", "set"]: featureDefineName = "SCI_" + string.upper(name) out.write("#define " + featureDefineName + " " + v["Value"] + "\n") elif v["FeatureType"] in ["evt"]: featureDefineName = "SCN_" + string.upper(name) out.write("#define " + featureDefineName + " " + v["Value"] + "\n") elif v["FeatureType"] in ["val"]: if not (Contains(name, "SCE_") or Contains(name, "SCLEX_")): out.write("#define " + name + " " + v["Value"] + "\n") def CopyWithInsertion(input, output, genfn, definition): copying = 1 for line in input.readlines(): if copying: output.write(line) if Contains(line, "//++Autogenerated"): copying = 0 genfn(definition, output) if Contains(line, "//--Autogenerated"): copying = 1 output.write(line) def contents(filename): f = file(filename) t = f.read() f.close() return t def Regenerate(filename, genfn, definition): inText = contents(filename) tempname = "HFacer.tmp" out = open(tempname,"w") hfile = open(filename) CopyWithInsertion(hfile, out, genfn, definition) out.close() hfile.close() outText = contents(tempname) if inText == outText: os.unlink(tempname) else: os.unlink(filename) os.rename(tempname, filename) f = Face.Face() try: f.ReadFromFile("Scintilla.iface") Regenerate("Scintilla.h", printHFile, f) Regenerate("SciLexer.h", printLexHFile, f) print "Maximum ID is", max(x for x in f.values if int(x) < 3000) except: raise --- NEW FILE: Platform.h --- // Scintilla source code edit control /** @file Platform.h ** 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 <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #ifndef PLATFORM_H #define PLATFORM_H // PLAT_GTK = GTK+ on Linux or Win32 // PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 // PLAT_WIN = Win32 API on Win32 OS // PLAT_WX is wxWindows on any supported platform #define PLAT_GTK 0 #define PLAT_GTK_WIN32 0 #define PLAT_WIN 0 #define PLAT_WX 1 #define PLAT_FOX 0 #if defined(FOX) #undef PLAT_FOX #define PLAT_FOX 1 #elif defined(__WX__) #undef PLAT_WX #define PLAT_WX 1 #undef PLAT_WIN #define PLAT_WIN 1 #elif defined(GTK) #undef PLAT_GTK #define PLAT_GTK 1 #undef PLAT_WX #define PLAT_WX 1 #ifdef _MSC_VER #undef PLAT_GTK_WIN32 #define PLAT_GTK_WIN32 1 #endif #else #undef PLAT_WIN #define PLAT_WIN 1 #endif // Underlying the implementation of the platform classes are platform specific types. // Sometimes these need to be passed around by client code so they are defined here typedef void *FontID; typedef void *SurfaceID; typedef void *WindowID; typedef void *MenuID; typedef void *TickerID; typedef void *Function; typedef void *IdlerID; /** * A geometric point class. * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably. */ class Point { public: int x; int y; explicit Point(int x_=0, int y_=0) : x(x_), y(y_) { } // Other automatically defined methods (assignment, copy constructor, destructor) are fine static Point FromLong(long lpoint); }; /** * A geometric rectangle class. * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably. * PRectangles contain their top and left sides, but not their right and bottom sides. */ class PRectangle { public: int left; int top; int right; int bottom; PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) : left(left_), top(top_), right(right_), bottom(bottom_) { } // Other automatically defined methods (assignment, copy constructor, destructor) are fine bool operator==(PRectangle &rc) { return (rc.left == left) && (rc.right == right) && (rc.top == top) && (rc.bottom == bottom); } bool Contains(Point pt) { return (pt.x >= left) && (pt.x <= right) && (pt.y >= top) && (pt.y <= bottom); } bool Contains(PRectangle rc) { return (rc.left >= left) && (rc.right <= right) && (rc.top >= top) && (rc.bottom <= bottom); } bool Intersects(PRectangle other) { return (right > other.left) && (left < other.right) && (bottom > other.top) && (top < other.bottom); } void Move(int xDelta, int yDelta) { left += xDelta; top += yDelta; right += xDelta; bottom += yDelta; } int Width() { return right - left; } int Height() { return bottom - top; } }; /** * In some circumstances, including Win32 in paletted mode and GTK+, each colour * must be allocated before use. The desired colours are held in the ColourDesired class, * and after allocation the allocation entry is stored in the ColourAllocated class. In other * circumstances, such as Win32 in true colour mode, the allocation process just copies * the RGB values from the desired to the allocated class. * As each desired colour requires allocation before it can be used, the ColourPair class * holds both a ColourDesired and a ColourAllocated * The Palette class is responsible for managing the palette of colours which contains a * list of ColourPair objects and performs the allocation. */ /** * Holds a desired RGB colour. */ class ColourDesired { long co; public: ColourDesired(long lcol=0) { co = lcol; } ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { Set(red, green, blue); } bool operator==(const ColourDesired &other) const { return co == other.co; } void Set(long lcol) { co = lcol; } void Set(unsigned int red, unsigned int green, unsigned int blue) { co = red | (green << 8) | (blue << 16); } static inline unsigned int ValueOfHex(const char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; else if (ch >= 'A' && ch <= 'F') return ch - 'A' + 10; else if (ch >= 'a' && ch <= 'f') return ch - 'a' + 10; else return 0; } void Set(const char *val) { if (*val == '#') { val++; } unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); Set(r, g, b); } long AsLong() const { return co; } unsigned int GetRed() { return co & 0xff; } unsigned int GetGreen() { return (co >> 8) & 0xff; } unsigned int GetBlue() { return (co >> 16) & 0xff; } }; /** * Holds an allocated RGB colour which may be an approximation to the desired colour. */ class ColourAllocated { long coAllocated; public: ColourAllocated(long lcol=0) { coAllocated = lcol; } void Set(long lcol) { coAllocated = lcol; } long AsLong() const { return coAllocated; } }; /** * Colour pairs hold a desired colour and an allocated colour. */ struct ColourPair { ColourDesired desired; ColourAllocated allocated; ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) { desired = desired_; allocated.Set(desired.AsLong()); } void Copy() { allocated.Set(desired.AsLong()); } }; class Window; // Forward declaration for Palette /** * Colour palette management. */ class Palette { int used; int size; ColourPair *entries; #if PLAT_GTK void *allocatedPalette; // GdkColor * int allocatedLen; #endif // Private so Palette objects can not be copied Palette(const Palette &) {} Palette &operator=(const Palette &) { return *this; } public: #if PLAT_WIN void *hpal; #endif bool allowRealization; Palette(); ~Palette(); void Release(); /** * This method either adds a colour to the list of wanted colours (want==true) * or retrieves the allocated colour back to the ColourPair. * This is one method to make it easier to keep the code for wanting and retrieving in sync. */ void WantFind(ColourPair &cp, bool want); void Allocate(Window &w); }; /** * Font management. */ class Font { protected: FontID id; #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; } public: Font(); virtual ~Font(); virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic, bool extraFontFlag=false); virtual void Release(); FontID GetID() { return id; } // Alias another font - caller guarantees not to Release void SetID(FontID id_) { id = id_; } friend class Surface; friend class SurfaceImpl; }; /** * A surface abstracts a place to draw. */ class Surface { private: // Private so Surface objects can not be copied Surface(const Surface &) {} Surface &operator=(const Surface &) { return *this; } public: Surface() {}; virtual ~Surface() {}; static Surface *Allocate(); virtual void Init(WindowID wid)=0; virtual void Init(SurfaceID sid, WindowID wid)=0; virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; virtual void Release()=0; virtual bool Initialised()=0; virtual void PenColour(ColourAllocated fore)=0; virtual int LogPixelsY()=0; virtual int DeviceHeightFont(int points)=0; virtual void MoveTo(int x_, int y_)=0; virtual void LineTo(int x_, int y_)=0; virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0; virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0; virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, ColourAllocated outline, int alphaOutline, int flags)=0; virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; virtual int WidthText(Font &font_, const char *s, int len)=0; virtual int WidthChar(Font &font_, char ch)=0; virtual int Ascent(Font &font_)=0; virtual int Descent(Font &font_)=0; virtual int InternalLeading(Font &font_)=0; virtual int ExternalLeading(Font &font_)=0; virtual int Height(Font &font_)=0; virtual int AverageCharWidth(Font &font_)=0; virtual int SetPalette(Palette *pal, bool inBackGround)=0; virtual void SetClip(PRectangle rc)=0; virtual void FlushCachedState()=0; virtual void SetUnicodeMode(bool unicodeMode_)=0; virtual void SetDBCSMode(int codePage)=0; }; /** * A simple callback action passing one piece of untyped user data. */ typedef void (*CallBackAction)(void*); /** * Class to hide the details of window manipulation. * Does not own the window which will normally have a longer life than this object. */ class Window { protected: WindowID id; public: Window() : id(0), cursorLast(cursorInvalid) {} Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {} virtual ~Window(); Window &operator=(WindowID id_) { id = id_; return *this; } WindowID GetID() const { return id; } bool Created() const { return id != 0; } void Destroy(); bool HasFocus(); PRectangle GetPosition(); void SetPosition(PRectangle rc); void SetPositionRelative(PRectangle rc, Window relativeTo); PRectangle GetClientPosition(); void Show(bool show=true); void InvalidateAll(); void InvalidateRectangle(PRectangle rc); virtual void SetFont(Font &font); enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; void SetCursor(Cursor curs); void SetTitle(const char *s); private: Cursor cursorLast; }; /** * Listbox management. */ class ListBox : public Window { public: ListBox(); virtual ~ListBox(); static ListBox *Allocate(); virtual void SetFont(Font &font)=0; virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0; virtual void SetAverageCharWidth(int width)=0; virtual void SetVisibleRows(int rows)=0; virtual int GetVisibleRows() const=0; virtual PRectangle GetDesiredRect()=0; virtual int CaretFromEdge()=0; virtual void Clear()=0; virtual void Append(char *s, int type = -1)=0; virtual int Length()=0; virtual void Select(int n)=0; virtual int GetSelection()=0; virtual int Find(const char *prefix)=0; virtual void GetValue(int n, char *value, int len)=0; virtual void RegisterImage(int type, const char *xpm_data)=0; virtual void ClearRegisteredImages()=0; virtual void SetDoubleClickAction(CallBackAction, void *)=0; virtual void SetList(const char* list, char separator, char typesep)=0; }; /** * Menu management. */ class Menu { MenuID id; public: Menu(); MenuID GetID() { return id; } void CreatePopUp(); void Destroy(); void Show(Point pt, Window &w); }; class ElapsedTime { long bigBit; long littleBit; public: ElapsedTime(); double Duration(bool reset=false); }; /** * Dynamic Library (DLL/SO/...) loading */ class DynamicLibrary { public: virtual ~DynamicLibrary() {}; /// @return Pointer to function "name", or NULL on failure. virtual Function FindFunction(const char *name) = 0; /// @return true if the library was loaded successfully. virtual bool IsValid() = 0; /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. static DynamicLibrary *Load(const char *modulePath); }; /** * Platform class used to retrieve system wide parameters such as double click speed * and chrome colour. Not a creatable object, more of a module with several functions. */ class Platform { // Private so Platform objects can not be copied Platform(const Platform &) {} Platform &operator=(const Platform &) { return *this; } public: // Should be private because no new Platforms are ever created // but gcc warns about this Platform() {} ~Platform() {} static ColourDesired Chrome(); static ColourDesired ChromeHighlight(); static const char *DefaultFont(); static int DefaultFontSize(); static unsigned int DoubleClickTime(); static bool MouseButtonBounce(); static void DebugDisplay(const char *s); static bool IsKeyDown(int key); static long SendScintilla( WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); static long SendScintillaPointer( WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); static bool IsDBCSLeadByte(int codePage, char ch); static int DBCSCharLength(int codePage, const char *s); static int DBCSCharMaxLength(); // These are utility functions not really tied to a platform static int Minimum(int a, int b); static int Maximum(int a, int b); // Next three assume 16 bit shorts and 32 bit longs static long LongFromTwoShorts(short a,short b) { return (a) | ((b) << 16); } static short HighShortFromLong(long x) { return static_cast<short>(x >> 16); } static short LowShortFromLong(long x) { return static_cast<short>(x & 0xffff); } static void DebugPrintf(const char *format, ...); static bool ShowAssertionPopUps(bool assertionPopUps_); static void Assert(const char *c, const char *file, int line); static int Clamp(int val, int minVal, int maxVal); }; #ifdef NDEBUG #define PLATFORM_ASSERT(c) ((void)0) #else #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) #endif // Shut up annoying Visual C++ warnings: #ifdef _MSC_VER #pragma warning(disable: 4244 4309 4514 4710) #endif #endif --- NEW FILE: SString.h --- // SciTE - Scintilla based Text Editor /** @file SString.h ** A simple string class. **/ // Copyright 1998-2004 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #ifndef SSTRING_H #define SSTRING_H // 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); bool EqualCaseInsensitive(const char *a, const char *b); // Define another string class. // While it would be 'better' to use std::string, that doubles the executable size. // An SString may contain embedded nul characters. /** * Base class from which the two other classes (SBuffer & SString) * are derived. */ class SContainer { public: /** Type of string lengths (sizes) and positions (indexes). */ typedef size_t lenpos_t; /** Out of bounds value indicating that the string argument should be measured. */ enum { measure_length=0xffffffffU}; protected: char *s; ///< The C string lenpos_t sSize; ///< The size of the buffer, less 1: ie. the maximum size of the string SContainer() : s(0), sSize(0) {} ~SContainer() { delete []s; // Suppose it was allocated using StringAllocate s = 0; sSize = 0; } /** Size of buffer. */ lenpos_t size() const { if (s) { return sSize; } else { return 0; } } public: /** * Allocate uninitialized memory big enough to fit a string of the given length. * @return the pointer to the new string */ static char *StringAllocate(lenpos_t len); /** * Duplicate a buffer/C string. * Allocate memory of the given size, or big enough to fit the string if length isn't given; * then copy the given string in the allocated memory. * @return the pointer to the new string */ static char *StringAllocate( const char *s, ///< The string to duplicate lenpos_t len=measure_length); ///< The length of memory to allocate. Optional. }; /** * @brief A string buffer class. * * Main use is to ask an API the length of a string it can provide, * then to allocate a buffer of the given size, and to provide this buffer * to the API to put the string. * This class is intended to be shortlived, to be transformed as SString * as soon as it holds the string, so it has little members. * Note: we assume the buffer is filled by the API. If the length can be shorter, * we should set sLen to strlen(sb.ptr()) in related SString constructor and assignment. */ class SBuffer : protected SContainer { public: SBuffer(lenpos_t len) { s = StringAllocate(len); if (s) { *s = '\0'; sSize = len; } else { sSize = 0; } } private: /// Copy constructor // Here only to be on the safe size, user should avoid returning SBuffer values. SBuffer(const SBuffer &source) : SContainer() { s = StringAllocate(source.s, source.sSize); sSize = (s) ? source.sSize : 0; } /// Default assignment operator // Same here, shouldn't be used SBuffer &operator=(const SBuffer &source) { if (this != &source) { delete []s; s = StringAllocate(source.s, source.sSize); sSize = (s) ? source.sSize : 0; } return *this; } public: /** Provide direct read/write access to buffer. */ char *ptr() { return s; } /** Ownership of the buffer have been taken, so release it. */ void reset() { s = 0; sSize = 0; } /** Size of buffer. */ lenpos_t size() const { return SContainer::size(); } }; /** * @brief A simple string class. * * Hold the length of the string for quick operations, * can have a buffer bigger than the string to avoid too many memory allocations and copies. * May have embedded zeroes as a result of @a substitute, but relies too heavily on C string * functions to allow reliable manipulations of these strings, other than simple appends, etc. */ class SString : protected SContainer { lenpos_t sLen; ///< The size of the string in s lenpos_t sizeGrowth; ///< Minimum growth size when appending strings enum { sizeGrowthDefault = 64 }; bool grow(lenpos_t lenNew); SString &assign(const char *sOther, lenpos_t sSize_=measure_length); public: SString() : sLen(0), sizeGrowth(sizeGrowthDefault) {} SString(const SString &source) : SContainer(), sizeGrowth(sizeGrowthDefault) { s = StringAllocate(source.s, source.sLen); sSize = sLen = (s) ? source.sLen : 0; } SString(const char *s_) : sizeGrowth(sizeGrowthDefault) { s = StringAllocate(s_); sSize = sLen = (s) ? strlen(s) : 0; } SString(SBuffer &buf) : sizeGrowth(sizeGrowthDefault) { s = buf.ptr(); sSize = sLen = buf.size(); // Consumes the given buffer! buf.reset(); } SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) { // note: expects the "last" argument to point one beyond the range end (a la STL iterators) s = StringAllocate(s_ + first, last - first); sSize = sLen = (s) ? last - first : 0; } SString(int i); SString(double d, int precision); ~SString() { sLen = 0; } void clear() { if (s) { *s = '\0'; } sLen = 0; } /** Size of buffer. */ lenpos_t size() const { return SContainer::size(); } /** Size of string in buffer. */ lenpos_t length() const { return sLen; } /** Read access to a character of the string. */ char operator[](lenpos_t i) const { return (s && i < sSize) ? s[i] : '\0'; } SString &operator=(const char *source) { return assign(source); } SString &operator=(const SString &source) { if (this != &source) { assign(source.s, source.sLen); } return *this; } bool operator==(const SString &sOther) const; bool operator!=(const SString &sOther) const { return !operator==(sOther); } bool operator==(const char *sOther) const; bool operator!=(const char *sOther) const { return !operator==(sOther); } bool contains(char ch) const { return (s && *s) ? strchr(s, ch) != 0 : false; } void setsizegrowth(lenpos_t sizeGrowth_) { sizeGrowth = sizeGrowth_; } const char *c_str() const { return s ? s : ""; } /** Give ownership of buffer to caller which must use delete[] to free buffer. */ char *detach() { char *sRet = s; s = 0; sSize = 0; sLen = 0; return sRet; } SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const; SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); SString &uppercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0'); SString &operator+=(const char *sOther) { return append(sOther, static_cast<lenpos_t>(measure_length)); } SString &operator+=(const SString &sOther) { return append(sOther.s, sOther.sLen); } SString &operator+=(char ch) { return append(&ch, 1); } SString &appendwithseparator(const char *sOther, char sep) { return append(sOther, strlen(sOther), sep); } SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length); /** * 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 remove(lenpos_t pos, lenpos_t len); SString &change(lenpos_t pos, char ch) { if (pos < sLen) { // character changed must be in string bounds *(s + pos) = ch; } return *this; } /** Read an integral numeric value from the string. */ int value() const { return s ? atoi(s) : 0; } bool startswith(const char *prefix); bool endswith(const char *suffix); int search(const char *sFind, lenpos_t start=0) const; bool contains(const char *sFind) const { return search(sFind) >= 0; } int substitute(char chFind, char chReplace); int substitute(const char *sFind, const char *sReplace); int remove(const char *sFind) { return substitute(sFind, ""); } }; /** * Duplicate a C string. * Allocate memory of the given size, or big enough to fit the string if length isn't given; * then copy the given string in the allocated memory. * @return the pointer to the new string */ inline char *StringDup( const char *s, ///< The string to duplicate SContainer::lenpos_t len=SContainer::measure_length) ///< The length of memory to allocate. Optional. { return SContainer::StringAllocate(s, len); } #endif --- NEW FILE: KeyWords.h --- // Scintilla source code edit control /** @file KeyWords.h ** Colourise for particular languages. **/ // Copyright 1998-2001 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler); /** * A LexerModule is responsible for lexing and folding a particular language. * The class maintains a list of LexerModules which can be searched to find a * module appropriate to a particular language. */ class LexerModule { protected: const LexerModule *next; int language; LexerFunction fnLexer; LexerFunction fnFolder; const char * const * wordListDescriptions; int styleBits; static const LexerModule *base; static int nextLanguage; public: const char *languageName; LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_=0, LexerFunction fnFolder_=0, const char * const wordListDescriptions_[] = NULL, int styleBits_=5); virtual ~LexerModule() { } int GetLanguage() const { return language; } // -1 is returned if no WordList information is available int GetNumWordLists() const; const char *GetWordListDescription(int index) const; int GetStyleBitsNeeded() const; virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; static const LexerModule *Find(int language); static const LexerModule *Find(const char *languageName); }; /** * Check if a character is a space. * This is ASCII specific but is safe with chars >= 0x80. */ inline bool isspacechar(unsigned char ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } inline bool iswordchar(char ch) { return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_'); } inline bool iswordstart(char ch) { return isascii(ch) && (isalnum(ch) || ch == '_'); } inline bool isoperator(char ch) { if (isascii(ch) && isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '(' || ch == ')' || ch == '-' || ch == '+' || ch == '=' || ch == '|' || ch == '{' || ch == '}' || ch == '[' || ch == ']' || ch == ':' || ch == ';' || ch == '<' || ch == '>' || ch == ',' || ch == '/' || ch == '?' || ch == '!' || ch == '.' || ch == '~') return true; return false; } --- NEW FILE: ScintillaWidget.h --- // Scintilla source code edit control /** @file ScintillaWidget.h ** Definition of Scintilla widget for GTK+. ** Only needed by GTK+ code but is harmless on other platforms. **/ // Copyright 1998-2001 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCINTILLAWIDGET_H #define SCINTILLAWIDGET_H #if PLAT_GTK #ifdef __cplusplus extern "C" { #endif #define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) #define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) #define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) typedef struct _ScintillaObject ScintillaObject; typedef struct _ScintillaClass ScintillaClass; struct _ScintillaObject { GtkContainer cont; void *pscin; }; struct _ScintillaClass { GtkContainerClass parent_class; void (* command) (ScintillaObject *ttt); void (* notify) (ScintillaObject *ttt); }; #if GLIB_MAJOR_VERSION < 2 GtkType scintilla_get_type (void); #else GType scintilla_get_type (void); #endif GtkWidget* scintilla_new (void); void scintilla_set_id (ScintillaObject *sci, uptr_t id); sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); void scintilla_release_resources(void); #if GTK_MAJOR_VERSION < 2 #define SCINTILLA_NOTIFY "notify" #else #define SCINTILLA_NOTIFY "sci-notify" #endif #ifdef __cplusplus } #endif #endif #endif --- NEW FILE: Scintilla.h --- // Scintilla source code edit control /** @file Scintilla.h ** Interface to the edit control. **/ // Copyright 1998-2003 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. // Most of this file is automatically generated from the Scintilla.iface interface definition // file which contains any comments about the definitions. HFacer.py does the generation. #ifndef SCINTILLA_H #define SCINTILLA_H #if LCCWIN typedef BOOL bool; #endif #if PLAT_WIN // Return false on failure: bool Scintilla_RegisterClasses(void *hInstance); bool Scintilla_ReleaseResources(); #endif int Scintilla_LinkLexers(); // Here should be placed typedefs for uptr_t, an unsigned integer type large enough to // hold a pointer and sptr_t, a signed integer large enough to hold a pointer. // May need to be changed for 64 bit platforms. #if _MSC_VER >= 1300 #include <BaseTsd.h> #endif #ifdef MAXULONG_PTR typedef ULONG_PTR uptr_t; typedef LONG_PTR sptr_t; #else typedef unsigned long uptr_t; typedef long sptr_t; #endif typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); //++Autogenerated -- start of section automatically generated from Scintilla.iface #define INVALID_POSITION -1 #define SCI_START 2000 #define SCI_OPTIONAL_START 3000 #define SCI_LEXER_START 4000 #define SCI_ADDTEXT 2001 #define SCI_ADDSTYLEDTEXT 2002 #define SCI_INSERTTEXT 2003 #define SCI_CLEARALL 2004 #define SCI_CLEARDOCUMENTSTYLE 2005 #define SCI_GETLENGTH 2006 #define SCI_GETCHARAT 2007 #define SCI_GETCURRENTPOS 2008 #define SCI_GETANCHOR 2009 #define SCI_GETSTYLEAT 2010 #define SCI_REDO 2011 #define SCI_SETUNDOCOLLECTION 2012 #define SCI_SELECTALL 2013 #define SCI_SETSAVEPOINT 2014 #define SCI_GETSTYLEDTEXT 2015 #define SCI_CANREDO 2016 #define SCI_MARKERLINEFROMHANDLE 2017 #define SCI_MARKERDELETEHANDLE 2018 #define SCI_GETUNDOCOLLECTION 2019 #define SCWS_INVISIBLE 0 #define SCWS_VISIBLEALWAYS 1 #define SCWS_VISIBLEAFTERINDENT 2 #define SCI_GETVIEWWS 2020 #define SCI_SETVIEWWS 2021 #define SCI_POSITIONFROMPOINT 2022 #define SCI_POSITIONFROMPOINTCLOSE 2023 #define SCI_GOTOLINE 2024 #define SCI_GOTOPOS 2025 #define SCI_SETANCHOR 2026 #define SCI_GETCURLINE 2027 #define SCI_GETENDSTYLED 2028 #define SC_EOL_CRLF 0 #define SC_EOL_CR 1 #define SC_EOL_LF 2 #define SCI_CONVERTEOLS 2029 #define SCI_GETEOLMODE 2030 #define SCI_SETEOLMODE 2031 #define SCI_STARTSTYLING 2032 #define SCI_SETSTYLING 2033 #define SCI_GETBUFFEREDDRAW 2034 #define SCI_SETBUFFEREDDRAW 2035 #define SCI_SETTABWIDTH 2036 #define SCI_GETTABWIDTH 2121 #define SC_CP_UTF8 65001 #define SC_CP_DBCS 1 #define SCI_SETCODEPAGE 2037 #define SCI_SETUSEPALETTE 2039 #define MARKER_MAX 31 #define SC_MARK_CIRCLE 0 #define SC_MARK_ROUNDRECT 1 #define SC_MARK_ARROW 2 #define SC_MARK_SMALLRECT 3 #define SC_MARK_SHORTARROW 4 #define SC_MARK_EMPTY 5 #define SC_MARK_ARROWDOWN 6 #define SC_MARK_MINUS 7 #define SC_MARK_PLUS 8 #define SC_MARK_VLINE 9 #define SC_MARK_LCORNER 10 #define SC_MARK_TCORNER 11 #define SC_MARK_BOXPLUS 12 #define SC_MARK_BOXPLUSCONNECTED 13 #define SC_MARK_BOXMINUS 14 #define SC_MARK_BOXMINUSCONNECTED 15 #define SC_MARK_LCORNERCURVE 16 #define SC_MARK_TCORNERCURVE 17 #define SC_MARK_CIRCLEPLUS 18 #define SC_MARK_CIRCLEPLUSCONNECTED 19 #define SC_MARK_CIRCLEMINUS 20 #define SC_MARK_CIRCLEMINUSCONNECTED 21 #define SC_MARK_BACKGROUND 22 #define SC_MARK_DOTDOTDOT 23 #define SC_MARK_ARROWS 24 #define SC_MARK_PIXMAP 25 #define SC_MARK_FULLRECT 26 #define SC_MARK_CHARACTER 10000 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 #define SC_MARKNUM_FOLDERMIDTAIL 27 #define SC_MARKNUM_FOLDERTAIL 28 #define SC_MARKNUM_FOLDERSUB 29 #define SC_MARKNUM_FOLDER 30 #define SC_MARKNUM_FOLDEROPEN 31 #define SC_MASK_FOLDERS 0xFE000000 #define SCI_MARKERDEFINE 2040 #define SCI_MARKERSETFORE 2041 #define SCI_MARKERSETBACK 2042 #define SCI_MARKERADD 2043 #define SCI_MARKERDELETE 2044 #define SCI_MARKERDELETEALL 2045 #define SCI_MARKERGET 2046 #define SCI_MARKERNEXT 2047 #define SCI_MARKERPREVIOUS 2048 #define SCI_MARKERDEFINEPIXMAP 2049 #define SCI_MARKERADDSET 2466 #define SCI_MARKERSETALPHA 2476 #define SC_MARGIN_SYMBOL 0 #define SC_MARGIN_NUMBER 1 #define SCI_SETMARGINTYPEN 2240 #define SCI_GETMARGINTYPEN 2241 #define SCI_SETMARGINWIDTHN 2242 #define SCI_GETMARGINWIDTHN 2243 #define SCI_SETMARGINMASKN 2244 #define SCI_GETMARGINMASKN 2245 #define SCI_SETMARGINSENSITIVEN 2246 #define SCI_GETMARGINSENSITIVEN 2247 #define STYLE_DEFAULT 32 #define STYLE_LINENUMBER 33 #define STYLE_BRACELIGHT 34 #define STYLE_BRACEBAD 35 #define STYLE_CONTROLCHAR 36 #define STYLE_INDENTGUIDE 37 #define STYLE_CALLTIP 38 #define STYLE_LASTPREDEFINED 39 #define STYLE_MAX 127 #define SC_CHARSET_ANSI 0 #define SC_CHARSET_DEFAULT 1 #define SC_CHARSET_BALTIC 186 #define SC_CHARSET_CHINESEBIG5 136 #define SC_CHARSET_EASTEUROPE 238 #define SC_CHARSET_GB2312 134 #define SC_CHARSET_GREEK 161 #define SC_CHARSET_HANGUL 129 #define SC_CHARSET_MAC 77 #define SC_CHARSET_OEM 255 #define SC_CHARSET_RUSSIAN 204 #define SC_CHARSET_CYRILLIC 1251 #define SC_CHARSET_SHIFTJIS 128 #define SC_CHARSET_SYMBOL 2 #define SC_CHARSET_TURKISH 162 #define SC_CHARSET_JOHAB 130 #define SC_CHARSET_HEBREW 177 #define SC_CHARSET_ARABIC 178 #define SC_CHARSET_VIETNAMESE 163 #define SC_CHARSET_THAI 222 #define SC_CHARSET_8859_15 1000 #define SCI_STYLECLEARALL 2050 #define SCI_STYLESETFORE 2051 #define SCI_STYLESETBACK 2052 #define SCI_STYLESETBOLD 2053 #define SCI_STYLESETITALIC 2054 #define SCI_STYLESETSIZE 2055 #define SCI_STYLESETFONT 2056 #define SCI_STYLESETEOLFILLED 2057 #define SCI_STYLERESETDEFAULT 2058 #define SCI_STYLESETUNDERLINE 2059 #define SC_CASE_MIXED 0 #define SC_CASE_UPPER 1 #define SC_CASE_LOWER 2 #define SCI_STYLESETCASE 2060 #define SCI_STYLESETCHARACTERSET 2066 #define SCI_STYLESETHOTSPOT 2409 #define SCI_SETSELFORE 2067 #define SCI_SETSELBACK 2068 #define SCI_GETSELALPHA 2477 #define SCI_SETSELALPHA 2478 #define SCI_SETCARETFORE 2069 #define SCI_ASSIGNCMDKEY 2070 #define SCI_CLEARCMDKEY 2071 #define SCI_CLEARALLCMDKEYS 2072 #define SCI_SETSTYLINGEX 2073 #define SCI_STYLESETVISIBLE 2074 #define SCI_GETCARETPERIOD 2075 #define SCI_SETCARETPERIOD 2076 #define SCI_SETWORDCHARS 2077 #define SCI_BEGINUNDOACTION 2078 #define SCI_ENDUNDOACTION 2079 #define INDIC_MAX 7 #define INDIC_PLAIN 0 #define INDIC_SQUIGGLE 1 #define INDIC_TT 2 #define INDIC_DIAGONAL 3 #define INDIC_STRIKE 4 #define INDIC_HIDDEN 5 #define INDIC_BOX 6 #define INDIC_ROUNDBOX 7 #define INDIC0_MASK 0x20 #define INDIC1_MASK 0x40 #define INDIC2_MASK 0x80 #define INDICS_MASK 0xE0 #define SCI_INDICSETSTYLE 2080 #define SCI_INDICGETSTYLE 2081 #define SCI_INDICSETFORE 2082 #define SCI_INDICGETFORE 2083 #define SCI_SETWHITESPACEFORE 2084 #define SCI_SETWHITESPACEBACK 2085 #define SCI_SETSTYLEBITS 2090 #define SCI_GETSTYLEBITS 2091 #define SCI_SETLINESTATE 2092 #define SCI_GETLINESTATE 2093 #define SCI_GETMAXLINESTATE 2094 #define SCI_GETCARETLINEVISIBLE 2095 #define SCI_SETCARETLINEVISIBLE 2096 #define SCI_GETCARETLINEBACK 2097 #define SCI_SETCARETLINEBACK 2098 #define SCI_STYLESETCHANGEABLE 2099 #define SCI_AUTOCSHOW 2100 #define SCI_AUTOCCANCEL 2101 #define SCI_AUTOCACTIVE 2102 #define SCI_AUTOCPOSSTART 2103 #define SCI_AUTOCCOMPLETE 2104 #define SCI_AUTOCSTOPS 2105 #define SCI_AUTOCSETSEPARATOR 2106 #define SCI_AUTOCGETSEPARATOR 2107 #define SCI_AUTOCSELECT 2108 #define SCI_AUTOCSETCANCELATSTART 2110 #define SCI_AUTOCGETCANCELATSTART 2111 #define SCI_AUTOCSETFILLUPS 2112 #define SCI_AUTOCSETCHOOSESINGLE 2113 #define SCI_AUTOCGETCHOOSESINGLE 2114 #define SCI_AUTOCSETIGNORECASE 2115 #define SCI_AUTOCGETIGNORECASE 2116 #define SCI_USERLISTSHOW 2117 #define SCI_AUTOCSETAUTOHIDE 2118 #define SCI_AUTOCGETAUTOHIDE 2119 #define SCI_AUTOCSETDROPRESTOFWORD 2270 #define SCI_AUTOCGETDROPRESTOFWORD 2271 #define SCI_REGISTERIMAGE 2405 #define SCI_CLEARREGISTEREDIMAGES 2408 #define SCI_AUTOCGETTYPESEPARATOR 2285 #define SCI_AUTOCSETTYPESEPARATOR 2286 #define SCI_AUTOCSETMAXWIDTH 2208 #define SCI_AUTOCGETMAXWIDTH 2209 #define SCI_AUTOCSETMAXHEIGHT 2210 #define SCI_AUTOCGETMAXHEIGHT 2211 #define SCI_SETINDENT 2122 #define SCI_GETINDENT 2123 #define SCI_SETUSETABS 2124 #define SCI_GETUSETABS 2125 #define SCI_SETLINEINDENTATION 2126 #define SCI_GETLINEINDENTATION 2127 #define SCI_GETLINEINDENTPOSITION 2128 #define SCI_GETCOLUMN 2129 #define SCI_SETHSCROLLBAR 2130 #define SCI_GETHSCROLLBAR 2131 #define SCI_SETINDENTATIONGUIDES 2132 #define SCI_GETINDENTATIONGUIDES 2133 #define SCI_SETHIGHLIGHTGUIDE 2134 #define SCI_GETHIGHLIGHTGUIDE 2135 #define SCI_GETLINEENDPOSITION 2136 #define SCI_GETCODEPAGE 2137 #define SCI_GETCARETFORE 2138 #define SCI_GETUSEPALETTE 2139 #define SCI_GETREADONLY 2140 #define SCI_SETCURRENTPOS 2141 #define SCI_SETSELECTIONSTART 2142 #define SCI_GETSELECTIONSTART 2143 #define SCI_SETSELECTIONEND 2144 #define SCI_GETSELECTIONEND 2145 #define SCI_SETPRINTMAGNIFICATION 2146 #define SCI_GETPRINTMAGNIFICATION 2147 #define SC_PRINT_NORMAL 0 #define SC_PRINT_INVERTLIGHT 1 #define SC_PRINT_BLACKONWHITE 2 #define SC_PRINT_COLOURONWHITE 3 #define SC_PRINT_COLOURONWHITEDEFAULTBG 4 #define SCI_SETPRINTCOLOURMODE 2148 #define SCI_GETPRINTCOLOURMODE 2149 #define SCFIND_WHOLEWORD 2 #define SCFIND_MATCHCASE 4 #define SCFIND_WORDSTART 0x00100000 #define SCFIND_REGEXP 0x00200000 #define SCFIND_POSIX 0x00400000 #define SCI_FINDTEXT 2150 #define SCI_FORMATRANGE 2151 #define SCI_GETFIRSTVISIBLELINE 2152 #define SCI_GETLINE 2153 #define SCI_GETLINECOUNT 2154 #define SCI_SETMARGINLEFT 2155 #define SCI_GETMARGINLEFT 2156 #define SCI_SETMARGINRIGHT 2157 #define SCI_GETMARGINRIGHT 2158 #define SCI_GETMODIFY 2159 #define SCI_SETSEL 2160 #define SCI_GETSELTEXT 2161 #define SCI_GETTEXTRANGE 2162 #define SCI_HIDESELECTION 2163 #define SCI_POINTXFROMPOSITION 2164 #define SCI_POINTYFROMPOSITION 2165 #define SCI_LINEFROMPOSITION 2166 #define SCI_POSITIONFROMLINE 2167 #define SCI_LINESCROLL 2168 #define SCI_SCROLLCARET 2169 #define SCI_REPLACESEL 2170 #define SCI_SETREADONLY 2171 #define SCI_NULL 2172 #define SCI_CANPASTE 2173 #define SCI_CANUNDO 2174 #define SCI_EMPTYUNDOBUFFER 2175 #define SCI_UNDO 2176 #define SCI_CUT 2177 #define SCI_COPY 2178 #define SCI_PASTE 2179 #define SCI_CLEAR 2180 #define SCI_SETTEXT 2181 #define SCI_GETTEXT 2182 #define SCI_GETTEXTLENGTH 2183 #define SCI_GETDIRECTFUNCTION 2184 #define SCI_GETDIRECTPOINTER 2185 #define SCI_SETOVERTYPE 2186 #define SCI_GETOVERTYPE 2187 #define SCI_SETCARETWIDTH 2188 #define SCI_GETCARETWIDTH 2189 #define SCI_SETTARGETSTART 2190 #define SCI_GETTARGETSTART 2191 #define SCI_SETTARGETEND 2192 #define SCI_GETTARGETEND 2193 #define SCI_REPLACETARGET 2194 #define SCI_REPLACETARGETRE 2195 #define SCI_SEARCHINTARGET 2197 #define SCI_SETSEARCHFLAGS 2198 #define SCI_GETSEARCHFLAGS 2199 #define SCI_CALLTIPSHOW 2200 #define SCI_CALLTIPCANCEL 2201 #define SCI_CALLTIPACTIVE 2202 #define SCI_CALLTIPPOSSTART 2203 #define SCI_CALLTIPSETHLT 2204 #define SCI_CALLTIPSETBACK 2205 #define SCI_CALLTIPSETFORE 2206 #define SCI_CALLTIPSETFOREHLT 2207 #define SCI_CALLTIPUSESTYLE 2212 #define SCI_VISIBLEFROMDOCLINE 2220 #define SCI_DOCLINEFROMVISIBLE 2221 #define SCI_WRAPCOUNT 2235 #define SC_FOLDLEVELBASE 0x400 #define SC_FOLDLEVELWHITEFLAG 0x1000 #define SC_FOLDLEVELHEADERFLAG 0x2000 #define SC_FOLDLEVELBOXHEADERFLAG 0x4000 #define SC_FOLDLEVELBOXFOOTERFLAG 0x8000 #define SC_FOLDLEVELCONTRACTED 0x10000 #define SC_FOLDLEVELUNINDENT 0x20000 #define SC_FOLDLEVELNUMBERMASK 0x0FFF #define SCI_SETFOLDLEVEL 2222 #define SCI_GETFOLDLEVEL 2223 #define SCI_GETLASTCHILD 2224 #define SCI_GETFOLDPARENT 2225 #define SCI_SHOWLINES 2226 #define SCI_HIDELINES 2227 #define SCI_GETLINEVISIBLE 2228 #define SCI_SETFOLDEXPANDED 2229 #define SCI_GETFOLDEXPANDED 2230 #define SCI_TOGGLEFOLD 2231 #define SCI_ENSUREVISIBLE 2232 #define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 #define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 #define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 #define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 #define SC_FOLDFLAG_LEVELNUMBERS 0x0040 #define SC_FOLDFLAG_BOX 0x0001 #define SCI_SETFOLDFLAGS 2233 #define SCI_ENSUREVISIBLEENFORCEPOLICY 2234 #define SCI_SETTABINDENTS 2260 #define SCI_GETTABINDENTS 2261 #define SCI_SETBACKSPACEUNINDENTS 2262 #define SCI_GETBACKSPACEUNINDENTS 2263 #define SC_TIME_FOREVER 10000000 #define SCI_SETMOUSEDWELLTIME 2264 #define SCI_GETMOUSEDWELLTIME 2265 #define SCI_WORDSTARTPOSITION 2266 #define SCI_WORDENDPOSITION 2267 #define SC_WRAP_NONE 0 #define SC_WRAP_WORD 1 #define SC_WRAP_CHAR 2 #define SCI_SETWRAPMODE 2268 #define SCI_GETWRAPMODE 2269 #define SC_WRAPVISUALFLAG_NONE 0x0000 #define SC_WRAPVISUALFLAG_END 0x0001 #define SC_WRAPVISUALFLAG_START 0x0002 #define SCI_SETWRAPVISUALFLAGS 2460 #define SCI_GETWRAPVISUALFLAGS 2461 #define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 #define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 #define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 #define SCI_SETWRAPVISUALFLAGSLOCATION 2462 #define SCI_GETWRAPVISUALFLAGSLOCATION 2463 #define SCI_SETWRAPSTARTINDENT 2464 #define SCI_GETWRAPSTARTINDENT 2465 #define SC_CACHE_NONE 0 #define SC_CACHE_CARET 1 #define SC_CACHE_PAGE 2 #define SC_CACHE_DOCUMENT 3 #define SCI_SETLAYOUTCACHE 2272 #define SCI_GETLAYOUTCACHE 2273 #define SCI_SETSCROLLWIDTH 2274 #define SCI_GETSCROLLWIDTH 2275 #define SCI_TEXTWIDTH 2276 #define SCI_SETENDATLASTLINE 2277 #define SCI_GETENDATLASTLINE 2278 #define SCI_TEXTHEIGHT 2279 #define SCI_SETVSCROLLBAR 2280 #define SCI_GETVSCROLLBAR 2281 #define SCI_APPENDTEXT 2282 #define SCI_GETTWOPHASEDRAW 2283 #define SCI_SETTWOPHASEDRAW 2284 #define SCI_TARGETFROMSELECTION 2287 #define SCI_LINESJOIN 2288 #define SCI_LINESSPLIT 2289 #define SCI_SETFOLDMARGINCOLOUR 2290 #define SCI_SETFOLDMARGINHICOLOUR 2291 #define SCI_LINEDOWN 2300 #define SCI_LINEDOWNEXTEND 2301 #define SCI_LINEUP 2302 #define SCI_LINEUPEXTEND 2303 #define SCI_CHARLEFT 2304 #define SCI_CHARLEFTEXTEND 2305 #define SCI_CHARRIGHT 2306 #define SCI_CHARRIGHTEXTEND 2307 #define SCI_WORDLEFT 2308 #define SCI_WORDLEFTEXTEND 2309 #define SCI_WORDRIGHT 2310 #define SCI_WORDRIGHTEXTEND 2311 #define SCI_HOME 2312 #define SCI_HOMEEXTEND 2313 #define SCI_LINEEND 2314 #define SCI_LINEENDEXTEND 2315 #define SCI_DOCUMENTSTART 2316 #define SCI_DOCUMENTSTARTEXTEND 2317 #define SCI_DOCUMENTEND 2318 #define SCI_DOCUMENTENDEXTEND 2319 #define SCI_PAGEUP 2320 #define SCI_PAGEUPEXTEND 2321 #define SCI_PAGEDOWN 2322 #define SCI_PAGEDOWNEXTEND 2323 #define SCI_EDITTOGGLEOVERTYPE 2324 #define SCI_CANCEL 2325 #define SCI_DELETEBACK 2326 #define SCI_TAB 2327 #define SCI_BACKTAB 2328 #define SCI_NEWLINE 2329 #define SCI_FORMFEED 2330 #define SCI_VCHOME 2331 #define SCI_VCHOMEEXTEND 2332 #define SCI_ZOOMIN 2333 #define SCI_ZOOMOUT 2334 #define SCI_DELWORDLEFT 2335 #define SCI_DELWORDRIGHT 2336 #define SCI_LINECUT 2337 #define SCI_LINEDELETE 2338 #define SCI_LINETRANSPOSE 2339 #define SCI_LINEDUPLICATE 2404 #define SCI_LOWERCASE 2340 #define SCI_UPPERCASE 2341 #define SCI_LINESCROLLDOWN 2342 #define SCI_LINESCROLLUP 2343 #define SCI_DELETEBACKNOTLINE 2344 #define SCI_HOMEDISPLAY 2345 #define SCI_HOMEDISPLAYEXTEND 2346 #define SCI_LINEENDDISPLAY 2347 #define SCI_LINEENDDISPLAYEXTEND 2348 #define SCI_HOMEWRAP 2349 #define SCI_HOMEWRAPEXTEND 2450 #define SCI_LINEENDWRAP 2451 #define SCI_LINEENDWRAPEXTEND 2452 #define SCI_VCHOMEWRAP 2453 #define SCI_VCHOMEWRAPEXTEND 2454 #define SCI_LINECOPY 2455 #define SCI_MOVECARETINSIDEVIEW 2401 #define SCI_LINELENGTH 2350 #define SCI_BRACEHIGHLIGHT 2351 #define SCI_BRACEBADLIGHT 2352 #define SCI_BRACEMATCH 2353 #define SCI_GETVIEWEOL 2355 #define SCI_SETVIEWEOL 2356 #define SCI_GETDOCPOINTER 2357 #define SCI_SETDOCPOINTER 2358 #define SCI_SETMODEVENTMASK 2359 #define EDGE_NONE 0 #define EDGE_LINE 1 #define EDGE_BACKGROUND 2 #define SCI_GETEDGECOLUMN 2360 #define SCI_SETEDGECOLUMN 2361 #define SCI_GETEDGEMODE 2362 #define SCI_SETEDGEMODE 2363 #define SCI_GETEDGECOLOUR 2364 #define SCI_SETEDGECOLOUR 2365 #define SCI_SEARCHANCHOR 2366 #define SCI_SEARCHNEXT 2367 #define SCI_SEARCHPREV 2368 #define SCI_LINESONSCREEN 2370 #define SCI_USEPOPUP 2371 #define SCI_SELECTIONISRECTANGLE 2372 #define SCI_SETZOOM 2373 #define SCI_GETZOOM 2374 #define SCI_CREATEDOCUMENT 2375 #define SCI_ADDREFDOCUMENT 2376 #define SCI_RELEASEDOCUMENT 2377 #define SCI_GETMODEVENTMASK 2378 #define SCI_SETFOCUS 2380 #define SCI_GETFOCUS 2381 #define SCI_SETSTATUS 2382 #define SCI_GETSTATUS 2383 #define SCI_SETMOUSEDOWNCAPTURES 2384 #define SCI_GETMOUSEDOWNCAPTURES 2385 #define SC_CURSORNORMAL -1 #define SC_CURSORWAIT 4 #define SCI_SETCURSOR 2386 #define SCI_GETCURSOR 2387 #define SCI_SETCONTROLCHARSYMBOL 2388 #define SCI_GETCONTROLCHARSYMBOL 2389 #define SCI_WORDPARTLEFT 2390 #define SCI_WORDPARTLEFTEXTEND 2391 #define SCI_WORDPARTRIGHT 2392 #define SCI_WORDPARTRIGHTEXTEND 2393 #define VISIBLE_SLOP 0x01 #define VISIBLE_STRICT 0x04 #define SCI_SETVISIBLEPOLICY 2394 #define SCI_DELLINELEFT 2395 #define SCI_DELLINERIGHT 2396 #define SCI_SETXOFFSET 2397 #define SCI_GETXOFFSET 2398 #define SCI_CHOOSECARETX 2399 #define SCI_GRABFOCUS 2400 #define CARET_SLOP 0x01 #define CARET_STRICT 0x04 #define CARET_JUMPS 0x10 #define CARET_EVEN 0x08 #define SCI_SETXCARETPOLICY 2402 #define SCI_SETYCARETPOLICY 2403 #define SCI_SETPRINTWRAPMODE 2406 #define SCI_GETPRINTWRAPMODE 2407 #define SCI_SETHOTSPOTACTIVEFORE 2410 #define SCI_SETHOTSPOTACTIVEBACK 2411 #define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 #define SCI_SETHOTSPOTSINGLELINE 2421 #define SCI_PARADOWN 2413 #define SCI_PARADOWNEXTEND 2414 #define SCI_PARAUP 2415 #define SCI_PARAUPEXTEND 2416 #define SCI_POSITIONBEFORE 2417 #define SCI_POSITIONAFTER 2418 #define SCI_COPYRANGE 2419 #define SCI_COPYTEXT 2420 #define SC_SEL_STREAM 0 #define SC_SEL_RECTANGLE 1 #define SC_SEL_LINES 2 #define SCI_SETSELECTIONMODE 2422 #define SCI_GETSELECTIONMODE 2423 #define SCI_GETLINESELSTARTPOSITION 2424 #define SCI_GETLINESELENDPOSITION 2425 #define SCI_LINEDOWNRECTEXTEND 2426 #define SCI_LINEUPRECTEXTEND 2427 #define SCI_CHARLEFTRECTEXTEND 2428 #define SCI_CHARRIGHTRECTEXTEND 2429 #define SCI_HOMERECTEXTEND 2430 #define SCI_VCHOMERECTEXTEND 2431 #define SCI_LINEENDRECTEXTEND 2432 #define SCI_PAGEUPRECTEXTEND 2433 #define SCI_PAGEDOWNRECTEXTEND 2434 #define SCI_STUTTEREDPAGEUP 2435 #define SCI_STUTTEREDPAGEUPEXTEND 2436 #define SCI_STUTTEREDPAGEDOWN 2437 #define SCI_STUTTEREDPAGEDOWNEXTEND 2438 #define SCI_WORDLEFTEND 2439 #define SCI_WORDLEFTENDEXTEND 2440 #define SCI_WORDRIGHTEND 2441 #define SCI_WORDRIGHTENDEXTEND 2442 #define SCI_SETWHITESPACECHARS 2443 #define SCI_SETCHARSDEFAULT 2444 #define SCI_AUTOCGETCURRENT 2445 #define SCI_ALLOCATE 2446 #define SCI_TARGETASUTF8 2447 #define SCI_SETLENGTHFORENCODE 2448 #define SCI_ENCODEDFROMUTF8 2449 #define SCI_FINDCOLUMN 2456 #define SCI_GETCARETSTICKY 2457 #define SCI_SETCARETSTICKY 2458 #define SCI_TOGGLECARETSTICKY 2459 #define SCI_SETPASTECONVERTENDINGS 2467 #define SCI_GETPASTECONVERTENDINGS 2468 #define SCI_SELECTIONDUPLICATE 2469 #define SC_ALPHA_TRANSPARENT 0 #define SC_ALPHA_OPAQUE 255 #define SC_ALPHA_NOALPHA 256 #define SCI_SETCARETLINEBACKALPHA 2470 #define SCI_GETCARETLINEBACKALPHA 2471 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_SETLEXER 4001 #define SCI_GETLEXER 4002 #define SCI_COLOURISE 4003 #define SCI_SETPROPERTY 4004 #define KEYWORDSET_MAX 8 #define SCI_SETKEYWORDS 4005 #define SCI_SETLEXERLANGUAGE 4006 #define SCI_LOADLEXERLIBRARY 4007 #define SCI_GETPROPERTY 4008 #define SCI_GETPROPERTYEXPANDED 4009 #define SCI_GETPROPERTYINT 4010 #define SCI_GETSTYLEBITSNEEDED 4011 #define SC_MOD_INSERTTEXT 0x1 #define SC_MOD_DELETETEXT 0x2 #define SC_MOD_CHANGESTYLE 0x4 #define SC_MOD_CHANGEFOLD 0x8 #define SC_PERFORMED_USER 0x10 #define SC_PERFORMED_UNDO 0x20 #define SC_PERFORMED_REDO 0x40 #define SC_MULTISTEPUNDOREDO 0x80 #define SC_LASTSTEPINUNDOREDO 0x100 #define SC_MOD_CHANGEMARKER 0x200 #define SC_MOD_BEFOREINSERT 0x400 #define SC_MOD_BEFOREDELETE 0x800 #define SC_MULTILINEUNDOREDO 0x1000 #define SC_MODEVENTMASKALL 0x1FFF #define SCEN_CHANGE 768 #define SCEN_SETFOCUS 512 #define SCEN_KILLFOCUS 256 #define SCK_DOWN 300 #define SCK_UP 301 #define SCK_LEFT 302 #define SCK_RIGHT 303 #define SCK_HOME 304 #define SCK_END 305 #define SCK_PRIOR 306 #define SCK_NEXT 307 #define SCK_DELETE 308 #define SCK_INSERT 309 #define SCK_ESCAPE 7 #define SCK_BACK 8 #define SCK_TAB 9 #define SCK_RETURN 13 #define SCK_ADD 310 #define SCK_SUBTRACT 311 #define SCK_DIVIDE 312 #define SCMOD_NORM 0 #define SCMOD_SHIFT 1 #define SCMOD_CTRL 2 #define SCMOD_ALT 4 #define SCN_STYLENEEDED 2000 #define SCN_CHARADDED 2001 #define SCN_SAVEPOINTREACHED 2002 #define SCN_SAVEPOINTLEFT 2003 #define SCN_MODIFYATTEMPTRO 2004 #define SCN_KEY 2005 #define SCN_DOUBLECLICK 2006 #define SCN_UPDATEUI 2007 #define SCN_MODIFIED 2008 #define SCN_MACRORECORD 2009 #define SCN_MARGINCLICK 2010 #define SCN_NEEDSHOWN 2011 #define SCN_PAINTED 2013 #define SCN_USERLISTSELECTION 2014 #define SCN_URIDROPPED 2015 #define SCN_DWELLSTART 2016 #define SCN_DWELLEND 2017 #define SCN_ZOOM 2018 #define SCN_HOTSPOTCLICK 2019 #define SCN_HOTSPOTDOUBLECLICK 2020 #define SCN_CALLTIPCLICK 2021 #define SCN_AUTOCSELECTION 2022 //--Autogenerated -- end of section automatically generated from Scintilla.iface // These structures are defined to be exactly the same shape as the Win32 // CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. // So older code that treats Scintilla as a RichEdit will work. struct CharacterRange { long cpMin; long cpMax; }; struct TextRange { struct CharacterRange chrg; char *lpstrText; }; struct TextToFind { struct CharacterRange chrg; char *lpstrText; struct CharacterRange chrgText; }; #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 { SurfaceID hdc; SurfaceID hdcTarget; PRectangle rc; PRectangle rcPage; CharacterRange chrg; }; #endif struct 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. void *hwndFrom; uptr_t idFrom; unsigned int code; }; struct SCNotification { struct 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 int length; // SCN_MODIFIED int linesAdded; // SCN_MODIFIED int message; // SCN_MACRORECORD uptr_t wParam; // SCN_MACRORECORD sptr_t lParam; // SCN_MACRORECORD int line; // SCN_MODIFIED int foldLevelNow; // SCN_MODIFIED int foldLevelPrev; // SCN_MODIFIED int margin; // SCN_MARGINCLICK int listType; // SCN_USERLISTSELECTION int x; // SCN_DWELLSTART, SCN_DWELLEND int y; // SCN_DWELLSTART, SCN_DWELLEND }; // Deprecation section listing all API features that are deprecated and will // 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 SCN_POSCHANGED 2012 #define SCN_CHECKBRACE 2007 #endif #endif --- NEW FILE: Accessor.h --- // Scintilla source code edit control /** @file Accessor.h ** Rapid easy access to contents of a Scintilla. **/ // Copyright 1998-2001 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; class Accessor; typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len); /** * Interface to data in a Scintilla. */ class Accessor { protected: enum {extremePosition=0x7FFFFFFF}; /** @a bufferSize is a trade off between time taken to copy the characters * and retrieval overhead. * @a slopSize positions the buffer before the desired position * in case there is some backtracking. */ enum {bufferSize=4000, slopSize=bufferSize/8}; char buf[bufferSize+1]; int startPos; int endPos; int codePage; virtual bool InternalIsLeadByte(char ch)=0; virtual void Fill(int position)=0; public: Accessor() : startPos(extremePosition), endPos(0), codePage(0) {} virtual ~Accessor() {} char operator[](int position) { if (position < startPos || position >= endPos) { Fill(position); } return buf[position - startPos]; } /** Safe version of operator[], returning a defined value for invalid position. */ char SafeGetCharAt(int position, char chDefault=' ') { if (position < startPos || position >= endPos) { Fill(position); if (position < startPos || position >= endPos) { // Position is outside range of document return chDefault; } } return buf[position - startPos]; } bool IsLeadByte(char ch) { return codePage && InternalIsLeadByte(ch); } void SetCodePage(int codePage_) { codePage = codePage_; } virtual bool Match(int pos, const char *s)=0; virtual char StyleAt(int position)=0; virtual int GetLine(int position)=0; virtual int LineStart(int line)=0; virtual int LevelAt(int line)=0; virtual int Length()=0; virtual void Flush()=0; virtual int GetLineState(int line)=0; virtual int SetLineState(int line, int state)=0; virtual int GetPropertyInt(const char *key, int defaultValue=0)=0; virtual char *GetProperties()=0; // Style... [truncated message content] |
From: Markus R. <rol...@us...> - 2007-06-19 05:19:48
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24867/src/scintilla Added Files: Tag: RSGEDIT_SCINTILLA License.txt README.txt Log Message: - added files for Scintilla, a free GTK and Win32 source editing component - added files for wxScintilla, a Scintilla wrapper for wxWidgets --- NEW FILE: License.txt --- License for Scintilla and SciTE Copyright 1998-2003 by Neil Hodgson <ne...@sc...> All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- NEW FILE: README.txt --- This directory contains copies of the scintilla/src and scintilla/include directories from the Scintilla source distribution. The current version of the Scintilla code is 1.62 |
From: Markus R. <rol...@us...> - 2007-06-19 05:19:48
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24867/src Added Files: Tag: RSGEDIT_SCINTILLA PlatWX.cpp PlatWX.h ScintillaWX.cpp ScintillaWX.h wxscintilla.cpp Log Message: - added files for Scintilla, a free GTK and Win32 source editing component - added files for wxScintilla, a Scintilla wrapper for wxWidgets --- NEW FILE: PlatWX.h --- wxRect wxRectFromPRectangle(PRectangle prc); PRectangle PRectangleFromwxRect(wxRect rc); wxColour wxColourFromCA(const ColourAllocated& ca); --- NEW FILE: PlatWX.cpp --- // Scintilla source code edit control // PlatWX.cxx - implementation of platform facilities on wxWidgets // Copyright 1998-1999 by Neil Hodgson <ne...@sc...> // Robin Dunn <ro...@al...> // The License.txt file describes the conditions under which this software may be distributed. #include <ctype.h> #include <wx/wx.h> #include <wx/encconv.h> #include <wx/listctrl.h> #include <wx/mstream.h> #include <wx/image.h> #include <wx/imaglist.h> #include <wx/tokenzr.h> #include "Platform.h" #include "PlatWX.h" #include "wx/wxscintilla.h" [...1407 lines suppressed...] size_t actualLen = UCS2FromUTF8(str, len, buffer.data(), wclen+1); return wxString(buffer.data(), actualLen); } const wxWX2MBbuf wx2stc(const wxString& str) { const wchar_t* wcstr = str.c_str(); size_t wclen = str.length(); size_t len = UTF8Length(wcstr, wclen); wxCharBuffer buffer(len+1); UTF8FromUCS2(wcstr, wclen, buffer.data(), len); // TODO check NULL termination!! return buffer; } #endif --- NEW FILE: wxscintilla.cpp --- //////////////////////////////////////////////////////////////////////////// // Name: wxscintilla.cpp // Purpose: A wxWidgets implementation of Scintilla. This class is the // one meant to be used directly by wx applications. It does not // derive directly from the Scintilla classes, but instead // delegates most things to the real Scintilla class. // This allows the use of Scintilla without polluting the // namespace with all the classes and identifiers from Scintilla. // // Author: Robin Dunn // // Created: 13-Jan-2000 // RCS-ID: $Id: wxscintilla.cpp,v 1.1.2.1 2007/06/19 05:19:45 rollmark Exp $ // Copyright: (c) 2004 wxCode // Licence: wxWindows ///////////////////////////////////////////////////////////////////////////// #include <ctype.h> [...3305 lines suppressed...] m_linesAdded = event.m_linesAdded; m_line = event.m_line; m_foldLevelNow = event.m_foldLevelNow; m_foldLevelPrev = event.m_foldLevelPrev; m_margin = event.m_margin; m_message = event.m_message; m_wParam = event.m_wParam; m_lParam = event.m_lParam; m_listType = event.m_listType; m_x = event.m_x; m_y = event.m_y; m_dragText = event.m_dragText; m_dragAllowMove = event.m_dragAllowMove; #if wxUSE_DRAG_AND_DROP m_dragResult = event.m_dragResult; #endif } //---------------------------------------------------------------------- //---------------------------------------------------------------------- --- NEW FILE: ScintillaWX.cpp --- //////////////////////////////////////////////////////////////////////////// // Name: ScintillaWX.cxx // Purpose: A wxWidgets implementation of Scintilla. A class derived // from ScintillaBase that uses the "wx platform" defined in // PlatformWX.cxx This class is one end of a bridge between // the wx world and the Scintilla world. It needs a peer // object of type wxScintilla to function. // // Author: Robin Dunn // // Created: 13-Jan-2000 // RCS-ID: $Id: ScintillaWX.cpp,v 1.1.2.1 2007/06/19 05:19:45 rollmark Exp $ // Copyright: (c) 2000 by Total Control Software // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #include "ScintillaWX.h" //?#include "ExternalLexer.h" #include "PlatWX.h" [...1140 lines suppressed...] dc.SetClippingRegion(rgn); #endif } #else void ScintillaWX::ClipChildren(wxDC& WXUNUSED(dc), PRectangle WXUNUSED(rect)) { } #endif void ScintillaWX::SetUseAntiAliasing(bool useAA) { vs.extraFontFlag = useAA; InvalidateStyleRedraw(); } bool ScintillaWX::GetUseAntiAliasing() { return vs.extraFontFlag; } //---------------------------------------------------------------------- //---------------------------------------------------------------------- --- NEW FILE: ScintillaWX.h --- //////////////////////////////////////////////////////////////////////////// // Name: ScintillaWX.h // Purpose: A wxWidgets implementation of Scintilla. A class derived // from ScintillaBase that uses the "wx platform" defined in // PlatWX.cpp. This class is one end of a bridge between // the wx world and the Scintilla world. It needs a peer // object of type wxScintilla to function. // // Author: Robin Dunn // // Created: 13-Jan-2000 // RCS-ID: $Id: ScintillaWX.h,v 1.1.2.1 2007/06/19 05:19:45 rollmark Exp $ // Copyright: (c) 2000 by Total Control Software // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #ifndef __ScintillaWX_h__ #define __ScintillaWX_h__ //---------------------------------------------------------------------- #include <ctype.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include "Platform.h" #include "Scintilla.h" #include "XPM.h" #ifdef SCI_LEXER #include "SciLexer.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #endif #include "ContractionState.h" #include "SVector.h" #include "CellBuffer.h" #include "CallTip.h" #include "KeyMap.h" #include "Indicator.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "AutoComplete.h" #include "CharClassify.h" #include "RESearch.h" #include "Document.h" #include "Editor.h" #include "ScintillaBase.h" #include <wx/wx.h> #include <wx/dataobj.h> #include <wx/clipbrd.h> #include <wx/dnd.h> //---------------------------------------------------------------------- #ifdef WXMAKINGDLL_SCI #define WXDLLIMPEXP_SCI WXEXPORT #elif defined(WXUSINGDLL) #define WXDLLIMPEXP_SCI WXIMPORT #else // not making nor using DLL #define WXDLLIMPEXP_SCI #endif class WXDLLIMPEXP_SCI wxScintilla; // forward class ScintillaWX; //---------------------------------------------------------------------- // Helper classes #if wxUSE_DRAG_AND_DROP class wxSCIDropTarget : public wxTextDropTarget { public: void SetScintilla(ScintillaWX* swx) { this->swx = swx; } bool OnDropText(wxCoord x, wxCoord y, const wxString& data); wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def); wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); void OnLeave(); private: ScintillaWX* swx; }; #endif //---------------------------------------------------------------------- class ScintillaWX : public ScintillaBase { public: ScintillaWX(wxScintilla* win); ~ScintillaWX(); // base class virtuals virtual void Initialise(); virtual void Finalise(); virtual void StartDrag(); virtual bool SetIdle(bool on); virtual void SetTicking(bool on); virtual void SetMouseCapture(bool on); virtual bool HaveMouseCapture(); virtual void ScrollText(int linesToMove); virtual void SetVerticalScrollPos(); virtual void SetHorizontalScrollPos(); virtual bool ModifyScrollBars(int nMax, int nPage); virtual void Copy(); virtual void Paste(); virtual void CopyToClipboard(const SelectionText &selectedText); virtual void CreateCallTipWindow(PRectangle rc); virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); virtual void ClaimSelection(); virtual long DefWndProc(unsigned int iMessage, unsigned long wParam, long lParam); virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam); virtual void NotifyChange(); virtual void NotifyParent(SCNotification scn); virtual void CancelModes(); virtual void UpdateSystemCaret(); // Event delegates void DoPaint(wxDC* dc, wxRect rect); void DoHScroll(int type, int pos); void DoVScroll(int type, int pos); void DoSize(int width, int height); void DoLoseFocus(); void DoGainFocus(); void DoSysColourChange(); void DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); void DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl); void DoLeftButtonMove(Point pt); void DoMiddleButtonUp(Point pt); void DoMouseWheel(int rotation, int delta, int linesPerAction, int ctrlDown, bool isPageScroll); void DoAddChar(int key); int DoKeyDown(const wxKeyEvent& event, bool* consumed); void DoTick() { Tick(); } void DoOnIdle(wxIdleEvent& evt); void DoStartDrag(); #if wxUSE_DRAG_AND_DROP bool DoDropText(long x, long y, const wxString& data); wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult def); wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); void DoDragLeave(); #endif void DoCommand(int ID); void DoContextMenu(Point pt); void DoOnListBox(); // helpers void FullPaint(); bool CanPaste(); bool GetHideSelection() { return hideSelection; } void DoScrollToLine(int line); void DoScrollToColumn(int column); void ClipChildren(wxDC& dc, PRectangle rect); void SetUseAntiAliasing(bool useAA); bool GetUseAntiAliasing(); private: bool capturedMouse; bool focusEvent; wxScintilla* sci; #if wxUSE_DRAG_AND_DROP wxSCIDropTarget* dropTarget; wxDragResult dragResult; bool dragRectangle; wxTimer* startDragTimer; #endif int wheelRotation; // For use in creating a system caret bool HasCaretSizeChanged(); bool CreateSystemCaret(); bool DestroySystemCaret(); #ifdef __WXMSW__ #if wxCHECK_VERSION(2, 5, 0) HBITMAP sysCaretBitmap; int sysCaretWidth; int sysCaretHeight; #endif #endif friend class wxSCICallTip; }; //---------------------------------------------------------------------- #endif |
From: Markus R. <rol...@us...> - 2007-06-19 05:19:48
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/include/wx In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24867/include/wx Added Files: Tag: RSGEDIT_SCINTILLA wxscintilla.h Log Message: - added files for Scintilla, a free GTK and Win32 source editing component - added files for wxScintilla, a Scintilla wrapper for wxWidgets --- NEW FILE: wxscintilla.h --- ///////////////////////////////////////////////////////////////////////////// // Name: wxscintilla.h // Purpose: A wxWidgets implementation of Scintilla. This class is the // one meant to be used directly by wx applications. It does not // derive directly from the Scintilla classes, and in fact there // is no mention of Scintilla classes at all in this header. // This class delegates all method calls and events to the // Scintilla objects and so forth. This allows the use of // Scintilla without polluting the namespace with all the // classes and itentifiers from Scintilla. // // Author: Robin Dunn // // Created: 13-Jan-2000 // RCS-ID: $Id: wxscintilla.h,v 1.1.2.1 2007/06/19 05:19:45 rollmark Exp $ // Copyright: (c) 2004 wxCode // Licence: wxWindows ///////////////////////////////////////////////////////////////////////////// [...3636 lines suppressed...] return wxString (str, len); } #endif #if wxUSE_UNICODE inline const wxWX2MBbuf wx2sci (const wxString& str) { return str.mb_str (wxConvUTF8); } #else inline const wxWX2MBbuf wx2sci (const wxString& str) { return str.mbc_str(); } #endif #endif //---------------------------------------------------------------------- #endif // __WXSCINTILLA_H__ |
From: Markus R. <rol...@us...> - 2007-06-19 05:16:24
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24056/src Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla/src added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-19 05:16:24
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla/include In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24056/include Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla/include added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-19 05:16:11
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24010/scintilla Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src/scintilla added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-19 05:15:38
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/include/wx In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23658/wx Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/include/wx added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-19 05:15:23
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23626/src Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/src added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-19 05:15:22
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/include In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23626/include Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla/include added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-19 05:15:00
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23247/wxscintilla Log Message: Directory /cvsroot/simspark/simspark/contrib/rsgedit/wxscintilla added to the repository --> Using per-directory sticky tag `RSGEDIT_SCINTILLA' |
From: Markus R. <rol...@us...> - 2007-06-18 18:04:50
|
Update of /cvsroot/simspark/simspark/spark/salt In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16716 Modified Files: salt.vcproj Log Message: - add spark/win32 to list of include directories (to find sparkconfig.h) Index: salt.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/salt.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** salt.vcproj 15 Mar 2007 07:26:29 -0000 1.2 --- salt.vcproj 18 Jun 2007 18:04:47 -0000 1.3 *************** *** 2,6 **** <VisualStudioProject ProjectType="Visual C++" ! Version="8,00" Name="salt" ProjectGUID="{17DECC5C-BD53-4ECE-8E4F-707C52D4987C}" --- 2,6 ---- <VisualStudioProject ProjectType="Visual C++" ! Version="8.00" Name="salt" ProjectGUID="{17DECC5C-BD53-4ECE-8E4F-707C52D4987C}" *************** *** 41,44 **** --- 41,45 ---- Name="VCCLCompilerTool" Optimization="0" + AdditionalIncludeDirectories="..\win32" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H" MinimalRebuild="true" |
From: Markus R. <rol...@us...> - 2007-06-18 18:03:44
|
Update of /cvsroot/simspark/simspark/spark/kerosin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16322 Modified Files: kerosin.vcproj Log Message: - add materialexporter, materialexternal and baserenderserver files (merged from osX branch) Index: kerosin.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kerosin.vcproj 15 Mar 2007 07:26:25 -0000 1.2 --- kerosin.vcproj 18 Jun 2007 18:03:39 -0000 1.3 *************** *** 2,6 **** <VisualStudioProject ProjectType="Visual C++" ! Version="8,00" Name="kerosin" ProjectGUID="{38291F56-23B6-4B5D-8810-D2AD2A379EE9}" --- 2,6 ---- <VisualStudioProject ProjectType="Visual C++" ! Version="8.00" Name="kerosin" ProjectGUID="{38291F56-23B6-4B5D-8810-D2AD2A379EE9}" *************** *** 172,175 **** --- 172,195 ---- </File> <File + RelativePath=".\materialserver\materialexporter.h" + > + </File> + <File + RelativePath=".\materialserver\materialexporter_c.cpp" + > + </File> + <File + RelativePath=".\materialserver\materialexternal.cpp" + > + </File> + <File + RelativePath=".\materialserver\materialexternal.h" + > + </File> + <File + RelativePath=".\materialserver\materialexternal_c.cpp" + > + </File> + <File RelativePath=".\materialserver\materialserver.cpp" > *************** *** 308,311 **** --- 328,343 ---- > <File + RelativePath=".\renderserver\baserenderserver.cpp" + > + </File> + <File + RelativePath=".\renderserver\baserenderserver.h" + > + </File> + <File + RelativePath=".\renderserver\baserenderserver_c.cpp" + > + </File> + <File RelativePath=".\renderserver\customrender.cpp" > |
From: Oliver O. <fr...@us...> - 2007-06-17 21:54:56
|
Update of /cvsroot/simspark/simspark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21899 Modified Files: ChangeLog Log Message: *** empty log message *** Index: ChangeLog =================================================================== RCS file: /cvsroot/simspark/simspark/spark/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog 17 Jun 2007 13:38:29 -0000 1.3 --- ChangeLog 17 Jun 2007 21:54:51 -0000 1.4 *************** *** 1,3 **** ! 2007-06-17 Oliver Obst <fr...@us...> * acinclude.m4: --- 1,9 ---- ! 2007-06-18 Oliver Obst <fr...@us...> ! ! * kerosin/renderserver/renderserver.cpp: ! replaced uint8 by unsigned char ! ! ! 2007-06-17 Oliver Obst <fr...@us...> * acinclude.m4: *************** *** 98,102 **** * oxygen/simulationserver/netmessage.cpp: * zeitgeist/leaf.h: ! - merge from HEAD 2007-06-04 Oliver Obst <fr...@us...> --- 104,108 ---- * oxygen/simulationserver/netmessage.cpp: * zeitgeist/leaf.h: ! - merge: sync projectx branch with HEAD 2007-06-04 Oliver Obst <fr...@us...> |
From: Oliver O. <fr...@us...> - 2007-06-17 21:53:45
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21514 Modified Files: renderserver.cpp Log Message: replaced uint8 by unsigned char Index: renderserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** renderserver.cpp 17 Jun 2007 13:38:31 -0000 1.5 --- renderserver.cpp 17 Jun 2007 21:53:42 -0000 1.6 *************** *** 179,183 **** size_t len = Width() * 3; ! uint8_t* line = new uint8_t[len]; /* one line of packed RGB pixels */ unsigned char* a; --- 179,183 ---- size_t len = Width() * 3; ! unsigned char* line = new unsigned char[len]; /* one line of packed RGB pixels */ unsigned char* a; |
From: Oliver O. <fr...@us...> - 2007-06-17 21:53:08
|
Update of /cvsroot/simspark/simspark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21263 Modified Files: Tag: projectx ChangeLog Log Message: *** empty log message *** Index: ChangeLog =================================================================== RCS file: /cvsroot/simspark/simspark/spark/ChangeLog,v retrieving revision 1.1.2.2.2.5 retrieving revision 1.1.2.2.2.6 diff -C2 -d -r1.1.2.2.2.5 -r1.1.2.2.2.6 *** ChangeLog 17 Jun 2007 12:18:40 -0000 1.1.2.2.2.5 --- ChangeLog 17 Jun 2007 21:53:03 -0000 1.1.2.2.2.6 *************** *** 1,3 **** ! 2007-06-17 Oliver Obst <fr...@us...> * acinclude.m4: --- 1,9 ---- ! 2007-06-18 Oliver Obst <fr...@us...> ! ! * kerosin/renderserver/renderserver.cpp: ! replaced uint8 by unsigned char ! ! ! 2007-06-17 Oliver Obst <fr...@us...> * acinclude.m4: |
From: Oliver O. <fr...@us...> - 2007-06-17 21:52:20
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21094 Modified Files: Tag: projectx renderserver.cpp Log Message: replaced uint8 by unsigned char Index: renderserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.cpp,v retrieving revision 1.2.2.3.2.2 retrieving revision 1.2.2.3.2.3 diff -C2 -d -r1.2.2.3.2.2 -r1.2.2.3.2.3 *** renderserver.cpp 17 Jun 2007 08:48:56 -0000 1.2.2.3.2.2 --- renderserver.cpp 17 Jun 2007 21:52:17 -0000 1.2.2.3.2.3 *************** *** 179,183 **** size_t len = Width() * 3; ! uint8_t* line = new uint8_t[len]; /* one line of packed RGB pixels */ unsigned char* a; --- 179,183 ---- size_t len = Width() * 3; ! unsigned char* line = new unsigned char[len]; /* one line of packed RGB pixels */ unsigned char* a; |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:38
|
Update of /cvsroot/simspark/simspark/spark/oxygen/geometryserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/oxygen/geometryserver Modified Files: geometryserver.cpp geometryserver.h geometryserver_c.cpp Added Files: meshexporter.h meshexporter_c.cpp Log Message: merge from projectx branch Index: geometryserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/geometryserver/geometryserver.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** geometryserver.cpp 15 Jun 2007 08:48:16 -0000 1.3 --- geometryserver.cpp 17 Jun 2007 13:38:32 -0000 1.4 *************** *** 22,25 **** --- 22,26 ---- #include "geometryserver.h" #include "meshimporter.h" + #include "meshexporter.h" #include <zeitgeist/logserver/logserver.h> *************** *** 38,50 **** } ! void GeometryServer::OnLink() { if (mChildren.size() == 0) ! { ! InitMeshImporter("oxygen/StdMeshImporter"); ! } } ! bool GeometryServer::InitMeshImporter(const string& importerName) { shared_ptr<MeshImporter> importer --- 39,53 ---- } ! void ! GeometryServer::OnLink() { if (mChildren.size() == 0) ! { ! InitMeshImporter("oxygen/StdMeshImporter"); ! } } ! bool ! GeometryServer::InitMeshImporter(const string& importerName) { shared_ptr<MeshImporter> importer *************** *** 52,60 **** if (importer.get() == 0) ! { ! GetLog()->Error() << "(GeometryServer) ERROR: " ! << "unable to create '" << importerName << "'\n"; ! return false; ! } importer->SetName(importerName); --- 55,63 ---- if (importer.get() == 0) ! { ! GetLog()->Error() << "(GeometryServer) ERROR: " ! << "unable to create '" << importerName << "'\n"; ! return false; ! } importer->SetName(importerName); *************** *** 67,81 **** } ! shared_ptr<TriMesh> GeometryServer::GetMesh ! (const string& name, const::ParameterList& parameter) { // try a direct match string meshName = name; ! TMeshMap::iterator meshIter = mMeshMap.find(meshName); if (meshIter != mMeshMap.end()) ! { ! return (*meshIter).second; ! } TLeafList importer; --- 70,84 ---- } ! shared_ptr<TriMesh> ! GeometryServer::GetMesh(const string& name, const::ParameterList& parameter) { // try a direct match string meshName = name; ! TMeshMap::const_iterator meshIter = mMeshMap.find(meshName); if (meshIter != mMeshMap.end()) ! { ! return (*meshIter).second; ! } TLeafList importer; *************** *** 83,92 **** if (importer.size() == 0) ! { ! GetLog()->Error() ! << "(GeometryServer) Warning: no MeshImporter registered\n"; ! return shared_ptr<TriMesh>(); ! } // try to mangle the name --- 86,95 ---- if (importer.size() == 0) ! { ! GetLog()->Error() ! << "(GeometryServer) Warning: no MeshImporter registered\n"; ! return shared_ptr<TriMesh>(); ! } // try to mangle the name *************** *** 96,115 **** ++iter ) ! { ! shared_ptr<MeshImporter> importer = ! shared_static_cast<MeshImporter>(*iter); ! ! string str = importer->MangleName(name, parameter); ! if (str != meshName) ! { ! meshName = str; ! meshIter = mMeshMap.find(meshName); ! if (meshIter != mMeshMap.end()) ! { ! return (*meshIter).second; ! } ! } } // try to import the mesh --- 99,118 ---- ++iter ) ! { ! shared_ptr<MeshImporter> importer = ! shared_static_cast<MeshImporter>(*iter); ! string str = importer->MangleName(name, parameter); ! ! if (str != meshName) ! { ! meshName = str; ! meshIter = mMeshMap.find(meshName); ! if (meshIter != mMeshMap.end()) ! { ! return (*meshIter).second; ! } } + } // try to import the mesh *************** *** 119,150 **** ++iter ) ! { ! shared_ptr<MeshImporter> importer = ! shared_static_cast<MeshImporter>(*iter); ! ! shared_ptr<TriMesh> mesh = importer->ImportMesh(name,parameter); ! if (mesh.get() == 0 || mesh->GetVertexCount() == 0) ! { ! continue; ! } ! string meshName = mesh->GetName(); ! if (meshName == "") ! { ! meshName = name; ! mesh->SetName(name); ! } ! GetLog()->Normal() ! << "(GeometryServer) imported mesh '" ! << meshName << " with '" ! << importer->GetName() << "'\n"; ! RegisterMesh(mesh); ! return mesh; } GetLog()->Error() << "(GeometryServer) ERROR: cannot import mesh '" << name << "'\n"; --- 122,156 ---- ++iter ) ! { ! shared_ptr<MeshImporter> importer = ! shared_static_cast<MeshImporter>(*iter); ! shared_ptr<TriMesh> mesh = importer->ImportMesh(name,parameter); ! if (mesh.get() == 0) ! { ! continue; ! } ! string meshName = mesh->GetName(); ! if (meshName.empty()) ! { ! meshName = name; ! mesh->SetName(name); ! } ! GetLog()->Normal() << "(GeometryServer) imported mesh '" << meshName ! << " with '" << importer->GetName() << "'\n"; ! if (mesh.get() == 0 || mesh->GetVertexCount() == 0) ! { ! continue; } + RegisterMesh(mesh); + + return mesh; + } + GetLog()->Error() << "(GeometryServer) ERROR: cannot import mesh '" << name << "'\n"; *************** *** 153,181 **** } ! void GeometryServer::RegisterMesh(shared_ptr<TriMesh> mesh) { if (mesh.get() == 0) ! { ! GetLog()->Debug() << "(GeometryServer) RegisterMesh called with NULL mesh\n"; ! return; ! } std::string name = mesh->GetName(); if (name.empty()) ! { ! GetLog()->Error() << "(GeometryServer) Cannot register a mesh without a name\n"; ! return; ! } ! TMeshMap::iterator iter = mMeshMap.find(name); if (iter != mMeshMap.end()) ! { ! GetLog()->Debug() << "(GeometryServer) replacing mesh " << name << "\n"; ! } mMeshMap[name] = mesh; GetLog()->Normal() << "(GeometryServer) mesh " << name << " registered\n"; } --- 159,219 ---- } ! void ! GeometryServer::RegisterMesh(shared_ptr<TriMesh> mesh) { if (mesh.get() == 0) ! { ! GetLog()->Debug() ! << "(GeometryServer) RegisterMesh called with NULL mesh\n"; ! return; ! } std::string name = mesh->GetName(); if (name.empty()) ! { ! GetLog()->Error() ! << "(GeometryServer) Cannot register a mesh without a name\n"; ! return; ! } ! TMeshMap::const_iterator iter = mMeshMap.find(name); if (iter != mMeshMap.end()) ! { ! GetLog()->Debug() << "(GeometryServer) replacing mesh " << name << "\n"; ! } mMeshMap[name] = mesh; GetLog()->Normal() << "(GeometryServer) mesh " << name << " registered\n"; + + TLeafList exporters; + ListChildrenSupportingClass<MeshExporter>(exporters); + + for (TLeafList::const_iterator bi = exporters.begin(); bi != exporters.end(); ++bi) + { + GetLog()->Normal() << "(GeometryServer) additionally registered mesh " + << name << " via MeshExporter '" << (*bi)->GetName() << "'\n"; + shared_ptr<MeshExporter> mb = shared_static_cast<MeshExporter>(*bi); + mb->RegisterMesh(mesh); + } } + bool + GeometryServer::InitMeshExporter(const string& name) + { + shared_ptr<MeshExporter> exporter + = shared_dynamic_cast<MeshExporter>(GetCore()->New(name)); + + if (exporter.get() == 0) + { + GetLog()->Error() << "(GeometryServer) ERROR: " + << "unable to create MeshExporter '" << name << "'\n"; + return false; + } + + exporter->SetName(name); + AddChildReference(exporter); + GetLog()->Normal() << "(GeometryServer) MeshExporter '" << name << "' registered\n"; + return true; + } --- NEW FILE: meshexporter.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Tue May 9 2006 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2007 RoboCup Soccer Server 3D Maintenance Group $Id: meshexporter.h,v 1.2 2007/06/17 13:38:32 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. MeshExporter NOTE: This class serves as an (abstract) exporter to register meshes with other graphic engines (possibly also for exporting). HISTORY: 30/03/07 - OO - Initial version */ #ifndef OXYGEN_MESHEXPORTER_H #define OXYGEN_MESHEXPORTER_H #include <zeitgeist/class.h> #include <zeitgeist/node.h> #include "trimesh.h" namespace oxygen { /** \class MeshExporter. This class can be used to implement custom render server, which needs to be informed about the meshes used for a specific simulation. By registering a MeshExporter implementation to the GeometryServer, meshes can be registered (exported) to another class. */ class MeshExporter : public zeitgeist::Leaf { public: virtual ~MeshExporter() {} /** Register / Export the given mesh. \param mesh the mesh to register / export. */ virtual void RegisterMesh(boost::shared_ptr<TriMesh> mesh) = 0; }; DECLARE_ABSTRACTCLASS(MeshExporter); } // end namespace oxygen #endif // OXYGEN_MESHEXPORTER --- NEW FILE: meshexporter_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Tue May 9 2006 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2007 RoboCup Soccer Server 3D Maintenance Group $Id: meshexporter_c.cpp,v 1.2 2007/06/17 13:38:32 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. MeshExporter NOTE: This class serves as an (abstract) exporter, to register meshes with other graphic engines (possibly also for exporting) HISTORY: 30/03/07 - OO - Initial version */ #include "meshexporter.h" using namespace oxygen; void CLASS(MeshExporter)::DefineClass() { DEFINE_BASECLASS(zeitgeist/Leaf); } Index: geometryserver_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/geometryserver/geometryserver_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** geometryserver_c.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- geometryserver_c.cpp 17 Jun 2007 13:38:32 -0000 1.2 *************** *** 34,48 **** (! in.GetValue(in.begin(),inImporterName)) ) ! { ! return false; ! } return obj->InitMeshImporter(inImporterName); } ! void CLASS(GeometryServer)::DefineClass() { DEFINE_BASECLASS(zeitgeist/Node); DEFINE_FUNCTION(initMeshImporter); } --- 34,65 ---- (! in.GetValue(in.begin(),inImporterName)) ) ! { ! return false; ! } return obj->InitMeshImporter(inImporterName); } ! FUNCTION(GeometryServer,initMeshExporter) ! { ! string inExporterName; ! ! if ( ! (in.GetSize() != 1) || ! (! in.GetValue(in.begin(),inExporterName)) ! ) ! { ! return false; ! } ! ! return obj->InitMeshExporter(inExporterName); ! } ! ! void ! CLASS(GeometryServer)::DefineClass() { DEFINE_BASECLASS(zeitgeist/Node); DEFINE_FUNCTION(initMeshImporter); + DEFINE_FUNCTION(initMeshExporter); } Index: geometryserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/geometryserver/geometryserver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** geometryserver.h 23 Feb 2006 13:38:36 -0000 1.2 --- geometryserver.h 17 Jun 2007 13:38:32 -0000 1.3 *************** *** 25,28 **** --- 25,29 ---- #include <zeitgeist/class.h> #include <zeitgeist/node.h> + #include "meshexporter.h" #include "trimesh.h" *************** *** 43,48 **** ~GeometryServer(); ! /** creates an instance of \param importerName and registers it as a ! MeshImporter to the GeometryServer */ bool InitMeshImporter(const std::string& importerName); --- 44,50 ---- ~GeometryServer(); ! /** creates an instance of a mesh importer and registers it to the GeometryServer. ! * \param importerName the (class) name of the importer ! * \returns true if successful */ bool InitMeshImporter(const std::string& importerName); *************** *** 51,56 **** returns a cached reference */ ! boost::shared_ptr<TriMesh> GetMesh ! (const std::string& name, const zeitgeist::ParameterList& parameter); /** register a trimesh to the GeometryServer. The name of the mesh --- 53,58 ---- returns a cached reference */ ! boost::shared_ptr<TriMesh> ! GetMesh (const std::string& name, const zeitgeist::ParameterList& parameter); /** register a trimesh to the GeometryServer. The name of the mesh *************** *** 59,62 **** --- 61,74 ---- void RegisterMesh(boost::shared_ptr<TriMesh> mesh); + /** Create an instance of a mesh exporter and register it to the GeometryServer. + A MeshExporter is a class that takes care to additionally register/export + meshes registered at the GeometryServer at another class (potentially + external to spark). This has to be done only when spark/kerosin + rendering alone is not enough. + \param name name of the MeshExporter class name + \returns true if successful + */ + bool InitMeshExporter(const std::string& name); + protected: /** registers the standard mesh importer */ |