mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 06:40:56 +02:00
remove old imagelist code
git-svn-id: trunk@12972 -
This commit is contained in:
parent
df3fab3e3a
commit
d0cdd9d471
@ -100,14 +100,8 @@ type
|
|||||||
|
|
||||||
// Some temp rework defines, for old functionality both need so be set
|
// Some temp rework defines, for old functionality both need so be set
|
||||||
|
|
||||||
{.$define IMGLIST_OLDSTYLE} // Set to keep original functionality
|
|
||||||
{.$define IMGLIST_KEEP_EXTRA} // Not needed for Delphi compat.
|
{.$define IMGLIST_KEEP_EXTRA} // Not needed for Delphi compat.
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
// hack to set defines in dependent widgetsets.
|
|
||||||
TOldstyleCustomImageList = Boolean;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
TDrawingStyle = (dsFocus, dsSelected, dsNormal, dsTransparent);
|
TDrawingStyle = (dsFocus, dsSelected, dsNormal, dsTransparent);
|
||||||
TImageType = (itImage, itMask);
|
TImageType = (itImage, itMask);
|
||||||
|
|
||||||
@ -115,13 +109,6 @@ type
|
|||||||
private
|
private
|
||||||
FDrawingStyle: TDrawingStyle;
|
FDrawingStyle: TDrawingStyle;
|
||||||
FData: array of TRGBAQuad;
|
FData: array of TRGBAQuad;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
FHandle: THandle;
|
|
||||||
FImageList: TList;
|
|
||||||
FMaskList: TList;
|
|
||||||
FBitmap: TBitmap;
|
|
||||||
FMaskBitmap: TBitmap;
|
|
||||||
{$endif}
|
|
||||||
FImageType: TImageType;
|
FImageType: TImageType;
|
||||||
FHeight: Integer;
|
FHeight: Integer;
|
||||||
FMasked: boolean;
|
FMasked: boolean;
|
||||||
@ -137,19 +124,11 @@ type
|
|||||||
FChanged: boolean;
|
FChanged: boolean;
|
||||||
FUpdateCount: integer;
|
FUpdateCount: integer;
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
procedure AllocBitmap(Amount: Integer);
|
|
||||||
{$else}
|
|
||||||
procedure AllocData(ACount: Integer);
|
procedure AllocData(ACount: Integer);
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{$ifndef IMGLIST_OLDSTYLE}
|
|
||||||
procedure InternalInsert(AIndex: Integer; AImage, AMask: HBitmap;
|
procedure InternalInsert(AIndex: Integer; AImage, AMask: HBitmap;
|
||||||
AWidth, AHeight: Integer);
|
AWidth, AHeight: Integer);
|
||||||
procedure InternalMove(ACurIndex, ANewIndex: Cardinal; AIgnoreCurrent: Boolean);
|
procedure InternalMove(ACurIndex, ANewIndex: Cardinal; AIgnoreCurrent: Boolean);
|
||||||
function InternalSetImage(AIndex: Integer; AImage: TRawImage): PRGBAQuad;
|
function InternalSetImage(AIndex: Integer; AImage: TRawImage): PRGBAQuad;
|
||||||
{$endif}
|
|
||||||
|
|
||||||
procedure NotifyChangeLink;
|
procedure NotifyChangeLink;
|
||||||
procedure SetBkColor(const Value: TColor);
|
procedure SetBkColor(const Value: TColor);
|
||||||
procedure SetDrawingStyle(const AValue: TDrawingStyle);
|
procedure SetDrawingStyle(const AValue: TDrawingStyle);
|
||||||
@ -157,10 +136,6 @@ type
|
|||||||
procedure SetMasked(const AValue: boolean);
|
procedure SetMasked(const AValue: boolean);
|
||||||
procedure SetShareImages(const AValue: Boolean);
|
procedure SetShareImages(const AValue: Boolean);
|
||||||
procedure SetWidth(const Value: Integer);
|
procedure SetWidth(const Value: Integer);
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
procedure ShiftImages(const Source: TCanvas; Start, Shift: Integer);
|
|
||||||
{$endif}
|
|
||||||
protected
|
protected
|
||||||
procedure CheckIndex(AIndex: Integer; AForInsert: Boolean = False);
|
procedure CheckIndex(AIndex: Integer; AForInsert: Boolean = False);
|
||||||
procedure GetImages(Index: Integer; const Image, Mask: TBitmap);
|
procedure GetImages(Index: Integer; const Image, Mask: TBitmap);
|
||||||
@ -180,10 +155,6 @@ type
|
|||||||
procedure EndUpdate;
|
procedure EndUpdate;
|
||||||
|
|
||||||
function Add(Image, Mask: TBitmap): Integer;
|
function Add(Image, Mask: TBitmap): Integer;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
function AddDirect(Image, Mask: TBitmap): Integer;
|
|
||||||
function AddCopy(SrcImage, SrcMask: TBitmap): Integer;
|
|
||||||
{$endif}
|
|
||||||
function AddIcon(Image: TIcon): Integer;
|
function AddIcon(Image: TIcon): Integer;
|
||||||
procedure AddImages(AValue: TCustomImageList);
|
procedure AddImages(AValue: TCustomImageList);
|
||||||
function AddMasked(Image: TBitmap; MaskColor: TColor): Integer;
|
function AddMasked(Image: TBitmap; MaskColor: TColor): Integer;
|
||||||
@ -208,9 +179,6 @@ type
|
|||||||
function GetHotSpot: TPoint; virtual;
|
function GetHotSpot: TPoint; virtual;
|
||||||
procedure GetIcon(Index: Integer; Image: TIcon);
|
procedure GetIcon(Index: Integer; Image: TIcon);
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
function HandleAllocated: Boolean;
|
|
||||||
{$endif}
|
|
||||||
procedure Insert(AIndex: Integer; AImage, AMask: TBitmap);
|
procedure Insert(AIndex: Integer; AImage, AMask: TBitmap);
|
||||||
procedure InsertIcon(Index: Integer; Image: TIcon);
|
procedure InsertIcon(Index: Integer; Image: TIcon);
|
||||||
procedure InsertMasked(Index: Integer; AImage: TBitmap; MaskColor: TColor);
|
procedure InsertMasked(Index: Integer; AImage: TBitmap; MaskColor: TColor);
|
||||||
@ -227,11 +195,7 @@ type
|
|||||||
property BkColor: TColor read FBkColor write SetBkColor default clNone;
|
property BkColor: TColor read FBkColor write SetBkColor default clNone;
|
||||||
property Count: Integer read FCount;
|
property Count: Integer read FCount;
|
||||||
property DrawingStyle: TDrawingStyle read FDrawingStyle write SetDrawingStyle default dsNormal;
|
property DrawingStyle: TDrawingStyle read FDrawingStyle write SetDrawingStyle default dsNormal;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
property Handle: THandle read FHandle;
|
|
||||||
{$else}
|
|
||||||
property HandleAllocated;
|
property HandleAllocated;
|
||||||
{$endif}
|
|
||||||
property Height: Integer read FHeight write SetHeight default 16;
|
property Height: Integer read FHeight write SetHeight default 16;
|
||||||
property Width: Integer read FWidth write SetWidth default 16;
|
property Width: Integer read FWidth write SetWidth default 16;
|
||||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||||
|
@ -62,55 +62,10 @@ end;
|
|||||||
|
|
||||||
function TCustomImageList.Add(Image, Mask: TBitmap): Integer;
|
function TCustomImageList.Add(Image, Mask: TBitmap): Integer;
|
||||||
begin
|
begin
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
Result:=AddCopy(Image,Mask);
|
|
||||||
{$else}
|
|
||||||
Result := Count;
|
Result := Count;
|
||||||
Insert(Result, Image, Mask);
|
Insert(Result, Image, Mask);
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
function TCustomImageList.AddDirect(Image, Mask: TBitmap): Integer;
|
|
||||||
begin
|
|
||||||
try
|
|
||||||
Result := Count;
|
|
||||||
Insert(Result, Image, Mask);
|
|
||||||
except
|
|
||||||
on E: Exception do begin
|
|
||||||
DebugLn('TCustomImageList.Add ',E.Message);
|
|
||||||
Result := -1; // Ignore exceptions, just return -1
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
function TCustomImageList.AddCopy(SrcImage, SrcMask: TBitmap): Integer;
|
|
||||||
var
|
|
||||||
NewImage: TBitmap;
|
|
||||||
NewMask: TBitmap;
|
|
||||||
begin
|
|
||||||
NewImage:=nil;
|
|
||||||
NewMask:=nil;
|
|
||||||
try
|
|
||||||
NewImage := TBitmap.Create;
|
|
||||||
NewImage.Assign(SrcImage);
|
|
||||||
if Assigned(SrcMask)
|
|
||||||
then begin
|
|
||||||
NewMask := TBitmap.Create;
|
|
||||||
NewMask.Assign(SrcMask);
|
|
||||||
end;
|
|
||||||
Result:=AddDirect(NewImage, NewMask);
|
|
||||||
NewImage:=nil;
|
|
||||||
NewMask:=nil;
|
|
||||||
finally
|
|
||||||
NewImage.Free;
|
|
||||||
NewMask.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: TCustomImageList.AddIcon
|
Function: TCustomImageList.AddIcon
|
||||||
Params: Image: the Icon to be added;
|
Params: Image: the Icon to be added;
|
||||||
@ -137,37 +92,12 @@ end;
|
|||||||
procedure TCustomImageList.AddImages(AValue: TCustomImageList);
|
procedure TCustomImageList.AddImages(AValue: TCustomImageList);
|
||||||
var
|
var
|
||||||
n: Integer;
|
n: Integer;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
SrcImage: TBitmap;
|
|
||||||
SrcMask: TBitmap;
|
|
||||||
NewImage: TBitmap;
|
|
||||||
NewMask: TBitmap;
|
|
||||||
{$else}
|
|
||||||
p: PRGBAQuad;
|
p: PRGBAQuad;
|
||||||
DataSize: Integer;
|
DataSize: Integer;
|
||||||
OldCount: Integer;
|
OldCount: Integer;
|
||||||
{$endif}
|
|
||||||
begin
|
begin
|
||||||
if (AValue = nil) or (AValue=Self) then exit;
|
if (AValue = nil) or (AValue=Self) then exit;
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
BeginUpdate;
|
|
||||||
for n := 0 to AValue.Count - 1 do begin
|
|
||||||
SrcImage:=TBitmap(AValue.FImageList[n]);
|
|
||||||
if SrcImage<>nil then begin
|
|
||||||
NewImage:=TBitmap.Create;
|
|
||||||
NewImage.Assign(SrcImage);
|
|
||||||
SrcMask:=TBitmap(AValue.FMaskList[n]);
|
|
||||||
if SrcMask<>nil then begin
|
|
||||||
NewMask:=TBitmap.Create;
|
|
||||||
NewMask.Assign(SrcMask);
|
|
||||||
end else
|
|
||||||
NewMask:=nil;
|
|
||||||
AddDirect(NewImage,NewMask);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
EndUpdate;
|
|
||||||
{$else}
|
|
||||||
AllocData(FCount + AValue.FCount);
|
AllocData(FCount + AValue.FCount);
|
||||||
if (AValue.FWidth = FWidth) and (AValue.FHeight = FHeight)
|
if (AValue.FWidth = FWidth) and (AValue.FHeight = FHeight)
|
||||||
then begin
|
then begin
|
||||||
@ -188,7 +118,6 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
{$note implement}
|
{$note implement}
|
||||||
end;
|
end;
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -228,44 +157,17 @@ begin
|
|||||||
if MaskColor <> clNone then
|
if MaskColor <> clNone then
|
||||||
Bmp.TransparentColor := MaskColor;
|
Bmp.TransparentColor := MaskColor;
|
||||||
Bmp.LoadFromLazarusResource(ResourceName);
|
Bmp.LoadFromLazarusResource(ResourceName);
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
Result := AddDirect(Bmp, nil);
|
|
||||||
{$else}
|
|
||||||
Result := Add(Bmp, nil);
|
Result := Add(Bmp, nil);
|
||||||
Bmp.Free;
|
Bmp.Free;
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomImageList.AllocBitmap
|
Method: TCustomImageList.AllocData
|
||||||
Params: Amount: the amount of free image position which should be availabe
|
Params: ACount: the amount of images
|
||||||
Returns: Nothing
|
Returns: Nothing
|
||||||
|
|
||||||
Checks if there is enough space for Amount images, increases the internal
|
Allocates data for ACount images
|
||||||
list if necessary .
|
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
procedure TCustomImageList.AllocBitmap(Amount: Integer);
|
|
||||||
var
|
|
||||||
n: Integer;
|
|
||||||
begin
|
|
||||||
Assert(FAllocCount >= FCount, 'Less space allocated than images');
|
|
||||||
if FAllocCount >= FCount + Amount
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
// calculate number of blocks, add an extra block for the remainder.
|
|
||||||
n := Amount mod FAllocBy;
|
|
||||||
if n <> 0
|
|
||||||
then Inc(Amount, FAllocBy - n);
|
|
||||||
|
|
||||||
if FBitMap<>nil then
|
|
||||||
FBitMap.Height := FBitMap.Height + Amount * FHeight;
|
|
||||||
if FMaskBitmap<>nil then
|
|
||||||
FMaskBitmap.Height := FBitMap.Height;
|
|
||||||
|
|
||||||
Inc(FAllocCount, Amount);
|
|
||||||
end;
|
|
||||||
{$else}
|
|
||||||
procedure TCustomImageList.AllocData(ACount: Integer);
|
procedure TCustomImageList.AllocData(ACount: Integer);
|
||||||
var
|
var
|
||||||
n: Integer;
|
n: Integer;
|
||||||
@ -284,6 +186,16 @@ begin
|
|||||||
Inc(FAllocCount, ACount);
|
Inc(FAllocCount, ACount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
Method: TCustomImageList.InternalInsert
|
||||||
|
Params: AIndex: Index to insert images
|
||||||
|
AImage, AMask: handles of Image and Mask
|
||||||
|
AWidth, AHeight: Width and Height of AImage and AMask
|
||||||
|
Returns: Nothing
|
||||||
|
|
||||||
|
Insert bitmap (with split if necessary) into position AIndex with shifting other
|
||||||
|
images
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomImageList.InternalInsert(AIndex: Integer; AImage, AMask: HBitmap;
|
procedure TCustomImageList.InternalInsert(AIndex: Integer; AImage, AMask: HBitmap;
|
||||||
AWidth, AHeight: Integer);
|
AWidth, AHeight: Integer);
|
||||||
var
|
var
|
||||||
@ -322,8 +234,6 @@ begin
|
|||||||
Change;
|
Change;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomImageList.Assign
|
Method: TCustomImageList.Assign
|
||||||
Params: Source: Source data
|
Params: Source: Source data
|
||||||
@ -414,18 +324,11 @@ end;
|
|||||||
procedure TCustomImageList.Clear;
|
procedure TCustomImageList.Clear;
|
||||||
begin
|
begin
|
||||||
if FCount = 0 then Exit;
|
if FCount = 0 then Exit;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
while Count>0 do
|
|
||||||
Delete(0);
|
|
||||||
FImageList.Clear;
|
|
||||||
FMaskList.Clear;
|
|
||||||
{$else}
|
|
||||||
if HandleAllocated
|
if HandleAllocated
|
||||||
then TWSCustomImageListClass(WidgetSetClass).Clear(Self);
|
then TWSCustomImageListClass(WidgetSetClass).Clear(Self);
|
||||||
SetLength(FData, 0);
|
SetLength(FData, 0);
|
||||||
FAllocCount := 0;
|
FAllocCount := 0;
|
||||||
{$endif}
|
|
||||||
|
|
||||||
FCount := 0;
|
FCount := 0;
|
||||||
Change;
|
Change;
|
||||||
end;
|
end;
|
||||||
@ -443,10 +346,6 @@ begin
|
|||||||
FHeight := 16;
|
FHeight := 16;
|
||||||
FWidth := 16;
|
FWidth := 16;
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
FImageList := TList.Create; //shane
|
|
||||||
FMaskList := TList.Create;
|
|
||||||
{$endif}
|
|
||||||
Initialize;
|
Initialize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -464,10 +363,6 @@ begin
|
|||||||
inherited Create(nil);
|
inherited Create(nil);
|
||||||
FHeight := AHeight;
|
FHeight := AHeight;
|
||||||
FWidth := AWidth;
|
FWidth := AWidth;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
FImageList := TList.Create; //shane
|
|
||||||
FMaskList := TList.Create;
|
|
||||||
{$endif}
|
|
||||||
Initialize;
|
Initialize;
|
||||||
end;
|
end;
|
||||||
{.$endif}
|
{.$endif}
|
||||||
@ -507,10 +402,6 @@ end;
|
|||||||
Deletes the image identified by Index. An index of -1 deletes all
|
Deletes the image identified by Index. An index of -1 deletes all
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomImageList.Delete(AIndex: Integer);
|
procedure TCustomImageList.Delete(AIndex: Integer);
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
var
|
|
||||||
Obj : TObject;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
if AIndex = -1
|
if AIndex = -1
|
||||||
then begin
|
then begin
|
||||||
@ -520,25 +411,11 @@ begin
|
|||||||
|
|
||||||
CheckIndex(AIndex);
|
CheckIndex(AIndex);
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
Obj:=TObject(fImageList.Items[AIndex]);
|
|
||||||
If Assigned(Obj) then
|
|
||||||
Obj.Free;
|
|
||||||
fImageList.Delete(AIndex);
|
|
||||||
Obj:=TObject(fMaskList.Items[AIndex]);
|
|
||||||
If Assigned(Obj) then
|
|
||||||
Obj.Free;
|
|
||||||
fMaskList.Delete(AIndex);
|
|
||||||
// ShiftImages(FBitmap.Canvas, Index, 1);
|
|
||||||
// ShiftImages(FMaskBitmap.Canvas, Index, 1);
|
|
||||||
FCount := fImageList.Count;
|
|
||||||
{$else}
|
|
||||||
InternalMove(AIndex, FCount - 1, True);
|
InternalMove(AIndex, FCount - 1, True);
|
||||||
Dec(FCount);
|
Dec(FCount);
|
||||||
if HandleAllocated
|
if HandleAllocated
|
||||||
then TWSCustomImageListClass(WidgetSetClass).Delete(Self, AIndex);
|
then TWSCustomImageListClass(WidgetSetClass).Delete(Self, AIndex);
|
||||||
// TODO: adjust allocated data
|
// TODO: adjust allocated data
|
||||||
{$endif}
|
|
||||||
FChanged := true;
|
FChanged := true;
|
||||||
Change;
|
Change;
|
||||||
end;
|
end;
|
||||||
@ -551,21 +428,7 @@ end;
|
|||||||
Destructor for the class.
|
Destructor for the class.
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
destructor TCustomImageList.Destroy;
|
destructor TCustomImageList.Destroy;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
var
|
|
||||||
i: integer;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
FBitmap.Free;
|
|
||||||
FBitmap:=nil;
|
|
||||||
FMaskBitmap.Free;
|
|
||||||
FMaskBitmap:=nil;
|
|
||||||
for i:=0 to FImageList.Count-1 do TObject(FImageList[i]).Free;
|
|
||||||
for i:=0 to FMaskList.Count-1 do TObject(FMaskList[i]).Free;
|
|
||||||
FreeThenNil(FImageList);
|
|
||||||
FreeThenNil(FMaskList);
|
|
||||||
{$endif}
|
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
while FChangeLinkList.Count>0 do
|
while FChangeLinkList.Count>0 do
|
||||||
UnregisterChanges(TChangeLink(FChangeLinkList[0]));
|
UnregisterChanges(TChangeLink(FChangeLinkList[0]));
|
||||||
@ -597,21 +460,12 @@ end;
|
|||||||
|
|
||||||
procedure TCustomImageList.Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer;
|
procedure TCustomImageList.Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer;
|
||||||
ADrawEffect: TGraphicsDrawEffect);
|
ADrawEffect: TGraphicsDrawEffect);
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
var
|
|
||||||
aBitmap: TBitmap;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
if (FCount = 0) or (AIndex >= FCount) then Exit;
|
if (FCount = 0) or (AIndex >= FCount) then Exit;
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
aBitmap := TBitmap(FImageList[AIndex]);
|
|
||||||
ACanvas.Draw(AX, AY, aBitmap);
|
|
||||||
{$else}
|
|
||||||
HandleNeeded;
|
HandleNeeded;
|
||||||
TWSCustomImageListClass(WidgetSetClass).Draw(Self, AIndex, ACanvas, Rect(AX, AY, FWidth, FHeight),
|
TWSCustomImageListClass(WidgetSetClass).Draw(Self, AIndex, ACanvas, Rect(AX, AY, FWidth, FHeight),
|
||||||
BkColor, BlendColor, ADrawEffect, DrawingStyle, ImageType);
|
BkColor, BlendColor, ADrawEffect, DrawingStyle, ImageType);
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -675,18 +529,13 @@ end;
|
|||||||
|
|
||||||
procedure TCustomImageList.GetBitmap(Index: Integer; Image: TBitmap;
|
procedure TCustomImageList.GetBitmap(Index: Integer; Image: TBitmap;
|
||||||
AEffect: TGraphicsDrawEffect);
|
AEffect: TGraphicsDrawEffect);
|
||||||
{$ifndef IMGLIST_OLDSTYLE}
|
|
||||||
var
|
var
|
||||||
RawImg: TRawImage;
|
RawImg: TRawImage;
|
||||||
ListImg, DeviceImg: TLazIntfImage;
|
ListImg, DeviceImg: TLazIntfImage;
|
||||||
ImgHandle, MskHandle: HBitmap;
|
ImgHandle, MskHandle: HBitmap;
|
||||||
{$endif}
|
|
||||||
begin
|
begin
|
||||||
if (FCount = 0) or (Image = nil) then Exit;
|
if (FCount = 0) or (Image = nil) then Exit;
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
Image.Assign(TBitMap(FImageList.Items[Index]));
|
|
||||||
{$else}
|
|
||||||
GetRawImage(Index, RawImg);
|
GetRawImage(Index, RawImg);
|
||||||
|
|
||||||
RawImg.PerformEffect(AEffect, True);
|
RawImg.PerformEffect(AEffect, True);
|
||||||
@ -706,8 +555,6 @@ begin
|
|||||||
Image.SetHandles(ImgHandle, MskHandle);
|
Image.SetHandles(ImgHandle, MskHandle);
|
||||||
|
|
||||||
RawImg.FreeData;
|
RawImg.FreeData;
|
||||||
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomImageList.GetRawImage(Index: Integer; out Image: TRawImage);
|
procedure TCustomImageList.GetRawImage(Index: Integer; out Image: TRawImage);
|
||||||
@ -778,36 +625,9 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomImageList.GetImages(Index: Integer; const Image, Mask: TBitmap);
|
procedure TCustomImageList.GetImages(Index: Integer; const Image, Mask: TBitmap);
|
||||||
begin
|
begin
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
with Image do FBitmap.Canvas.CopyRect(
|
|
||||||
Rect(0, 0, Width, Height),
|
|
||||||
Canvas,
|
|
||||||
Rect(0, Index * FHeight, FWidth, (Index + 1) * FHeight)
|
|
||||||
);
|
|
||||||
with Mask do FMaskBitmap.Canvas.CopyRect(
|
|
||||||
Rect(0, 0, Width, Height),
|
|
||||||
Canvas,
|
|
||||||
Rect(0, Index * FHeight, FWidth, (Index + 1) * FHeight)
|
|
||||||
);
|
|
||||||
{$else}
|
|
||||||
{$note implement}
|
{$note implement}
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Function: TCustomImageList.HandleAllocated
|
|
||||||
Params: None
|
|
||||||
Returns: True if a handle is allocated
|
|
||||||
|
|
||||||
This function checks if the internal image is allocated
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
function TCustomImageList.HandleAllocated: Boolean;
|
|
||||||
begin
|
|
||||||
Result := (FBitmap <> nil);
|
|
||||||
end;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomImageList.Initialize
|
Method: TCustomImageList.Initialize
|
||||||
Params: None
|
Params: None
|
||||||
@ -827,20 +647,6 @@ begin
|
|||||||
|
|
||||||
if (Height < 1) or (Height > 32768) or (Width < 1)
|
if (Height < 1) or (Height > 32768) or (Width < 1)
|
||||||
then raise EInvalidOperation.Create(SInvalidImageSize);
|
then raise EInvalidOperation.Create(SInvalidImageSize);
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
FBitmap := TBitmap.Create;
|
|
||||||
FBitmap.Height := Height;
|
|
||||||
FBitmap.Width := Width;
|
|
||||||
FMaskBitmap := TBitmap.Create;
|
|
||||||
with FMaskBitmap do
|
|
||||||
begin
|
|
||||||
Height := Height;
|
|
||||||
Width := Width;
|
|
||||||
Canvas.Brush.Color := clWhite;
|
|
||||||
Monochrome := True;
|
|
||||||
end;
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomImageList.SetWidthHeight(NewWidth, NewHeight: integer);
|
procedure TCustomImageList.SetWidthHeight(NewWidth, NewHeight: integer);
|
||||||
@ -848,11 +654,6 @@ begin
|
|||||||
if (FHeight=NewHeight) and (FWidth=NewWidth) then exit;
|
if (FHeight=NewHeight) and (FWidth=NewWidth) then exit;
|
||||||
FHeight := NewHeight;
|
FHeight := NewHeight;
|
||||||
FWidth := NewWidth;
|
FWidth := NewWidth;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
FBitMap.Width := 0;
|
|
||||||
FBitMap.Height := 0;
|
|
||||||
AllocBitmap(0);
|
|
||||||
{$endif}
|
|
||||||
Clear;
|
Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -898,9 +699,7 @@ begin
|
|||||||
if (Index < 0) then Index := 0;
|
if (Index < 0) then Index := 0;
|
||||||
|
|
||||||
//No Icon Support yet
|
//No Icon Support yet
|
||||||
{$ifndef IMGLIST_OLDSTYLE}
|
|
||||||
{$note implement}
|
{$note implement}
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -941,7 +740,6 @@ end;
|
|||||||
Moves an image from the CurIndex'th location to NewIndex'th location
|
Moves an image from the CurIndex'th location to NewIndex'th location
|
||||||
without notifying the widgetset
|
without notifying the widgetset
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
{$ifndef IMGLIST_OLDSTYLE}
|
|
||||||
procedure TCustomImageList.InternalMove(ACurIndex, ANewIndex: Cardinal; AIgnoreCurrent: Boolean);
|
procedure TCustomImageList.InternalMove(ACurIndex, ANewIndex: Cardinal; AIgnoreCurrent: Boolean);
|
||||||
var
|
var
|
||||||
ImgSize, DataSize: Cardinal;
|
ImgSize, DataSize: Cardinal;
|
||||||
@ -969,7 +767,6 @@ begin
|
|||||||
FreeMem(p);
|
FreeMem(p);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomImageList.InternalSetImage
|
Method: TCustomImageList.InternalSetImage
|
||||||
@ -979,7 +776,6 @@ end;
|
|||||||
|
|
||||||
Copies the imagedata into the FData array and then frees the image.
|
Copies the imagedata into the FData array and then frees the image.
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
{$ifndef IMGLIST_OLDSTYLE}
|
|
||||||
function TCustomImageList.InternalSetImage(AIndex: Integer; AImage: TRawImage): PRGBAQuad;
|
function TCustomImageList.InternalSetImage(AIndex: Integer; AImage: TRawImage): PRGBAQuad;
|
||||||
var
|
var
|
||||||
Desc: TRawImageDescription absolute AImage.Description;
|
Desc: TRawImageDescription absolute AImage.Description;
|
||||||
@ -1050,7 +846,6 @@ begin
|
|||||||
DstImg.Free;
|
DstImg.Free;
|
||||||
SrcImg.Free;
|
SrcImg.Free;
|
||||||
end;
|
end;
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomImageList.Move
|
Method: TCustomImageList.Move
|
||||||
@ -1069,14 +864,9 @@ begin
|
|||||||
if ACurIndex < 0 then ACurIndex := 0;
|
if ACurIndex < 0 then ACurIndex := 0;
|
||||||
if ANewIndex < 0 then ANewIndex := 0;
|
if ANewIndex < 0 then ANewIndex := 0;
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
FImageList.Move(ACurIndex,ANewIndex);
|
|
||||||
FMaskList.Move(ACurIndex,ANewIndex);
|
|
||||||
{$else}
|
|
||||||
InternalMove(ACurIndex, ANewIndex, False);
|
InternalMove(ACurIndex, ANewIndex, False);
|
||||||
if HandleAllocated
|
if HandleAllocated
|
||||||
then TWSCustomImageListClass(WidgetSetClass).Move(Self, ACurIndex, ANewIndex);
|
then TWSCustomImageListClass(WidgetSetClass).Move(Self, ACurIndex, ANewIndex);
|
||||||
{$endif}
|
|
||||||
|
|
||||||
FChanged := true;
|
FChanged := true;
|
||||||
Change;
|
Change;
|
||||||
@ -1108,18 +898,10 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomImageList.WriteData(AStream: TStream);
|
procedure TCustomImageList.WriteData(AStream: TStream);
|
||||||
var
|
var
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
CurImage: TBitMap;
|
|
||||||
i: Integer;
|
|
||||||
{$ENDIF}
|
|
||||||
Signature: TImageListSignature;
|
Signature: TImageListSignature;
|
||||||
begin
|
begin
|
||||||
//Write signature
|
//Write signature
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
Signature:=SIG_LAZ2;
|
|
||||||
{$else}
|
|
||||||
Signature:=SIG_LAZ3;
|
Signature:=SIG_LAZ3;
|
||||||
{$endif}
|
|
||||||
AStream.Write(Signature,SizeOf(Signature));
|
AStream.Write(Signature,SizeOf(Signature));
|
||||||
|
|
||||||
//Count of image
|
//Count of image
|
||||||
@ -1128,16 +910,7 @@ begin
|
|||||||
WriteLRSInteger(AStream,Height);
|
WriteLRSInteger(AStream,Height);
|
||||||
|
|
||||||
//images
|
//images
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
for i:=0 to Count-1 do
|
|
||||||
begin
|
|
||||||
CurImage:=TBitmap(FImageList[i]);
|
|
||||||
//DebugLn('TCustomImageList.WriteData Position=',AStream.Position,' ',CurImage.Width,',',CurImage.Height);
|
|
||||||
CurImage.WriteNativeStream(AStream,true,bnXPixmap);
|
|
||||||
end;
|
|
||||||
{$else}
|
|
||||||
AStream.Write(FData[0], FWidth * FHeight * FCount * SizeOf(FData[0]));
|
AStream.Write(FData[0], FWidth * FHeight * FCount * SizeOf(FData[0]));
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1165,12 +938,8 @@ var
|
|||||||
Size:=ReadLRSInteger(AStream);
|
Size:=ReadLRSInteger(AStream);
|
||||||
bmp.ReadStream(AStream, True, Size);
|
bmp.ReadStream(AStream, True, Size);
|
||||||
bmp.Transparent := True;
|
bmp.Transparent := True;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
AddDirect(bmp, nil);
|
|
||||||
{$else}
|
|
||||||
Add(bmp, nil);
|
Add(bmp, nil);
|
||||||
bmp.Free;
|
bmp.Free;
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1191,12 +960,8 @@ var
|
|||||||
Size:=ReadLRSCardinal(AStream);
|
Size:=ReadLRSCardinal(AStream);
|
||||||
//DebugLn('TCustomImageList.ReadData DoReadLaz2 Size=',Size,' ',AStream.Position);
|
//DebugLn('TCustomImageList.ReadData DoReadLaz2 Size=',Size,' ',AStream.Position);
|
||||||
bmp.ReadStream(AStream, True, Size);
|
bmp.ReadStream(AStream, True, Size);
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
AddDirect(bmp, nil);
|
|
||||||
{$else}
|
|
||||||
Add(bmp, nil);
|
Add(bmp, nil);
|
||||||
bmp.Free;
|
bmp.Free;
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1206,12 +971,8 @@ var
|
|||||||
FWidth := ReadLRSCardinal(AStream);
|
FWidth := ReadLRSCardinal(AStream);
|
||||||
FHeight := ReadLRSCardinal(AStream);
|
FHeight := ReadLRSCardinal(AStream);
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
AStream.Seek(FWidth * FHeight * FCount * 4, soCurrent);
|
|
||||||
{$else}
|
|
||||||
AllocData(FCount);
|
AllocData(FCount);
|
||||||
AStream.ReadBuffer(FData[0], FWidth * FHeight * FCount * SizeOf(FData[0])) ;
|
AStream.ReadBuffer(FData[0], FWidth * FHeight * FCount * SizeOf(FData[0])) ;
|
||||||
{$endif}
|
|
||||||
|
|
||||||
FChanged := true;
|
FChanged := true;
|
||||||
Change;
|
Change;
|
||||||
@ -1250,12 +1011,8 @@ var
|
|||||||
Img := TBitmap.Create;
|
Img := TBitmap.Create;
|
||||||
Img.SetHandles(ImgHandle, MaskHandle);
|
Img.SetHandles(ImgHandle, MaskHandle);
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
AddDirect(Img, nil);
|
|
||||||
{$else}
|
|
||||||
Add(Img, nil);
|
Add(Img, nil);
|
||||||
Img.Free;
|
Img.Free;
|
||||||
{$endif}
|
|
||||||
//DebugLn('CreateImagesFromRawImage B ',Img.Width,',',Img.Height,' ',Count);
|
//DebugLn('CreateImagesFromRawImage B ',Img.Width,',',Img.Height,' ',Count);
|
||||||
Img := nil;
|
Img := nil;
|
||||||
Dec(NewCount);
|
Dec(NewCount);
|
||||||
@ -1416,26 +1173,14 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomImageList.Replace(AIndex: Integer; AImage, AMask: TBitmap);
|
procedure TCustomImageList.Replace(AIndex: Integer; AImage, AMask: TBitmap);
|
||||||
var
|
var
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
DestinationRect, SourceRect: TRect;
|
|
||||||
{$else}
|
|
||||||
RawImage: TRawImage;
|
RawImage: TRawImage;
|
||||||
R: TRect;
|
R: TRect;
|
||||||
ImgData: PRGBAQuad;
|
ImgData: PRGBAQuad;
|
||||||
msk: THandle;
|
msk: THandle;
|
||||||
{$endif}
|
|
||||||
begin
|
begin
|
||||||
if (AIndex < 0) then AIndex := 0;
|
if (AIndex < 0) then AIndex := 0;
|
||||||
CheckIndex(AIndex);
|
CheckIndex(AIndex);
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
DestinationRect := Rect(0, AIndex * FHeight, FWidth, (AIndex + 1) * FHeight);
|
|
||||||
SourceRect := Rect(0, 0, FWidth, FHeight);
|
|
||||||
CopyImage(FBitmap.Canvas, AImage.Canvas, DestinationRect, SourceRect);
|
|
||||||
if AMask <> nil
|
|
||||||
then CopyImage(FMaskBitmap.Canvas, AMask.Canvas, DestinationRect, SourceRect)
|
|
||||||
else FMaskBitmap.Canvas.FillRect(DestinationRect);
|
|
||||||
{$else}
|
|
||||||
if AMask = nil
|
if AMask = nil
|
||||||
then msk := 0
|
then msk := 0
|
||||||
else msk := AMask.Handle;
|
else msk := AMask.Handle;
|
||||||
@ -1444,7 +1189,6 @@ begin
|
|||||||
ImgData := InternalSetImage(AIndex, RawImage);
|
ImgData := InternalSetImage(AIndex, RawImage);
|
||||||
if HandleAllocated
|
if HandleAllocated
|
||||||
then TWSCustomImageListClass(WidgetSetClass).Replace(Self, AIndex, ImgData);
|
then TWSCustomImageListClass(WidgetSetClass).Replace(Self, AIndex, ImgData);
|
||||||
{$endif}
|
|
||||||
|
|
||||||
FChanged := true;
|
FChanged := true;
|
||||||
Change;
|
Change;
|
||||||
@ -1466,9 +1210,7 @@ begin
|
|||||||
if (Index < 0) then Index := 0;
|
if (Index < 0) then Index := 0;
|
||||||
|
|
||||||
// No Icon suppport yet
|
// No Icon suppport yet
|
||||||
{$ifndef IMGLIST_OLDSTYLE}
|
|
||||||
{$note implement}
|
{$note implement}
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1488,9 +1230,7 @@ begin
|
|||||||
|
|
||||||
if (Index < 0) then Index := 0;
|
if (Index < 0) then Index := 0;
|
||||||
|
|
||||||
{$ifndef IMGLIST_OLDSTYLE}
|
|
||||||
{$note implement}
|
{$note implement}
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1554,66 +1294,18 @@ begin
|
|||||||
SetWidthHeight(Value,Height);
|
SetWidthHeight(Value,Height);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Method: TCustomImageList.ShiftImages
|
|
||||||
Params: Source: source canvas on which the images are moved
|
|
||||||
Start: start of the image to shift
|
|
||||||
Shift: number of images to shift
|
|
||||||
Returns: Nothing
|
|
||||||
|
|
||||||
Internal routine to move images on the internal image list.
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
procedure TCustomImageList.ShiftImages(const Source: TCanvas;
|
|
||||||
Start, Shift: Integer);
|
|
||||||
var
|
|
||||||
FMoveBitmap: TBitmap;
|
|
||||||
begin
|
|
||||||
try
|
|
||||||
FMoveBitmap := TBitmap.Create;
|
|
||||||
with FMoveBitmap do
|
|
||||||
begin
|
|
||||||
Width := FWidth;
|
|
||||||
Height := (1 + FCount - Start) * FHeight;
|
|
||||||
end;
|
|
||||||
FMoveBitmap.Canvas.CopyRect(
|
|
||||||
Rect(0, 0, FWidth, FMoveBitmap.Height),
|
|
||||||
Source,
|
|
||||||
Rect(0, Start * FHeight, FWidth, (FCount + 1) * FHeight)
|
|
||||||
);
|
|
||||||
Source.CopyRect(
|
|
||||||
Rect(0, (Start + Shift) * FHeight, FWidth, (FCount + Shift + 1) * FHeight),
|
|
||||||
FMoveBitmap.Canvas,
|
|
||||||
Rect(0, 0, FWidth, FMoveBitmap.Height)
|
|
||||||
);
|
|
||||||
finally
|
|
||||||
FMoveBitmap.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
procedure TCustomImageList.StretchDraw(Canvas: TCanvas; Index: Integer; ARect: TRect; Enabled: Boolean);
|
procedure TCustomImageList.StretchDraw(Canvas: TCanvas; Index: Integer; ARect: TRect; Enabled: Boolean);
|
||||||
var
|
var
|
||||||
bmp: TBitmap;
|
bmp: TBitmap;
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
msk: TBitmap;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
if (FCount = 0) or (Index >= FCount) then Exit;
|
if (FCount = 0) or (Index >= FCount) then Exit;
|
||||||
|
|
||||||
{$ifdef IMGLIST_OLDSTYLE}
|
|
||||||
bmp := TBitmap(FImageList[Index]);
|
|
||||||
msk := TBitmap(FMaskList[Index]);
|
|
||||||
StretchMaskBlt(Canvas.Handle, ARect.Left, ARect.Top, ARect.Right - ARect.Left,
|
|
||||||
ARect.Bottom - ARect.Top, bmp.Handle, 0, 0, FWidth, FHeight, msk.Handle, 0, 0, SRCCOPY);
|
|
||||||
{$else}
|
|
||||||
{$note implement}
|
{$note implement}
|
||||||
// temp workaround
|
// temp workaround
|
||||||
bmp := TBitmap.Create;
|
bmp := TBitmap.Create;
|
||||||
GetBitmap(Index, bmp);
|
GetBitmap(Index, bmp);
|
||||||
Canvas.StretchDraw(ARect, bmp);
|
Canvas.StretchDraw(ARect, bmp);
|
||||||
bmp.Free;
|
bmp.Free;
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -65,15 +65,6 @@ const
|
|||||||
GtkComboLCLItemIndexTag = 'LCLItemIndex';
|
GtkComboLCLItemIndexTag = 'LCLItemIndex';
|
||||||
|
|
||||||
|
|
||||||
{$if Declared(TOldStyleCustomImageList)}
|
|
||||||
{$define IMGLIST_OLDSTYLE}
|
|
||||||
{$else}
|
|
||||||
{$note TODO: remove me}
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
PPWaitHandleEventHandler = ^PWaitHandleEventHandler;
|
PPWaitHandleEventHandler = ^PWaitHandleEventHandler;
|
||||||
PWaitHandleEventHandler = ^TWaitHandleEventHandler;
|
PWaitHandleEventHandler = ^TWaitHandleEventHandler;
|
||||||
|
@ -42,12 +42,6 @@ uses
|
|||||||
GtkDef, GtkExtra, GtkWSPrivate;
|
GtkDef, GtkExtra, GtkWSPrivate;
|
||||||
|
|
||||||
type
|
type
|
||||||
{$if Declared(TOldStyleCustomImageList)}
|
|
||||||
{$define IMGLIST_OLDSTYLE}
|
|
||||||
{$else}
|
|
||||||
{$note TODO: remove me}
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{ TGtkWSStatusBar }
|
{ TGtkWSStatusBar }
|
||||||
|
|
||||||
TGtkWSStatusBar = class(TWSStatusBar)
|
TGtkWSStatusBar = class(TWSStatusBar)
|
||||||
|
Loading…
Reference in New Issue
Block a user