I'm still not sure why the initial error (interface not found) message occurs with Lazarus installed through apt, but I have tried compiling Lazarus from source and have gotten a bit further.
It now no longer complains that it can't find the fpGUI interface, but it now complains about the fpGUI code itself. It seems to be missing the 'Graph' Unit.
Just out of curiosity I removed Graph from the source file and the compilation got further and I found the following afterwards that also mentions removing Graph:
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-fpGUI-WS-update-td4053988.htmlIt's now stuck on:
fpguiwsbuttons.pp(88,60) Error: Wrong number of parameters specified for call to "GetImageIndexAndEffect"
in the following procedure (line 15):
class procedure TFpGuiWSBitBtn.SetGlyph(const ABitBtn: TCustomBitBtn;
const AValue: TButtonGlyph);
var
lButton: TFPGUIPrivateButton;
lBitmap: TBitmap=nil;
fpgImage: TfpgImage;
lButImageName: string;
lButtonState: TButtonState;
lIndex: integer;
lEffect: TGraphicsDrawEffect;
begin
if not Assigned(AValue.Images) then exit;
lButton := TFPGUIPrivateButton(ABitBtn.Handle);
lButtonState:=bsUp;
Value.GetImageIndexAndEffect(lButtonState,lIndex,lEffect)
lBitmap:=TBitmap.Create;
AValue.Images.GetBitmap(lIndex,lBitmap);
fpgImage:=TfpgImage.Create;
fpgImage.AllocateImage(32,lBitmap.Width,lBitmap.Height);
move(lBitmap.RawImage.Data^,fpgImage.ImageData^,fpgImage.ImageDataSize);
fpgImage.CreateMaskFromSample(0,0);
fpgImage.UpdateImage;
lBitmap.Free;
if lButton.Button.ImageName<>'' then begin
fpgImages.DeleteImage(lButton.Button.ImageName,true);
end;
lButImageName:='lcl.bitbtn.'+IntToStr(PtrInt(ABitBtn.Handle));
fpgImages.AddImage(lButImageName,fpgImage);
lButton.Button.ImageName:=lButImageName;
lButton.Button.ShowImage:=true;
end;
Is it possible that the fpGUI isn't updated to work with the latest LCL version? or what is the status of fpGUI as LCL backend?
I did not know there was an fpgui back-end, but stll you can not mix the two, Marco......
You can not use LCL controls in an fpgui application. Period. Same with KOL..
I think that's where the confusion is about, I may be wrong...(I don't think so....)
I am not trying to use LCL controls in an fpGUI application and neither am I trying to use fpGUI controls in an LCL application.
I'm trying to use pure LCL and change the backend to be fpGUI, just like you can change the backend to be Qt instead of Gtk+ on Linux.
I believe "interface" (as opposed to backend) is the proper terminology for it, but I'm new to Lazarus. There also is an option to select fpGUI as LCLWidgetType in Lazarus, so I assume it must be possible.