SynEdit: Clean up: patch by zaher dirkey / issue #0024174

git-svn-id: trunk@41048 -
This commit is contained in:
martin 2013-05-06 11:18:42 +00:00
parent cb29a62dfe
commit 1c23acb238
4 changed files with 9 additions and 49 deletions

View File

@ -4448,18 +4448,16 @@ begin
end; end;
procedure TCustomSynEdit.WMDropFiles(var Msg: TMessage); procedure TCustomSynEdit.WMDropFiles(var Msg: TMessage);
{$IFNDEF SYN_LAZARUS} {TODO: DropFiles
// ToDo DropFiles
var var
i, iNumberDropped: integer; i, iNumberDropped: integer;
szPathName: array[0..260] of char; szPathName: array[0..260] of char;
Point: TPoint; Point: TPoint;
FilesList: TStringList; FilesList: TStringList;
{$ENDIF} }
begin begin
{$IFDEF SYN_LAZARUS}
LastMouseCaret:=Point(-1,-1); LastMouseCaret:=Point(-1,-1);
{$ELSE} {TODO: DropFiles
try try
if Assigned(fOnDropFiles) then begin if Assigned(fOnDropFiles) then begin
FilesList := TStringList.Create; FilesList := TStringList.Create;
@ -4481,8 +4479,7 @@ begin
finally finally
Msg.Result := 0; Msg.Result := 0;
DragFinish(THandle(Msg.wParam)); DragFinish(THandle(Msg.wParam));
end; end;}
{$ENDIF}
end; end;
procedure TCustomSynEdit.WMExit(var Message: TLMExit); procedure TCustomSynEdit.WMExit(var Message: TLMExit);
@ -7736,12 +7733,9 @@ procedure TCustomSynEdit.CreateWnd;
begin begin
inherited; inherited;
if (eoDropFiles in fOptions) and not (csDesigning in ComponentState) then if (eoDropFiles in fOptions) and not (csDesigning in ComponentState) then
{$IFDEF SYN_LAZARUS}
// ToDo DragAcceptFiles // ToDo DragAcceptFiles
//old DragAcceptFiles(Handle, TRUE);
; ;
{$ELSE}
DragAcceptFiles(Handle, TRUE);
{$ENDIF}
SizeOrFontChanged(true); SizeOrFontChanged(true);
end; end;
@ -7754,12 +7748,9 @@ begin
end; end;
{$ENDIF} {$ENDIF}
if (eoDropFiles in fOptions) and not (csDesigning in ComponentState) then begin if (eoDropFiles in fOptions) and not (csDesigning in ComponentState) then begin
{$IFDEF SYN_LAZARUS}
// ToDo DragAcceptFiles // ToDo DragAcceptFiles
//DragAcceptFiles(Handle, FALSE);
; ;
{$ELSE}
DragAcceptFiles(Handle, FALSE);
{$ENDIF}
end; end;
{$IFDEF EnableDoubleBuf} {$IFDEF EnableDoubleBuf}
FreeAndNil(BufferBitmap); FreeAndNil(BufferBitmap);

View File

@ -61,13 +61,6 @@ type
TSynCoordinateMappingFlag = (scmLimitToLines, scmIncludePartVisible); TSynCoordinateMappingFlag = (scmLimitToLines, scmIncludePartVisible);
TSynCoordinateMappingFlags = set of TSynCoordinateMappingFlag; TSynCoordinateMappingFlags = set of TSynCoordinateMappingFlag;
{$IFDEF SYN_LAZARUS}
// NOTE: the note below is not valid for the LCL which uses UTF-8
{$ELSE}
//NOTE: This will need to be localized and currently will not work with
// MBCS languages like Japanese or Korean.
{$ENDIF}
PSynSelectionMode = ^TSynSelectionMode; PSynSelectionMode = ^TSynSelectionMode;
// to be binary (clipboard) compatible with other (Delphi compiled) synedits // to be binary (clipboard) compatible with other (Delphi compiled) synedits
// use {$PACKENUM 1} // use {$PACKENUM 1}

View File

@ -98,16 +98,8 @@ type
order of keyword entries is maintained. } order of keyword entries is maintained. }
procedure Put(HashKey: Integer; Entry: TSynHashEntry); procedure Put(HashKey: Integer; Entry: TSynHashEntry);
public public
{$IFDEF LIST_CLEAR_NOT_VIRTUAL}
{ Overridden destructor clears the list and frees all contained keyword
entries. }
destructor Destroy; override;
{ Clears the list and frees all contained keyword entries. }
procedure DeleteEntries;
{$ELSE}
{ Clears the list and frees all contained keyword entries. } { Clears the list and frees all contained keyword entries. }
procedure Clear; override; procedure Clear; override;
{$ENDIF}
public public
{ Type-safe access to the first keyword entry for a hashvalue. } { Type-safe access to the first keyword entry for a hashvalue. }
property Items[Index: integer]: TSynHashEntry read Get write Put; default; property Items[Index: integer]: TSynHashEntry read Get write Put; default;
@ -191,17 +183,7 @@ end;
{ TSynHashEntryList } { TSynHashEntryList }
{$IFDEF LIST_CLEAR_NOT_VIRTUAL}
destructor TSynHashEntryList.Destroy;
begin
DeleteEntries;
inherited Destroy;
end;
procedure TSynHashEntryList.DeleteEntries;
{$ELSE}
procedure TSynHashEntryList.Clear; procedure TSynHashEntryList.Clear;
{$ENDIF}
var var
i: integer; i: integer;
begin begin

View File

@ -305,15 +305,9 @@ type
function GetFontsInfoManager: TheFontsInfoManager; function GetFontsInfoManager: TheFontsInfoManager;
(* (*
{$IFNDEF VER93}
{$IFNDEF VER90}
{$IFNDEF VER80}
{$DEFINE HE_ASSERT} {$DEFINE HE_ASSERT}
{$DEFINE HE_LEADBYTES} {$DEFINE HE_LEADBYTES}
{$DEFINE HE_COMPAREMEM} {$DEFINE HE_COMPAREMEM}
{$ENDIF}
{$ENDIF}
{$ENDIF}
*) *)
{$IFNDEF HE_LEADBYTES} {$IFNDEF HE_LEADBYTES}
@ -1392,16 +1386,16 @@ begin
SetTextCharacterExtra(StockDC, CharExtra + FCrntDx); SetTextCharacterExtra(StockDC, CharExtra + FCrntDx);
if IsTrueType or (not (fsItalic in Style)) then if IsTrueType or (not (fsItalic in Style)) then
FExtTextOutProc := FExtTextOutProc :=
{$IFDEF FPC}@{$ENDIF}TextOutOrExtTextOut @TextOutOrExtTextOut
else else
FExtTextOutProc := FExtTextOutProc :=
{$IFDEF FPC}@{$ENDIF}ExtTextOutFixed; @ExtTextOutFixed;
end; end;
True: True:
begin begin
FCrntDBDx := DBCHAR_CALCULATION_FALED; FCrntDBDx := DBCHAR_CALCULATION_FALED;
FExtTextOutProc := FExtTextOutProc :=
{$IFDEF FPC}@{$ENDIF}ExtTextOutWithETO; @ExtTextOutWithETO;
end; end;
end; end;
end; end;