* Fix compilation of various units

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1705 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2011-06-18 16:17:03 +00:00
parent 8e56c66be7
commit e943f03a21
13 changed files with 101 additions and 13 deletions

View File

@ -95,6 +95,9 @@ type
1 : (TopLeft : T2DIntVector; BottomRight : T2DIntVector);
end;
{$else}
{ T2DIntRect }
T2DIntRect = object
Left, Top, Right, Bottom: integer;
//todo
@ -104,6 +107,7 @@ type
constructor Create(ALeft, ATop, ARight, ABottom : integer); overload;
constructor Create(ATopLeft : T2DIntVector; ABottomRight : T2DIntVector); overload;
function Contains(APoint : T2DIntPoint) : boolean;
function Contains(Ax, Ay : Integer) : boolean;
function IntersectsWith(ARect : T2DIntRect) : boolean; overload;
function IntersectsWith(ARect : T2DIntRect; var Intersection : T2DIntRect) : boolean; overload;
procedure Move(dx, dy : integer); overload;
@ -1101,6 +1105,12 @@ begin
(APoint.y>=self.Top) and (APoint.y<=self.Bottom);
end;
function T2DIntRect.Contains(Ax, Ay: Integer): boolean;
begin
result:=(Ax>=Left) and (Ax<=Right) and
(Ay>=Top) and (Ay<=Bottom);
end;
procedure T2DIntRect.ExpandBy(APoint: T2DIntPoint);
begin
self.left:=min(self.left,APoint.x);

View File

@ -1,5 +1,7 @@
unit spkt_Appearance;
{$mode Delphi}
(*******************************************************************************
* *
* Plik: spkt_Appearance.pas *
@ -12,8 +14,8 @@ unit spkt_Appearance;
interface
uses Windows, Graphics, Classes, Forms, SysUtils,
SpkGraphTools, SpkGUITools, SpkXMLParser, SpkXMLTools,
uses Graphics, Classes, Forms, SysUtils,
SpkGUITools, SpkXMLParser, SpkXMLTools,
spkt_Dispatch, spkt_Exceptions;
type TSpkTabAppearance = class(TPersistent)
@ -209,6 +211,9 @@ type TSpkToolbarAppearance = class;
implementation
uses
LCLIntf, LCLType;
{ TSpkBaseToolbarAppearance }
procedure TSpkTabAppearance.Assign(Source: TPersistent);

View File

@ -10,6 +10,9 @@ unit spkt_BaseItem;
* *
*******************************************************************************)
{$mode delphi}
{.$Define EnhancedRecordSupport}
interface
uses Windows, Graphics, Classes, Controls,
@ -81,7 +84,12 @@ constructor TSpkBaseItem.Create(AOwner : TComponent);
begin
inherited Create(AOwner);
{$IFDEF EnhancedRecordSupport}
FRect:=T2DIntRect.create(0, 0, 0, 0);
{$ELSE}
FRect.create(0, 0, 0, 0);
{$ENDIF}
FToolbarDispatch:=nil;
FAppearance:=nil;
FImages:=nil;

View File

@ -1,5 +1,7 @@
unit spkt_Const;
{$mode delphi}
(*******************************************************************************
* *
* Plik: spkt_Const.pas *

View File

@ -1,5 +1,7 @@
unit spkt_Dispatch;
{$mode delphi}
(*******************************************************************************
* *
* Plik: spkt_Dispatch.pas *
@ -13,7 +15,7 @@ unit spkt_Dispatch;
interface
uses Windows, Classes, Controls, Graphics,
uses Classes, Controls, Graphics,
SpkMath;
type TSpkBaseDispatch = class abstract(TObject)

View File

@ -1,5 +1,7 @@
unit spkt_Exceptions;
{$mode delphi}
(*******************************************************************************
* *
* Plik: spkt_Exceptions.pas *

View File

@ -1,5 +1,8 @@
unit spkt_Tools;
{$mode delphi}
{.$Define EnhancedRecordSupport}
(*******************************************************************************
* *
* Plik: spkt_Tools.pas *
@ -12,8 +15,8 @@ unit spkt_Tools;
interface
uses Windows, Graphics, SysUtils,
SpkMath, SpkGraphTools, SpkGUITools;
uses
Graphics, SysUtils, SpkMath, SpkGraphTools, SpkGUITools;
type TButtonTools = class sealed(TObject)
private
@ -102,28 +105,44 @@ if RightEdgeOpen then
// Zaokr¹glone naro¿niki
if not(LeftEdgeOpen or TopEdgeOpen) then
TGuiTools.DrawAARoundCorner(Bitmap,
{$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(Rect.left + 1, Rect.Top + 1),
{$ELSE}
Create2DIntPoint(Rect.left + 1, Rect.Top + 1),
{$ENDIF}
Radius,
cpLeftTop,
InnerLightColor,
ClipRect);
if not(RightEdgeOpen or TopEdgeOpen) then
TGuiTools.DrawAARoundCorner(Bitmap,
{$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(Rect.right - radius, Rect.Top + 1),
{$ELSE}
Create2DIntPoint(Rect.right - radius, Rect.Top + 1),
{$ENDIF}
Radius,
cpRightTop,
InnerLightColor,
ClipRect);
if not(LeftEdgeOpen or BottomEdgeOpen) then
TGuiTools.DrawAARoundCorner(Bitmap,
{$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(Rect.left + 1, Rect.bottom - radius),
{$ELSE}
Create2DIntPoint(Rect.left + 1, Rect.bottom - radius),
{$ENDIF}
Radius,
cpLeftBottom,
InnerLightColor,
ClipRect);
if not(RightEdgeOpen or BottomEdgeOpen) then
TGuiTools.DrawAARoundCorner(Bitmap,
{$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(Rect.right - radius, Rect.bottom - radius),
{$ELSE}
Create2DIntPoint(Rect.right - radius, Rect.bottom - radius),
{$ENDIF}
Radius,
cpRightBottom,
InnerLightColor,
@ -165,28 +184,44 @@ if not(RightEdgeOpen) then
if not(LeftEdgeOpen or TopEdgeOpen) then
TGuiTools.DrawAARoundCorner(Bitmap,
{$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(Rect.left, Rect.Top),
{$ELSE}
Create2DIntPoint(Rect.left, Rect.Top),
{$ENDIF}
Radius,
cpLeftTop,
FrameColor,
ClipRect);
if not(RightEdgeOpen or TopEdgeOpen) then
TGuiTools.DrawAARoundCorner(Bitmap,
{$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(Rect.right - radius + 1, Rect.Top),
{$ELSE}
Create2DIntPoint(Rect.right - radius + 1, Rect.Top),
{$ENDIF}
Radius,
cpRightTop,
FrameColor,
ClipRect);
if not(LeftEdgeOpen or BottomEdgeOpen) then
TGuiTools.DrawAARoundCorner(Bitmap,
{$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(Rect.left, Rect.bottom - radius + 1),
{$ELSE}
Create2DIntPoint(Rect.left, Rect.bottom - radius + 1),
{$ENDIF}
Radius,
cpLeftBottom,
FrameColor,
ClipRect);
if not(RightEdgeOpen or BottomEdgeOpen) then
TGuiTools.DrawAARoundCorner(Bitmap,
{$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(Rect.right - radius + 1, Rect.bottom - radius + 1),
{$ELSE}
Create2DIntPoint(Rect.right - radius + 1, Rect.bottom - radius + 1),
{$ENDIF}
Radius,
cpRightBottom,
FrameColor,

View File

@ -1,5 +1,7 @@
unit spkt_Types;
{$mode Delphi}
(*******************************************************************************
* *
* Plik: spkt_Types.pas *
@ -12,7 +14,7 @@ unit spkt_Types;
interface
uses Windows, Controls, Classes, ContNrs, SysUtils, Dialogs,
uses Controls, Classes, ContNrs, SysUtils, Dialogs,
spkt_Exceptions;
type TSpkListState = (lsNeedsProcessing, lsReady);

View File

@ -1,5 +1,8 @@
unit SpkXMLIni;
{$mode ObjFpc}
{$H+}
{$DEFINE SPKXMLINI}
interface

View File

@ -1,5 +1,6 @@
unit SpkXMLParser;
{$mode Delphi}
{$DEFINE SPKXMLPARSER}
interface
@ -8,8 +9,10 @@ interface
// Notatki: Stosuj� konsekwentnie case-insensitivity
uses SysUtils, Classes, ContNrs, Graphics, Math;
uses
SysUtils, Classes, ContNrs, Graphics, Math;
//todo: use LineEnding?
const CRLF=#13#10;
type // Rodzaj ga��zi XML

View File

@ -1,9 +1,12 @@
unit SpkXMLTools;
{$mode ObjFpc}
{$H+}
interface
uses Windows, Graphics, SysUtils,
SpkXMLParser;
uses
Graphics, SysUtils, SpkXMLParser;
type TSpkXMLTools = class
private

View File

@ -8,8 +8,8 @@
<Version Value="10"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="SpkToolbar;SpkMath;SpkGUITools;SpkGraphTools"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
<OtherUnitFiles Value="SpkToolbar;SpkMath;SpkGUITools;SpkGraphTools;SpkXML"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Optimizations>
@ -26,7 +26,7 @@
<Description Value="Ribbon like toolbar"/>
<License Value="Modified LGPL"/>
<Version Minor="1"/>
<Files Count="15">
<Files Count="18">
<Item1>
<Filename Value="SpkToolbar\spkt_Appearance.pas"/>
<UnitName Value="spkt_Appearance"/>
@ -87,6 +87,18 @@
<Filename Value="SpkGraphTools\SpkGraphTools.pas"/>
<UnitName Value="SpkGraphTools"/>
</Item15>
<Item16>
<Filename Value="SpkXML\SpkXMLIni.pas"/>
<UnitName Value="SpkXMLIni"/>
</Item16>
<Item17>
<Filename Value="SpkXML\SpkXMLParser.pas"/>
<UnitName Value="SpkXMLParser"/>
</Item17>
<Item18>
<Filename Value="SpkXML\SpkXMLTools.pas"/>
<UnitName Value="SpkXMLTools"/>
</Item18>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="1">

View File

@ -9,7 +9,8 @@ interface
uses
spkt_Appearance, spkt_BaseItem, spkt_Buttons, spkt_Const, spkt_Dispatch,
spkt_Exceptions, spkt_Items, spkt_Pane, spkt_Tab, spkt_Tools, spkt_Types,
SpkToolbar, SpkMath, SpkGUITools, SpkGraphTools, LazarusPackageIntf;
SpkToolbar, SpkMath, SpkGUITools, SpkGraphTools, SpkXMLIni, SpkXMLParser,
SpkXMLTools, LazarusPackageIntf;
implementation