mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:19:37 +02:00
LCL: small cleanups
git-svn-id: trunk@14021 -
This commit is contained in:
parent
8d1143faeb
commit
348cc7798a
@ -185,11 +185,9 @@ type
|
||||
function GetHotSpot: TPoint; virtual;
|
||||
|
||||
procedure Insert(AIndex: Integer; AImage, AMask: TBitmap);
|
||||
procedure InsertIcon(Index: Integer; Image: TIcon);
|
||||
procedure InsertMasked(Index: Integer; AImage: TBitmap; MaskColor: TColor);
|
||||
procedure Move(ACurIndex, ANewIndex: Integer);
|
||||
procedure Replace(AIndex: Integer; AImage, AMask: TBitmap);
|
||||
procedure ReplaceIcon(Index: Integer; Image: TIcon);
|
||||
procedure ReplaceMasked(Index: Integer; NewImage: TBitmap; MaskColor: TColor);
|
||||
procedure RegisterChanges(Value: TChangeLink);
|
||||
procedure StretchDraw(Canvas: TCanvas; Index: Integer; ARect: TRect; Enabled: Boolean = True);
|
||||
|
@ -668,24 +668,6 @@ begin
|
||||
InternalInsert(AIndex, AImage.Handle, msk, AImage.Width, AImage.Height);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomImageList.InsertIcon
|
||||
Params: Index: the index of the inserted image
|
||||
Image: the Icon to be inserted
|
||||
Returns: Nothing
|
||||
|
||||
Inserts an icon into the list at the index'th position.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomImageList.InsertIcon(Index: Integer; Image: TIcon);
|
||||
begin
|
||||
CheckIndex(Index, True);
|
||||
|
||||
if (Index < 0) then Index := 0;
|
||||
|
||||
//No Icon Support yet
|
||||
{$note implement}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomImageList.InsertMasked
|
||||
Params: Index: the index of the inserted image
|
||||
@ -1187,25 +1169,6 @@ begin
|
||||
InternalReplace(AIndex, AImage.Handle, msk);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomImageList.ReplaceIcon
|
||||
Params: Index: the index of the replaceded image
|
||||
Image: an icon image
|
||||
Returns: Nothing.
|
||||
|
||||
Replaces the index'th image with the image given.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomImageList.ReplaceIcon(Index: Integer; Image: TIcon);
|
||||
begin
|
||||
if (Index > FCount)
|
||||
then raise EInvalidOperation.Create(SInvalidIndex);
|
||||
|
||||
if (Index < 0) then Index := 0;
|
||||
|
||||
// No Icon suppport yet
|
||||
{$note implement}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomImageList.ReplaceMasked
|
||||
Params: Index: the index of the replaceded image
|
||||
|
@ -646,7 +646,8 @@ function ScalePixmapAndMask(AScaleGC: PGDKGC; AScaleMethod: TGdkInterpType;
|
||||
ASrc: PGdkPixmap; ASrcX, ASrcY, ASrcWidth, ASrcHeight: integer;
|
||||
ASrcColorMap: PGdkColormap; ASrcMask: PGdkBitmap;
|
||||
ADstWidth, ADstHeight: Integer; out ADst, ADstMask: PGdkPixmap) : Boolean;
|
||||
{$note TODO: Remove me}
|
||||
|
||||
// obsolete:
|
||||
function GetGdkImageBitsPerPixel(Image: PGdkImage): cardinal;
|
||||
function CreateGdkMaskBitmap(AImage, AMask: HBITMAP): PGdkBitmap;
|
||||
function CreateGdkMaskBitmap(AImageMask, AMask: PGdkBitmap): PGdkBitmap;
|
||||
|
@ -5222,7 +5222,7 @@ begin
|
||||
Result := Result or TOGGLESTATE[FKeyStateList_.IndexOf(Pointer(
|
||||
PtrInt(nVirtKey or KEYMAP_TOGGLE))) >=0];
|
||||
{$IFDEF GTK2}
|
||||
{$WARNING If there are tons of new keyboard errors this is probably the cause}
|
||||
// If there are tons of new keyboard errors this is probably the cause
|
||||
GtkModMask := gtk_accelerator_get_default_mod_mask;
|
||||
if Result and $8000 > 0 then
|
||||
begin
|
||||
|
@ -429,21 +429,10 @@ end;
|
||||
|
||||
class procedure TGtkWSCustomForm.SetBorderIcons(const AForm: TCustomForm;
|
||||
const ABorderIcons: TBorderIcons);
|
||||
|
||||
procedure RaiseNotImplemented;
|
||||
begin
|
||||
raise Exception.Create('TGtkWSCustomForm.SetBorderIcons BorderIcons not supported by gtk interface');
|
||||
end;
|
||||
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AForm, 'SetBorderIcons')
|
||||
then Exit;
|
||||
|
||||
{$note remove check here, it belongs in the lcl}
|
||||
if (AForm.ComponentState*[csDesigning,csLoading]=[csDesigning]) then begin
|
||||
if (AForm.BorderIcons<>DefaultBorderIcons[AForm.BorderStyle]) then
|
||||
RaiseNotImplemented;
|
||||
end;
|
||||
inherited SetBorderIcons(AForm, ABorderIcons);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user