Cleanup SynEdit: Removed unnecessary uses, redeclaration's,...

git-svn-id: trunk@18519 -
This commit is contained in:
martin 2009-01-31 16:33:20 +00:00
parent f6ffc3b079
commit 4e1e17c667
17 changed files with 25 additions and 49 deletions

View File

@ -44,7 +44,7 @@ unit SynBeautifierPas;
interface
uses
Math, Classes, SysUtils, LCLProc, SynEdit, SynBeautifier, SynEditTextBuffer,
Classes, SysUtils, LCLProc, SynEdit, SynBeautifier, SynEditTextBuffer,
SynEditHighlighter, SynHighlighterPas;
type

View File

@ -155,7 +155,7 @@ type
ESynEditError = class(Exception);
TDropFilesEvent = procedure(Sender: TObject; X, Y: integer; AFiles: TStrings)
TSynDropFilesEvent = procedure(Sender: TObject; X, Y: integer; AFiles: TStrings)
of object;
THookedCommandEvent = procedure(Sender: TObject; AfterProcessing: boolean;
@ -173,13 +173,6 @@ type
TReplaceTextEvent = procedure(Sender: TObject; const ASearch, AReplace:
string; Line, Column: integer; var ReplaceAction: TSynReplaceAction) of object;
{$IFDEF SYN_LAZARUS}
TSpecialLineMarkupEvent = procedure(Sender: TObject; Line: integer;
var Special: boolean; Markup: TSynSelectedColor) of object;
{$ENDIF}
TSpecialLineColorsEvent = procedure(Sender: TObject; Line: integer;
var Special: boolean; var FG, BG: TColor) of object;
TSynEditCaretType = (ctVerticalLine, ctHorizontalLine, ctHalfBlock, ctBlock);
TSynStateFlag = (sfCaretChanged, sfScrollbarChanged, sfLinesChanging,
@ -273,13 +266,6 @@ type
TCustomSynEdit = class;
{ Make them visible for Units that use TSynEdit }
TSynEditMark = SynEditMarks.TSynEditMark;
TPlaceMarkEvent = SynEditMarks.TPlaceMarkEvent;
TSynEditMarks = SynEditMarks.TSynEditMarks;
TSynEditMarkList = SynEditMarks.TSynEditMarkList;
TGutterClickEvent = SynGutterBase.TGutterClickEvent;
TSynLineState = (slsNone, slsSaved, slsUnsaved);
@ -425,7 +411,7 @@ type
fOnChange: TNotifyEvent;
fOnClearMark: TPlaceMarkEvent; // djlp 2000-08-29
fOnCommandProcessed: TProcessCommandEvent;
fOnDropFiles: TDropFilesEvent;
fOnDropFiles: TSynDropFilesEvent;
fOnPaint: TPaintEvent;
fOnPlaceMark: TPlaceMarkEvent;
fOnProcessCommand: TProcessCommandEvent;
@ -958,7 +944,7 @@ type
write fOnClearMark;
property OnCommandProcessed: TProcessCommandEvent
read fOnCommandProcessed write fOnCommandProcessed;
property OnDropFiles: TDropFilesEvent read fOnDropFiles write fOnDropFiles;
property OnDropFiles: TSynDropFilesEvent read fOnDropFiles write fOnDropFiles;
property OnGutterClick: TGutterClickEvent
read GetOnGutterClick write SetOnGutterClick;
property OnPaint: TPaintEvent read fOnPaint write fOnPaint;

View File

@ -31,7 +31,7 @@ interface
uses
LCLProc, Graphics,
Classes, SysUtils, SynEditTypes, SynEditTextBuffer, SynEditTextBase,
SynEditMiscClasses, SynEditPointClasses;
SynEditMiscClasses, SynEditMiscProcs, SynEditPointClasses;
type
@ -293,8 +293,6 @@ type
implementation
uses
SynEditMiscProcs;
{ TSynTextFoldAVLNodeData }

View File

@ -26,7 +26,8 @@ unit SynEditMarkup;
interface
uses
Classes, SysUtils, Graphics, SynEditTextBase, SynEditTextBuffer, SynEditMiscClasses, Controls, SynEditHighlighter;
Classes, SysUtils, Graphics, SynEditTextBase, SynEditTextBuffer,
SynEditMiscClasses, SynEditMiscProcs, Controls, SynEditHighlighter;
type
@ -146,7 +147,7 @@ type
implementation
uses SynEdit, SynEditMiscProcs;
uses SynEdit;
{ TSynEditMarkup }

View File

@ -52,7 +52,7 @@ type
end;
implementation
uses SynEdit; //, SynEditTypes;
uses SynEdit;
{ TSynEditMarkupCtrlMouseLink }

View File

@ -47,7 +47,7 @@ uses
{$ELSE}
Windows,
{$ENDIF}
Classes, Graphics, Controls, SysUtils, SynEditTypes;
Classes, Graphics, Controls, SysUtils, SynEditMiscProcs, SynEditTypes;
type
@ -261,9 +261,6 @@ type
implementation
uses
SynEditMiscProcs;
{ TSynSelectedColor }
constructor TSynSelectedColor.Create;

View File

@ -239,7 +239,7 @@ end;
{***}
// mh: Please don't change; no stack frame and efficient register use.
function GetHasTabs(pLine: PChar; var CharsBefore: integer): boolean;
function GetHasTabs(pLine: PChar; out CharsBefore: integer): boolean;
begin
CharsBefore := 0;
if Assigned(pLine) then begin
@ -254,7 +254,7 @@ begin
end;
{$IFDEF SYN_LAZARUS}
function StringHasTabs(const Line: string; var CharsBefore: integer): boolean;
function StringHasTabs(const Line: string; out CharsBefore: integer): boolean;
var LineLen: integer;
begin
LineLen:=length(Line);

View File

@ -1268,12 +1268,7 @@ end;
{ TSynEditStringMemory }
type
PString = ^String;
PObject = ^TObject;
PByte = ^Byte;
PWord = ^Word;
PLong = ^LongWord;
PQLong = ^QWord;
const
AttributeOfset = SizeOf(String) + SizeOf(TObject);
@ -1373,8 +1368,8 @@ begin
case Size of
1 : Result := Pointer(PtrUInt((PByte(FMem + Index * FAttributeSize + AttributeOfset + Pos))^));
2 : Result := Pointer(PtrUInt((PWord(FMem + Index * FAttributeSize + AttributeOfset + Pos))^));
4 : Result := Pointer(PtrUInt((PLong(FMem + Index * FAttributeSize + AttributeOfset + Pos))^));
8 : Result := Pointer(PtrUInt((PQLong(FMem + Index * FAttributeSize + AttributeOfset + Pos))^));
4 : Result := Pointer(PtrUInt((PLongWord(FMem + Index * FAttributeSize + AttributeOfset + Pos))^));
8 : Result := Pointer(PtrUInt((PQWord(FMem + Index * FAttributeSize + AttributeOfset + Pos))^));
end;
end;
@ -1383,8 +1378,8 @@ begin
case Size of
1 : (PByte(FMem + Index * FAttributeSize + AttributeOfset + Pos))^ := Byte(PtrUInt(AValue));
2 : (PWord(FMem + Index * FAttributeSize + AttributeOfset + Pos))^ := Word(PtrUInt(AValue));
4 : (PLong(FMem + Index * FAttributeSize + AttributeOfset + Pos))^ := LongWord(PtrUInt(AValue));
8 : (PQLong(FMem + Index * FAttributeSize + AttributeOfset + Pos))^ := QWord(PtrUInt(AValue));
4 : (PLongWord(FMem + Index * FAttributeSize + AttributeOfset + Pos))^ := LongWord(PtrUInt(AValue));
8 : (PQWord(FMem + Index * FAttributeSize + AttributeOfset + Pos))^ := QWord(PtrUInt(AValue));
end;
end;

View File

@ -27,8 +27,7 @@ interface
uses
LCLProc,
Classes, SysUtils, SynEditTypes, SynEditTextBase, SynEditTextBuffer,
SynEditMiscClasses, SynEditMiscProcs;
Classes, SysUtils, SynEditTextBase, SynEditTextBuffer, SynEditMiscProcs;
const
// Offset to add to LengthOfLine, if Line has no tabs.

View File

@ -29,7 +29,7 @@ interface
uses
LCLProc,
Classes, SysUtils, SynEditTypes, SynEditTextBase, SynEditTextBuffer,
SynEditMiscClasses, SynEditPointClasses;
SynEditPointClasses;
type

View File

@ -5,7 +5,7 @@ unit SynGutter;
interface
uses
Classes, SysUtils, Controls, Graphics, LCLType, LCLIntf, LCLProc, LCLClasses,
Classes, SysUtils, Controls, Graphics, LCLType, LCLIntf, LCLProc,
SynEditMarks, SynEditMiscClasses, SynEditMiscProcs, SynEditFoldedView,
SynTextDrawer, SynGutterBase, SynGutterLineNumber, SynGutterCodeFolding,
SynGutterMarks, SynGutterChanges;

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, Graphics, Controls, SynEditMarks,
SynEditMiscClasses, SynEditMiscProcs, SynEditFoldedView, SynTextDrawer;
SynEditMiscClasses, SynEditFoldedView, SynTextDrawer;
type

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, Graphics, LCLType, LCLIntf, SynGutterBase,
SynEditMiscClasses, SynEditMiscProcs, SynEditFoldedView;
SynEditMiscProcs, SynEditFoldedView;
type

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, Graphics, LCLType, LCLIntf, SynGutterBase,
SynEditMiscProcs, SynEditMiscClasses, SynTextDrawer, SynEditFoldedView;
SynEditMiscProcs, SynTextDrawer, SynEditFoldedView;
type

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, Graphics, LCLType, LCLIntf, SynGutterBase,
SynEditMiscClasses, SynEditMiscProcs, SynEditFoldedView;
SynEditMiscClasses, SynEditMiscProcs, SynEditFoldedView, SynEditMarks;
type

View File

@ -50,7 +50,7 @@ uses
// synedit
SynEditStrConst, SynEditTypes, SynEdit, SynRegExpr, SynEditHighlighter,
SynEditAutoComplete, SynEditKeyCmds, SynCompletion, SynEditMiscClasses,
SynEditMarkupHighAll, SynGutterLineNumber,
SynEditMarkupHighAll, SynGutterLineNumber, SynEditMarks,
// IDE interface
MacroIntf, ProjectIntf, SrcEditorIntf, MenuIntf, LazIDEIntf, PackageIntf,
IDEDialogs, IDEHelpIntf, IDEWindowIntf, IDEImagesIntf,

View File

@ -39,7 +39,7 @@ interface
uses
Classes, SysUtils, LCLProc, LResources, Graphics, GraphType, Controls, Menus,
AVL_Tree, SynEdit, IDEProcs, MenuIntf, EditorOptions;
AVL_Tree, SynEdit, SynEditMarks, IDEProcs, MenuIntf, EditorOptions;
type
TSourceMarks = class;