You've already forked lazarus-ccr
spktoolbar: Less hints and warnings
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6174 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -30,7 +30,7 @@ type
|
||||
protected
|
||||
class procedure FillGradientRectangle(ACanvas: TCanvas; Rect: T2DIntRect;
|
||||
ColorFrom, ColorTo: TColor; GradientKind: TBackgroundKind);
|
||||
class procedure SaveClipRgn(DC: HDC; var OrgRgnExists: boolean; var OrgRgn: HRGN);
|
||||
class procedure SaveClipRgn(DC: HDC; out OrgRgnExists: boolean; out OrgRgn: HRGN);
|
||||
class procedure RestoreClipRgn(DC: HDC; OrgRgnExists: boolean; var OrgRgn: HRGN);
|
||||
public
|
||||
// *** Lines ***
|
||||
@ -390,7 +390,7 @@ end;
|
||||
implementation
|
||||
|
||||
uses
|
||||
types, LCLIntf, IntfGraphics, Math, Themes;
|
||||
Types, LCLIntf, IntfGraphics, Themes;
|
||||
|
||||
{ TSpkGUITools }
|
||||
|
||||
@ -498,8 +498,8 @@ begin
|
||||
begin
|
||||
SrcLine := SrcImg.GetDataLineStart(y);
|
||||
DstLine := DestImg.GetDataLineStart(y+Offset.y);
|
||||
SrcPtr := pointer(PtrInt(SrcLine) + 3*SrcRect.Left);
|
||||
DstPtr := pointer(PtrInt(DstLine) + 3*(SrcRect.Left + Offset.x));
|
||||
SrcPtr := {%H-}pointer({%H-}PtrInt(SrcLine) + SrcRect.Left*3);
|
||||
DstPtr := {%H-}pointer({%H-}PtrInt(DstLine) + 3*(SrcRect.Left + Offset.x));
|
||||
for x := SrcRect.Left to SrcRect.Right do
|
||||
begin
|
||||
{$ifdef EnhancedRecordSupport}
|
||||
@ -527,8 +527,8 @@ begin
|
||||
begin
|
||||
SrcLine := SrcImg.GetDataLineStart(y);
|
||||
DstLine := DestImg.GetDataLineStart(y+Offset.y);
|
||||
SrcPtr := pointer(PtrInt(SrcLine) + 3*SrcRect.Left);
|
||||
DstPtr := pointer(PtrInt(DstLine) + 3*(SrcRect.Left + Offset.x));
|
||||
SrcPtr := {%H-}pointer({%H-}PtrInt(SrcLine) + 3*SrcRect.Left);
|
||||
DstPtr := {%H-}pointer({%H-}PtrInt(DstLine) + 3*(SrcRect.Left + Offset.x));
|
||||
for x := SrcRect.Left to SrcRect.Right do
|
||||
begin
|
||||
{$ifdef EnhancedRecordSupport}
|
||||
@ -974,8 +974,8 @@ begin
|
||||
begin
|
||||
SrcLine := SrcImg.GetDataLineStart(y);
|
||||
DstLine := DestImg.GetDataLineStart(y+Offset.y);
|
||||
Move(pointer(PtrInt(SrcLine) + 3*ClippedSrcRect.Left)^,
|
||||
pointer(PtrInt(DstLine) + 3*(ClippedSrcRect.Left + Offset.x))^,
|
||||
Move({%H-}pointer({%H-}PtrInt(SrcLine) + 3*ClippedSrcRect.Left)^,
|
||||
{%H-}pointer({%H-}PtrInt(DstLine) + 3*(ClippedSrcRect.Left + Offset.x))^,
|
||||
3*ClippedSrcRect.Width);
|
||||
end;
|
||||
ABitmap.LoadFromIntfImage(DestImg);
|
||||
@ -1081,18 +1081,18 @@ begin
|
||||
for y := ClippedSrcRect.Top to ClippedSrcRect.Bottom do
|
||||
begin
|
||||
SrcLine := SrcImg.GetDataLineStart(y);
|
||||
SrcLine := pointer(PtrInt(SrcLine) + 3 * ClippedSrcRect.left);
|
||||
SrcLine := {%H-}pointer({%H-}PtrInt(SrcLine) + 3 * ClippedSrcRect.left);
|
||||
MaskLine := MaskImg.GetDataLineStart(y);
|
||||
MaskLine := pointer(PtrInt(MaskLine) + ClippedSrcRect.left);
|
||||
MaskLine := {%H-}pointer({%H-}PtrInt(MaskLine) + ClippedSrcRect.left);
|
||||
DstLine := DestImg.GetDataLineStart(y+Offset.y);
|
||||
DstLine := pointer(PtrInt(DstLine) + 3 * (ClippedSrcRect.left + Offset.x));
|
||||
DstLine := {%H-}pointer({%H-}PtrInt(DstLine) + 3 * (ClippedSrcRect.left + Offset.x));
|
||||
for i := 0 to ClippedSrcRect.Width - 1 do
|
||||
begin
|
||||
if PByte(MaskLine)^ < 128 then
|
||||
Move(SrcLine^, DstLine^, 3);
|
||||
SrcLine := pointer(PtrInt(SrcLine)+3);
|
||||
DstLine := pointer(PtrInt(DstLine)+3);
|
||||
MaskLine := pointer(PtrInt(MaskLine)+1);
|
||||
SrcLine := {%H-}pointer({%H-}PtrInt(SrcLine)+3);
|
||||
DstLine := {%H-}pointer({%H-}PtrInt(DstLine)+3);
|
||||
MaskLine := {%H-}pointer({%H-}PtrInt(MaskLine)+1);
|
||||
end;
|
||||
end;
|
||||
ABitmap.LoadFromIntfImage(DestImg);
|
||||
@ -1191,22 +1191,22 @@ begin
|
||||
for y := ClippedSrcRect.top to ClippedSrcRect.bottom do
|
||||
begin
|
||||
SrcLine:=SrcImg.GetDataLineStart(y);
|
||||
SrcLine:=pointer(PtrInt(SrcLine) + 3 * ClippedSrcRect.left);
|
||||
SrcLine:={%H-}pointer({%H-}PtrInt(SrcLine) + 3 * ClippedSrcRect.left);
|
||||
|
||||
MaskLine:=MaskImg.GetDataLineStart(y);
|
||||
MaskLine:=pointer(PtrInt(MaskLine) + ClippedSrcRect.left);
|
||||
MaskLine:={%H-}pointer({%H-}PtrInt(MaskLine) + ClippedSrcRect.left);
|
||||
|
||||
DstLine:=DestImg.GetDataLineStart(y+Offset.y);
|
||||
DstLine:=pointer(PtrInt(DstLine) + 3 * (ClippedSrcRect.left + Offset.x));
|
||||
DstLine:={%H-}pointer({%H-}PtrInt(DstLine) + 3 * (ClippedSrcRect.left + Offset.x));
|
||||
|
||||
for i := 0 to ClippedSrcRect.width - 1 do
|
||||
begin
|
||||
if PByte(MaskLine)^<128 then
|
||||
Move(SrcLine^, DstLine^, 3);
|
||||
|
||||
SrcLine:=pointer(PtrInt(SrcLine)+3);
|
||||
DstLine:=pointer(PtrInt(DstLine)+3);
|
||||
MaskLine:=pointer(PtrInt(MaskLine)+1);
|
||||
SrcLine:={%H-}pointer({%H-}PtrInt(SrcLine)+3);
|
||||
DstLine:={%H-}pointer({%H-}PtrInt(DstLine)+3);
|
||||
MaskLine:={%H-}pointer({%H-}PtrInt(MaskLine)+1);
|
||||
end;
|
||||
end;
|
||||
ABitmap.LoadFromIntfImage(DestImg);
|
||||
@ -1295,8 +1295,8 @@ begin
|
||||
SrcLine:=SrcImg.GetDataLineStart(y);
|
||||
DstLine:=DestImg.GetDataLineStart(y+Offset.y);
|
||||
|
||||
Move(pointer(PtrInt(SrcLine) + 3*ClippedSrcRect.left)^,
|
||||
pointer(PtrInt(DstLine) + 3*(ClippedSrcRect.left + Offset.x))^,
|
||||
Move({%H-}pointer({%H-}PtrInt(SrcLine) + 3*ClippedSrcRect.left)^,
|
||||
{%H-}pointer({%H-}PtrInt(DstLine) + 3*(ClippedSrcRect.left + Offset.x))^,
|
||||
3*ClippedSrcRect.Width);
|
||||
end;
|
||||
ABitmap.LoadFromIntfImage(DestImg);
|
||||
@ -1398,8 +1398,8 @@ if Convex then
|
||||
SrcLine:=SrcImg.GetDataLineStart(y);
|
||||
DstLine:=DestImg.GetDataLineStart(y+Offset.y);
|
||||
|
||||
SrcPtr:=pointer(PtrInt(SrcLine) + 3*SrcRect.left);
|
||||
DstPtr:=pointer(PtrInt(DstLine) + 3*(SrcRect.left + Offset.x));
|
||||
SrcPtr:={%H-}pointer({%H-}PtrInt(SrcLine) + 3*SrcRect.left);
|
||||
DstPtr:={%H-}pointer({%H-}PtrInt(DstLine) + 3*(SrcRect.left + Offset.x));
|
||||
for x := SrcRect.left to SrcRect.right do
|
||||
begin
|
||||
{$IFDEF EnhancedRecordSupport}
|
||||
@ -1430,8 +1430,8 @@ else
|
||||
SrcLine:=SrcImg.GetDataLineStart(y);
|
||||
DstLine:=DestImg.GetDataLineStart(y+Offset.y);
|
||||
|
||||
SrcPtr:=pointer(PtrInt(SrcLine) + 3*SrcRect.left);
|
||||
DstPtr:=pointer(PtrInt(DstLine) + 3*(SrcRect.left + Offset.x));
|
||||
SrcPtr:={%H-}pointer({%H-}PtrInt(SrcLine) + 3*SrcRect.left);
|
||||
DstPtr:={%H-}pointer({%H-}PtrInt(DstLine) + 3*(SrcRect.left + Offset.x));
|
||||
for x := SrcRect.left to SrcRect.right do
|
||||
begin
|
||||
{$IFDEF EnhancedRecordSupport}
|
||||
@ -1458,8 +1458,6 @@ class procedure TGUITools.DrawAARoundCorner(ABitmap: TBitmap; Point: T2DIntVecto
|
||||
var
|
||||
CornerRect: T2DIntRect;
|
||||
Center: T2DIntVector;
|
||||
Line: PByte;
|
||||
Ptr: PByte;
|
||||
colorR, colorG, colorB: byte;
|
||||
x, y: integer;
|
||||
RadiusDist: double;
|
||||
@ -1561,8 +1559,6 @@ class procedure TGUITools.DrawAARoundCorner(ABitmap: TBitmap;
|
||||
var
|
||||
CornerRect: T2DIntRect;
|
||||
Center: T2DIntVector;
|
||||
Line: PByte;
|
||||
Ptr: PByte;
|
||||
colorR, colorG, colorB: byte;
|
||||
x, y: integer;
|
||||
RadiusDist: double;
|
||||
@ -1829,6 +1825,7 @@ var
|
||||
begin
|
||||
with ABitmap.Canvas do
|
||||
begin
|
||||
Font.Color := TextColor;
|
||||
s := AText;
|
||||
tw := TextWidth(s);
|
||||
if tw <= x2-x1+1 then
|
||||
@ -1921,7 +1918,7 @@ begin
|
||||
above in order to fix the "handle leak" of
|
||||
https://sourceforge.net/p/lazarus-ccr/bugs/35/
|
||||
Not daring to touch the ImageList.Draw which would have worked as well. }
|
||||
{
|
||||
(*
|
||||
// avoid exclusive draw. draw with local canvas itself.
|
||||
//ImageList.Draw(ACanvas, Point.x, Point.y, ImageIndex);
|
||||
{$IfDef LCLWin32}
|
||||
@ -1935,7 +1932,7 @@ begin
|
||||
ACanvas.Draw(Point.x, Point.y, ImageBitmap);
|
||||
ImageBitmap.Free;
|
||||
{$EndIf}
|
||||
}
|
||||
*)
|
||||
RestoreClipRgn(ACanvas.Handle, UseOrgClipRgn, OrgRgn);
|
||||
DeleteObject(ClipRgn);
|
||||
end;
|
||||
@ -1944,8 +1941,8 @@ class procedure TGUITools.DrawMarkedText(ACanvas: TCanvas; x, y: integer; const
|
||||
AMarkPhrase: string; TextColor : TColor; ClipRect: T2DIntRect; CaseSensitive: boolean);
|
||||
var
|
||||
UseOrgClipRgn: Boolean;
|
||||
OrgRgn: HRGN;
|
||||
ClipRgn: HRGN;
|
||||
OrgRgn: HRGN = 0;
|
||||
ClipRgn: HRGN = 0;
|
||||
begin
|
||||
// Store the original ClipRgn and set a new one
|
||||
SaveClipRgn(ACanvas.Handle, UseOrgClipRgn, OrgRgn);
|
||||
@ -2540,6 +2537,7 @@ var
|
||||
begin
|
||||
with ACanvas do
|
||||
begin
|
||||
Font.Color := TextColor;
|
||||
s := AText;
|
||||
tw := TextWidth(s);
|
||||
// We draw if the text is changed
|
||||
@ -2616,8 +2614,8 @@ begin
|
||||
DeleteObject(OrgRgn);
|
||||
end;
|
||||
|
||||
class procedure TGUITools.SaveClipRgn(DC: HDC; var OrgRgnExists: boolean;
|
||||
var OrgRgn: HRGN);
|
||||
class procedure TGUITools.SaveClipRgn(DC: HDC; out OrgRgnExists: boolean;
|
||||
out OrgRgn: HRGN);
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
@ -2842,8 +2840,6 @@ var
|
||||
UseOrgClipRgn: Boolean;
|
||||
OrgRgn: HRGN;
|
||||
ClipRgn: HRGN;
|
||||
te: TThemedElementDetails;
|
||||
Rect: TRect;
|
||||
begin
|
||||
SaveClipRgn(ACanvas.Handle, UseOrgClipRgn, OrgRgn);
|
||||
ClipRgn := CreateRectRgn(ClipRect.left, ClipRect.Top, ClipRect.Right+1, ClipRect.Bottom+1);
|
||||
|
@ -161,9 +161,9 @@ begin
|
||||
c1 := TRgbColor(ColorToRGB(AColor1));
|
||||
c2 := TRgbColor(ColorToRGB(AColor2));
|
||||
result := rgb(
|
||||
max(0, min(255, c1.R + c2.R)),
|
||||
max(0, min(255, c1.G + c2.G)),
|
||||
max(0, min(255, c1.B + c2.B))
|
||||
max(0, min(255, Integer(c1.R) + c2.R)),
|
||||
max(0, min(255, Integer(c1.G) + c2.G)),
|
||||
max(0, min(255, Integer(c1.B) + c2.B))
|
||||
);
|
||||
end;
|
||||
|
||||
@ -174,9 +174,9 @@ begin
|
||||
c1 := TRgbColor(ColorToRGB(AColor1));
|
||||
c2 := TRgbColor(ColorToRGB(AColor2));
|
||||
result := rgb(
|
||||
max(0, min(255, c1.R * c2.R)),
|
||||
max(0, min(255, c1.G * c2.G)),
|
||||
max(0, min(255, c1.B * c2.B))
|
||||
max(0, min(255, Integer(c1.R) * c2.R)),
|
||||
max(0, min(255, Integer(c1.G) * c2.G)),
|
||||
max(0, min(255, Integer(c1.B) * c2.B))
|
||||
);
|
||||
end;
|
||||
|
||||
@ -186,9 +186,9 @@ var
|
||||
begin
|
||||
c := TRgbColor(ColorToRGB(AColor));
|
||||
result := rgb(
|
||||
max(0, min(255, c.R * AScalar)),
|
||||
max(0, min(255, c.G * AScalar)),
|
||||
max(0, min(255, c.B * AScalar))
|
||||
max(0, min(255, AScalar * c.R)),
|
||||
max(0, min(255, AScalar * c.G)),
|
||||
max(0, min(255, AScalar * c.B))
|
||||
);
|
||||
end;
|
||||
|
||||
|
@ -112,7 +112,7 @@ type
|
||||
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;
|
||||
function IntersectsWith(ARect : T2DIntRect; out Intersection : T2DIntRect) : boolean; overload;
|
||||
procedure Move(dx, dy : integer); overload;
|
||||
procedure Move(AVector : T2DIntVector); overload;
|
||||
function Moved(dx, dy : integer) : T2DIntRect; overload;
|
||||
@ -1192,7 +1192,7 @@ begin
|
||||
end;
|
||||
|
||||
function T2DIntRect.IntersectsWith(ARect : T2DIntRect;
|
||||
var Intersection: T2DIntRect): boolean;
|
||||
out Intersection: T2DIntRect): boolean;
|
||||
|
||||
var XStart, XWidth, YStart, YWidth : integer;
|
||||
|
||||
@ -1249,7 +1249,7 @@ if self.top<=ARect.top then
|
||||
//todo: is it possible to call constructor directly like object?
|
||||
Intersection:=T2DIntRect.create(XStart, YStart, XStart+XWidth-1, YStart+YWidth-1);
|
||||
{$else}
|
||||
Intersection.create(XStart, YStart, XStart+XWidth-1, YStart+YWidth-1);
|
||||
Intersection.Create(XStart, YStart, XStart+XWidth-1, YStart+YWidth-1);
|
||||
{$endif}
|
||||
result:=(XWidth>0) and (YWidth>0);
|
||||
end;
|
||||
|
@ -214,10 +214,9 @@ type
|
||||
|
||||
{ The Change of component size }
|
||||
procedure DoOnResize; override;
|
||||
procedure EraseBackground(DC: HDC); override;
|
||||
|
||||
{ Method called when mouse pointer left component region }
|
||||
procedure MouseLeave;
|
||||
procedure MouseLeave; override;
|
||||
|
||||
{ Method called when mouse button is pressed }
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
@ -246,16 +245,16 @@ type
|
||||
|
||||
{ Method called when the mouse button is pressed
|
||||
and at the same time the mouse pointer is over the region of tabs }
|
||||
procedure TabMouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
procedure TabMouseDown(Button: TMouseButton; {%H-}Shift: TShiftState;
|
||||
X, Y: integer);
|
||||
|
||||
{ Method called when the mouse will move over the region of tab "handles" }
|
||||
procedure TabMouseMove(Shift: TShiftState; X, Y: integer);
|
||||
procedure TabMouseMove({%H-}Shift: TShiftState; X, Y: integer);
|
||||
|
||||
{ Method called when one of the mouse buttons is released
|
||||
and at the same time the region of tabs was active element of toolbar }
|
||||
procedure TabMouseUp(Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: integer);
|
||||
procedure TabMouseUp({%H-}Button: TMouseButton; {%H-}Shift: TShiftState;
|
||||
{%H-}X, {%H-}Y: integer);
|
||||
|
||||
// *********************
|
||||
// *** Extra support ***
|
||||
@ -295,7 +294,7 @@ type
|
||||
function GetColor: TColor;
|
||||
|
||||
{ Setter for property Color }
|
||||
procedure SetColor(const Value: TColor);
|
||||
procedure SetColor(Value: TColor);
|
||||
|
||||
{ Setter for property TabIndex }
|
||||
procedure SetTabIndex(const Value: integer);
|
||||
@ -362,6 +361,8 @@ type
|
||||
// *** Drawing ***
|
||||
// ***************
|
||||
|
||||
procedure EraseBackground(DC: HDC); override;
|
||||
|
||||
{ Method draws the content of the component }
|
||||
procedure Paint; override;
|
||||
|
||||
@ -1081,7 +1082,7 @@ begin
|
||||
FBufferValid := False;
|
||||
end;
|
||||
|
||||
procedure TSpkToolbar.SetColor(const Value: TColor);
|
||||
procedure TSpkToolbar.SetColor(Value: TColor);
|
||||
begin
|
||||
inherited Color := Value;
|
||||
SetBufferInvalid;
|
||||
@ -1390,7 +1391,7 @@ procedure TSpkToolbar.ValidateBuffer;
|
||||
procedure DrawTabs;
|
||||
var
|
||||
i: integer;
|
||||
TabRect: T2DIntRect;
|
||||
// TabRect: T2DIntRect;
|
||||
CurrentAppearance: TSpkToolbarAppearance;
|
||||
FocusedAppearance: TSpkToolbarAppearance;
|
||||
|
||||
@ -1617,7 +1618,7 @@ procedure TSpkToolbar.ValidateBuffer;
|
||||
delta := 0 else
|
||||
delta := 50;
|
||||
|
||||
TabRect := FTabRects[i];
|
||||
//TabRect := FTabRects[i];
|
||||
|
||||
// Tab is drawn
|
||||
if i = FTabIndex then // active tab
|
||||
|
@ -17,7 +17,7 @@ interface
|
||||
uses
|
||||
Graphics, Classes, Forms, SysUtils,
|
||||
SpkGUITools, SpkXMLParser, SpkXMLTools,
|
||||
spkt_Dispatch, spkt_Exceptions, spkt_Const;
|
||||
spkt_Dispatch, spkt_Exceptions;
|
||||
|
||||
type
|
||||
TSpkPaneStyle = (
|
||||
@ -1605,7 +1605,7 @@ end;
|
||||
|
||||
procedure SetDefaultFont(AFont: TFont);
|
||||
begin
|
||||
// AFont.Assign(Screen.MenuFont);
|
||||
//AFont.Assign(Screen.MenuFont); // wp: why is this harmful?
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -19,7 +19,7 @@ uses
|
||||
Graphics, Classes, Types, Controls, Menus, ActnList, Math,
|
||||
Dialogs, ImgList, Forms,
|
||||
SpkGUITools, SpkGraphTools, SpkMath,
|
||||
spkt_Const, spkt_BaseItem, spkt_Exceptions, spkt_Tools;
|
||||
spkt_Const, spkt_BaseItem, spkt_Tools;
|
||||
|
||||
type
|
||||
TSpkMouseButtonElement = (beNone, beButton, beDropdown);
|
||||
@ -39,7 +39,7 @@ type
|
||||
procedure SetGroupIndex(Value: Integer); override;
|
||||
procedure SetImageIndex(Value: integer); override;
|
||||
procedure SetVisible(Value: Boolean); override;
|
||||
procedure SetOnExecute(Value: TNotifyEvent); override;
|
||||
procedure SetOnExecute({%H-}Value: TNotifyEvent); override;
|
||||
public
|
||||
function IsCaptionLinked: Boolean; override;
|
||||
function IsCheckedLinked: Boolean; override;
|
||||
@ -113,11 +113,11 @@ type
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure MouseLeave; override;
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: Integer); override;
|
||||
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
|
||||
procedure MouseDown(Button: TMouseButton; {%H-}Shift: TShiftState;
|
||||
{%H-}X, {%H-}Y: Integer); override;
|
||||
procedure MouseMove({%H-}Shift: TShiftState; X, Y: Integer); override;
|
||||
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: Integer); override;
|
||||
{%H-}X, {%H-}Y: Integer); override;
|
||||
|
||||
function GetRootComponent: TComponent;
|
||||
|
||||
|
@ -19,9 +19,10 @@ type
|
||||
procedure SetTableBehaviour(const Value: TSpkItemTableBehaviour);
|
||||
protected
|
||||
procedure CalcRects; override;
|
||||
procedure ConstructRect(var BtnRect: T2DIntRect);
|
||||
procedure ConstructRect(out BtnRect: T2DIntRect);
|
||||
function GetChecked: Boolean; override;
|
||||
function GetDefaultCaption: String; override;
|
||||
function GetDropdownPoint: T2DIntPoint; override;
|
||||
procedure SetChecked(const AValue: Boolean); override;
|
||||
procedure SetState(AValue: TCheckboxState); virtual;
|
||||
public
|
||||
@ -90,7 +91,7 @@ begin
|
||||
FButtonRect := FButtonRect + RectVector;
|
||||
end;
|
||||
|
||||
procedure TSpkCustomCheckbox.ConstructRect(var BtnRect: T2DIntRect);
|
||||
procedure TSpkCustomCheckbox.ConstructRect(out BtnRect: T2DIntRect);
|
||||
var
|
||||
BtnWidth: integer;
|
||||
Bitmap: TBitmap;
|
||||
@ -276,6 +277,15 @@ begin
|
||||
Result := 'Checkbox';
|
||||
end;
|
||||
|
||||
function TSpkCustomCheckbox.GetDropdownPoint: T2DIntPoint;
|
||||
begin
|
||||
{$IFDEF EnhancedRecordSupport}
|
||||
Result := T2DIntPoint.Create(0,0);
|
||||
{$ELSE}
|
||||
Result.Create(0,0);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TSpkCustomCheckbox.GetGroupBehaviour: TSpkItemGroupBehaviour;
|
||||
begin
|
||||
Result := gbSingleitem; //FGroupBehaviour;
|
||||
@ -293,7 +303,7 @@ end;
|
||||
|
||||
function TSpkCustomCheckbox.GetWidth: integer;
|
||||
var
|
||||
BtnRect, DropRect: T2DIntRect;
|
||||
BtnRect: T2DIntRect;
|
||||
begin
|
||||
Result := -1;
|
||||
if FToolbarDispatch = nil then
|
||||
|
@ -271,7 +271,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
LCLType, Types;
|
||||
LCLType;
|
||||
|
||||
procedure SpkInitLayoutConsts(FromDPI: Integer; ToDPI: Integer = 0);
|
||||
begin
|
||||
|
@ -236,7 +236,6 @@ var
|
||||
i: Integer;
|
||||
R: T2DIntRect;
|
||||
delta: Integer;
|
||||
cornerRadius: Integer;
|
||||
begin
|
||||
// W niektórych warunkach nie jesteœmy w stanie rysowaæ:
|
||||
// * Brak dyspozytora
|
||||
|
@ -30,7 +30,7 @@ type
|
||||
|
||||
// *** Metody reakcji na zmiany w liœcie ***
|
||||
// *** Methods responding to changes in list ***
|
||||
procedure Notify(Item: TComponent; Operation: TOperation); virtual;
|
||||
procedure Notify({%H-}Item: TComponent; {%H-}Operation: TOperation); virtual;
|
||||
procedure Update; virtual;
|
||||
|
||||
// *** Wewnêtrzne metody dodawania i wstawiania elementów ***
|
||||
|
@ -2,6 +2,7 @@ unit SpkXMLParser;
|
||||
|
||||
{$mode Delphi}
|
||||
{$DEFINE SPKXMLPARSER}
|
||||
{$WARN 4055 off : Conversion between ordinals and pointers is not portable}
|
||||
|
||||
interface
|
||||
|
||||
@ -1500,7 +1501,7 @@ try
|
||||
|
||||
// Oczekujemy nazwy taga, kt�ra jest postaci
|
||||
// [a-zA-Z]([a-zA-Z0-9_]|([\-:][a-zA-Z0-9_]))*
|
||||
if not(input^ in ['a'..'z','A'..'Z']) then
|
||||
if not (input^ in ['a'..'z','A'..'Z']) then
|
||||
raise exception.create('B��d w sk�adni XML (linia '+IntToStr(ParseLine)+', znak '+IntToStr(ParseChar)+') : Nieprawid�owa nazwa taga!');
|
||||
|
||||
TokenStart:=input;
|
||||
@ -1515,8 +1516,8 @@ try
|
||||
end;
|
||||
until not(input^ in ['a'..'z','A'..'Z','0'..'9','_']);
|
||||
|
||||
setlength(s,integer(input)-integer(TokenStart));
|
||||
StrLCopy(PChar(s),TokenStart,integer(input)-integer(TokenStart));
|
||||
SetLength(s, PtrUInt(input)-PtrUInt(TokenStart));
|
||||
StrLCopy(PChar(s),TokenStart, PtrUInt(input)-PtrUInt(TokenStart));
|
||||
Node.Name:=s;
|
||||
|
||||
// Plik nie mo�e si� tu ko�czy�.
|
||||
@ -1546,8 +1547,8 @@ try
|
||||
increment(input)
|
||||
until not(input^ in ['a'..'z','A'..'Z','0'..'9','_']);
|
||||
|
||||
setlength(s,integer(input)-integer(TokenStart));
|
||||
StrLCopy(PChar(s),TokenStart,integer(input)-integer(TokenStart));
|
||||
SetLength(s, {%H-}PtrUInt(input)-{%H-}PtrUInt(TokenStart));
|
||||
StrLCopy(PChar(s), TokenStart, {%H-}PtrUInt(input)-{%H-}PtrUInt(TokenStart));
|
||||
|
||||
// Pomijamy bia�e znaki
|
||||
while input^ in [#32,#9,#13,#10] do increment(input);
|
||||
@ -1676,8 +1677,8 @@ try
|
||||
until input^='-';
|
||||
until StrLComp(input,'-->',3)=0;
|
||||
|
||||
setlength(s,integer(input)-integer(TokenStart));
|
||||
StrLCopy(PChar(s),TokenStart,integer(input)-integer(TokenStart));
|
||||
setlength(s, PtrUInt(input)-PtrUInt(TokenStart));
|
||||
StrLCopy(PChar(s),TokenStart, PtrUInt(input)-PtrUInt(TokenStart));
|
||||
Node.Text:=s;
|
||||
|
||||
// Pomijamy znaki zako�czenia komentarza
|
||||
@ -1721,8 +1722,8 @@ try
|
||||
end;
|
||||
until not(input^ in ['a'..'z','A'..'Z','0'..'9','_']);
|
||||
|
||||
setlength(s,integer(input)-integer(TokenStart));
|
||||
StrLCopy(PChar(s),TokenStart,integer(input)-integer(TokenStart));
|
||||
SetLength(s, PtrUInt(input)-PtrUInt(TokenStart));
|
||||
StrLCopy(PChar(s),TokenStart, PtrUInt(input)-PtrUInt(TokenStart));
|
||||
|
||||
// Pomijamy zb�dne znaki bia�e
|
||||
while input^ in [#32,#9,#10,#13] do increment(input);
|
||||
|
@ -291,13 +291,13 @@ type
|
||||
FScreenshotForm: TForm;
|
||||
function PickColor(APanel: TPanel): Boolean;
|
||||
procedure ScreenshotKeyDown(Sender: TObject;
|
||||
var Key: Word; Shift: TShiftState);
|
||||
procedure ScreenshotMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: integer);
|
||||
var Key: Word; {%H-}Shift: TShiftState);
|
||||
procedure ScreenshotMouseDown(Sender: TObject; {%H-}Button: TMouseButton;
|
||||
{%H-}Shift: TShiftState; X, Y: integer);
|
||||
procedure ScreenshotMouseMove(Sender: TObject;
|
||||
Shift: TShiftState; X, Y: integer);
|
||||
procedure ScreenshotMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: integer);
|
||||
{%H-}Shift: TShiftState; X, Y: integer);
|
||||
procedure ScreenshotMouseUp(Sender: TObject; {%H-}Button: TMouseButton;
|
||||
{%H-}Shift: TShiftState; {%H-}X, {%H-}Y: integer);
|
||||
|
||||
private
|
||||
procedure UpdateImages;
|
||||
@ -321,7 +321,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Types, clipbrd, Spkt_Const;
|
||||
Types, clipbrd;
|
||||
|
||||
var
|
||||
CurrPageIndex: Integer = 0;
|
||||
@ -1411,7 +1411,7 @@ end;
|
||||
|
||||
procedure TfrmAppearanceEditWindow.UpdateSizes;
|
||||
var
|
||||
w, h, dist: Integer;
|
||||
w, h: Integer;
|
||||
|
||||
procedure AddToHeight(var AHeight: Integer; AControl: TControl);
|
||||
begin
|
||||
|
@ -5,8 +5,8 @@ unit spkte_EditWindow;
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, {DesignIntf, DesignEditors,} StdCtrls, ImgList, ComCtrls, ToolWin,
|
||||
LCLIntf, LCLType, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, {DesignIntf, DesignEditors,} StdCtrls, ImgList, ComCtrls,
|
||||
ActnList, Menus, ComponentEditors, PropEdits,
|
||||
SpkToolbar, spkt_Tab, spkt_Pane, spkt_BaseItem, spkt_Buttons, spkt_Types, spkt_Checkboxes;
|
||||
|
||||
@ -85,7 +85,7 @@ type
|
||||
procedure tvStructureDeletion(Sender:TObject; Node:TTreeNode);
|
||||
procedure tvStructureEdited(Sender: TObject; Node: TTreeNode; var S: string);
|
||||
procedure tvStructureKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
{%H-}Shift: TShiftState);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
@ -1002,8 +1002,6 @@ end;
|
||||
procedure TfrmEditWindow.tvStructureDeletion(Sender:TObject; Node:TTreeNode);
|
||||
var
|
||||
RunNode: TTreeNode;
|
||||
index: Integer;
|
||||
comp: TSpkComponent;
|
||||
begin
|
||||
if Node = nil then
|
||||
exit;
|
||||
|
Reference in New Issue
Block a user