Cleaned Delphi specific defines
Removed dependency from Compilers.inc git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@124 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
b753295148
commit
28532757f9
@ -89,7 +89,6 @@ interface
|
|||||||
|
|
||||||
{$booleval off} // Use fastest possible boolean evaluation.
|
{$booleval off} // Use fastest possible boolean evaluation.
|
||||||
|
|
||||||
{$I Compilers.inc}
|
|
||||||
{$I VTConfig.inc}
|
{$I VTConfig.inc}
|
||||||
|
|
||||||
{$ifdef COMPILER_7_UP}
|
{$ifdef COMPILER_7_UP}
|
||||||
@ -99,9 +98,6 @@ interface
|
|||||||
{$warn UNSAFE_CODE off}
|
{$warn UNSAFE_CODE off}
|
||||||
{$endif COMPILER_7_UP}
|
{$endif COMPILER_7_UP}
|
||||||
|
|
||||||
{$HPPEMIT '#include <objidl.h>'}
|
|
||||||
{$HPPEMIT '#include <oleidl.h>'} // Necessary for BCB 6 SP 2.
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$ifdef UseExternalDragManager}
|
{$ifdef UseExternalDragManager}
|
||||||
virtualdragmanager,
|
virtualdragmanager,
|
||||||
@ -281,9 +277,7 @@ type
|
|||||||
|
|
||||||
TWMPrintClient = TWMPrint;
|
TWMPrintClient = TWMPrint;
|
||||||
|
|
||||||
{ .$ifndef COMPILER_5_UP}
|
|
||||||
TLMContextMenu = TLMMouse;
|
TLMContextMenu = TLMMouse;
|
||||||
{ .$endif COMPILER_5_UP}
|
|
||||||
|
|
||||||
// Be careful when adding new states as this might change the size of the type which in turn
|
// Be careful when adding new states as this might change the size of the type which in turn
|
||||||
// changes the alignment in the node record as well as the stream chunks.
|
// changes the alignment in the node record as well as the stream chunks.
|
||||||
@ -940,9 +934,8 @@ type
|
|||||||
vsOwnerDraw
|
vsOwnerDraw
|
||||||
);
|
);
|
||||||
|
|
||||||
{$ifndef COMPILER_5_UP}
|
|
||||||
TImageIndex = Integer;
|
TImageIndex = Integer;
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
|
|
||||||
TVTHeaderColumnLayout = (
|
TVTHeaderColumnLayout = (
|
||||||
blGlyphLeft,
|
blGlyphLeft,
|
||||||
@ -2503,7 +2496,7 @@ TBaseVirtualTree = class(TCustomControl)
|
|||||||
procedure BeginUpdate;
|
procedure BeginUpdate;
|
||||||
procedure CancelCutOrCopy;
|
procedure CancelCutOrCopy;
|
||||||
function CancelEditNode: Boolean;
|
function CancelEditNode: Boolean;
|
||||||
function CanFocus: Boolean; {$ifdef COMPILER_5_UP} override;{$endif}
|
function CanFocus: Boolean; override;
|
||||||
procedure Clear; virtual;
|
procedure Clear; virtual;
|
||||||
procedure ClearChecked;
|
procedure ClearChecked;
|
||||||
procedure ClearSelection;
|
procedure ClearSelection;
|
||||||
@ -2995,9 +2988,7 @@ type
|
|||||||
property OnColumnDblClick;
|
property OnColumnDblClick;
|
||||||
property OnColumnResize;
|
property OnColumnResize;
|
||||||
property OnCompareNodes;
|
property OnCompareNodes;
|
||||||
{$ifdef COMPILER_5_UP}
|
property OnContextPopup;
|
||||||
property OnContextPopup;
|
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
property OnCreateDataObject;
|
property OnCreateDataObject;
|
||||||
property OnCreateDragManager;
|
property OnCreateDragManager;
|
||||||
property OnCreateEditor;
|
property OnCreateEditor;
|
||||||
@ -3207,9 +3198,7 @@ type
|
|||||||
property OnColumnDblClick;
|
property OnColumnDblClick;
|
||||||
property OnColumnResize;
|
property OnColumnResize;
|
||||||
property OnCompareNodes;
|
property OnCompareNodes;
|
||||||
{$ifdef COMPILER_5_UP}
|
property OnContextPopup;
|
||||||
property OnContextPopup;
|
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
property OnCreateDataObject;
|
property OnCreateDataObject;
|
||||||
property OnCreateDragManager;
|
property OnCreateDragManager;
|
||||||
property OnCreateEditor;
|
property OnCreateEditor;
|
||||||
@ -5210,8 +5199,9 @@ begin
|
|||||||
Terminate;
|
Terminate;
|
||||||
WorkEvent.SetEvent;
|
WorkEvent.SetEvent;
|
||||||
|
|
||||||
|
//lcl: probably not necessary under fpc. Remove later
|
||||||
// The following work around is no longer necessary with Delphi 6 and up.
|
// The following work around is no longer necessary with Delphi 6 and up.
|
||||||
{$ifndef COMPILER_6_UP}
|
{$ifndef fpc}
|
||||||
// There is a problem when the thread is freed in the exit code of a DLL. This can happen when a tree is
|
// There is a problem when the thread is freed in the exit code of a DLL. This can happen when a tree is
|
||||||
// destroyed on unload of a DLL (e.g. control panel applet). In this case only the main thread will get
|
// destroyed on unload of a DLL (e.g. control panel applet). In this case only the main thread will get
|
||||||
// CPU time, other threads will never awake again. The VCL however waits for a thread when freeing it
|
// CPU time, other threads will never awake again. The VCL however waits for a thread when freeing it
|
||||||
@ -5219,7 +5209,7 @@ begin
|
|||||||
// If a thread is however suspended then the VCL does not wait and all is fine.
|
// If a thread is however suspended then the VCL does not wait and all is fine.
|
||||||
if IsLibrary then
|
if IsLibrary then
|
||||||
Suspend;
|
Suspend;
|
||||||
{$endif COMPILER_6_UP}
|
{$endif}
|
||||||
|
|
||||||
WorkerThread.Free;
|
WorkerThread.Free;
|
||||||
end;
|
end;
|
||||||
@ -6585,6 +6575,7 @@ var
|
|||||||
Shadow: Integer;
|
Shadow: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
//todo: see the meaning of this code
|
||||||
{$ifndef COMPILER_7_UP}
|
{$ifndef COMPILER_7_UP}
|
||||||
if MMXAvailable then
|
if MMXAvailable then
|
||||||
Shadow := ShadowSize
|
Shadow := ShadowSize
|
||||||
@ -6627,12 +6618,7 @@ begin
|
|||||||
Font.Color := clInfoText;
|
Font.Color := clInfoText;
|
||||||
Pen.Color := clBlack;
|
Pen.Color := clBlack;
|
||||||
Brush.Color := clInfoBk;
|
Brush.Color := clInfoBk;
|
||||||
{$ifdef COMPILER_5_UP}
|
Rectangle(R);
|
||||||
Rectangle(R);
|
|
||||||
{$else}
|
|
||||||
with R do
|
|
||||||
Rectangle(Left, Top, Right, Bottom);
|
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
|
|
||||||
// Determine text position and don't forget the border.
|
// Determine text position and don't forget the border.
|
||||||
InflateRect(R, -1, -1);
|
InflateRect(R, -1, -1);
|
||||||
@ -10185,9 +10171,7 @@ begin
|
|||||||
if Assigned(FImages) then
|
if Assigned(FImages) then
|
||||||
begin
|
begin
|
||||||
FImages.UnRegisterChanges(FImageChangeLink);
|
FImages.UnRegisterChanges(FImageChangeLink);
|
||||||
{$ifdef COMPILER_5_UP}
|
FImages.RemoveFreeNotification(FOwner);
|
||||||
FImages.RemoveFreeNotification(FOwner);
|
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
end;
|
end;
|
||||||
FImages := Value;
|
FImages := Value;
|
||||||
if Assigned(FImages) then
|
if Assigned(FImages) then
|
||||||
@ -14202,9 +14186,8 @@ begin
|
|||||||
if Assigned(FCustomCheckImages) then
|
if Assigned(FCustomCheckImages) then
|
||||||
begin
|
begin
|
||||||
FCustomCheckImages.UnRegisterChanges(FCustomCheckChangeLink);
|
FCustomCheckImages.UnRegisterChanges(FCustomCheckChangeLink);
|
||||||
{$ifdef COMPILER_5_UP}
|
FCustomCheckImages.RemoveFreeNotification(Self);
|
||||||
FCustomCheckImages.RemoveFreeNotification(Self);
|
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
// Reset the internal check image list reference too, if necessary.
|
// Reset the internal check image list reference too, if necessary.
|
||||||
if FCheckImages = FCustomCheckImages then
|
if FCheckImages = FCustomCheckImages then
|
||||||
FCheckImages := nil;
|
FCheckImages := nil;
|
||||||
@ -14373,9 +14356,7 @@ begin
|
|||||||
if Assigned(FImages) then
|
if Assigned(FImages) then
|
||||||
begin
|
begin
|
||||||
FImages.UnRegisterChanges(FImageChangeLink);
|
FImages.UnRegisterChanges(FImageChangeLink);
|
||||||
{$ifdef COMPILER_5_UP}
|
FImages.RemoveFreeNotification(Self);
|
||||||
FImages.RemoveFreeNotification(Self);
|
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
end;
|
end;
|
||||||
FImages := Value;
|
FImages := Value;
|
||||||
if Assigned(FImages) then
|
if Assigned(FImages) then
|
||||||
@ -14679,9 +14660,7 @@ begin
|
|||||||
if Assigned(FStateImages) then
|
if Assigned(FStateImages) then
|
||||||
begin
|
begin
|
||||||
FStateImages.UnRegisterChanges(FStateChangeLink);
|
FStateImages.UnRegisterChanges(FStateChangeLink);
|
||||||
{$ifdef COMPILER_5_UP}
|
FStateImages.RemoveFreeNotification(Self);
|
||||||
FStateImages.RemoveFreeNotification(Self);
|
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
end;
|
end;
|
||||||
FStateImages := Value;
|
FStateImages := Value;
|
||||||
if Assigned(FStateImages) then
|
if Assigned(FStateImages) then
|
||||||
@ -24335,11 +24314,7 @@ var
|
|||||||
Form: TCustomForm;
|
Form: TCustomForm;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifdef COMPILER_5_UP}
|
Result := inherited CanFocus;
|
||||||
Result := inherited CanFocus;
|
|
||||||
{$else}
|
|
||||||
Result := True;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
if Result and not (csDesigning in ComponentState) then
|
if Result and not (csDesigning in ComponentState) then
|
||||||
begin
|
begin
|
||||||
@ -24940,13 +24915,11 @@ begin
|
|||||||
|
|
||||||
if not Result then
|
if not Result then
|
||||||
begin
|
begin
|
||||||
{$ifdef COMPILER_5_UP}
|
|
||||||
Result := Action is TEditSelectAll;
|
Result := Action is TEditSelectAll;
|
||||||
if Result then
|
if Result then
|
||||||
SelectAll(False)
|
SelectAll(False)
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
Result := Action is TEditCopy;
|
Result := Action is TEditCopy;
|
||||||
if Result then
|
if Result then
|
||||||
CopyToClipboard
|
CopyToClipboard
|
||||||
@ -24961,19 +24934,15 @@ begin
|
|||||||
Result := Action is TEditPaste;
|
Result := Action is TEditPaste;
|
||||||
if Result then
|
if Result then
|
||||||
PasteFromClipboard
|
PasteFromClipboard
|
||||||
{$ifdef COMPILER_5_UP}
|
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Result := Action is TEditDelete;
|
Result := Action is TEditDelete;
|
||||||
if Result then
|
if Result then
|
||||||
DeleteSelectedNodes
|
DeleteSelectedNodes
|
||||||
end;
|
end;
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$ifdef COMPILER_5_UP}
|
|
||||||
end;
|
end;
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -28470,11 +28439,7 @@ type
|
|||||||
function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer;
|
function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifdef COMPILER_5_UP}
|
raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError));
|
||||||
raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError));
|
|
||||||
{$else}
|
|
||||||
raise EStreamError.Create(SCantWriteResourceStreamError);
|
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -29333,11 +29298,11 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Result := (Action is TEditCut) or (Action is TEditCopy)
|
Result := (Action is TEditCut) or (Action is TEditCopy)
|
||||||
{$ifdef COMPILER_5_UP} or (Action is TEditDelete) {$endif COMPILER_5_UP};
|
or (Action is TEditDelete);
|
||||||
|
|
||||||
if Result then
|
if Result then
|
||||||
TAction(Action).Enabled := (FSelectionCount > 0) and
|
TAction(Action).Enabled := (FSelectionCount > 0) and
|
||||||
({$ifdef COMPILER_5_UP} (Action is TEditDelete) or {$endif COMPILER_5_UP} (FClipboardFormats.Count > 0))
|
((Action is TEditDelete) or (FClipboardFormats.Count > 0))
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Result := Action is TEditPaste;
|
Result := Action is TEditPaste;
|
||||||
@ -29345,12 +29310,10 @@ begin
|
|||||||
TAction(Action).Enabled := True
|
TAction(Action).Enabled := True
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{$ifdef COMPILER_5_UP}
|
|
||||||
Result := Action is TEditSelectAll;
|
Result := Action is TEditSelectAll;
|
||||||
if Result then
|
if Result then
|
||||||
TAction(Action).Enabled := (toMultiSelect in FOptions.FSelectionOptions) and (FVisibleCount > 0)
|
TAction(Action).Enabled := (toMultiSelect in FOptions.FSelectionOptions) and (FVisibleCount > 0)
|
||||||
else
|
else
|
||||||
{$endif COMPILER_5_UP}
|
|
||||||
Result := inherited UpdateAction(Action);
|
Result := inherited UpdateAction(Action);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user