diff --git a/components/spktoolbar/SpkMath/SpkMath.pas b/components/spktoolbar/SpkMath/SpkMath.pas
index 295cd3116..c588d6b9f 100644
--- a/components/spktoolbar/SpkMath/SpkMath.pas
+++ b/components/spktoolbar/SpkMath/SpkMath.pas
@@ -307,6 +307,10 @@ type
operator - (Left: T2DIntVector; Right: T2DIntVector): T2DIntVector;
+ operator := (APoint: T2DIntPoint): TPoint;
+
+ operator := (APoint: TPoint): T2DIntPoint;
+
operator - (Left: T2DIntRect; Right: T2DIntVector): T2DIntRect;
operator + (Left: T2DIntRect; Right: T2DIntVector): T2DIntRect;
@@ -343,6 +347,18 @@ begin
Result.y := Left.y - Right.y;
end;
+operator := (APoint: T2DIntPoint): TPoint;
+begin
+ Result.x := APoint.x;
+ Result.y := APoint.y;
+end;
+
+operator := (APoint: TPoint): T2DIntPoint;
+begin
+ Result.x := APoint.x;
+ Result.y := APoint.y;
+end;
+
operator - (Left: T2DIntRect; Right: T2DIntVector): T2DIntRect;
begin
Result.Create(Left.Left - Right.x, Left.Top - Right.y,
diff --git a/components/spktoolbar/SpkToolbar/SpkToolbar.pas b/components/spktoolbar/SpkToolbar/SpkToolbar.pas
index 0985fb861..bc6529e3b 100644
--- a/components/spktoolbar/SpkToolbar/SpkToolbar.pas
+++ b/components/spktoolbar/SpkToolbar/SpkToolbar.pas
@@ -1,5 +1,8 @@
unit SpkToolbar;
+{$mode delphi}
+{.$Define EnhancedRecordSupport}
+
(*******************************************************************************
* *
* Plik: SpkToolbar.pas *
@@ -12,11 +15,11 @@ unit SpkToolbar;
interface
-uses Windows, Graphics, SysUtils, Controls, Classes, Messages, Math, Dialogs,
- Types,
- SpkGraphTools, SpkGUITools, SpkMath, SpkXMLParser,
+uses
+ LCLType, LMessages, Graphics, SysUtils, Controls, Classes, Math, Dialogs,
+ Types, SpkGraphTools, SpkGUITools, SpkMath,
spkt_Appearance, spkt_BaseItem, spkt_Const, spkt_Dispatch, spkt_Tab,
- spkt_Pane, spkt_Exceptions, spkt_Types;
+ spkt_Pane, spkt_Types;
type /// Typ opisuj¹cy regiony toolbara, które s¹ u¿ywane podczas
/// obs³ugi interakcji z mysz¹
@@ -213,7 +216,7 @@ type TSpkToolbar = class;
/// Komunikat odbierany, gdy mysz opuœci obszar komponentu
///
- procedure CMMouseLeave(var msg : TMessage); message CM_MOUSELEAVE;
+ procedure CMMouseLeave(var msg : TLMessage); message CM_MOUSELEAVE;
// ********************************
// *** Obs³uga designtime i DFM ***
@@ -329,13 +332,22 @@ type TSpkToolbar = class;
implementation
+uses
+ LCLIntf;
+
{ TSpkToolbarDispatch }
function TSpkToolbarDispatch.ClientToScreen(Point: T2DIntPoint): T2DIntPoint;
begin
+ {$IFDEF EnhancedRecordSupport}
if FToolbar<>nil then
result:=FToolbar.ClientToScreen(Point) else
result:=T2DIntPoint.Create(-1,-1);
+ {$ELSE}
+ if FToolbar<>nil then
+ result:=FToolbar.ClientToScreen(Point) else
+ result.Create(-1,-1);
+ {$ENDIF}
end;
constructor TSpkToolbarDispatch.Create(AToolbar: TSpkToolbar);
@@ -402,7 +414,7 @@ begin
FUpdating:=true;
end;
-procedure TSpkToolbar.CMMouseLeave(var msg: TMessage);
+procedure TSpkToolbar.CMMouseLeave(var msg: TLMessage);
begin
inherited;
MouseLeave;
@@ -414,7 +426,8 @@ begin
// Inicjacja dziedziczonych w³asnoœci
inherited Align:=alTop;
- inherited AlignWithMargins:=true;
+ //todo: not found in lcl
+ //inherited AlignWithMargins:=true;
inherited Height:=TOOLBAR_HEIGHT;
inherited Doublebuffered:=true;
@@ -428,19 +441,20 @@ begin
FTemporary.Pixelformat:=pf24bit;
setlength(FTabRects,0);
+
+ {$IFDEF EnhancedRecordSupport}
FTabClipRect:=T2DIntRect.create(0,0,0,0);
FTabContentsClipRect:=T2DIntRect.create(0,0,0,0);
+ {$ELSE}
+ FTabClipRect.create(0,0,0,0);
+ FTabContentsClipRect.create(0,0,0,0);
+ {$ENDIF}
FMouseHoverElement:=teNone;
FMouseActiveElement:=teNone;
FTabHover:=-1;
- FMetricsValid:=false;
- FBufferValid:=false;
- FInternalUpdating:=false;
- FUpdating:=false;
-
// Inicjacja pól
FAppearance:=TSpkToolbarAppearance.Create(FToolbarDispatch);
@@ -449,11 +463,6 @@ begin
FTabs.Appearance:=FAppearance;
FTabIndex:=-1;
-
- FImages:=nil;
- FDisabledImages:=nil;
- FLargeImages:=nil;
- FDisabledLargeImages:=nil;
end;
procedure TSpkToolbar.DefineProperties(Filer: TFiler);
@@ -654,7 +663,11 @@ begin
inherited MouseMove(Shift, X, Y);
// Sprawdzamy, który obiekt jest pod mysz¹
+ {$IFDEF EnhancedRecordSupport}
MousePoint:=T2DIntVector.create(x,y);
+ {$ELSE}
+ MousePoint.create(x,y);
+ {$ENDIF}
if FTabClipRect.Contains(MousePoint) then
NewMouseHoverElement:=teTabs else
@@ -991,7 +1004,11 @@ if AtLeastOneTabVisible then
if FTabs[i].visible then
begin
if FTabClipRect.IntersectsWith(FTabRects[i], TabRect) then
+ {$IFDEF EnhancedRecordSupport}
if TabRect.Contains(T2DIntPoint.Create(x, y)) then
+ {$ELSE}
+ if TabRect.Contains(x, y) then
+ {$ENDIF}
SelTab:=i;
end;
@@ -1036,7 +1053,11 @@ if AtLeastOneTabVisible then
if FTabs[i].Visible then
begin
if FTabClipRect.IntersectsWith(FTabRects[i], TabRect) then
+ {$IFDEF EnhancedRecordSupport}
if TabRect.Contains(T2DIntPoint.Create(x, y)) then
+ {$ELSE}
+ if TabRect.Contains(x, y) then
+ {$ENDIF}
NewTabHover:=i;
end;
@@ -1091,31 +1112,54 @@ procedure TSpkToolbar.ValidateBuffer;
FocusedAppearance:=FAppearance;
TGuiTools.DrawRoundRect(FBuffer.Canvas,
+ {$IFDEF EnhancedRecordSupport}
T2DIntRect.Create(0,
TOOLBAR_TAB_CAPTIONS_HEIGHT,
self.width-1,
self.Height-1),
+ {$ELSE}
+ Create2DIntRect(0,
+ TOOLBAR_TAB_CAPTIONS_HEIGHT,
+ self.width-1,
+ self.Height-1),
+ {$ENDIF}
TOOLBAR_CORNER_RADIUS,
FocusedAppearance.Tab.GradientFromColor,
FocusedAppearance.Tab.GradientToColor,
FocusedAppearance.Tab.GradientType);
TGuiTools.DrawAARoundCorner(FBuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntPoint.Create(0, TOOLBAR_TAB_CAPTIONS_HEIGHT),
+ {$ELSE}
+ Create2DIntPoint(0, TOOLBAR_TAB_CAPTIONS_HEIGHT),
+ {$ENDIF}
TOOLBAR_CORNER_RADIUS,
cpLeftTop,
FocusedAppearance.Tab.BorderColor);
TGuiTools.DrawAARoundCorner(FBuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntPoint.Create(self.width - TOOLBAR_CORNER_RADIUS, TOOLBAR_TAB_CAPTIONS_HEIGHT),
+ {$ELSE}
+ Create2DIntPoint(self.width - TOOLBAR_CORNER_RADIUS, TOOLBAR_TAB_CAPTIONS_HEIGHT),
+ {$ENDIF}
TOOLBAR_CORNER_RADIUS,
cpRightTop,
FocusedAppearance.Tab.BorderColor);
TGuiTools.DrawAARoundCorner(FBuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntPoint.Create(0, self.height - TOOLBAR_CORNER_RADIUS),
+ {$ELSE}
+ Create2DIntPoint(0, self.height - TOOLBAR_CORNER_RADIUS),
+ {$ENDIF}
TOOLBAR_CORNER_RADIUS,
cpLeftBottom,
FocusedAppearance.Tab.BorderColor);
TGuiTools.DrawAARoundCorner(FBuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntPoint.Create(self.width - TOOLBAR_CORNER_RADIUS, self.height - TOOLBAR_CORNER_RADIUS),
+ {$ELSE}
+ Create2DIntPoint(self.width - TOOLBAR_CORNER_RADIUS, self.height - TOOLBAR_CORNER_RADIUS),
+ {$ENDIF}
TOOLBAR_CORNER_RADIUS,
cpRightBottom,
FocusedAppearance.Tab.BorderColor);
@@ -1245,13 +1289,21 @@ procedure TSpkToolbar.ValidateBuffer;
// Ramka
TGuiTools.DrawAARoundCorner(FBuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(TabRect.left, TabRect.bottom - TAB_CORNER_RADIUS + 1),
+ {$ELSE}
+ Create2DIntPoint(TabRect.left, TabRect.bottom - TAB_CORNER_RADIUS + 1),
+ {$ENDIF}
TAB_CORNER_RADIUS,
cpRightBottom,
Border,
FTabClipRect);
TGuiTools.DrawAARoundCorner(FBuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(TabRect.right - TAB_CORNER_RADIUS + 1, TabRect.bottom - TAB_CORNER_RADIUS + 1),
+ {$ELSE}
+ Create2DIntPoint(TabRect.right - TAB_CORNER_RADIUS + 1, TabRect.bottom - TAB_CORNER_RADIUS + 1),
+ {$ENDIF}
TAB_CORNER_RADIUS,
cpLeftBottom,
Border,
@@ -1271,13 +1323,21 @@ procedure TSpkToolbar.ValidateBuffer;
FTabClipRect);
TGuiTools.DrawAARoundCorner(FBuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntPoint.create(TabRect.left + TAB_CORNER_RADIUS - 1, 0),
+ {$ELSE}
+ Create2DIntPoint(TabRect.left + TAB_CORNER_RADIUS - 1, 0),
+ {$ENDIF}
TAB_CORNER_RADIUS,
cpLeftTop,
Border,
FTabClipRect);
TGuiTools.DrawAARoundCorner(FBuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntPoint.Create(TabRect.right - 2*TAB_CORNER_RADIUS + 2, 0),
+ {$ELSE}
+ Create2DIntPoint(TabRect.right - 2*TAB_CORNER_RADIUS + 2, 0),
+ {$ENDIF}
TAB_CORNER_RADIUS,
cpRightTop,
Border,
@@ -1428,10 +1488,17 @@ FBuffer.SetSize(self.width, self.height);
// *** Zak³adki ***
// Cliprect zak³adek (zawgórn¹ ramkê komponentu)
+{$IFDEF EnhancedRecordSupport}
FTabClipRect:=T2DIntRect.Create(TOOLBAR_CORNER_RADIUS,
0,
self.width - TOOLBAR_CORNER_RADIUS - 1,
TOOLBAR_TAB_CAPTIONS_HEIGHT);
+{$ELSE}
+FTabClipRect.Create(TOOLBAR_CORNER_RADIUS,
+ 0,
+ self.width - TOOLBAR_CORNER_RADIUS - 1,
+ TOOLBAR_TAB_CAPTIONS_HEIGHT);
+{$ENDIF}
// Recty nag³ówków zak³adek (zawieraj¹ górn¹ ramkê komponentu)
setlength(FTabRects, FTabs.Count);
@@ -1462,7 +1529,11 @@ if FTabs.count>0 then
end
else
begin
+ {$IFDEF EnhancedRecordSupport}
FTabRects[i]:=T2DIntRect.Create(-1,-1,-1,-1);
+ {$ELSE}
+ FTabRects[i].Create(-1,-1,-1,-1);
+ {$ENDIF}
end;
end;
@@ -1471,10 +1542,17 @@ if FTabs.count>0 then
if FTabIndex<>-1 then
begin
// Rect obszaru zak³adki
+ {$IFDEF EnhancedRecordSupport}
FTabContentsClipRect:=T2DIntRect.Create(TOOLBAR_BORDER_WIDTH + TAB_PANE_LEFTPADDING,
TOOLBAR_TAB_CAPTIONS_HEIGHT + TOOLBAR_BORDER_WIDTH + TAB_PANE_TOPPADDING,
self.width - 1 - TOOLBAR_BORDER_WIDTH - TAB_PANE_RIGHTPADDING,
self.Height - 1 - TOOLBAR_BORDER_WIDTH - TAB_PANE_BOTTOMPADDING);
+ {$ELSE}
+ FTabContentsClipRect.Create(TOOLBAR_BORDER_WIDTH + TAB_PANE_LEFTPADDING,
+ TOOLBAR_TAB_CAPTIONS_HEIGHT + TOOLBAR_BORDER_WIDTH + TAB_PANE_TOPPADDING,
+ self.width - 1 - TOOLBAR_BORDER_WIDTH - TAB_PANE_RIGHTPADDING,
+ self.Height - 1 - TOOLBAR_BORDER_WIDTH - TAB_PANE_BOTTOMPADDING);
+ {$ENDIF}
FTabs[FTabIndex].Rect:=FTabContentsClipRect;
end;
diff --git a/components/spktoolbar/SpkToolbar/spkt_BaseItem.pas b/components/spktoolbar/SpkToolbar/spkt_BaseItem.pas
index 1ca729fe4..1b27942fa 100644
--- a/components/spktoolbar/SpkToolbar/spkt_BaseItem.pas
+++ b/components/spktoolbar/SpkToolbar/spkt_BaseItem.pas
@@ -15,9 +15,8 @@ unit spkt_BaseItem;
interface
-uses Windows, Graphics, Classes, Controls,
- SpkMath, SpkGUITools, SpkGraphTools,
- spkt_Appearance, spkt_Exceptions, spkt_Dispatch, spkt_Types;
+uses Graphics, Classes, Controls,
+ SpkMath, spkt_Appearance, spkt_Dispatch, spkt_Types;
type TSpkItemSize = (isLarge, isNormal);
TSpkItemTableBehaviour = (tbBeginsRow, tbBeginsColumn, tbContinuesRow);
diff --git a/components/spktoolbar/SpkToolbar/spkt_Buttons.pas b/components/spktoolbar/SpkToolbar/spkt_Buttons.pas
index 31227f46f..0b2770080 100644
--- a/components/spktoolbar/SpkToolbar/spkt_Buttons.pas
+++ b/components/spktoolbar/SpkToolbar/spkt_Buttons.pas
@@ -16,8 +16,8 @@ unit spkt_Buttons;
interface
uses
- Graphics, Classes, Controls, Menus, ImgList, ActnList, Math,
- Types, Dialogs,
+ Graphics, Classes, Controls, Menus, ActnList, Math,
+ Dialogs,
SpkGuiTools, SpkGraphTools, SpkMath,
spkt_Const, spkt_BaseItem, spkt_Exceptions, spkt_Tools;
diff --git a/components/spktoolbar/SpkToolbar/spkt_Items.pas b/components/spktoolbar/SpkToolbar/spkt_Items.pas
index 78169cfac..eddc62962 100644
--- a/components/spktoolbar/SpkToolbar/spkt_Items.pas
+++ b/components/spktoolbar/SpkToolbar/spkt_Items.pas
@@ -1,5 +1,8 @@
unit spkt_Items;
+{$mode delphi}
+{.$Define EnhancedRecordSupport}
+
(*******************************************************************************
* *
* Plik: spkt_Items.pas *
@@ -12,9 +15,8 @@ unit spkt_Items;
interface
-uses Windows, Classes, Controls, SysUtils, Dialogs,
- SpkXMLParser,
- spkt_Appearance, spkt_Dispatch, spkt_BaseItem, spkt_Exceptions, spkt_Types,
+uses Classes, Controls, SysUtils, Dialogs,
+ spkt_Appearance, spkt_Dispatch, spkt_BaseItem, spkt_Types,
spkt_Buttons;
type TSpkItems = class(TSpkCollection)
diff --git a/components/spktoolbar/SpkToolbar/spkt_Pane.pas b/components/spktoolbar/SpkToolbar/spkt_Pane.pas
index 4e395f0f1..5379f16a6 100644
--- a/components/spktoolbar/SpkToolbar/spkt_Pane.pas
+++ b/components/spktoolbar/SpkToolbar/spkt_Pane.pas
@@ -1,5 +1,8 @@
unit spkt_Pane;
+{$mode delphi}
+{.$Define EnhancedRecordSupport}
+
(*******************************************************************************
* *
* Plik: spkt_Pane.pas *
@@ -12,7 +15,7 @@ unit spkt_Pane;
interface
-uses Windows, Graphics, Controls, Classes, SysUtils, Math, Dialogs, Types,
+uses Graphics, Controls, Classes, SysUtils, Math, Dialogs,
SpkGraphTools, SpkGUITools, SpkMath,
spkt_Appearance, spkt_Const, spkt_Dispatch, spkt_Exceptions,
spkt_BaseItem, spkt_Items, spkt_Types;
@@ -160,7 +163,12 @@ FRect:=ARect;
// Obliczamy layout
Layout:=GenerateLayout;
+{$IFDEF EnhancedRecordSupport}
Pt:=T2DIntPoint.create(ARect.left + PANE_BORDER_SIZE + PANE_LEFT_PADDING, ARect.top + PANE_BORDER_SIZE);
+{$ELSE}
+Pt.create(ARect.left + PANE_BORDER_SIZE + PANE_LEFT_PADDING, ARect.top + PANE_BORDER_SIZE);
+{$ENDIF}
+
if length(Layout.Rects)>0 then
begin
for i := 0 to high(Layout.Rects) do
@@ -186,8 +194,11 @@ begin
FMouseActiveElement.ElementIndex:=-1;
FCaption:='Pane';
+ {$IFDEF EnhancedRecordSupport}
FRect:=T2DIntRect.create(0,0,0,0);
-
+ {$ELSE}
+ FRect.create(0,0,0,0);
+ {$ENDIF}
FToolbarDispatch:=nil;
FAppearance:=nil;
FImages:=nil;
@@ -255,10 +266,17 @@ if FPaneState = psIdle then
// T³o
TGuiTools.DrawRoundRect(ABuffer.Canvas,
+ {$IFDEF EnhancedRecordSupport}
T2DIntRect.Create(FRect.left,
FRect.top,
FRect.right - PANE_BORDER_HALF_SIZE,
FRect.Bottom - PANE_BORDER_HALF_SIZE),
+ {$ELSE}
+ Create2DIntRect(FRect.left,
+ FRect.top,
+ FRect.right - PANE_BORDER_HALF_SIZE,
+ FRect.Bottom - PANE_BORDER_HALF_SIZE),
+ {$ENDIF}
PANE_CORNER_RADIUS,
BgFromColor,
BgToColor,
@@ -267,10 +285,17 @@ TGuiTools.DrawRoundRect(ABuffer.Canvas,
// T³o etykiety tafli
TGuiTools.DrawRoundRect(ABuffer.Canvas,
+ {$IFDEF EnhancedRecordSupport}
T2DIntRect.Create(FRect.Left,
FRect.Bottom - PANE_CAPTION_HEIGHT - PANE_BORDER_HALF_SIZE,
FRect.right - PANE_BORDER_HALF_SIZE,
FRect.bottom - PANE_BORDER_HALF_SIZE),
+ {$ELSE}
+ Create2DIntRect(FRect.Left,
+ FRect.Bottom - PANE_CAPTION_HEIGHT - PANE_BORDER_HALF_SIZE,
+ FRect.right - PANE_BORDER_HALF_SIZE,
+ FRect.bottom - PANE_BORDER_HALF_SIZE),
+ {$ENDIF}
PANE_CORNER_RADIUS,
CaptionColor,
clNone,
@@ -296,18 +321,32 @@ TGUITools.DrawText(ABuffer.Canvas,
// Ramki
TGUITools.DrawAARoundFrame(ABuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntRect.create(FRect.left+1,
FRect.top+1,
FRect.Right,
FRect.bottom),
+ {$ELSE}
+ Create2DIntRect(FRect.left+1,
+ FRect.top+1,
+ FRect.Right,
+ FRect.bottom),
+ {$ENDIF}
PANE_CORNER_RADIUS,
BorderLightColor,
ClipRect);
TGUITools.DrawAARoundFrame(ABuffer,
+ {$IFDEF EnhancedRecordSupport}
T2DIntRect.create(FRect.left,
FRect.top,
FRect.Right-1,
FRect.bottom-1),
+ {$ELSE}
+ Create2DIntRect(FRect.left,
+ FRect.top,
+ FRect.Right-1,
+ FRect.bottom-1),
+ {$ENDIF}
PANE_CORNER_RADIUS,
BorderDarkColor,
ClipRect);
@@ -332,7 +371,11 @@ while (i>=0) and (result=-1) do
begin
if FItems[i].Visible then
begin
+ {$IFDEF EnhancedRecordSupport}
if FItems[i].Rect.Contains(T2DIntVector.create(x,y)) then
+ {$ELSE}
+ if FItems[i].Rect.Contains(x,y) then
+ {$ENDIF}
result:=i;
end;
dec(i);
@@ -443,8 +486,13 @@ for i := 0 to FItems.count - 1 do
// Najpierw wype³niamy je pustymi danymi, które zape³ni¹ miejsce elementów
// niewidocznych.
+{$IFDEF EnhancedRecordSupport}
for i := 0 to FItems.count - 1 do
result.Rects[i]:=T2DIntRect.create(-1, -1, -1, -1);
+{$ELSE}
+for i := 0 to FItems.count - 1 do
+ result.Rects[i].create(-1, -1, -1, -1);
+{$ENDIF}
MaxRowX:=0;
diff --git a/components/spktoolbar/SpkToolbar/spkt_Tab.pas b/components/spktoolbar/SpkToolbar/spkt_Tab.pas
index bc51e4e8b..23683b290 100644
--- a/components/spktoolbar/SpkToolbar/spkt_Tab.pas
+++ b/components/spktoolbar/SpkToolbar/spkt_Tab.pas
@@ -1,5 +1,8 @@
unit spkt_Tab;
+{$mode delphi}
+{.$Define EnhancedRecordSupport}
+
(*******************************************************************************
* *
* Plik: spkt_Tab.pas *
@@ -12,8 +15,8 @@ unit spkt_Tab;
interface
-uses Windows, Graphics, Controls, Classes, SysUtils,
- SpkGraphTools, SpkGUITools, SpkMath,
+uses Graphics, Controls, Classes, SysUtils,
+ SpkMath,
spkt_Appearance, spkt_Const, spkt_Dispatch, spkt_Exceptions,
spkt_Pane, spkt_Types;
@@ -224,7 +227,11 @@ if AtLeastOnePaneVisible then
end
else
begin
+ {$IFDEF EnhancedRecordSupport}
FPanes[i].Rect:=T2DIntRect.create(-1,-1,-1,-1);
+ {$ELSE}
+ FPanes[i].Rect.create(-1,-1,-1,-1);
+ {$ENDIF}
end;
end;
end;
@@ -241,27 +248,24 @@ begin
inherited Create(AOwner);
FAppearanceDispatch:=TSpkTabAppearanceDispatch.create(self);
- FAppearance:=nil;
FMouseHoverElement.ElementType:=etNone;
FMouseHoverElement.ElementIndex:=-1;
FMouseActiveElement.ElementType:=etNone;
FMouseActiveElement.ElementIndex:=-1;
- FToolbarDispatch:=nil;
FCaption:='Tab';
FVisible:=true;
- FOverrideAppearance:=false;
FCustomAppearance:=TSpkToolbarAppearance.Create(FAppearanceDispatch);
FPanes:=TSpkPanes.Create(self);
FPanes.ToolbarDispatch:=FToolbarDispatch;
+ {$IFDEF EnhancedRecordSupport}
FRect:=T2DIntRect.create(0,0,0,0);
+ {$ELSE}
+ FRect.create(0,0,0,0);
+ {$ENDIF}
- FImages:=nil;
- FDisabledImages:=nil;
- FLargeImages:=nil;
- FDisabledLargeImages:=nil;
SetPaneAppearance;
end;
@@ -308,7 +312,11 @@ while (i>=0) and (result=-1) do
begin
if FPanes[i].Visible then
begin
+ {$IFDEF EnhancedRecordSupport}
if FPanes[i].Rect.Contains(T2DIntVector.create(x,y)) then
+ {$ELSE}
+ if FPanes[i].Rect.Contains(x,y) then
+ {$ENDIF}
result:=i;
end;
dec(i);
diff --git a/components/spktoolbar/SpkToolbar/spkt_Tools.pas b/components/spktoolbar/SpkToolbar/spkt_Tools.pas
index e6bd9d272..6eaccf30f 100644
--- a/components/spktoolbar/SpkToolbar/spkt_Tools.pas
+++ b/components/spktoolbar/SpkToolbar/spkt_Tools.pas
@@ -16,7 +16,7 @@ unit spkt_Tools;
interface
uses
- Graphics, SysUtils, SpkMath, SpkGraphTools, SpkGUITools;
+ Graphics, SysUtils, SpkMath, SpkGUITools;
type TButtonTools = class sealed(TObject)
private