You can subscribe to this list here.
2002 |
Jan
(2) |
Feb
(30) |
Mar
(17) |
Apr
(34) |
May
(25) |
Jun
(13) |
Jul
(20) |
Aug
(22) |
Sep
(39) |
Oct
(8) |
Nov
(20) |
Dec
(27) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(43) |
Feb
(18) |
Mar
(6) |
Apr
(78) |
May
(27) |
Jun
(23) |
Jul
(31) |
Aug
(14) |
Sep
(49) |
Oct
(2) |
Nov
(2) |
Dec
(38) |
2004 |
Jan
(52) |
Feb
(7) |
Mar
(15) |
Apr
(46) |
May
(27) |
Jun
(42) |
Jul
(31) |
Aug
(16) |
Sep
(42) |
Oct
(69) |
Nov
(75) |
Dec
(26) |
2005 |
Jan
(18) |
Feb
(18) |
Mar
(13) |
Apr
(3) |
May
(3) |
Jun
(6) |
Jul
(22) |
Aug
(6) |
Sep
(6) |
Oct
(24) |
Nov
(8) |
Dec
(23) |
2006 |
Jan
(24) |
Feb
(8) |
Mar
(16) |
Apr
|
May
(16) |
Jun
(9) |
Jul
|
Aug
(7) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(9) |
2007 |
Jan
(62) |
Feb
(16) |
Mar
(19) |
Apr
(17) |
May
(15) |
Jun
(16) |
Jul
(16) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(8) |
Dec
(2) |
2008 |
Jan
(2) |
Feb
(6) |
Mar
(3) |
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(12) |
Oct
(7) |
Nov
(2) |
Dec
|
2009 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
|
From: Maël Hörz <ma...@us...> - 2008-09-14 16:36:30
|
Update of /cvsroot/synedit/SynEdit/Packages In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25402 Modified Files: Tag: Unicode_2004_08_31 .cvsignore Added Files: Tag: Unicode_2004_08_31 SynEdit_D2006.res SynEdit_D2009.res SynEdit_D7_TNT.res SynEdit_R2006.res SynEdit_R2009.res SynEdit_R7_TNT.res Log Message: Add res files Index: .cvsignore =================================================================== RCS file: /cvsroot/synedit/SynEdit/Packages/.cvsignore,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -u -d -r1.2.2.2 -r1.2.2.3 --- .cvsignore 18 Feb 2006 17:46:47 -0000 1.2.2.2 +++ .cvsignore 14 Sep 2008 16:36:27 -0000 1.2.2.3 @@ -4,7 +4,6 @@ *.bpl *.obj *.~* -*.res *.drc *.exe *.cfg --- NEW FILE: SynEdit_D2006.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SynEdit_D7_TNT.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SynEdit_R7_TNT.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SynEdit_R2006.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SynEdit_D2009.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SynEdit_R2009.res --- (This appears to be a binary file; contents omitted.) |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:31
|
Update of /cvsroot/synedit/SynEdit/Demos/SearchReplaceDemo In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/Demos/SearchReplaceDemo Modified Files: Tag: Unicode_2004_08_31 frmMain.pas Log Message: Changes for compatibility with Delphi 2009 Index: frmMain.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/SearchReplaceDemo/frmMain.pas,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -d -r1.5.2.1 -r1.5.2.2 --- frmMain.pas 10 Nov 2004 21:45:49 -0000 1.5.2.1 +++ frmMain.pas 14 Sep 2008 16:24:57 -0000 1.5.2.2 @@ -74,7 +74,7 @@ procedure actSearchReplaceExecute(Sender: TObject); procedure actSearchUpdate(Sender: TObject); procedure SynEditorReplaceText(Sender: TObject; const ASearch, - AReplace: WideString; Line, Column: Integer; + AReplace: UnicodeString; Line, Column: Integer; var Action: TSynReplaceAction); procedure actSearchReplaceUpdate(Sender: TObject); private @@ -249,7 +249,7 @@ end; procedure TSearchReplaceDemoForm.SynEditorReplaceText(Sender: TObject; - const ASearch, AReplace: WideString; Line, Column: Integer; + const ASearch, AReplace: UnicodeString; Line, Column: Integer; var Action: TSynReplaceAction); var APos: TPoint; |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:31
|
Update of /cvsroot/synedit/SynEdit/Demos/EditAppDemos In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/Demos/EditAppDemos Modified Files: Tag: Unicode_2004_08_31 frmEditor.dfm frmEditor.pas frmMainWorkbook.dfm Log Message: Changes for compatibility with Delphi 2009 Index: frmMainWorkbook.dfm =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/EditAppDemos/frmMainWorkbook.dfm,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- frmMainWorkbook.dfm 10 Nov 2004 21:30:21 -0000 1.1.2.2 +++ frmMainWorkbook.dfm 14 Sep 2008 16:24:57 -0000 1.1.2.3 @@ -1,16 +1,16 @@ -inherited WorkbookMainForm: TWorkbookMainForm - Caption = 'Workbook Edit Demo' - OldCreateOrder = True - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - object pctrlMain: TPageControl [0] - Left = 0 - Top = 0 - Width = 506 - Height = 273 - Align = alClient - TabOrder = 0 - TabStop = False - end -end +inherited WorkbookMainForm: TWorkbookMainForm + Caption = 'Workbook Edit Demo' + OldCreateOrder = True + OnCloseQuery = FormCloseQuery + PixelsPerInch = 96 + TextHeight = 13 + object pctrlMain: TPageControl [0] + Left = 0 + Top = 0 + Width = 506 + Height = 273 + Align = alClient + TabOrder = 0 + TabStop = False + end +end Index: frmEditor.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/EditAppDemos/frmEditor.pas,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -d -r1.5.2.1 -r1.5.2.2 --- frmEditor.pas 10 Nov 2004 21:30:21 -0000 1.5.2.1 +++ frmEditor.pas 14 Sep 2008 16:24:57 -0000 1.5.2.2 @@ -43,7 +43,7 @@ uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Menus, uEditAppIntfs, SynEdit, SynEditTypes, SynEditMiscProcs, - SynEditMiscClasses, SynEditSearch; + SynEditMiscClasses, SynEditSearch, SynUnicode; type TEditorKind = (ekBorderless, ekInTabsheet, ekMDIChild); @@ -73,7 +73,7 @@ procedure SynEditorEnter(Sender: TObject); procedure SynEditorExit(Sender: TObject); procedure SynEditorReplaceText(Sender: TObject; const ASearch, - AReplace: WideString; Line, Column: Integer; + AReplace: UnicodeString; Line, Column: Integer; var Action: TSynReplaceAction); procedure SynEditorStatusChange(Sender: TObject; Changes: TSynStatusChanges); @@ -673,7 +673,7 @@ end; procedure TEditorForm.SynEditorReplaceText(Sender: TObject; const ASearch, - AReplace: WideString; Line, Column: Integer; var Action: TSynReplaceAction); + AReplace: UnicodeString; Line, Column: Integer; var Action: TSynReplaceAction); var APos: TPoint; EditRect: TRect; Index: frmEditor.dfm =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/EditAppDemos/frmEditor.dfm,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -u -d -r1.5.2.2 -r1.5.2.3 --- frmEditor.dfm 10 Nov 2004 21:30:21 -0000 1.5.2.2 +++ frmEditor.dfm 14 Sep 2008 16:24:56 -0000 1.5.2.3 @@ -1,97 +1,97 @@ -object EditorForm: TEditorForm - Left = 338 - Top = 199 - Width = 470 - Height = 326 - ActiveControl = SynEditor - Caption = 'Editor' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnActivate = FormActivate - OnClose = FormClose - OnCloseQuery = FormCloseQuery - OnDestroy = FormDestroy - OnDeactivate = FormDeactivate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object SynEditor: TSynEdit - Left = 0 - Top = 0 - Width = 462 - Height = 292 - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Courier New' - Font.Style = [] - PopupMenu = pmnuEditor - TabOrder = 0 - OnEnter = SynEditorEnter - OnExit = SynEditorExit - Gutter.Font.Charset = DEFAULT_CHARSET - Gutter.Font.Color = clWindowText - Gutter.Font.Height = -11 - Gutter.Font.Name = 'Courier New' - Gutter.Font.Style = [] - SearchEngine = SynEditSearch1 - OnChange = SynEditorChange - OnReplaceText = SynEditorReplaceText - OnStatusChange = SynEditorStatusChange - RemovedKeystrokes = < - item - Command = ecDeleteLastChar - ShortCut = 8200 - end - item - Command = ecLineBreak - ShortCut = 8205 - end - item - Command = ecContextHelp - ShortCut = 112 - end> - AddedKeystrokes = <> - end - object pmnuEditor: TPopupMenu - Left = 92 - Top = 28 - object lmiEditUndo: TMenuItem - Action = CommandsDataModule.actEditUndo - end - object lmiEditRedo: TMenuItem - Action = CommandsDataModule.actEditRedo - end - object N2: TMenuItem - Caption = '-' - end - object lmiEditCut: TMenuItem - Action = CommandsDataModule.actEditCut - end - object lmiEditCopy: TMenuItem - Action = CommandsDataModule.actEditCopy - end - object lmiEditPaste: TMenuItem - Action = CommandsDataModule.actEditPaste - end - object lmiEditDelete: TMenuItem - Action = CommandsDataModule.actEditDelete - end - object N1: TMenuItem - Caption = '-' - end - object lmiEditSelectAll: TMenuItem - Action = CommandsDataModule.actEditSelectAll - end - end - object SynEditSearch1: TSynEditSearch - Left = 92 - Top = 64 - end -end +object EditorForm: TEditorForm + Left = 338 + Top = 199 + Width = 470 + Height = 326 + ActiveControl = SynEditor + Caption = 'Editor' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnActivate = FormActivate + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnDestroy = FormDestroy + OnDeactivate = FormDeactivate + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object SynEditor: TSynEdit + Left = 0 + Top = 0 + Width = 462 + Height = 292 + Align = alClient + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'Courier New' + Font.Style = [] + PopupMenu = pmnuEditor + TabOrder = 0 + OnEnter = SynEditorEnter + OnExit = SynEditorExit + Gutter.Font.Charset = DEFAULT_CHARSET + Gutter.Font.Color = clWindowText + Gutter.Font.Height = -11 + Gutter.Font.Name = 'Courier New' + Gutter.Font.Style = [] + SearchEngine = SynEditSearch1 + OnChange = SynEditorChange + OnReplaceText = SynEditorReplaceText + OnStatusChange = SynEditorStatusChange + RemovedKeystrokes = < + item + Command = ecDeleteLastChar + ShortCut = 8200 + end + item + Command = ecLineBreak + ShortCut = 8205 + end + item + Command = ecContextHelp + ShortCut = 112 + end> + AddedKeystrokes = <> + end + object pmnuEditor: TPopupMenu + Left = 92 + Top = 28 + object lmiEditUndo: TMenuItem + Action = CommandsDataModule.actEditUndo + end + object lmiEditRedo: TMenuItem + Action = CommandsDataModule.actEditRedo + end + object N2: TMenuItem + Caption = '-' + end + object lmiEditCut: TMenuItem + Action = CommandsDataModule.actEditCut + end + object lmiEditCopy: TMenuItem + Action = CommandsDataModule.actEditCopy + end + object lmiEditPaste: TMenuItem + Action = CommandsDataModule.actEditPaste + end + object lmiEditDelete: TMenuItem + Action = CommandsDataModule.actEditDelete + end + object N1: TMenuItem + Caption = '-' + end + object lmiEditSelectAll: TMenuItem + Action = CommandsDataModule.actEditSelectAll + end + end + object SynEditSearch1: TSynEditSearch + Left = 92 + Top = 64 + end +end |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:31
|
Update of /cvsroot/synedit/SynEdit/Demos/HighlighterDemo In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/Demos/HighlighterDemo Modified Files: Tag: Unicode_2004_08_31 SynHighlighterSample.pas Log Message: Changes for compatibility with Delphi 2009 Index: SynHighlighterSample.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/HighlighterDemo/SynHighlighterSample.pas,v retrieving revision 1.6.2.10 retrieving revision 1.6.2.11 diff -u -d -r1.6.2.10 -r1.6.2.11 --- SynHighlighterSample.pas 12 Dec 2006 07:22:29 -0000 1.6.2.10 +++ SynHighlighterSample.pas 14 Sep 2008 16:24:57 -0000 1.6.2.11 @@ -105,18 +105,18 @@ procedure StringOpenProc; procedure StringProc; protected - function GetSampleSource: WideString; override; + function GetSampleSource: UnicodeString; override; function IsFilterStored: Boolean; override; public constructor Create(AOwner: TComponent); override; - class function GetFriendlyLanguageName: WideString; override; + class function GetFriendlyLanguageName: UnicodeString; override; class function GetLanguageName: string; override; function GetRange: Pointer; override; procedure ResetRange; override; procedure SetRange(Value: Pointer); override; function GetDefaultAttribute(Index: Integer): TSynHighlighterAttributes; override; function GetEol: Boolean; override; - function GetKeyWords(TokenKind: Integer): WideString; override; + function GetKeyWords(TokenKind: Integer): UnicodeString; override; function GetTokenID: TtkTokenKind; function GetTokenAttribute: TSynHighlighterAttributes; override; function GetTokenKind: Integer; override; @@ -149,7 +149,7 @@ const // as this language is case-insensitive keywords *must* be in lowercase - KeyWords: array[0..2] of WideString = ( + KeyWords: array[0..2] of UnicodeString = ( 'hello', 'synedit', 'world' ); @@ -433,7 +433,7 @@ Result := Run = fLineLen + 1; end; -function TSynSampleSyn.GetKeyWords(TokenKind: Integer): WideString; +function TSynSampleSyn.GetKeyWords(TokenKind: Integer): UnicodeString; begin Result := 'Hello,SynEdit,World'; @@ -474,7 +474,7 @@ end; end; -function TSynSampleSyn.GetSampleSource: WideString; +function TSynSampleSyn.GetSampleSource: UnicodeString; begin Result := '{ Sample source for the demo highlighter }'#13#10 + @@ -491,7 +491,7 @@ Result := fDefaultFilter <> SYNS_FilterTest; end; -class function TSynSampleSyn.GetFriendlyLanguageName: WideString; +class function TSynSampleSyn.GetFriendlyLanguageName: UnicodeString; begin Result := SYNS_FriendlyLangTest; end; |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:30
|
Update of /cvsroot/synedit/SynEdit/Packages In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/Packages Modified Files: Tag: Unicode_2004_08_31 SynEdit_R2006.dpk Added Files: Tag: Unicode_2004_08_31 SynEdit_D2009.dpk SynEdit_D2009.dproj SynEdit_R2009.dpk SynEdit_R2009.dproj Log Message: Changes for compatibility with Delphi 2009 Index: SynEdit_R2006.dpk =================================================================== RCS file: /cvsroot/synedit/SynEdit/Packages/SynEdit_R2006.dpk,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- SynEdit_R2006.dpk 18 Feb 2006 17:50:26 -0000 1.1.2.2 +++ SynEdit_R2006.dpk 14 Sep 2008 16:24:57 -0000 1.1.2.3 @@ -129,6 +129,7 @@ SynHighlighterDOT in '..\Source\SynHighlighterDOT.pas', SynHighlighterVrml97 in '..\Source\SynHighlighterVrml97.pas', SynHighlighterEiffel in '..\Source\SynHighlighterEiffel.pas', - SynUnicode in '..\Source\SynUnicode.pas'; + SynUnicode in '..\Source\SynUnicode.pas', + SynUsp10 in '..\Source\SynUsp10.pas'; end. --- NEW FILE: SynEdit_D2009.dproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SynEdit_R2009.dpk --- package SynEdit_R2009; {$R *.res} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$DESCRIPTION 'SynEdit component suite runtime'} {$RUNONLY} {$IMPLICITBUILD OFF} requires vcl, vcldb, vclx, rtl; contains SynTextDrawer in '..\Source\SynTextDrawer.pas', SynAutoCorrect in '..\Source\SynAutoCorrect.pas', SynAutoCorrectEditor in '..\Source\SynAutoCorrectEditor.pas' {frmAutoCorrectEditor}, SynCompletionProposal in '..\Source\SynCompletionProposal.pas', SynDBEdit in '..\Source\SynDBEdit.pas', SynEdit in '..\Source\SynEdit.pas', SynEditAutoComplete in '..\Source\SynEditAutoComplete.pas', SynEditExport in '..\Source\SynEditExport.pas', SynEditHighlighter in '..\Source\SynEditHighlighter.pas', SynEditKbdHandler in '..\Source\SynEditKbdHandler.pas', SynEditKeyCmdEditor in '..\Source\SynEditKeyCmdEditor.pas' {SynEditKeystrokeEditorForm}, SynEditKeyCmds in '..\Source\SynEditKeyCmds.pas', SynEditKeyCmdsEditor in '..\Source\SynEditKeyCmdsEditor.pas' {SynEditKeystrokesEditorForm}, SynEditKeyConst in '..\Source\SynEditKeyConst.pas', SynEditMiscClasses in '..\Source\SynEditMiscClasses.pas', SynEditMiscProcs in '..\Source\SynEditMiscProcs.pas', SynEditOptionsDialog in '..\Source\SynEditOptionsDialog.pas' {fmEditorOptionsDialog}, SynEditPlugins in '..\Source\SynEditPlugins.pas', SynEditWordWrap in '..\Source\SynEditWordWrap.pas', SynEditPrint in '..\Source\SynEditPrint.pas', SynEditPrinterInfo in '..\Source\SynEditPrinterInfo.pas', SynEditPrintHeaderFooter in '..\Source\SynEditPrintHeaderFooter.pas', SynEditPrintMargins in '..\Source\SynEditPrintMargins.pas', SynEditPrintMarginsDialog in '..\Source\SynEditPrintMarginsDialog.pas' {SynEditPrintMarginsDlg}, SynEditPrintPreview in '..\Source\SynEditPrintPreview.pas', SynEditPrintTypes in '..\Source\SynEditPrintTypes.pas', SynEditPythonBehaviour in '..\Source\SynEditPythonBehaviour.pas', SynEditRegexSearch in '..\Source\SynEditRegexSearch.pas', SynEditSearch in '..\Source\SynEditSearch.pas', SynEditStrConst in '..\Source\SynEditStrConst.pas', SynEditTextBuffer in '..\Source\SynEditTextBuffer.pas', SynEditTypes in '..\Source\SynEditTypes.pas', SynExportHTML in '..\Source\SynExportHTML.pas', SynExportRTF in '..\Source\SynExportRTF.pas', SynExportTeX in '..\Source\SynExportTeX.pas', SynHighlighterADSP21xx in '..\Source\SynHighlighterADSP21xx.pas', SynHighlighterAsm in '..\Source\SynHighlighterAsm.pas', SynHighlighterAWK in '..\Source\SynHighlighterAWK.pas', SynHighlighterBaan in '..\Source\SynHighlighterBaan.pas', SynHighlighterBat in '..\Source\SynHighlighterBat.pas', SynHighlighterCAC in '..\Source\SynHighlighterCAC.pas', SynHighlighterCache in '..\Source\SynHighlighterCache.pas', SynHighlighterCobol in '..\Source\SynHighlighterCobol.pas', SynHighlighterCPM in '..\Source\SynHighlighterCPM.pas', SynHighlighterCpp in '..\Source\SynHighlighterCpp.pas', SynHighlighterCS in '..\Source\SynHighlighterCS.pas', SynHighlighterDfm in '..\Source\SynHighlighterDfm.pas', SynHighlighterDml in '..\Source\SynHighlighterDml.pas', SynHighlighterFortran in '..\Source\SynHighlighterFortran.pas', SynHighlighterFoxpro in '..\Source\SynHighlighterFoxpro.pas', SynHighlighterGalaxy in '..\Source\SynHighlighterGalaxy.pas', SynHighlighterGeneral in '..\Source\SynHighlighterGeneral.pas', SynHighlighterGWS in '..\Source\SynHighlighterGWS.pas', SynHighlighterHashEntries in '..\Source\SynHighlighterHashEntries.pas', SynHighlighterHaskell in '..\Source\SynHighlighterHaskell.pas', SynHighlighterHC11 in '..\Source\SynHighlighterHC11.pas', SynHighlighterHP48 in '..\Source\SynHighlighterHP48.pas', SynHighlighterHtml in '..\Source\SynHighlighterHtml.pas', SynHighlighterIDL in '..\Source\SynHighlighterIDL.pas', SynHighlighterIni in '..\Source\SynHighlighterIni.pas', SynHighlighterInno in '..\Source\SynHighlighterInno.pas', SynHighlighterJava in '..\Source\SynHighlighterJava.pas', SynHighlighterJScript in '..\Source\SynHighlighterJScript.pas', SynHighlighterKix in '..\Source\SynHighlighterKix.pas', SynHighlighterM3 in '..\Source\SynHighlighterM3.pas', SynHighlighterModelica in '..\Source\SynHighlighterModelica.pas', SynHighlighterMsg in '..\Source\SynHighlighterMsg.pas', SynHighlighterMulti in '..\Source\SynHighlighterMulti.pas', SynHighlighterPas in '..\Source\SynHighlighterPas.pas', SynHighlighterPerl in '..\Source\SynHighlighterPerl.pas', SynHighlighterPHP in '..\Source\SynHighlighterPHP.pas', SynHighlighterProgress in '..\Source\SynHighlighterProgress.pas', SynHighlighterPython in '..\Source\SynHighlighterPython.pas', SynHighlighterRC in '..\Source\SynHighlighterRC.pas', SynHighlighterRuby in '..\Source\SynHighlighterRuby.pas', SynHighlighterSDD in '..\Source\SynHighlighterSDD.pas', SynHighlighterSml in '..\Source\SynHighlighterSml.pas', SynHighlighterSQL in '..\Source\SynHighlighterSQL.pas', SynHighlighterST in '..\Source\SynHighlighterST.pas', SynHighlighterTclTk in '..\Source\SynHighlighterTclTk.pas', SynHighlighterTeX in '..\Source\SynHighlighterTeX.pas', SynHighlighterUNIXShellScript in '..\Source\SynHighlighterUNIXShellScript.pas', SynHighlighterUnreal in '..\Source\SynHighlighterUnreal.pas', SynHighlighterVB in '..\Source\SynHighlighterVB.pas', SynHighlighterVBScript in '..\Source\SynHighlighterVBScript.pas', SynHighlighterXML in '..\Source\SynHighlighterXML.pas', SynMacroRecorder in '..\Source\SynMacroRecorder.pas', SynMemo in '..\Source\SynMemo.pas', SynRegExpr in '..\Source\SynRegExpr.pas', SynHighlighterCss in '..\Source\SynHighlighterCss.pas', SynHighlighterLDraw in '..\Source\SynHighlighterLDraw.pas', SynHighlighterURI in '..\Source\SynHighlighterURI.pas', SynURIOpener in '..\Source\SynURIOpener.pas', SynHighlighterDOT in '..\Source\SynHighlighterDOT.pas', SynHighlighterVrml97 in '..\Source\SynHighlighterVrml97.pas', SynHighlighterEiffel in '..\Source\SynHighlighterEiffel.pas', SynUnicode in '..\Source\SynUnicode.pas', SynUsp10 in '..\Source\SynUsp10.pas'; end. --- NEW FILE: SynEdit_D2009.dpk --- package SynEdit_D2009; {$R *.res} {$R '..\Source\SynEditReg.dcr'} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$DESCRIPTION 'SynEdit component suite'} {$DESIGNONLY} {$IMPLICITBUILD ON} requires designide, SynEdit_R2006; contains SynEditReg in '..\Source\SynEditReg.pas', SynEditPropertyReg in '..\Source\SynEditPropertyReg.pas', SynHighlighterManager in '..\Source\SynHighlighterManager.pas'; end. --- NEW FILE: SynEdit_R2009.dproj --- (This appears to be a binary file; contents omitted.) |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:30
|
Update of /cvsroot/synedit/SynEdit/Demos/D4Demo In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/Demos/D4Demo Modified Files: Tag: Unicode_2004_08_31 EditU2.pas Log Message: Changes for compatibility with Delphi 2009 Index: EditU2.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/D4Demo/EditU2.pas,v retrieving revision 1.11.2.2 retrieving revision 1.11.2.3 diff -u -d -r1.11.2.2 -r1.11.2.3 --- EditU2.pas 19 Mar 2005 13:32:12 -0000 1.11.2.2 +++ EditU2.pas 14 Sep 2008 16:24:56 -0000 1.11.2.3 @@ -322,7 +322,7 @@ procedure SynEditorDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); procedure SynEditorDropFiles(Sender: TObject; X, Y: Integer; - AFiles: TWideStrings); + AFiles: TUnicodeStrings); procedure SynEditorEnter(Sender: TObject); procedure SynEditorExit(Sender: TObject); procedure SynEditorKeyDown(Sender: TObject; var Key: Word; @@ -345,7 +345,7 @@ procedure SynEditorProcessUserCommand(Sender: TObject; var Command: TSynEditorCommand; var AChar: WideChar; Data: Pointer); procedure SynEditorReplaceText(Sender: TObject; const ASearch, - AReplace: WideString; Line, Column: Integer; + AReplace: UnicodeString; Line, Column: Integer; var Action: TSynReplaceAction); procedure SynEditorStartDrag(Sender: TObject; var DragObject: TDragObject); @@ -378,7 +378,7 @@ procedure DoReplaceText(Sender: TObject); procedure btnExportToFileClick(Sender: TObject); procedure btnExportToClipboardClick(Sender: TObject); - procedure SynEditorContextHelp(Sender: TObject; word: WideString); + procedure SynEditorContextHelp(Sender: TObject; word: UnicodeString); procedure cbShrinkListClick(Sender: TObject); procedure cbCompletionAttrChange(Sender: TObject); procedure cbxCompletionColorChange(Sender: TObject); @@ -1044,7 +1044,7 @@ end; procedure TDemoMainForm.SynEditorDropFiles(Sender: TObject; X, Y: Integer; - AFiles: TWideStrings); + AFiles: TUnicodeStrings); begin if cbOther.Checked then LogEvent('OnDropFiles'); @@ -1142,7 +1142,7 @@ end; procedure TDemoMainForm.SynEditorReplaceText(Sender: TObject; - const ASearch, AReplace: WideString; Line, Column: Integer; + const ASearch, AReplace: UnicodeString; Line, Column: Integer; var Action: TSynReplaceAction); begin if cbOther.Checked then @@ -1163,7 +1163,7 @@ InsertModeStrs: array[boolean] of string = ('Overwrite', 'Insert'); var p: TBufferCoord; - Token: WideString; + Token: UnicodeString; Attri: TSynHighlighterAttributes; begin // Note: scAll for new file loaded @@ -1616,7 +1616,7 @@ end; end; -procedure TDemoMainForm.SynEditorContextHelp(Sender: TObject; word: WideString); +procedure TDemoMainForm.SynEditorContextHelp(Sender: TObject; word: UnicodeString); var hlpmsg : array[0..255] of char; begin |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:30
|
Update of /cvsroot/synedit/SynEdit/Demos/pas2html In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/Demos/pas2html Modified Files: Tag: Unicode_2004_08_31 pas2html.dpr Log Message: Changes for compatibility with Delphi 2009 Index: pas2html.dpr =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/pas2html/pas2html.dpr,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -d -r1.2.2.1 -r1.2.2.2 --- pas2html.dpr 10 Nov 2004 21:54:34 -0000 1.2.2.1 +++ pas2html.dpr 14 Sep 2008 16:24:57 -0000 1.2.2.2 @@ -53,7 +53,7 @@ var SettingsLines: TStrings; - TextLines: TWideStringList; + TextLines: TUnicodeStringList; Syn: TSynPasSyn; Exp: TSynExporterHTML; begin @@ -71,7 +71,7 @@ SettingsLines.Free; end; - TextLines := TWideStringList.Create; + TextLines := TUnicodeStringList.Create; try // load text from clipboard TextLines.Text := GetClipboardText; |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:30
|
Update of /cvsroot/synedit/SynEdit/Demos/OnPaintTransientDemo In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/Demos/OnPaintTransientDemo Modified Files: Tag: Unicode_2004_08_31 Unit1.pas Log Message: Changes for compatibility with Delphi 2009 Index: Unit1.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/OnPaintTransientDemo/Unit1.pas,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -d -r1.5.2.1 -r1.5.2.2 --- Unit1.pas 10 Nov 2004 21:38:16 -0000 1.5.2.1 +++ Unit1.pas 14 Sep 2008 16:24:57 -0000 1.5.2.2 @@ -60,7 +60,7 @@ var P: TBufferCoord; Pix: TPoint; D : TDisplayCoord; - S: WideString; + S: UnicodeString; I: Integer; Attri: TSynHighlighterAttributes; ArrayLength: Integer; |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:29
|
Update of /cvsroot/synedit/SynEdit/Demos/CompletionProposalDemo In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/Demos/CompletionProposalDemo Modified Files: Tag: Unicode_2004_08_31 FormMain_ctParams.pas Log Message: Changes for compatibility with Delphi 2009 Index: FormMain_ctParams.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Demos/CompletionProposalDemo/FormMain_ctParams.pas,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -u -d -r1.4.2.1 -r1.4.2.2 --- FormMain_ctParams.pas 10 Nov 2004 21:23:40 -0000 1.4.2.1 +++ FormMain_ctParams.pas 14 Sep 2008 16:24:56 -0000 1.4.2.2 @@ -14,7 +14,7 @@ scpParams: TSynCompletionProposal; FontDialog1: TFontDialog; procedure scpParamsExecute(Kind: SynCompletionType; Sender: TObject; - var AString: WideString; var x, y: Integer; var CanExecute: Boolean); + var AString: UnicodeString; var x, y: Integer; var CanExecute: Boolean); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure FormShow(Sender: TObject); @@ -36,8 +36,8 @@ {$R *.DFM} procedure TForm1.scpParamsExecute(Kind: SynCompletionType; Sender: TObject; - var AString: WideString; var x, y: Integer; var CanExecute: Boolean); -var locline, lookup: WideString; + var AString: UnicodeString; var x, y: Integer; var CanExecute: Boolean); +var locline, lookup: UnicodeString; TmpX, savepos, StartX, ParenCounter, TmpLocation : Integer; |
From: Maël Hörz <ma...@us...> - 2008-09-14 16:27:20
|
Update of /cvsroot/synedit/SynEdit/SynGen In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19785/SynGen Modified Files: Tag: Unicode_2004_08_31 HashTableGen.pas SynGenUnit.pas Log Message: Changes for compatibility with Delphi 2009 Index: HashTableGen.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/SynGen/Attic/HashTableGen.pas,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -d -r1.1.2.4 -r1.1.2.5 --- HashTableGen.pas 12 Jan 2005 17:11:26 -0000 1.1.2.4 +++ HashTableGen.pas 14 Sep 2008 16:27:16 -0000 1.1.2.5 @@ -69,11 +69,11 @@ c, d, m: Cardinal; FinalC, FinalD, FinalM: Cardinal; searching: Boolean; - KeyWords: array of WideString; + KeyWords: array of UnicodeString; HashKeyList: THashKeyList; {$Q-} -function HashKey(const S: WideString): Cardinal; +function HashKey(const S: UnicodeString): Cardinal; var i: Integer; begin @@ -85,7 +85,7 @@ {$Q+} {$Q-} -function FinalHashKey(const S: WideString): Cardinal; +function FinalHashKey(const S: UnicodeString): Cardinal; var i: Integer; begin @@ -341,7 +341,7 @@ // write KeyWords if not CaseSensitive then Result := Result + ' // as this language is case-insensitive keywords *must* be in lowercase'#13#10; - Result := Result + Format(' KeyWords: array[0..%d] of WideString = (', [High(KeyWords)]) + #13#10; + Result := Result + Format(' KeyWords: array[0..%d] of UnicodeString = (', [High(KeyWords)]) + #13#10; sl := TStringList.Create; try for i := Low(KeyWords) to High(KeyWords) do Index: SynGenUnit.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/SynGen/SynGenUnit.pas,v retrieving revision 1.18.2.8 retrieving revision 1.18.2.9 diff -u -d -r1.18.2.8 -r1.18.2.9 --- SynGenUnit.pas 12 Dec 2006 07:42:36 -0000 1.18.2.8 +++ SynGenUnit.pas 14 Sep 2008 16:27:16 -0000 1.18.2.9 @@ -238,7 +238,7 @@ end; end; -function FirstLetterCap(S: WideString): WideString; +function FirstLetterCap(S: UnicodeString): UnicodeString; begin Result := SynWideLowerCase(S); if Length(Result) > 0 then @@ -252,7 +252,7 @@ end; {$ENDIF} -function ToAlphaNum(S: WideString): AnsiString; +function ToAlphaNum(S: UnicodeString): AnsiString; var c: AnsiChar; begin @@ -270,7 +270,7 @@ Result := AnsiReplaceStr(Result, c, IntToStr(Ord(c))); end; -function IsASCIIAlphaNum(S: WideString): Boolean; +function IsASCIIAlphaNum(S: UnicodeString): Boolean; var i: Integer; begin @@ -1209,11 +1209,11 @@ + 'Proc;'); end; Writeln(OutFile, ' protected'); - Writeln(OutFile, ' function GetSampleSource: WideString; override;'); + Writeln(OutFile, ' function GetSampleSource: UnicodeString; override;'); Writeln(OutFile, ' function IsFilterStored: Boolean; override;'); Writeln(OutFile, ' public'); Writeln(OutFile, ' constructor Create(AOwner: TComponent); override;'); - Writeln(OutFile, ' class function GetFriendlyLanguageName: WideString; override;'); + Writeln(OutFile, ' class function GetFriendlyLanguageName: UnicodeString; override;'); Writeln(OutFile, ' class function GetLanguageName: string; override;'); Writeln(OutFile, ' function GetRange: Pointer; override;'); Writeln(OutFile, ' procedure ResetRange; override;'); @@ -1222,7 +1222,7 @@ ' function GetDefaultAttribute(Index: Integer): TSynHighlighterAttributes; override;'); Writeln(OutFile, ' function GetEol: Boolean; override;'); if ChkGetKeyWords.Checked then - Writeln(OutFile, ' function GetKeyWords(TokenKind: Integer): WideString; override;'); + Writeln(OutFile, ' function GetKeyWords(TokenKind: Integer): UnicodeString; override;'); Writeln(OutFile, ' function GetTokenID: TtkTokenKind;'); Writeln(OutFile, ' function GetTokenAttribute: TSynHighlighterAttributes; override;'); @@ -1695,7 +1695,7 @@ if ChkGetKeyWords.Checked then begin - Writeln(OutFile, 'function ' + LexName + '.GetKeyWords(TokenKind: Integer): WideString;'); + Writeln(OutFile, 'function ' + LexName + '.GetKeyWords(TokenKind: Integer): UnicodeString;'); Writeln(OutFile, 'begin'); TempStringList := TStringList.Create; try @@ -1774,7 +1774,7 @@ Writeln(OutFile, 'end;'); Writeln(OutFile); - Writeln(OutFile, 'function ' + LexName + '.GetSampleSource: WideString;'); + Writeln(OutFile, 'function ' + LexName + '.GetSampleSource: UnicodeString;'); Writeln(OutFile, 'begin'); if (SampleSourceList.Count = 0) then begin @@ -1805,7 +1805,7 @@ Writeln(OutFile, 'end;'); Writeln(OutFile); - Writeln(OutFile, 'class function ' + LexName + '.GetFriendlyLanguageName: WideString;'); + Writeln(OutFile, 'class function ' + LexName + '.GetFriendlyLanguageName: UnicodeString;'); Writeln(OutFile, 'begin'); Writeln(OutFile, ' Result := ' + GetFriendlyLangName + ';'); Writeln(OutFile, 'end;'); |
From: Flávio E. <et...@us...> - 2008-06-05 23:16:31
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1110 Modified Files: Tag: SynEdit_2_0_x SynEdit.pas Log Message: FIX: [1882917] Memory leak in SynEdit.DoBlockUnindent(). Index: SynEdit.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.pas,v retrieving revision 1.457.2.16 retrieving revision 1.457.2.17 diff -u -d -r1.457.2.16 -r1.457.2.17 --- SynEdit.pas 5 Jun 2008 23:12:32 -0000 1.457.2.16 +++ SynEdit.pas 5 Jun 2008 23:16:27 -0000 1.457.2.17 @@ -9079,6 +9079,8 @@ Inc(Result); end; +var + v_StrToDeleteBuffer: String; begin OrgSelectionMode := fActiveSelectionMode; Len := 0; @@ -9100,7 +9102,8 @@ // build string to delete StrToDeleteLen := (FTabWidth + 2) * (e - BB.Line) + FTabWidth + 1; // chars per line * lines-1 + last line + null char - StrToDelete := StrAlloc(StrToDeleteLen); + SetLength(v_StrToDeleteBuffer, StrToDeleteLen); + StrToDelete := PChar(v_StrToDeleteBuffer); StrToDelete[0] := #0; SomethingToDelete := False; for i := BB.Line to e-1 do |
From: Flávio E. <et...@us...> - 2008-06-05 23:13:33
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32416 Modified Files: Tag: UtterUnstable SynEdit.pas Log Message: - Fix compilation (fInvalidRect vs fInvalidateRect). - Somewhat silly optimization: avoid unecessary canvas invalidation in SetTopLine. - Keep caret position after SelectAll. Index: SynEdit.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.pas,v retrieving revision 1.389.2.100 retrieving revision 1.389.2.101 diff -u -d -r1.389.2.100 -r1.389.2.101 --- SynEdit.pas 13 Feb 2008 04:50:34 -0000 1.389.2.100 +++ SynEdit.pas 5 Jun 2008 23:13:30 -0000 1.389.2.101 @@ -41,7 +41,7 @@ //todo: Move WordWrap glyph to the WordWrap plugin. //todo: remove the several Undo block types //todo: always use TSynTextContainer? -//todo: check whether fInvalidateRect is really a performence gain +//todo: check whether fInvalidRect is really a performence gain {$IFNDEF QSYNEDIT} unit SynEdit; @@ -3037,7 +3037,7 @@ Inc( LastPt.Char, Length(Lines[LastPt.Line - 1]) ) else LastPt.Line := 1; - SetCaretAndSelection(LastPt, BufferCoord(1, 1), LastPt); + SetCaretAndSelection(CaretXY, BufferCoord(1, 1), LastPt); // Selection should have changed... StatusChanged([scSelection]); end; @@ -3781,7 +3781,9 @@ if Abs(Delta) < LinesInWindow then begin ScrollCanvas(0, fLineHeight * Delta, 0, 0); - OffsetRect(fInvalidateRect, 0, fLineHeight * Delta); + OffsetRect(fInvalidRect, 0, fLineHeight * Delta); + // Somewhat silly optimization: avoid unecessary invalidation + IntersectRect(fInvalidRect, fInvalidRect, ClientRect); end else Invalidate; |
From: Flávio E. <et...@us...> - 2008-06-05 23:12:36
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32034 Modified Files: Tag: SynEdit_2_0_x SynEdit.pas Log Message: Somewhat silly optimization: avoid unecessary canvas invalidation in SetTopLine. Index: SynEdit.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.pas,v retrieving revision 1.457.2.15 retrieving revision 1.457.2.16 diff -u -d -r1.457.2.15 -r1.457.2.16 --- SynEdit.pas 13 Feb 2008 04:29:11 -0000 1.457.2.15 +++ SynEdit.pas 5 Jun 2008 23:12:32 -0000 1.457.2.16 @@ -4409,6 +4409,7 @@ ScrollWindow(Handle, 0, fTextHeight * Delta, nil, nil); {$ENDIF} OffsetRect(fInvalidateRect, 0, fTextHeight * Delta); + IntersectRect(fInvalidateRect, fInvalidateRect, ClientRect); end else Invalidate; |
From: Flávio E. <et...@us...> - 2008-06-05 23:03:49
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28542 Modified Files: Tag: UtterUnstable SynEditBasicActions.pas Log Message: FIX: [1882917] Memory leak in SynEdit.DoBlockUnindent(). Index: SynEditBasicActions.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/Attic/SynEditBasicActions.pas,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -d -r1.1.2.11 -r1.1.2.12 --- SynEditBasicActions.pas 4 Oct 2007 04:14:23 -0000 1.1.2.11 +++ SynEditBasicActions.pas 5 Jun 2008 23:03:44 -0000 1.1.2.12 @@ -158,6 +158,7 @@ OrgSelectionMode : TSynSelectionMode; SomethingToDelete : Boolean; c_Line: Integer; + v_StrDeleteBuffer: String; begin OrgSelectionMode := ActiveSelectionMode; Len := 0; @@ -177,7 +178,8 @@ // build string to delete // chars per line * lines-1 + last line + null char StrToDeleteLen := (TabWidth + 2) * (e - BB.Line) + TabWidth + 1; - StrToDelete := StrAlloc(StrToDeleteLen); + SetLength(v_StrDeleteBuffer, StrToDeleteLen); + StrToDelete := PChar(v_StrDeleteBuffer); StrToDelete[0] := #0; SomethingToDelete := False; for i := BB.Line to e-1 do |
From: Maël Hörz <ma...@us...> - 2008-03-13 16:31:57
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15512 Modified Files: Tag: Unicode_2004_08_31 SynTextDrawer.pas SynUnicode.pas Log Message: - Add SSA_LINK flag to SSAnalyseFlags to fix text rendering issues in Vista. Index: SynUnicode.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/Attic/SynUnicode.pas,v retrieving revision 1.1.2.37 retrieving revision 1.1.2.38 diff -u -d -r1.1.2.37 -r1.1.2.38 --- SynUnicode.pas 1 Mar 2008 18:32:02 -0000 1.1.2.37 +++ SynUnicode.pas 13 Mar 2008 16:31:41 -0000 1.1.2.38 @@ -2272,7 +2272,7 @@ function GetTextSize(DC: HDC; Str: PWideChar; Count: Integer): TSize; const - SSAnalyseFlags = SSA_GLYPHS or SSA_FALLBACK; + SSAnalyseFlags = SSA_GLYPHS or SSA_FALLBACK or SSA_LINK; var tm: TTextMetricA; GlyphBufferSize: Integer; Index: SynTextDrawer.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynTextDrawer.pas,v retrieving revision 1.6.2.14 retrieving revision 1.6.2.15 diff -u -d -r1.6.2.14 -r1.6.2.15 --- SynTextDrawer.pas 2 Feb 2008 19:13:53 -0000 1.6.2.14 +++ SynTextDrawer.pas 13 Mar 2008 16:31:41 -0000 1.6.2.15 @@ -278,7 +278,7 @@ function UniversalExtTextOut(DC: HDC; X, Y: Integer; Options: TTextOutOptions; Rect: TRect; Str: PWideChar; Count: Integer; ETODist: PIntegerArray): Boolean; const - SSAnalyseFlags = SSA_GLYPHS or SSA_FALLBACK; + SSAnalyseFlags = SSA_GLYPHS or SSA_FALLBACK or SSA_LINK; SpaceString: WideString = ' '; var TextOutFlags: DWORD; @@ -306,7 +306,10 @@ Count := 1; end else + begin + Result := False; Exit; + end; // According to the MS Windows SDK (1.5 * Count + 16) is the recommended // value for GlyphBufferSize (see documentation of cGlyphs parameter of |
From: Maël Hörz <ma...@us...> - 2008-03-01 18:32:34
|
Update of /cvsroot/synedit/SynEdit/Packages In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19659/Packages Modified Files: Tag: Unicode_2004_08_31 SynEdit_R7_TNT.dpk Log Message: - Fix a drawing bug caused by text measurement (#9 was assigned width=0 when using USP but other WinAPIs return the average character width) - Use friendly language names in the highlighter manager Index: SynEdit_R7_TNT.dpk =================================================================== RCS file: /cvsroot/synedit/SynEdit/Packages/Attic/SynEdit_R7_TNT.dpk,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- SynEdit_R7_TNT.dpk 18 Dec 2005 19:19:26 -0000 1.1.2.1 +++ SynEdit_R7_TNT.dpk 1 Mar 2008 18:31:59 -0000 1.1.2.2 @@ -31,7 +31,8 @@ vcl, vcldb, vclx, - TntUnicodeVcl_R70; + TntUnicodeVcl_R70, + rtl; contains SynTextDrawer in '..\Source\SynTextDrawer.pas', @@ -130,6 +131,7 @@ SynURIOpener in '..\Source\SynURIOpener.pas', SynHighlighterDOT in '..\Source\SynHighlighterDOT.pas', SynHighlighterVrml97 in '..\Source\SynHighlighterVrml97.pas', - SynHighlighterEiffel in '..\Source\SynHighlighterEiffel.pas'; + SynHighlighterEiffel in '..\Source\SynHighlighterEiffel.pas', + SynUsp10 in '..\Source\SynUsp10.pas'; end. |
From: Maël Hörz <ma...@us...> - 2008-03-01 18:32:08
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19659/Source Modified Files: Tag: Unicode_2004_08_31 SynEdit.pas SynEditHighlighter.pas SynHighlighterManager.pas SynUnicode.pas Log Message: - Fix a drawing bug caused by text measurement (#9 was assigned width=0 when using USP but other WinAPIs return the average character width) - Use friendly language names in the highlighter manager Index: SynEdit.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.pas,v retrieving revision 1.386.2.72 retrieving revision 1.386.2.73 diff -u -d -r1.386.2.72 -r1.386.2.73 --- SynEdit.pas 30 Jan 2008 20:41:59 -0000 1.386.2.72 +++ SynEdit.pas 1 Mar 2008 18:31:59 -0000 1.386.2.73 @@ -3706,7 +3706,7 @@ try {$IFNDEF SYN_CLX} // Check for our special format and read PasteMode. - // The text is ignored as it is ANSI-only to keep compatible with programs + // The text is ignored as it is ANSI-only to stay compatible with programs // using the ANSI version of SynEdit. // // Instead we take the text stored in CF_UNICODETEXT or CF_TEXT. Index: SynEditHighlighter.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEditHighlighter.pas,v retrieving revision 1.36.2.16 retrieving revision 1.36.2.17 diff -u -d -r1.36.2.16 -r1.36.2.17 --- SynEditHighlighter.pas 24 Dec 2007 13:59:57 -0000 1.36.2.16 +++ SynEditHighlighter.pas 1 Mar 2008 18:32:02 -0000 1.36.2.17 @@ -248,6 +248,7 @@ constructor Create; destructor Destroy; override; function Count: Integer; + function FindByFriendlyName(FriendlyName: string): Integer; function FindByName(Name: string): Integer; function FindByClass(Comp: TComponent): Integer; property Items[Index: Integer]: TSynCustomHighlighterClass @@ -305,6 +306,21 @@ end; end; +function TSynHighlighterList.FindByFriendlyName(FriendlyName: string): Integer; +var + i: Integer; +begin + Result := -1; + for i := 0 to Count - 1 do + begin + if Items[i].GetFriendlyLanguageName = FriendlyName then + begin + Result := i; + Exit; + end; + end; +end; + function TSynHighlighterList.FindByName(Name: string): Integer; var i: Integer; Index: SynUnicode.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/Attic/SynUnicode.pas,v retrieving revision 1.1.2.36 retrieving revision 1.1.2.37 diff -u -d -r1.1.2.36 -r1.1.2.37 --- SynUnicode.pas 2 Feb 2008 19:13:53 -0000 1.1.2.36 +++ SynUnicode.pas 1 Mar 2008 18:32:02 -0000 1.1.2.37 @@ -2296,7 +2296,14 @@ begin lpSize := ScriptString_pSize(saa); if lpSize <> nil then + begin Result := lpSize^; + if Result.cx = 0 then + begin + GetTextMetricsA(DC, tm); + Result.cx := tm.tmAveCharWidth; + end; + end; ScriptStringFree(@saa); end; end Index: SynHighlighterManager.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynHighlighterManager.pas,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -u -d -r1.7.2.1 -r1.7.2.2 --- SynHighlighterManager.pas 31 Aug 2004 12:55:21 -0000 1.7.2.1 +++ SynHighlighterManager.pas 1 Mar 2008 18:32:02 -0000 1.7.2.2 @@ -158,7 +158,7 @@ for i := 0 to form.ComponentCount-1 do begin j := highlight.FindByClass(form.Components[i]); if j >= 0 then begin - j := synForm.clbHighlighters.Items.IndexOf(highlight[j].GetLanguageName); + j := synForm.clbHighlighters.Items.IndexOf(highlight[j].GetFriendlyLanguageName); if j >= 0 then synForm.clbHighlighters.Checked[j] := true; end; @@ -258,7 +258,7 @@ // in second. for i := 0 to synForm.clbHighlighters.Items.Count-1 do begin if not synForm.clbHighlighters.Checked[i] then begin // unchecked - remove - high := highlight.FindByName(synForm.clbHighlighters.Items[i]); + high := highlight.FindByFriendlyName(synForm.clbHighlighters.Items[i]); if high >= 0 then begin comp := FindHighlighterComp(highlight[high]); if comp >= 0 then @@ -268,7 +268,7 @@ end; //for for i := 0 to synForm.clbHighlighters.Items.Count-1 do begin if synForm.clbHighlighters.Checked[i] then begin // checked - add - high := highlight.FindByName(synForm.clbHighlighters.Items[i]); + high := highlight.FindByFriendlyName(synForm.clbHighlighters.Items[i]); if high >= 0 then begin if FindHighlighterComp(highlight[high]) < 0 then begin GetFreeCoordinates; @@ -459,7 +459,7 @@ begin clbHighlighters.Clear; for i := 0 to Highlight.Count-1 do begin - clbHighlighters.Items.Add(Highlight[i].GetLanguageName); + clbHighlighters.Items.Add(Highlight[i].GetFriendlyLanguageName); end; //for end; |
From: Maël Hörz <ma...@us...> - 2008-02-21 18:44:37
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28995 Modified Files: Tag: Unicode_2004_08_31 SynHighlighterSQL.pas Log Message: Fix to correctly identify comments, especially constructs like SELECT-- DISTINCT did not work Index: SynHighlighterSQL.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynHighlighterSQL.pas,v retrieving revision 1.39.2.12 retrieving revision 1.39.2.13 diff -u -d -r1.39.2.12 -r1.39.2.13 --- SynHighlighterSQL.pas 21 Aug 2006 12:28:01 -0000 1.39.2.12 +++ SynHighlighterSQL.pas 21 Feb 2008 18:44:32 -0000 1.39.2.13 @@ -474,7 +474,7 @@ ',UNIQUE,UNKNOWN,UNLISTEN,UNNAMED,UNNEST,UNTIL,UPDATE,USAGE,USER_DEFINED_TYPE_CATALOG' + ',USER_DEFINED_TYPE_NAME,USER_DEFINED_TYPE_SCHEMA,USING,VACUUM,VALID,VALIDATOR,VALUE,VALUES' + ',VARIABLE,VARYING,VERBOSE,VIEW,VOLATILE,WHEN,WHENEVER,WHERE,WITH,WITHOUT,WORK,WRITE,YEAR,ZONE'; - + //Postgresql Functions PostgresFunctions: WideString = 'abs,cbrt,ceil,ceiling,degrees,exp,floor,ln,log,mod,pi,power,radians,random,'+ @@ -1111,6 +1111,8 @@ 'VARBYTE'; function TSynSQLSyn.HashKey(Str: PWideChar): Integer; +var + FoundDoubleMinus: Boolean; function GetOrd: Integer; begin @@ -1131,6 +1133,8 @@ Result := 0; while IsIdentChar(Str^) do begin + FoundDoubleMinus := (Str^ = '-') and ((Str + 1)^ = '-'); + if FoundDoubleMinus then Break; {$IFOPT Q-} Result := 2 * Result + GetOrd; {$ELSE} @@ -1314,6 +1318,8 @@ end; procedure TSynSQLSyn.IdentProc; +var + FoundDoubleMinus: Boolean; begin fTokenID := IdentKind((fLine + Run)); inc(Run, fStringLen); @@ -1323,7 +1329,12 @@ Inc(Run); end else - while IsIdentChar(fLine[Run]) do inc(Run); + while IsIdentChar(fLine[Run]) do + begin + FoundDoubleMinus := (fLine[Run] = '-') and (fLine[Run + 1] = '-'); + if FoundDoubleMinus then Break; + inc(Run); + end; end; procedure TSynSQLSyn.LFProc; @@ -1542,6 +1553,7 @@ procedure TSynSQLSyn.VariableProc; var i: integer; + FoundDoubleMinus: Boolean; begin // MS SQL Server uses @@ to indicate system functions/variables if (SQLDialect in [sqlMSSQL7, sqlMSSQL2K]) and (fLine[Run] = '@') and (fLine[Run + 1] = '@') then @@ -1557,6 +1569,8 @@ fTokenID := tkVariable; i := Run; repeat + FoundDoubleMinus := (fLine[i] = '-') and (fLine[i + 1] = '-'); + if FoundDoubleMinus then Break; Inc(i); until not IsIdentChar(fLine[i]); Run := i; |
From: Flávio E. <et...@us...> - 2008-02-13 04:50:39
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16685 Modified Files: Tag: UtterUnstable SynEdit.pas Log Message: FIX: [1756353] text drawing bug again Index: SynEdit.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.pas,v retrieving revision 1.389.2.99 retrieving revision 1.389.2.100 diff -u -d -r1.389.2.99 -r1.389.2.100 --- SynEdit.pas 20 Nov 2007 09:39:43 -0000 1.389.2.99 +++ SynEdit.pas 13 Feb 2008 04:50:34 -0000 1.389.2.100 @@ -41,6 +41,7 @@ //todo: Move WordWrap glyph to the WordWrap plugin. //todo: remove the several Undo block types //todo: always use TSynTextContainer? +//todo: check whether fInvalidateRect is really a performence gain {$IFNDEF QSYNEDIT} unit SynEdit; @@ -3780,6 +3781,7 @@ if Abs(Delta) < LinesInWindow then begin ScrollCanvas(0, fLineHeight * Delta, 0, 0); + OffsetRect(fInvalidateRect, 0, fLineHeight * Delta); end else Invalidate; |
From: Flávio E. <et...@us...> - 2008-02-13 04:29:23
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8134 Modified Files: Tag: SynEdit_2_0_x SynEdit.pas Log Message: FIX: [1821977] Want Invalidate after paste Index: SynEdit.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.pas,v retrieving revision 1.457.2.14 retrieving revision 1.457.2.15 diff -u -d -r1.457.2.14 -r1.457.2.15 --- SynEdit.pas 5 Nov 2007 15:39:02 -0000 1.457.2.14 +++ SynEdit.pas 13 Feb 2008 04:29:11 -0000 1.457.2.15 @@ -4401,14 +4401,15 @@ Delta := TopLine - Value; fTopLine := Value; if Abs(Delta) < fLinesInWindow then -{$IFDEF SYN_CLX} begin +{$IFDEF SYN_CLX} iClip := GetClientRect; ScrollWindow(Self, 0, fTextHeight * Delta, @iClip); - end {$ELSE} - ScrollWindow(Handle, 0, fTextHeight * Delta, nil, nil) + ScrollWindow(Handle, 0, fTextHeight * Delta, nil, nil); {$ENDIF} + OffsetRect(fInvalidateRect, 0, fTextHeight * Delta); + end else Invalidate; UpdateScrollBars; |
From: Maël Hörz <ma...@us...> - 2008-02-09 13:13:40
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8586/Source Modified Files: Tag: Unicode_2004_08_31 SynEditMiscClasses.pas Log Message: Add fix from Jan Fiala Index: SynEditMiscClasses.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEditMiscClasses.pas,v retrieving revision 1.35.2.6 retrieving revision 1.35.2.7 diff -u -d -r1.35.2.6 -r1.35.2.7 --- SynEditMiscClasses.pas 21 May 2006 11:59:34 -0000 1.35.2.6 +++ SynEditMiscClasses.pas 9 Feb 2008 13:13:34 -0000 1.35.2.7 @@ -144,6 +144,7 @@ procedure SetGradientStartColor(const Value: TColor); procedure SetGradientEndColor(const Value: TColor); procedure SetGradientSteps(const Value: Integer); + function GetWidth: integer; public constructor Create; destructor Destroy; override; @@ -172,7 +173,7 @@ property UseFontStyle: boolean read fUseFontStyle write SetUseFontStyle default True; property Visible: boolean read fVisible write SetVisible default TRUE; - property Width: integer read fWidth write SetWidth default 30; + property Width: integer read GetWidth write SetWidth default 30; property ZeroStart: boolean read fZeroStart write SetZeroStart default False; property LineNumberStart: Integer read fLineNumberStart write SetLineNumberStart default 1; @@ -721,6 +722,14 @@ end; end; +function TSynGutter.GetWidth: integer; +begin + if not Visible then + Result := 0 + else + Result := fWidth; +end; + { TSynBookMarkOpt } constructor TSynBookMarkOpt.Create(AOwner: TComponent); |
From: Maël Hörz <ma...@us...> - 2008-02-02 19:13:56
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17853/Source Modified Files: Tag: Unicode_2004_08_31 SynTextDrawer.pas SynUnicode.pas Log Message: Fixed an issue with UniScribe, it expects strings of length >= 1, therefore background filling didn't work. Index: SynUnicode.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/Attic/SynUnicode.pas,v retrieving revision 1.1.2.35 retrieving revision 1.1.2.36 diff -u -d -r1.1.2.35 -r1.1.2.36 --- SynUnicode.pas 2 Feb 2008 15:13:33 -0000 1.1.2.35 +++ SynUnicode.pas 2 Feb 2008 19:13:53 -0000 1.1.2.36 @@ -2284,6 +2284,8 @@ if Usp10IsInstalled then begin + if Count <= 0 then Exit; + // According to the MS Windows SDK (1.5 * Count + 16) is the recommended // value for GlyphBufferSize (see documentation of cGlyphs parameter of // ScriptStringAnalyse function) Index: SynTextDrawer.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynTextDrawer.pas,v retrieving revision 1.6.2.13 retrieving revision 1.6.2.14 diff -u -d -r1.6.2.13 -r1.6.2.14 --- SynTextDrawer.pas 2 Feb 2008 15:13:33 -0000 1.6.2.13 +++ SynTextDrawer.pas 2 Feb 2008 19:13:53 -0000 1.6.2.14 @@ -279,6 +279,7 @@ Rect: TRect; Str: PWideChar; Count: Integer; ETODist: PIntegerArray): Boolean; const SSAnalyseFlags = SSA_GLYPHS or SSA_FALLBACK; + SpaceString: WideString = ' '; var TextOutFlags: DWORD; GlyphBufferSize: Integer; @@ -292,6 +293,21 @@ if Usp10IsInstalled then begin + // UniScribe requires that the string contains at least one character. + // If UniversalExtTextOut should be used to fill the background we can just + // pass a string made of a space. + if Count <= 0 then + if tooOpaque in Options then + begin + // Clipping is necessary, since depending on X, Y the space will be + // printed outside Rect and potentially fill more than we want. + TextOutFlags := TextOutFlags or ETO_CLIPPED; + Str := PWideChar(SpaceString); + Count := 1; + end + else + Exit; + // According to the MS Windows SDK (1.5 * Count + 16) is the recommended // value for GlyphBufferSize (see documentation of cGlyphs parameter of // ScriptStringAnalyse function) |
From: Maël Hörz <ma...@us...> - 2008-02-02 15:13:41
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19210/Source Modified Files: Tag: Unicode_2004_08_31 SynEdit.inc SynTextDrawer.pas SynUnicode.pas Added Files: Tag: Unicode_2004_08_31 SynUsp10.pas Log Message: - Introduction of UniScribe to fix TextOut-bugs and allows better Unicode support. It works on all plattforms, if UniScribe isn't available UniversalTextOut falls back to plain old ExtTextOut. - Speed improvements: Due to caching provided by UniScribe drawing and measuring of text is faster, this significantly speeds up selection and loading, though SynEdit still is not a speed deamon. Index: SynEdit.inc =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.inc,v retrieving revision 1.16.2.14 retrieving revision 1.16.2.15 diff -u -d -r1.16.2.14 -r1.16.2.15 --- SynEdit.inc 30 Jan 2008 20:41:59 -0000 1.16.2.14 +++ SynEdit.inc 2 Feb 2008 15:13:33 -0000 1.16.2.15 @@ -396,17 +396,4 @@ {$ENDIF} -// If the following statement is enabled SynTextDrawer uses a replacement for -// ExtTextOut that is based on DrawText. This fixes a bug of (Ext)TextOut which -// does or doesn't display some characters depending on the preceding -// characters. However as this is an emulation it is a little slower and causes -// more flicker since drawing has to be done in several steps. The best solution -// would be to use UniScribe which would unfortunately require a major/near -// total rewrite of SynEdit. -// -// See UniversalExtTextOut in SynTextDrawer.pas and the link below for details -// on the Windows-API bug: -// http://groups.google.com/group/microsoft.public.win32.programmer.international/browse_thread/thread/77cd596f2b96dc76/146300208098285c?lnk=st&q=font+substitution+problem#146300208098285c -{$DEFINE SYN_FIXTEXTOUTBUG} - // $Id$ Index: SynUnicode.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/Attic/SynUnicode.pas,v retrieving revision 1.1.2.34 retrieving revision 1.1.2.35 diff -u -d -r1.1.2.34 -r1.1.2.35 --- SynUnicode.pas 30 Jan 2008 20:41:59 -0000 1.1.2.34 +++ SynUnicode.pas 2 Feb 2008 15:13:33 -0000 1.1.2.35 @@ -403,6 +403,7 @@ QSynEditTextBuffer, {$ELSE} SynEditTextBuffer, + SynUsp10, {$ENDIF} Math, {$IFDEF SYN_LINUX} @@ -2270,29 +2271,44 @@ {$ENDIF} function GetTextSize(DC: HDC; Str: PWideChar; Count: Integer): TSize; +const + SSAnalyseFlags = SSA_GLYPHS or SSA_FALLBACK; var tm: TTextMetricA; - r: TRect; + GlyphBufferSize: Integer; + saa: TScriptStringAnalysis; + lpSize: PSize; begin Result.cx := 0; Result.cy := 0; - if Win32PlatformIsUnicode then + + if Usp10IsInstalled then begin - r := Rect(0, 0, 0, 0); - DrawTextW(DC, Str, Count, r, DT_CALCRECT or DT_SINGLELINE or DT_NOPREFIX or - DT_NOCLIP); - Result.cx := r.Right; - Result.cy := r.Bottom; + // According to the MS Windows SDK (1.5 * Count + 16) is the recommended + // value for GlyphBufferSize (see documentation of cGlyphs parameter of + // ScriptStringAnalyse function) + GlyphBufferSize := (3 * Count) div 2 + 16; + + if Succeeded(ScriptStringAnalyse(DC, Str, Count, GlyphBufferSize, -1, + SSAnalyseFlags, 0, nil, nil, nil, nil, nil, @saa)) then + begin + lpSize := ScriptString_pSize(saa); + if lpSize <> nil then + Result := lpSize^; + ScriptStringFree(@saa); + end; end else - GetTextExtentPoint32W(DC, Str, Count, Result); - if not Win32PlatformIsUnicode then begin - GetTextMetricsA(DC, tm); - if tm.tmPitchAndFamily and TMPF_TRUETYPE <> 0 then - Result.cx := Result.cx - tm.tmOverhang - else - Result.cx := tm.tmAveCharWidth * Count; + GetTextExtentPoint32W(DC, Str, Count, Result); + if not Win32PlatformIsUnicode then + begin + GetTextMetricsA(DC, tm); + if tm.tmPitchAndFamily and TMPF_TRUETYPE <> 0 then + Result.cx := Result.cx - tm.tmOverhang + else + Result.cx := tm.tmAveCharWidth * Count; + end; end; end; Index: SynTextDrawer.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynTextDrawer.pas,v retrieving revision 1.6.2.12 retrieving revision 1.6.2.13 diff -u -d -r1.6.2.12 -r1.6.2.13 --- SynTextDrawer.pas 30 Jan 2008 20:41:59 -0000 1.6.2.12 +++ SynTextDrawer.pas 2 Feb 2008 15:13:33 -0000 1.6.2.13 @@ -207,9 +207,6 @@ // Begin/EndDrawing calling count FDrawingCount: Integer; protected - function UniversalExtTextOut(DC: HDC; X, Y: Integer; - Options: TTextOutOptions; Rect: TRect; Str: PWideChar; Count: Integer; - ETODist: PIntegerArray): Boolean; procedure ReleaseETODist; virtual; procedure AfterStyleSet; virtual; procedure DoSetCharExtra(Value: Integer); virtual; @@ -253,6 +250,9 @@ implementation +uses + SynUsp10; + var gFontsInfoManager: TheFontsInfoManager; @@ -270,145 +270,42 @@ if x < y then Result := x else Result := y; end; -// UniversalExtTextOut tries to offer uniform behaviour accross platforms. -// Additionally on Win NT, 2000 and up DrawText is used to work around a bug -// when displaying a combination of Chinese and Korean text using (Ext)TextOut -// (there might be other combinations that trigger this WinAPI-bug, but -// DrawText hopefully handles them fine). +// UniversalExtTextOut uses UniScribe where available for the best possible +// output quality. This also avoids a bug in (Ext)TextOut that surfaces when +// displaying a combination of Chinese and Korean text. // // See here for details: http://groups.google.com/group/microsoft.public.win32.programmer.international/browse_thread/thread/77cd596f2b96dc76/146300208098285c?lnk=st&q=font+substitution+problem#146300208098285c -function TheTextDrawer.UniversalExtTextOut(DC: HDC; X, Y: Integer; - Options: TTextOutOptions; Rect: TRect; Str: PWideChar; Count: Integer; - ETODist: PIntegerArray): Boolean; +function UniversalExtTextOut(DC: HDC; X, Y: Integer; Options: TTextOutOptions; + Rect: TRect; Str: PWideChar; Count: Integer; ETODist: PIntegerArray): Boolean; const - // Default options to make DrawText behave as (Ext)TextOut - OptionFlags: UINT = DT_SINGLELINE or DT_NOPREFIX or DT_NOCLIP; -{$IFDEF SYN_FIXTEXTOUTBUG} + SSAnalyseFlags = SSA_GLYPHS or SSA_FALLBACK; var - TextEnclosingRect, TextSnippetRect: TRect; - SurroundingRgn, BackFillRgn, OldClipRgn: HRGN; - Brush: HBRUSH; - TextSnippetLength, i: Integer; - SavedBkMode: Integer; -{$ENDIF} + TextOutFlags: DWORD; + GlyphBufferSize: Integer; + saa: TScriptStringAnalysis; begin -{$IFDEF SYN_FIXTEXTOUTBUG} - if Win32PlatformIsUnicode then - begin - Result := True; - if tooClipped in Options then - begin - OldClipRgn := CreateRectRgn(0, 0, 0, 0); - if GetClipRgn(DC, OldClipRgn) <> 1 then - begin - DeleteObject(OldClipRgn); - OldClipRgn := 0; - end; - IntersectClipRect(DC, Rect.Left, Rect.Top, Rect.Right, Rect.Bottom); - end - else - OldClipRgn := INVALID_HANDLE_VALUE; - - // determine the smallest rect enclosing the text - TextEnclosingRect := Classes.Rect(X, Y, X, Y); - if ETODist = nil then - Result := Result and (DrawTextW(DC, Str, Count, TextEnclosingRect, - OptionFlags or DT_CALCRECT) <> 0) - else - begin - for i := 0 to Count - 1 do - inc(TextEnclosingRect.Right, ETODist^[i]); - inc(TextEnclosingRect.Bottom, CharHeight); - end; - - // Fill the region occupied by the text with the current background color, - // and if tooOpaque is in Options fill also the surrounding rect defined by - // the parameter Rect. - BackFillRgn := CreateRectRgnIndirect(TextEnclosingRect); - if tooOpaque in Options then - begin - SurroundingRgn := CreateRectRgnIndirect(Rect); - CombineRgn(BackFillRgn, BackFillRgn, SurroundingRgn, RGN_OR); - DeleteObject(SurroundingRgn); - end; - Brush := CreateSolidBrush(GetBkColor(DC)); - FillRgn(DC, BackFillRgn, Brush); - DeleteObject(Brush); - DeleteObject(BackFillRgn); - - // set background mode to transparent, such that several calls to DrawText - // can be made without clipping already drawn text - SavedBkMode := SetBkMode(DC, TRANSPARENT); - i := 0; - while Count > 0 do - begin - // Text is drawn in snippets if for each character a width is specified - // (i.e. if ETODist <> nil). A snippet contains a sequence of characters - // with the same width which are drawn with one call of DrawText. - // - // This is necessary since there is no way to specify the width of each - // character individually for DrawText as this is possible for ExtTextOut. - if ETODist <> nil then - begin - TextSnippetRect := Classes.Rect(X, TextEnclosingRect.Top, X, - TextEnclosingRect.Bottom); - if ETODist^[i] = CharWidth then - begin - TextSnippetLength := 0; - while (ETODist^[i] = CharWidth) and (TextSnippetLength < Count) do - begin - inc(TextSnippetLength); - inc(i); - end; - inc(TextSnippetRect.Right, TextSnippetLength * CharWidth); - end - else - // Characters of different width than CharWidth must be drawn - // individually, since it is the only way to ensure correct spacing. We - // could use SetTextCharacterExtra but it would require that the real - // character width is measured to determine how much to add for each - // character and which characters can then be put into a text snippet. - // Drawing each character individually is faster than doing such complex - // things. - begin - TextSnippetLength := 1; - inc(TextSnippetRect.Right, TextSnippetLength * ETODist^[i]); - inc(i); - end; - end - else - begin - TextSnippetLength := Count; - TextSnippetRect := TextEnclosingRect; - end; - - Result := Result and (DrawTextW(DC, Str, TextSnippetLength, - TextSnippetRect, OptionFlags) <> 0); - - inc(X, TextSnippetRect.Right - TextSnippetRect.Left); - inc(Str, TextSnippetLength); - dec(Count, TextSnippetLength); - end; + TextOutFlags := 0; + if tooOpaque in Options then + TextOutFlags := TextOutFlags or ETO_OPAQUE; + if tooClipped in Options then + TextOutFlags := TextOutFlags or ETO_CLIPPED; - if tooClipped in Options then - begin - SelectClipRgn(DC, OldClipRgn); - DeleteObject(OldClipRgn); - end; + if Usp10IsInstalled then + begin + // According to the MS Windows SDK (1.5 * Count + 16) is the recommended + // value for GlyphBufferSize (see documentation of cGlyphs parameter of + // ScriptStringAnalyse function) + GlyphBufferSize := (3 * Count) div 2 + 16; - if SavedBkMode <> 0 then - SetBkMode(DC, SavedBkMode); + Result := Succeeded(ScriptStringAnalyse(DC, Str, Count, GlyphBufferSize, -1, + SSAnalyseFlags, 0, nil, nil, Pointer(ETODist), nil, nil, @saa)); + Result := Result and Succeeded(ScriptStringOut(saa, X, Y, TextOutFlags, + @Rect, 0, 0, False)); + Result := Result and Succeeded(ScriptStringFree(@saa)); end else -{$ENDIF} begin - OptionFlags := 0; - if tooOpaque in Options then - OptionFlags := OptionFlags or ETO_OPAQUE; - if tooClipped in Options then - OptionFlags := OptionFlags or ETO_CLIPPED; - - Result := ExtTextOutW(DC, X, Y, OptionFlags, @Rect, Str, Count, + Result := ExtTextOutW(DC, X, Y, TextOutFlags, @Rect, Str, Count, Pointer(ETODist)); end; end; @@ -943,7 +840,7 @@ r: TRect; begin r := Rect(X, Y, X, Y); - UniversalExtTextOut(FDC, X, Y, [], r, Text, Length, nil); // TODO: FETODist wird in Universal verwendet aber hier nicht initialisiert + UniversalExtTextOut(FDC, X, Y, [], r, Text, Length, nil); end; procedure TheTextDrawer.ExtTextOut(X, Y: Integer; Options: TTextOutOptions; --- NEW FILE: SynUsp10.pas --- {******************************************************************************} {* *} {* Copyright (c) Microsoft Corporation. All rights reserved. *} {* *} {* File: usp10.h *} {* Content: USP - Unicode Complex Script processor *} {* *} {* Delphi / FreePascal adaptation by Alexey Barkovoy (cl...@cl...) *} (* *) {* The original version from Alexey Barkovoy can be downloaded from: *} {* http://clootie.ru *} (* *) (* Dynamic linking logic (similar to what the JCL does) by Maël Hörz. *) (* *) (* Latest version can be downloaded from http://mh-nexus.de/unisynedit.htm *) (* or checked out from the Unicode branch of SynEdit CVS. *) (* *) {******************************************************************************} { } [...2579 lines suppressed...] _ScriptApplyDigitSubstitution: Pointer; function ScriptApplyDigitSubstitution; begin GetProcedureAddress(_ScriptApplyDigitSubstitution, Usp10DLL, 'ScriptApplyDigitSubstitution'); asm MOV ESP, EBP POP EBP JMP [_ScriptApplyDigitSubstitution] end; end; initialization Usp10DllModule := GetUsp10DllModule; Usp10IsInstalled := Usp10DllModule <> 0; finalization if Usp10DllModule <> 0 then FreeLibrary(Usp10DllModule); end. |
From: Maël Hörz <ma...@us...> - 2008-01-30 20:42:04
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20069/Source Modified Files: Tag: Unicode_2004_08_31 SynEdit.inc SynEdit.pas SynTextDrawer.pas SynUnicode.pas Log Message: - SynTextDrawer uses a replacement for ExtTextOut that is based on DrawText. This fixes a bug of (Ext)TextOut which does or doesn't display some characters depending on the preceding characters. - Fix bug #1870079 by PyScripter Index: SynEdit.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.pas,v retrieving revision 1.386.2.71 retrieving revision 1.386.2.72 diff -u -d -r1.386.2.71 -r1.386.2.72 --- SynEdit.pas 24 Dec 2007 13:59:56 -0000 1.386.2.71 +++ SynEdit.pas 30 Jan 2008 20:41:59 -0000 1.386.2.72 @@ -2658,7 +2658,7 @@ rcLine.Top := rcLine.Bottom; rcLine.Bottom := vLineTop; with rcLine do - fTextDrawer.ExtTextOut(Left, Top, ETO_OPAQUE, rcLine, '', 0); + fTextDrawer.ExtTextOut(Left, Top, [tooOpaque], rcLine, '', 0); end; // next line rect rcLine.Top := vLineTop; @@ -2699,7 +2699,7 @@ rcLine.Top := rcLine.Bottom; rcLine.Bottom := AClip.Bottom; with rcLine do - fTextDrawer.ExtTextOut(Left, Top, ETO_OPAQUE, rcLine, '', 0); + fTextDrawer.ExtTextOut(Left, Top, [tooOpaque], rcLine, '', 0); end; finally fTextDrawer.EndDrawing; @@ -3007,7 +3007,7 @@ NonFillerPos: Integer; rcTab: TRect; const - ETOOptions = ETO_OPAQUE or ETO_CLIPPED; + ETOOptions = [tooOpaque, tooClipped]; begin sTabbedToken := Token; DoTabPainting := False; @@ -3075,7 +3075,7 @@ end; fTextDrawer.ExtTextOut(nX, rcToken.Top, ETOOptions, rcToken, - Text, nCharsToPaint); + PWideChar(Text), nCharsToPaint); if DoTabPainting then begin @@ -3102,7 +3102,7 @@ rcTab.Right := nX + fTextDrawer.GetCharWidth; fTextDrawer.ExtTextOut(nX, rcTab.Top, ETOOptions, rcTab, - Text, 1); + PWideChar(Text), 1); for i := 0 to TabLen - 1 do //wipe the text out so we don't sTabbedToken[TabStart + i] := #32; //count it again Index: SynUnicode.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/Attic/SynUnicode.pas,v retrieving revision 1.1.2.33 retrieving revision 1.1.2.34 diff -u -d -r1.1.2.33 -r1.1.2.34 --- SynUnicode.pas 24 Dec 2007 14:04:58 -0000 1.1.2.33 +++ SynUnicode.pas 30 Jan 2008 20:41:59 -0000 1.1.2.34 @@ -2272,10 +2272,20 @@ function GetTextSize(DC: HDC; Str: PWideChar; Count: Integer): TSize; var tm: TTextMetricA; + r: TRect; begin Result.cx := 0; Result.cy := 0; - GetTextExtentPoint32W(DC, Str, Count, Result); + if Win32PlatformIsUnicode then + begin + r := Rect(0, 0, 0, 0); + DrawTextW(DC, Str, Count, r, DT_CALCRECT or DT_SINGLELINE or DT_NOPREFIX or + DT_NOCLIP); + Result.cx := r.Right; + Result.cy := r.Bottom; + end + else + GetTextExtentPoint32W(DC, Str, Count, Result); if not Win32PlatformIsUnicode then begin GetTextMetricsA(DC, tm); @@ -2634,11 +2644,6 @@ i := 0; while i < BufferSize do begin - if FoundUTF8Strings = MinimumCountOfUTF8Strings then - begin - Result := True; - Break; - end; case Buffer[i] of $00..$7F: // skip US-ASCII characters as they could belong to various charsets ; @@ -2695,6 +2700,13 @@ // any occurence of "orphaned" trailing bytes is invalid UTF-8 Break; end; + + if FoundUTF8Strings = MinimumCountOfUTF8Strings then + begin + Result := True; + Break; + end; + inc(i); end; end; Index: SynEdit.inc =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.inc,v retrieving revision 1.16.2.13 retrieving revision 1.16.2.14 diff -u -d -r1.16.2.13 -r1.16.2.14 --- SynEdit.inc 8 Jul 2007 16:56:44 -0000 1.16.2.13 +++ SynEdit.inc 30 Jan 2008 20:41:59 -0000 1.16.2.14 @@ -396,4 +396,17 @@ {$ENDIF} +// If the following statement is enabled SynTextDrawer uses a replacement for +// ExtTextOut that is based on DrawText. This fixes a bug of (Ext)TextOut which +// does or doesn't display some characters depending on the preceding +// characters. However as this is an emulation it is a little slower and causes +// more flicker since drawing has to be done in several steps. The best solution +// would be to use UniScribe which would unfortunately require a major/near +// total rewrite of SynEdit. +// +// See UniversalExtTextOut in SynTextDrawer.pas and the link below for details +// on the Windows-API bug: +// http://groups.google.com/group/microsoft.public.win32.programmer.international/browse_thread/thread/77cd596f2b96dc76/146300208098285c?lnk=st&q=font+substitution+problem#146300208098285c +{$DEFINE SYN_FIXTEXTOUTBUG} + // $Id$ Index: SynTextDrawer.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynTextDrawer.pas,v retrieving revision 1.6.2.11 retrieving revision 1.6.2.12 diff -u -d -r1.6.2.11 -r1.6.2.12 --- SynTextDrawer.pas 21 May 2006 11:59:35 -0000 1.6.2.11 +++ SynTextDrawer.pas 30 Jan 2008 20:41:59 -0000 1.6.2.12 @@ -89,8 +89,7 @@ TheFontData = record Style: TFontStyles; Handle: HFont; - CharAdv: Integer; // char advance of single-byte code - DBCharAdv: Integer; // char advance of double-byte code + CharAdv: Integer; CharHeight: Integer; end; @@ -105,7 +104,6 @@ // font information BaseFont: TFont; BaseLF: TLogFont; - IsDBCSFont: Boolean; IsTrueType: Boolean; FontsData: TheFontsData; end; @@ -131,7 +129,9 @@ { TheFontStock } - TheExtTextOutProc = procedure (X, Y: Integer; fuOptions: UINT; + TTextOutOptions = set of (tooOpaque, tooClipped); + + TheExtTextOutProc = procedure (X, Y: Integer; fuOptions: TTextOutOptions; const ARect: TRect; const Text: WideString; Length: Integer) of object; EheFontStockException = class(Exception); @@ -153,17 +153,14 @@ // local font info FBaseLF: TLogFont; function GetBaseFont: TFont; - function GetIsDBCSFont: Boolean; function GetIsTrueType: Boolean; protected function InternalGetDC: HDC; virtual; procedure InternalReleaseDC(Value: HDC); virtual; function InternalCreateFont(Style: TFontStyles): HFONT; virtual; - function CalcFontAdvance(DC: HDC; - pCharHeight, pDBCharAdvance: PInteger): Integer; virtual; + function CalcFontAdvance(DC: HDC; pCharHeight: PInteger): Integer; virtual; function GetCharAdvance: Integer; virtual; function GetCharHeight: Integer; virtual; - function GetDBCharAdvance: Integer; virtual; function GetFontData(idx: Integer): PheFontData; virtual; procedure UseFontHandles; procedure ReleaseFontsInfo; @@ -180,8 +177,6 @@ property FontHandle: HFONT read FCrntFont; property CharAdvance: Integer read GetCharAdvance; property CharHeight: Integer read GetCharHeight; - property DBCharAdvance: Integer read GetDBCharAdvance; - property IsDBCSFont: Boolean read GetIsDBCSFont; property IsTrueType: Boolean read GetIsTrueType; end; @@ -212,6 +207,9 @@ // Begin/EndDrawing calling count FDrawingCount: Integer; protected + function UniversalExtTextOut(DC: HDC; X, Y: Integer; + Options: TTextOutOptions; Rect: TRect; Str: PWideChar; Count: Integer; + ETODist: PIntegerArray): Boolean; procedure ReleaseETODist; virtual; procedure AfterStyleSet; virtual; procedure DoSetCharExtra(Value: Integer); virtual; @@ -228,8 +226,8 @@ procedure BeginDrawing(DC: HDC); virtual; procedure EndDrawing; virtual; procedure TextOut(X, Y: Integer; Text: PWideChar; Length: Integer); virtual; - procedure ExtTextOut(X, Y: Integer; fuOptions: UINT; ARect: TRect; - const Text: WideString; Length: Integer); virtual; + procedure ExtTextOut(X, Y: Integer; Options: TTextOutOptions; ARect: TRect; + Text: PWideChar; Length: Integer); virtual; function TextExtent(const Text: WideString): TSize; overload; function TextExtent(Text: PWideChar; Count: Integer): TSize; overload; function TextWidth(const Text: WideString): Integer; overload; @@ -251,70 +249,12 @@ property CharExtra: Integer read FCharExtra write SetCharExtra; end; - { TheTextDrawer2 } - - TheTextDrawer2 = class(TheTextDrawer) - private - FFonts: array[TheStockFontPatterns] of HFONT; - public - procedure SetStyle(Value: TFontStyles); override; - procedure SetBaseFont(Value: TFont); override; - end; - - { TheTextDrawerEx } - - TheTextDrawerEx = class(TheTextDrawer) - private - // current font properties - FCrntDx: Integer; - FCrntDBDx: Integer; // for a double-byte character - // Text drawing procedure reference for optimization - FExtTextOutProc: TheExtTextOutProc; - protected - procedure AfterStyleSet; override; - procedure DoSetCharExtra(Value: Integer); override; - procedure TextOutOrExtTextOut(X, Y: Integer; fuOptions: UINT; - const ARect: TRect; const Text: WideString; Length: Integer); virtual; - procedure ExtTextOutFixed(X, Y: Integer; fuOptions: UINT; - const ARect: TRect; const Text: WideString; Length: Integer); virtual; - procedure ExtTextOutWithETO(X, Y: Integer; fuOptions: UINT; - const ARect: TRect; const Text: WideString; Length: Integer); virtual; - procedure ExtTextOutForDBCS(X, Y: Integer; fuOptions: UINT; - const ARect: TRect; Text: PAnsiChar; Length: Integer); virtual; - public - procedure ExtTextOut(X, Y: Integer; fuOptions: UINT; ARect: TRect; - const Text: WideString; Length: Integer); override; - end; - function GetFontsInfoManager: TheFontsInfoManager; -{$IFNDEF VER93} -{$IFNDEF VER90} -{$IFNDEF VER80} -{$DEFINE HE_ASSERT} -{$DEFINE HE_LEADBYTES} -{$DEFINE HE_COMPAREMEM} -{$ENDIF} -{$ENDIF} -{$ENDIF} - -{$IFNDEF HE_LEADBYTES} -type - TheLeadByteChars = set of AnsiChar; - - function SetLeadBytes(const Value: TheLeadByteChars): TheLeadByteChars; -{$ENDIF} - implementation -const - DBCHAR_CALCULATION_FALED = $7FFFFFFF; - var gFontsInfoManager: TheFontsInfoManager; -{$IFNDEF HE_LEADBYTES} - LeadBytes: TheLeadByteChars; -{$ENDIF} { utility routines } @@ -330,44 +270,148 @@ if x < y then Result := x else Result := y; end; -{$IFNDEF HE_ASSERT} -procedure ASSERT(Expression: Boolean); -begin - if not Expression then - raise EheTextDrawerException.Create('Assertion failed.'); -end; +// UniversalExtTextOut tries to offer uniform behaviour accross platforms. +// Additionally on Win NT, 2000 and up DrawText is used to work around a bug +// when displaying a combination of Chinese and Korean text using (Ext)TextOut +// (there might be other combinations that trigger this WinAPI-bug, but +// DrawText hopefully handles them fine). +// +// See here for details: http://groups.google.com/group/microsoft.public.win32.programmer.international/browse_thread/thread/77cd596f2b96dc76/146300208098285c?lnk=st&q=font+substitution+problem#146300208098285c +function TheTextDrawer.UniversalExtTextOut(DC: HDC; X, Y: Integer; + Options: TTextOutOptions; Rect: TRect; Str: PWideChar; Count: Integer; + ETODist: PIntegerArray): Boolean; +const + // Default options to make DrawText behave as (Ext)TextOut + OptionFlags: UINT = DT_SINGLELINE or DT_NOPREFIX or DT_NOCLIP; +{$IFDEF SYN_FIXTEXTOUTBUG} +var + TextEnclosingRect, TextSnippetRect: TRect; + SurroundingRgn, BackFillRgn, OldClipRgn: HRGN; + Brush: HBRUSH; + TextSnippetLength, i: Integer; + SavedBkMode: Integer; {$ENDIF} - -{$IFNDEF HE_LEADBYTES} -function SetLeadBytes(const Value: TheLeadByteChars): TheLeadByteChars; begin - Result := LeadBytes; - LeadBytes := Value; -end; +{$IFDEF SYN_FIXTEXTOUTBUG} + if Win32PlatformIsUnicode then + begin + Result := True; + if tooClipped in Options then + begin + OldClipRgn := CreateRectRgn(0, 0, 0, 0); + if GetClipRgn(DC, OldClipRgn) <> 1 then + begin + DeleteObject(OldClipRgn); + OldClipRgn := 0; + end; + IntersectClipRect(DC, Rect.Left, Rect.Top, Rect.Right, Rect.Bottom); + end + else + OldClipRgn := INVALID_HANDLE_VALUE; + + // determine the smallest rect enclosing the text + TextEnclosingRect := Classes.Rect(X, Y, X, Y); + if ETODist = nil then + Result := Result and (DrawTextW(DC, Str, Count, TextEnclosingRect, + OptionFlags or DT_CALCRECT) <> 0) + else + begin + for i := 0 to Count - 1 do + inc(TextEnclosingRect.Right, ETODist^[i]); + inc(TextEnclosingRect.Bottom, CharHeight); + end; + + // Fill the region occupied by the text with the current background color, + // and if tooOpaque is in Options fill also the surrounding rect defined by + // the parameter Rect. + BackFillRgn := CreateRectRgnIndirect(TextEnclosingRect); + if tooOpaque in Options then + begin + SurroundingRgn := CreateRectRgnIndirect(Rect); + CombineRgn(BackFillRgn, BackFillRgn, SurroundingRgn, RGN_OR); + DeleteObject(SurroundingRgn); + end; + Brush := CreateSolidBrush(GetBkColor(DC)); + FillRgn(DC, BackFillRgn, Brush); + DeleteObject(Brush); + DeleteObject(BackFillRgn); + + // set background mode to transparent, such that several calls to DrawText + // can be made without clipping already drawn text + SavedBkMode := SetBkMode(DC, TRANSPARENT); + i := 0; + while Count > 0 do + begin + // Text is drawn in snippets if for each character a width is specified + // (i.e. if ETODist <> nil). A snippet contains a sequence of characters + // with the same width which are drawn with one call of DrawText. + // + // This is necessary since there is no way to specify the width of each + // character individually for DrawText as this is possible for ExtTextOut. + if ETODist <> nil then + begin + TextSnippetRect := Classes.Rect(X, TextEnclosingRect.Top, X, + TextEnclosingRect.Bottom); + if ETODist^[i] = CharWidth then + begin + TextSnippetLength := 0; + while (ETODist^[i] = CharWidth) and (TextSnippetLength < Count) do + begin + inc(TextSnippetLength); + inc(i); + end; + inc(TextSnippetRect.Right, TextSnippetLength * CharWidth); + end + else + // Characters of different width than CharWidth must be drawn + // individually, since it is the only way to ensure correct spacing. We + // could use SetTextCharacterExtra but it would require that the real + // character width is measured to determine how much to add for each + // character and which characters can then be put into a text snippet. + // Drawing each character individually is faster than doing such complex + // things. + begin + TextSnippetLength := 1; + inc(TextSnippetRect.Right, TextSnippetLength * ETODist^[i]); + inc(i); + end; + end + else + begin + TextSnippetLength := Count; + TextSnippetRect := TextEnclosingRect; + end; + + Result := Result and (DrawTextW(DC, Str, TextSnippetLength, + TextSnippetRect, OptionFlags) <> 0); + + inc(X, TextSnippetRect.Right - TextSnippetRect.Left); + inc(Str, TextSnippetLength); + dec(Count, TextSnippetLength); + end; + + if tooClipped in Options then + begin + SelectClipRgn(DC, OldClipRgn); + DeleteObject(OldClipRgn); + end; + + if SavedBkMode <> 0 then + SetBkMode(DC, SavedBkMode); + end + else {$ENDIF} + begin + OptionFlags := 0; + if tooOpaque in Options then + OptionFlags := OptionFlags or ETO_OPAQUE; + if tooClipped in Options then + OptionFlags := OptionFlags or ETO_CLIPPED; -{$IFNDEF HE_COMPAREMEM} -function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler; -asm - PUSH ESI - PUSH EDI - MOV ESI,P1 - MOV EDI,P2 - MOV EDX,ECX - XOR EAX,EAX - AND EDX,3 - SHR ECX,1 - SHR ECX,1 - REPE CMPSD - JNE @@2 - MOV ECX,EDX - REPE CMPSB - JNE @@2 -@@1: INC EAX -@@2: POP EDI - POP ESI + Result := ExtTextOutW(DC, X, Y, OptionFlags, @Rect, Str, Count, + Pointer(ETODist)); + end; end; -{$ENDIF} { TheFontsInfoManager } @@ -386,9 +430,6 @@ function TheFontsInfoManager.CreateFontsInfo(ABaseFont: TFont; const LF: TLogFont): PheSharedFontsInfo; -var - DC: HDC; - hOldFont: HFont; begin New(Result); FillChar(Result^, SizeOf(TheSharedFontsInfo), 0); @@ -398,12 +439,6 @@ BaseFont.Assign(ABaseFont); BaseLF := LF; IsTrueType := (0 <> (TRUETYPE_FONTTYPE and LF.lfPitchAndFamily)); - // find out whether the font `IsDBCSFont' - DC := GetDC(0); - hOldFont := SelectObject(DC, ABaseFont.Handle); - IsDBCSFont := (0 <> (GCP_DBCS and GetFontLanguageInfo(DC))); - SelectObject(DC, hOldFont); - ReleaseDC(0, DC); except Result^.BaseFont.Free; Dispose(Result); @@ -530,13 +565,10 @@ // CalcFontAdvance : Calculation a advance of a character of a font. // [*]hCalcFont will be selected as FDC's font if FDC wouldn't be zero. -function TheFontStock.CalcFontAdvance(DC: HDC; - pCharHeight, pDBCharAdvance: PInteger): Integer; +function TheFontStock.CalcFontAdvance(DC: HDC; pCharHeight: PInteger): Integer; var TM: TTextMetric; ABC: TABC; - ABC2: TABC; - w: Integer; HasABC: Boolean; begin // Calculate advance of a character. @@ -563,50 +595,6 @@ // pCharHeight if Assigned(pCharHeight) then pCharHeight^ := Abs(TM.tmHeight) {+ TM.tmInternalLeading}; - // pDBCharAdvance - if Assigned(pDBCharAdvance) then - begin - pDBCharAdvance^ := DBCHAR_CALCULATION_FALED; - if IsDBCSFont then - begin - case TM.tmCharSet of - SHIFTJIS_CHARSET: - if HasABC and - GetCharABCWidths(DC, $8201, $8201, ABC) and // max width(maybe) - GetCharABCWidths(DC, $82A0, $82A0, ABC2) then // HIRAGANA 'a' - begin - with ABC do - w := abcA + Integer(abcB) + abcC; - if w > (1.5 * Result) then // it should be over 150% wider than SBChar(I think) - with ABC2 do - if w = (abcA + Integer(abcB) + abcC) then - pDBCharAdvance^ := w; - end; - // About the following character sets, - // I don't know with what character should be calculated. -{ - ANSI_CHARSET: - DEFAULT_CHARSET: - SYMBOL_CHARSET: - HANGUL_CHARSET: - GB2312_CHARSET: - CHINESEBIG5_CHARSET: - OEM_CHARSET: - JOHAB_CHARSET: - HEBREW_CHARSET: - ARABIC_CHARSET: - GREEK_CHARSET: - TURKISH_CHARSET: - VIETNAMESE_CHARSET: - THAI_CHARSET: - EASTEUROPE_CHARSET: - RUSSIAN_CHARSET: - MAC_CHARSET: - BALTIC_CHARSET: -} - end; - end; - end; end; constructor TheFontStock.Create(InitialFont: TFont); @@ -639,21 +627,11 @@ Result := FpCrntFontData^.CharHeight; end; -function TheFontStock.GetDBCharAdvance: Integer; -begin - Result := FpCrntFontData^.DBCharAdv; -end; - function TheFontStock.GetFontData(idx: Integer): PheFontData; begin Result := @FpInfo^.FontsData[idx]; end; -function TheFontStock.GetIsDBCSFont: Boolean; -begin - Result := FpInfo^.IsDBCSFont; -end; - function TheFontStock.GetIsTrueType: Boolean; begin Result := FpInfo^.IsTrueType @@ -783,10 +761,7 @@ with FpCrntFontData^ do begin Handle := FCrntFont; - if IsDBCSFont then - CharAdv := CalcFontAdvance(DC, @CharHeight, @DBCharAdv) - else - CharAdv := CalcFontAdvance(DC, @CharHeight, nil); + CharAdv := CalcFontAdvance(DC, @CharHeight); end; SelectObject(DC, hOldFont); @@ -964,12 +939,15 @@ procedure TheTextDrawer.TextOut(X, Y: Integer; Text: PWideChar; Length: Integer); +var + r: TRect; begin - Windows.TextOutW(FDC, X, Y, Text, Length); + r := Rect(X, Y, X, Y); + UniversalExtTextOut(FDC, X, Y, [], r, Text, Length, nil); // TODO: FETODist wird in Universal verwendet aber hier nicht initialisiert end; -procedure TheTextDrawer.ExtTextOut(X, Y: Integer; fuOptions: UINT; - ARect: TRect; const Text: WideString; Length: Integer); +procedure TheTextDrawer.ExtTextOut(X, Y: Integer; Options: TTextOutOptions; + ARect: TRect; Text: PWideChar; Length: Integer); procedure InitETODist(CharWidth: Integer); var @@ -977,10 +955,10 @@ i: Integer; begin ReallocMem(FETODist, Length * SizeOf(Integer)); - for i := 1 to Length do + for i := 0 to Length - 1 do begin Size := TextExtent(@Text[i], 1); - FETODist[i - 1] := Ceil(Size.cx / CharWidth) * CharWidth; + FETODist[i] := Ceil(Size.cx / CharWidth) * CharWidth; end; end; @@ -993,7 +971,7 @@ begin if Length <= 0 then Exit; - LastChar := Ord(Text[Length]); + LastChar := Ord(Text[Length - 1]); CharWidth := FETODist[Length - 1]; RealCharWidth := CharWidth; if Win32PlatformIsUnicode then @@ -1032,8 +1010,7 @@ begin InitETODist(GetCharWidth); AdjustLastCharWidthAndRect; - Windows.ExtTextOutW(FDC, X, Y, fuOptions, @ARect, PWideChar(Text), - Length, PInteger(FETODist)); + UniversalExtTextOut(FDC, X, Y, Options, ARect, Text, Length, FETODist); end; procedure TheTextDrawer.ReleaseTemporaryResources; @@ -1048,7 +1025,7 @@ function TheTextDrawer.TextExtent(Text: PWideChar; Count: Integer): TSize; begin - Result := GetTextSize(FStockBitmap.Canvas.Handle, Text, Count); + Result := SynUnicode.GetTextSize(FStockBitmap.Canvas.Handle, Text, Count); end; function TheTextDrawer.TextWidth(const Text: WideString): Integer; @@ -1058,200 +1035,12 @@ function TheTextDrawer.TextWidth(Text: PWideChar; Count: Integer): Integer; begin - Result := GetTextSize(FStockBitmap.Canvas.Handle, Text, Count).cX; -end; - -{ TheTextDrawer2 } - -procedure TheTextDrawer2.SetStyle(Value: TFontStyles); -var - idx: Integer; -begin - idx := PByte(@Value)^; - if FFonts[idx] <> 0 then - begin - FCrntFont := FFonts[idx]; - AfterStyleSet; - end - else - begin - inherited; - FFonts[idx] := FCrntFont; - end; -end; - -procedure TheTextDrawer2.SetBaseFont(Value: TFont); -var - i: Integer; -begin - for i := Low(FFonts) to High(FFonts) do - FFonts[i] := 0; - inherited; -end; - -{ TheTextDrawerEx } - -procedure TheTextDrawerEx.AfterStyleSet; -begin - inherited; - with FontStock do - begin - FCrntDx := BaseCharWidth - CharAdvance; - case IsDBCSFont of - False: - begin - if StockDC <> 0 then - SetTextCharacterExtra(StockDC, CharExtra + FCrntDx); - if IsTrueType or (not (fsItalic in Style)) then - FExtTextOutProc := TextOutOrExtTextOut - else - FExtTextOutProc := ExtTextOutFixed; - end; - True: - begin - FCrntDBDx := DBCHAR_CALCULATION_FALED; - FExtTextOutProc := ExtTextOutWithETO; - end; - end; - end; -end; - -procedure TheTextDrawerEx.DoSetCharExtra(Value: Integer); -begin - if not FontStock.IsDBCSFont then - begin - SetBkMode(StockDC, OPAQUE); - SetTextCharacterExtra(StockDC, Value + FCrntDx); - end - else if FCrntDBDx = DBCHAR_CALCULATION_FALED then - SetTextCharacterExtra(StockDC, Value); -end; - -procedure TheTextDrawerEx.ExtTextOut(X, Y: Integer; fuOptions: UINT; - ARect: TRect; const Text: WideString; Length: Integer); -begin - FExtTextOutProc(X, Y, fuOptions, ARect, Text, Length); -end; - -procedure TheTextDrawerEx.ExtTextOutFixed(X, Y: Integer; fuOptions: UINT; - const ARect: TRect; const Text: WideString; Length: Integer); -begin - Windows.ExtTextOutW(StockDC, X, Y, fuOptions, @ARect, @Text[1], Length, nil); -end; - -procedure TheTextDrawerEx.ExtTextOutForDBCS(X, Y: Integer; fuOptions: UINT; - const ARect: TRect; Text: PAnsiChar; Length: Integer); -var - pCrnt: PAnsiChar; - pTail: PAnsiChar; - pRun: PAnsiChar; - - procedure GetSBCharRange; - begin - while (pRun <> pTail) and (not (pRun^ in LeadBytes)) do - Inc(pRun); - end; - - procedure GetDBCharRange; - begin - while (pRun <> pTail) and (pRun^ in LeadBytes) do - Inc(pRun, 2); - end; - -var - TmpRect: TRect; - Len: Integer; - n: Integer; -begin - pCrnt := Text; - pRun := Text; - pTail := PAnsiChar(Integer(Text) + Length); - TmpRect := ARect; - while pCrnt < pTail do - begin - GetSBCharRange; - if pRun <> pCrnt then - begin - SetTextCharacterExtra(StockDC, FCharExtra + FCrntDx); - Len := Integer(pRun) - Integer(pCrnt); - with TmpRect do - begin - n := GetCharWidth * Len; - Right := Min(Left + n + GetCharWidth, ARect.Right); - Windows.ExtTextOut(StockDC, X, Y, fuOptions, @TmpRect, pCrnt, Len, nil); - Inc(X, n); - Inc(Left, n); - end; - end; - pCrnt := pRun; - if pRun = pTail then - break; - - GetDBCharRange; - SetTextCharacterExtra(StockDC, FCharExtra + FCrntDBDx); - Len := Integer(pRun) - Integer(pCrnt); - with TmpRect do - begin - n := GetCharWidth * Len; - Right := Min(Left + n + GetCharWidth, ARect.Right); - Windows.ExtTextOut(StockDC, X, Y, fuOptions, @TmpRect, pCrnt, Len, nil); - Inc(X, n); - Inc(Left, n); - end; - pCrnt := pRun; - end; - - if (pCrnt = Text) or // maybe Text is not assigned or Length is 0 - (TmpRect.Right < ARect.Right) then - begin - SetTextCharacterExtra(StockDC, FCharExtra + FCrntDx); - Windows.ExtTextOut(StockDC, X, Y, fuOptions, @TmpRect, nil, 0, nil); - end; -end; - -procedure TheTextDrawerEx.ExtTextOutWithETO(X, Y: Integer; fuOptions: UINT; - const ARect: TRect; const Text: WideString; Length: Integer); -begin - inherited ExtTextOut(X, Y, fuOptions, ARect, Text, Length); -end; - -procedure TheTextDrawerEx.TextOutOrExtTextOut(X, Y: Integer; - fuOptions: UINT; const ARect: TRect; const Text: WideString; Length: Integer); -begin - // this function may be used when: - // a. the text does not containing any multi-byte characters - // AND - // a-1. current font is TrueType. - // a-2. current font is RasterType and it is not italicic. - with ARect do - if (Length > 0) and - (Left = X) and (Top = Y) and - ((Bottom - Top) = GetCharHeight) and - (Left + GetCharWidth * (Length + 1) > Right) then - Windows.TextOutW(StockDC, X, Y, @Text[1], Length) - else - Windows.ExtTextOutW(StockDC, X, Y, fuOptions, @ARect, @Text[1], Length, nil) -end; - -{$IFNDEF HE_LEADBYTES} -procedure InitializeLeadBytes; -var - c: AnsiChar; -begin - for c := Low(AnsiChar) to High(AnsiChar) do - if IsDBCSLeadByte(Byte(c)) then - Include(LeadBytes, c); + Result := SynUnicode.GetTextSize(FStockBitmap.Canvas.Handle, Text, Count).cX; end; -{$ENDIF} // HE_LEADBYTES initialization -{$IFNDEF HE_LEADBYTES} - InitializeLeadBytes; -{$ENDIF} - finalization - gFontsInfoManager.Free; end. |
From: Maël Hörz <ma...@us...> - 2008-01-30 20:39:52
|
Update of /cvsroot/synedit/SynEdit/Source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19237/Source Modified Files: Tag: Unicode_2004_08_31 SynEditStrConst.pas SynHighlighterTclTk.pas Log Message: Language name and attribute string constants are used for loading/saving settings. Their counterparts starting with the "Friendly"-prefix should be used for display purposes. For saving/loading from XML it was necessary to adapt some of these constants and remove spaces or special characters like & and *. Index: SynHighlighterTclTk.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynHighlighterTclTk.pas,v retrieving revision 1.18.2.10 retrieving revision 1.18.2.11 diff -u -d -r1.18.2.10 -r1.18.2.11 --- SynHighlighterTclTk.pas 19 Aug 2006 16:12:12 -0000 1.18.2.10 +++ SynHighlighterTclTk.pas 30 Jan 2008 20:39:46 -0000 1.18.2.11 @@ -67,12 +67,6 @@ SysUtils, Classes; -const - SYNS_AttrOptions = 'Options'; - SYNS_AttrPath = 'PathName'; - SYNS_TixKeyWords = 'Tix keywords'; - SYNS_WidgetWords = 'BWidget keywords'; - type TtkTokenKind = (tkSymbol, tkKey, tkComment, tkIdentifier, tkNull, tkNumber, tkSecondKey, tkTixKey, tkSpace, tkString, tkOptions, tkVariable, tkWidgetKey, tkPath, tkUnknown); @@ -342,11 +336,11 @@ fSecondKeyAttri.Style := [fsBold]; AddAttribute(fSecondKeyAttri); - fTixKeyAttri := TSynHighlighterAttributes.Create(SYNS_TixKeyWords, SYNS_TixKeyWords); + fTixKeyAttri := TSynHighlighterAttributes.Create(SYNS_AttrTixKeyWords, SYNS_FriendlyAttrTixKeyWords); fTixKeyAttri.Style := [fsBold, fsItalic]; AddAttribute(fTixKeyAttri); - fWidgetKeyAttri := TSynHighlighterAttributes.Create(SYNS_WidgetWords, SYNS_WidgetWords); + fWidgetKeyAttri := TSynHighlighterAttributes.Create(SYNS_AttrWidgetWords, SYNS_FriendlyAttrWidgetWords); fWidgetKeyAttri.Style := [fsBold, fsItalic]; AddAttribute(fWidgetKeyAttri); @@ -359,11 +353,11 @@ fSymbolAttri := TSynHighlighterAttributes.Create(SYNS_AttrSymbol, SYNS_FriendlyAttrSymbol); AddAttribute(fSymbolAttri); SetAttributesOnChange(DefHighlightChange); - fOptionsAttri := TSynHighlighterAttributes.Create(SYNS_AttrOptions, SYNS_AttrOptions); + fOptionsAttri := TSynHighlighterAttributes.Create(SYNS_AttrOptions, SYNS_FriendlyAttrOptions); AddAttribute(fOptionsAttri); fVariableAttri := TSynHighlighterAttributes.Create(SYNS_AttrVariable, SYNS_FriendlyAttrVariable); AddAttribute(fVariableAttri); - fPathAttri := TSynHighlighterAttributes.Create(SYNS_AttrPath, SYNS_AttrPath); + fPathAttri := TSynHighlighterAttributes.Create(SYNS_AttrPath, SYNS_FriendlyAttrPath); AddAttribute(fPathAttri); fRange := rsUnknown; Index: SynEditStrConst.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEditStrConst.pas,v retrieving revision 1.41.2.3 retrieving revision 1.41.2.4 diff -u -d -r1.41.2.3 -r1.41.2.4 --- SynEditStrConst.pas 22 May 2006 10:50:11 -0000 1.41.2.3 +++ SynEditStrConst.pas 30 Jan 2008 20:39:46 -0000 1.41.2.4 @@ -46,46 +46,51 @@ SYNS_ComponentsPage = 'SynEdit'; SYNS_HighlightersPage = 'SynEdit Highlighters'; -// NOTE: the following constants are used to store information to the registry. -// If you want translated/more detailed descriptions use the resourcestrings, -// i.e. the "friendly" versions below. +// NOTE: the following constants are used to store information to the registry, +// INI files or XML files. For maximum compatibility only the chars +// 'A'..'Z', 'a'..'z', '0'..'9', '_' and '-' are allowed! +// +// If you want translated/"pretty"/more detailed descriptions use the +// resourcestrings, i.e. the "friendly" versions below. // constant names for highlighter attributes +// +// const - SYNS_AttrAreaAIdentifier = 'Area A Identifier'; + SYNS_AttrAreaAIdentifier = 'Area_A_Identifier'; SYNS_AttrArrowHead = 'ArrowHead'; SYNS_AttrAsm = 'Asm'; - SYNS_AttrAsmComment = 'Asm Comment'; - SYNS_AttrAsmKey = 'Asm Key'; + SYNS_AttrAsmComment = 'AsmComment'; + SYNS_AttrAsmKey = 'AsmKey'; SYNS_AttrAssembler = 'Assembler'; SYNS_AttrAttribute = 'Attribute'; - SYNS_AttrAttributeName = 'Attribute Name'; - SYNS_AttrAttributeValue = 'Attribute Value'; - SYNS_AttrBasicTypes = 'Basic Types'; + SYNS_AttrAttributeName = 'AttributeName'; + SYNS_AttrAttributeValue = 'AttributeValue'; + SYNS_AttrBasicTypes = 'BasicTypes'; SYNS_AttrBlock = 'Block'; - SYNS_AttrBoolean = 'Boolean value'; + SYNS_AttrBoolean = 'Booleanvalue'; SYNS_AttrBrackets = 'Brackets'; - SYNS_AttrCDATASection = 'CDATA Section'; + SYNS_AttrCDATASection = 'CDATA-Section'; SYNS_AttrCharacter = 'Character'; SYNS_AttrClass = 'Class'; - SYNS_AttrColor = 'Color Value'; + SYNS_AttrColor = 'ColorValue'; SYNS_AttrComment = 'Comment'; SYNS_AttrCondition = 'Condition'; - SYNS_AttrConditionalComment = 'Conditional Comment'; - SYNS_AttrDataType = 'Data Type'; - SYNS_AttrDebugLines = 'Debugging Lines'; - SYNS_AttrDefaultPackage = 'Default Packages'; - SYNS_AttrDelimitedIdentifier = 'Delimited Identifier'; + SYNS_AttrConditionalComment = 'ConditionalComment'; + SYNS_AttrDataType = 'DataType'; + SYNS_AttrDebugLines = 'DebuggingLines'; + SYNS_AttrDefaultPackage = 'DefaultPackages'; + SYNS_AttrDelimitedIdentifier = 'DelimitedIdentifier'; SYNS_AttrDir = 'Direction'; SYNS_AttrDirections = 'Directions'; SYNS_AttrDirective = 'Directive'; - SYNS_AttrDOCTYPESection = 'DOCTYPE Section'; + SYNS_AttrDOCTYPESection = 'DOCTYPE-Section'; SYNS_AttrDocumentation = 'Documentation'; - SYNS_AttrElementName = 'Element Name'; - SYNS_AttrEmbedSQL = 'Embedded SQL'; - SYNS_AttrEmbedText = 'Embedded Text'; - SYNS_AttrEntityReference = 'Entity Reference'; - SYNS_AttrEscapeAmpersand = 'Escape Ampersand'; + SYNS_AttrElementName = 'ElementName'; + SYNS_AttrEmbedSQL = 'EmbeddedSQL'; + SYNS_AttrEmbedText = 'EmbeddedText'; + SYNS_AttrEntityReference = 'EntityReference'; + SYNS_AttrEscapeAmpersand = 'EscapeAmpersand'; SYNS_AttrEvent = 'Event'; SYNS_AttrException = 'Exception'; SYNS_AttrFirstTri = 'FirstTri'; @@ -94,82 +99,85 @@ SYNS_AttrFourthTri = 'FourthTri'; SYNS_AttrFunction = 'Function'; SYNS_AttrHexadecimal = 'Hexadecimal'; - SYNS_AttrIcon = 'Icon Reference'; + SYNS_AttrIcon = 'IconReference'; SYNS_AttrIdentifier = 'Identifier'; - SYNS_AttrIllegalChar = 'Illegal Char'; + SYNS_AttrIllegalChar = 'IllegalChar'; SYNS_AttrInclude = 'Include'; - SYNS_AttrIndicator = 'Indicator Area'; + SYNS_AttrIndicator = 'IndicatorArea'; SYNS_AttrIndirect = 'Indirect'; - SYNS_AttrInvalidSymbol = 'Invalid Symbol'; - SYNS_AttrInternalFunction = 'Internal Function'; + SYNS_AttrInvalidSymbol = 'InvalidSymbol'; + SYNS_AttrInternalFunction = 'InternalFunction'; SYNS_AttrKey = 'Key'; SYNS_AttrLabel = 'Label'; SYNS_AttrLace = 'Lace'; SYNS_AttrLine = 'Line'; SYNS_AttrMacro = 'Macro'; SYNS_AttrMarker = 'Marker'; - SYNS_AttrMathMode = 'Math Mode'; + SYNS_AttrMathMode = 'MathMode'; SYNS_AttrMessage = 'Message'; SYNS_AttrMiscellaneous = 'Miscellaneous'; - SYNS_AttrNamespaceAttrName = 'Namespace Attribute Name'; - SYNS_AttrNamespaceAttrValue = 'Namespace Attribute Value'; - SYNS_AttrNonReservedKeyword = 'Non-reserved Keyword'; + SYNS_AttrNamespaceAttrName = 'NamespaceAttributeName'; + SYNS_AttrNamespaceAttrValue = 'NamespaceAttributeValue'; + SYNS_AttrNonReservedKeyword = 'NonreservedKeyword'; SYNS_AttrNull = 'Null'; SYNS_AttrNumber = 'Number'; SYNS_AttrOctal = 'Octal'; SYNS_AttrOperator = 'Operator'; - SYNS_AttrOperatorAndSymbols = 'Operator And Symbols'; + SYNS_AttrOperatorAndSymbols = 'OperatorAndSymbols'; SYNS_AttrOpLine = 'OpLine'; - SYNS_AttrPLSQL = 'PL/SQL Reserved Word'; + SYNS_AttrOptions = 'Options'; + SYNS_AttrPath = 'PathName'; + SYNS_AttrPLSQL = 'PLSQL-ReservedWord'; SYNS_AttrPragma = 'Pragma'; SYNS_AttrPredefined = 'Predefined'; SYNS_AttrPreprocessor = 'Preprocessor'; - SYNS_AttrProcessingInstr = 'Processing Instruction'; + SYNS_AttrProcessingInstr = 'ProcessingInstruction'; SYNS_AttrProperty = 'Property'; SYNS_AttrQuad = 'Quad'; SYNS_AttrQualifier = 'Qualifier'; SYNS_AttrRegister = 'Register'; - SYNS_AttrReservedWord = 'Reserved Word'; - SYNS_AttrResultValue = 'Result Value'; - SYNS_AttrRoundBracket = 'Round Bracket'; + SYNS_AttrReservedWord = 'ReservedWord'; + SYNS_AttrResultValue = 'ResultValue'; + SYNS_AttrRoundBracket = 'RoundBracket'; SYNS_AttrRpl = 'Rpl'; - SYNS_AttrRplKey = 'Rpl Key'; - SYNS_AttrRplComment = 'Rpl Comment'; + SYNS_AttrRplKey = 'Rpl-Key'; + SYNS_AttrRplComment = 'Rpl-Comment'; SYNS_AttrSASM = 'SASM'; - SYNS_AttrSASMComment = 'SASM Comment'; - SYNS_AttrSASMKey = 'SASM Key'; - SYNS_AttrSecondReservedWord = 'Second Reserved Word'; + SYNS_AttrSASMComment = 'SASM-Comment'; + SYNS_AttrSASMKey = 'SASM-Key'; + SYNS_AttrSecondReservedWord = 'SecondReservedWord'; SYNS_AttrSecondTri = 'SecondTri'; SYNS_AttrSection = 'Section'; - SYNS_AttrSequence = 'Sequence Number Area'; + SYNS_AttrSequence = 'SequenceNumberArea'; SYNS_AttrShape = 'Shape'; - SYNS_AttrSingleString = 'Single Quoted String'; + SYNS_AttrSingleString = 'SingleQuotedString'; SYNS_AttrSpace = 'Space'; - SYNS_AttrSpecialVariable = 'Special Variable'; - SYNS_AttrSQLKey = 'SQL Keyword'; - SYNS_AttrSQLPlus = 'SQL*Plus Command'; - SYNS_AttrSquareBracket = 'Square Bracket'; + SYNS_AttrSpecialVariable = 'SpecialVariable'; + SYNS_AttrSQLKey = 'SQL-Keyword'; + SYNS_AttrSQLPlus = 'SQLPlus-Command'; + SYNS_AttrSquareBracket = 'SquareBracket'; SYNS_AttrString = 'String'; SYNS_AttrSymbol = 'Symbol'; - SYNS_AttrSyntaxError = 'Syntax Error'; - SYNS_AttrSystem = 'System Functions and Variables'; - SYNS_AttrSystemValue = 'System Value'; - SYNS_AttrTagArea = 'Tag Area'; - SYNS_AttrTableName = 'Table Name'; + SYNS_AttrSyntaxError = 'SyntaxError'; + SYNS_AttrSystem = 'SystemFunctionsAndVariables'; + SYNS_AttrSystemValue = 'SystemValue'; + SYNS_AttrTagArea = 'TagArea'; + SYNS_AttrTableName = 'TableName'; SYNS_AttrTerminator = 'Terminator'; - SYNS_AttrTeXCommand = 'TeX Command'; + SYNS_AttrTeXCommand = 'TeX-Command'; SYNS_AttrText = 'Text'; - SYNS_AttrTextMathMode = 'Text in Math Mode'; + SYNS_AttrTextMathMode = 'TextInMathMode'; SYNS_AttrThirdTri = 'ThirdTri'; + SYNS_AttrTixKeyWords = 'Tix-Keywords'; SYNS_AttrTriangle = 'Triangle'; - SYNS_AttrUndefinedProperty = 'Undefined Property'; - SYNS_AttrUnknownWord = 'Unknown Word'; + SYNS_AttrUndefinedProperty = 'UndefinedProperty'; + SYNS_AttrUnknownWord = 'UnknownWord'; SYNS_AttrURI = 'URI'; - SYNS_AttrUser = 'User Functions and Variables'; - SYNS_AttrUserFunction = 'User Functions'; + SYNS_AttrUser = 'UserFunctionsAndVariables'; + SYNS_AttrUserFunction = 'UserFunctions'; SYNS_AttrValue = 'Value'; SYNS_AttrVariable = 'Variable'; - SYNS_AttrVisitedURI = 'Visited URI'; + SYNS_AttrVisitedURI = 'VisitedURI'; SYNS_AttrVrmlAppearance = 'Vrml_Appearance'; SYNS_AttrVrmlAttribute = 'Vrml_Attribute'; SYNS_AttrVrmlDefinition = 'Vrml_Definition'; @@ -187,65 +195,66 @@ SYNS_AttrVrmlViewpoint = 'Vrml_Viewpoint'; SYNS_AttrVrmlWorldInfo = 'Vrml_WorldInfo'; SYNS_AttrWhitespace = 'Whitespace'; + SYNS_AttrWidgetWords = 'Widget-Keywords'; SYNS_AttrX3DDocType = 'X3DDocType'; SYNS_AttrX3DHeader = 'X3DHeader'; // constant language names SYNS_LangHP48 = 'HP48'; SYNS_LangCAClipper = 'CA-Clipper'; - SYNS_LangCPM = 'COAS Product Manager Report'; - SYNS_LangCPP = 'C/C++'; - SYNS_LangCS = 'C#'; + SYNS_LangCPM = 'COAS_Product_Manager_Report'; + SYNS_LangCPP = 'CandCPlusPlus'; + SYNS_LangCS = 'CSharp'; SYNS_LangJava = 'Java'; SYNS_LangPerl = 'Perl'; - SYNS_LangBatch = 'MS-DOS Batch'; - SYNS_LangDfm = 'Borland Forms'; + SYNS_LangBatch = 'MS-DOS_Batch'; + SYNS_LangDfm = 'BorlandForms'; SYNS_LangAWK = 'AWK'; - SYNS_LangCORBAIDL = 'CORBA IDL'; + SYNS_LangCORBAIDL = 'CORBA_IDL'; SYNS_LangHTML = 'HTML'; - SYNS_LangVBSScript = 'MS VBScript'; + SYNS_LangVBSScript = 'MS-VBScript'; SYNS_LangGalaxy = 'Galaxy'; SYNS_LangGeneral = 'General'; - SYNS_LangPascal = 'Object Pascal'; - SYNS_LangX86Asm = 'x86 Assembly'; + SYNS_LangPascal = 'ObjectPascal'; + SYNS_LangX86Asm = 'x86Assembly'; SYNS_LangPython = 'Python'; - SYNS_LangTclTk = 'Tcl/Tk'; + SYNS_LangTclTk = 'TclTk'; SYNS_LangSQL = 'SQL'; SYNS_LangGembase = 'Gembase'; SYNS_LangINI = 'INI'; - SYNS_LangSML = 'Standard ML'; - SYNS_LangVisualBASIC = 'Visual Basic'; + SYNS_LangSML = 'StandardML'; + SYNS_LangVisualBASIC = 'VisualBasic'; SYNS_LangADSP21xx = 'ADSP21xx'; SYNS_LangPHP = 'PHP'; - SYNS_LangSybaseSQL = 'Sybase SQL'; - SYNS_LangGeneralMulti = 'General Multi-Highlighter'; - SYNS_LangCache = 'Cache Object Script'; - SYNS_LangCSS = 'Cascading Style Sheet'; + SYNS_LangSybaseSQL = 'SybaseSQL'; + SYNS_LangGeneralMulti = 'General_Multi-Highlighter'; + SYNS_LangCache = 'CacheObjectScript'; + SYNS_LangCSS = 'CascadingStyleSheet'; SYNS_LangJScript = 'JavaScript'; SYNS_LangKIX = 'KiXtart'; - SYNS_LangBaan = 'Baan 4GL'; + SYNS_LangBaan = 'Baan_4GL'; SYNS_LangFoxpro = 'Foxpro'; SYNS_LangFortran = 'Fortran'; - SYNS_Lang68HC11 = '68HC11 Assembler'; + SYNS_Lang68HC11 = '68HC11_Assembler'; SYNS_LangProgress = 'Progress'; - SYNS_LangInno = 'Inno Setup Script'; + SYNS_LangInno = 'InnoSetupScript'; SYNS_LangModelica = 'Modelica'; - SYNS_LangModula3 = 'Modula 3'; - SYNS_LangSDD = 'Semanta Data Dictionary'; + SYNS_LangModula3 = 'Modula3'; + SYNS_LangSDD = 'SemantaDataDictionary'; SYNS_LangXML = 'XML'; SYNS_LangGWS = 'GW-TEL'; - SYNS_LangSynGenMsgfiles = 'SynGen Msg'; + SYNS_LangSynGenMsgfiles = 'SynGen_Msg'; SYNS_LangUnreal = 'Unreal'; - SYNS_LangST = 'Structured Text'; + SYNS_LangST = 'StructuredText'; SYNS_LangCOBOL = 'COBOL'; SYNS_LangTeX = 'TeX'; SYNS_LangRC = 'Resource'; SYNS_LangRuby = 'Ruby'; - SYNS_LangNameUNIXShellScript = 'UNIX Shell Script'; + SYNS_LangNameUNIXShellScript = 'UNIXShellScript'; SYNS_LangHaskell = 'Haskell'; - SYNS_LangDOT = 'DOT Graph Drawing Description language'; + SYNS_LangDOT = 'DOT_Graph_Drawing_Description_language'; SYNS_LangEiffel = 'Eiffel'; - SYNS_LangLDraw = 'LEGO LDraw'; + SYNS_LangLDraw = 'LEGO_LDraw'; SYNS_LangUnknown = '<Unknown>'; SYNS_LangURI = 'URI'; SYNS_LangVrml97 = 'Vrml97'; @@ -279,7 +288,7 @@ SYNS_FriendlyAttrDataType = 'Data Type'; SYNS_FriendlyAttrDebugLines = 'Debugging Lines'; SYNS_FriendlyAttrDefaultPackage = 'Default Packages'; - SYNS_FriendlyAttrDelimitedIdentifier = 'Delimited Identifier'; + SYNS_FriendlyAttrDelimitedIdentifier = 'Delimited Identifier'; SYNS_FriendlyAttrDir = 'Direction'; SYNS_FriendlyAttrDirections = 'Directions'; SYNS_FriendlyAttrDirective = 'Directive'; @@ -324,6 +333,8 @@ SYNS_FriendlyAttrOperator = 'Operator'; SYNS_FriendlyAttrOperatorAndSymbols = 'Operator And Symbols'; SYNS_FriendlyAttrOpLine = 'OpLine'; + SYNS_FriendlyAttrOptions = 'Options'; + SYNS_FriendlyAttrPath = 'Pathname'; SYNS_FriendlyAttrPLSQL = 'PL/SQL Reserved Word'; SYNS_FriendlyAttrPragma = 'Pragma'; SYNS_FriendlyAttrPredefined = 'Predefined'; @@ -365,8 +376,9 @@ SYNS_FriendlyAttrText = 'Text'; SYNS_FriendlyAttrTextMathMode = 'Text in Math Mode'; SYNS_FriendlyAttrThirdTri = 'ThirdTri'; + SYNS_FriendlyAttrTixKeyWords = 'Tix Keywords'; SYNS_FriendlyAttrTriangle = 'Triangle'; - SYNS_FriendlyAttrUndefinedProperty = 'Undefined Property'; + SYNS_FriendlyAttrUndefinedProperty = 'Undefined Property'; SYNS_FriendlyAttrUnknownWord = 'Unknown Word'; SYNS_FriendlyAttrURI = 'URI'; SYNS_FriendlyAttrUser = 'User Functions and Variables'; @@ -391,6 +403,7 @@ SYNS_FriendlyAttrVrmlViewpoint = 'Vrml_Viewpoint'; SYNS_FriendlyAttrVrmlWorldInfo = 'Vrml_WorldInfo'; SYNS_FriendlyAttrWhitespace = 'Whitespace'; + SYNS_FriendlyAttrWidgetWords = 'Widget Keywords'; SYNS_FriendlyAttrX3DDocType = 'X3DDocType'; SYNS_FriendlyAttrX3DHeader = 'X3DHeader'; |