Recent

Author Topic: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus  (Read 1771 times)

cdbc

  • Hero Member
  • *****
  • Posts: 2667
    • http://www.cdbc.dk
MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« on: February 27, 2026, 01:34:11 pm »
Hi Rob
Take a long hard look at fpGUI, it ticks ALL your boxes and is easy to work with, did I mention ZERO dependencies!
Regards Benny

edit: ...and it looks good too  8-)
« Last Edit: February 27, 2026, 01:39:23 pm by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

zeljko

  • Hero Member
  • *****
  • Posts: 1870
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #1 on: February 27, 2026, 01:44:33 pm »
No, someone must implement fpgui widgetset :)

cdbc

  • Hero Member
  • *****
  • Posts: 2667
    • http://www.cdbc.dk
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #2 on: February 27, 2026, 01:53:18 pm »
Hi Rob
Yes and Yes, I only use the shown 'designer' to design the UI, via pointing and clicking and then the rest takes place inside Lazarus, incl. compiling...
Note: I also use the 'Pasbuild' tool from Graeme, as it's nifty too, but ALL my coding takes place in Lazarus  8)
Regards Benny

edit: zeljko is right, the /LCL/-version of fpGUI, needs some TLC, but I use the pure fpGUI-library, it's easy =^
« Last Edit: February 27, 2026, 01:56:15 pm by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2667
    • http://www.cdbc.dk
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #3 on: February 27, 2026, 02:01:11 pm »
Hi
Here's a gui demo-app  ...in 1 source-file... 8-)
Code: Pascal  [Select][+][-]
  1. program fpgui_mig_Demo;
  2. {$mode objfpc}{$H+}
  3. {-$define dbg}
  4.                                    /// for public domain \\\
  5. uses            /// made for your amusement by Benny Christensen a.k.a. cdbc \\\
  6.   classes, sysutils, fpg_cmdlineparams,
  7.   fpg_main, fpg_form, fpg_base, fpg_label, fpg_edit, fpg_button, fpg_panel,
  8.   fpg_mig_cc, fpg_miglayout, fpg_stylemanager, fpg_style_plastic;
  9.   { using the new MIG-layout-manager }
  10. type
  11.   { TMainForm }
  12.   TMainForm = class(TfpgForm)
  13.   private
  14.     lblNavn:  TfpgLabel;
  15.     edtNavn:  TfpgEdit;
  16.     btnGem:   TfpgButton;
  17.     stbInfo: TfpgPanel;
  18.     procedure HandleFormKeyPress(Sender: TObject; var KeyCode: word;
  19.                                  var ShiftState: TShiftState; var Consumed: boolean);
  20.     procedure SetupLayout;
  21.   public
  22.     procedure AfterCreate; override;
  23.   end;
  24.        
  25. var cmd: ICmdLineParams = nil; lstyle: string = 'plastic-dark';
  26.  
  27. procedure TMainForm.AfterCreate;
  28. begin
  29.   inherited AfterCreate;
  30.   Left:= 100; Top:= 100; Width:= 365; Height:= 140;
  31.   WindowTitle := 'MigLayout Demo <'+lstyle+'>';
  32.   { setup components - note we don't have to set X, Y, Width, Height here! }
  33.   lblNavn := TfpgLabel.Create(self);
  34.   lblNavn.Text := 'Your Name:';
  35.  
  36.   edtNavn := TfpgEdit.Create(self);
  37.   edtNavn.Text := '';
  38.  
  39.   btnGem := TfpgButton.Create(self);
  40.   btnGem.Text := 'Save Data';
  41.  
  42.   stbInfo:= TfpgPanel.Create(Self);            { <--- i'm missing a statusbar, }
  43.   stbInfo.Alignment:= taLeftJustify;                { so this'll have to do %) }
  44.   stbInfo.Style:= bsLowered;                            { baby steps \o/\ö/\o/ }
  45.   stbInfo.Height := 25;        { defining a preferred height for StatusBar /gg }
  46.   stbInfo.Text:= '[Ctrl + Q] = Quit';
  47.  
  48.   SetupLayout; { employs the MIG-Layout-manager :o) }
  49.   OnKeyPress:= @HandleFormKeyPress; { convenience with 'Ctrl+Q' to close/quit }
  50. end;
  51.  
  52. procedure TMainForm.HandleFormKeyPress(Sender: TObject; var KeyCode: word;
  53.                                        var ShiftState: TShiftState; var Consumed: boolean);
  54. var ct: boolean;
  55. begin
  56.   ct:= ssCtrl in ShiftState;
  57.   case KeyCode of
  58.     $51: if ct then begin
  59.            Consumed:= true; { <- important }
  60.            Close; { Ctrl + Q ~ fpg_key_q }
  61.          end;
  62.   end;
  63. end;
  64.  
  65. (* Note from Graeme @ https://forum.lazarus.freepascal.org/index.php/topic,73452.msg576274/topicseen.html#msg576274
  66. The .Fill on the LC (layout constraint) will allow all cells to grow and take up
  67. all available space. Meaning it will push your StatusBar (panel) all the way down.
  68. The .Debug is simply so you can visually see how mig calculated the cell sizes
  69. and component sizes. *)
  70.  
  71. procedure TMainForm.SetupLayout;
  72. var layout: TfpgMigLayoutManager;
  73. begin
  74.   { initialize MigLayout }
  75.   layout := TfpgMigLayoutManager.Create;
  76.   { Graeme: LC.Fill is key, note: '.Debug' facilitates grid-lines when designing }
  77.   layout.LC.Fill{$ifdef dbg}.Debug{$endif};
  78.  
  79.   layout.AddLayoutComponent(lblNavn, TfpgMigCC.Create);    { simplified by /gg }
  80.  
  81.   { growx = stretch horz }
  82.   layout.AddLayoutComponent(edtNavn, TfpgMigCC.Create.GrowX); { simplified by /gg }
  83.  
  84.   layout.AddLayoutComponent(btnGem, TfpgMigCC.Create);     { simplified by /gg }
  85.  
  86.   layout.AddLayoutComponent(stbInfo, TfpgMigCC.Create.DockSouth); { simplified by /gg }
  87.   { activate our layout }
  88.   LayoutManager:= layout;
  89. end;
  90.  
  91. begin
  92.   fpgApplication.Initialize;
  93.   if fpgApplication.GetInterface(ICmdLineParams,cmd) then begin { nifty little com-obj }
  94.     { i don't like spaces in cmdline params, so i alias it ;) }
  95.     fpgStyleManager.RegisterClass(lstyle,TfpgPlasticDarkStyle);
  96.     { if the user provided a style-choice, we'll roll with that }
  97.     if cmd.HasOption('style') then lstyle:= cmd.GetOptionValue('style');
  98.     fpgStyleManager.SetStyle(lstyle); { or we'll just use some plastic :o) }
  99.   end;
  100.  
  101.   with TMainForm.Create(nil) do try
  102.     Show;
  103.     fpgApplication.Run;
  104.   finally Free; end;
  105. end.
  106.  
To compile it you'll need fpgui-framework >= 2.0.3 + fpc >= 3.2.2
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Fred vS

  • Hero Member
  • *****
  • Posts: 3812
    • StrumPract is the musicians best friend
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #4 on: February 27, 2026, 02:11:24 pm »
Hello Rob.

Hmm, if I may, MSEgui projects can also be used with the Lazarus IDE.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3812
    • StrumPract is the musicians best friend
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #5 on: February 27, 2026, 02:22:25 pm »
Re-hello Rob.

If the goal is to have a program that uses "pure Wayland", neither fpGUi nor MSEgui have this option (maybe never did given the lack of enthusiasm from the developers).
However, both work perfectly with XWayland.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3812
    • StrumPract is the musicians best friend
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #6 on: February 27, 2026, 02:29:23 pm »
[...] MSEgui projects can also be used with the Lazarus IDE.

hi Fred   :-)

i have EXISTING lazarus projects, created using the lazarus IDE. can MSEgui build these lazarus projects into ELF binaries with just minimal changes to my source code?


cheers,
rob   :-)

Hmm, it all depends on what you mean by "minimal changes."

You can use all the method code, but for graphical widgets, you'll need to perform the conversion using the MSEide or ideU form designer. The same applies to fpGUI and its UIdesigner.
« Last Edit: February 27, 2026, 02:31:40 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

cdbc

  • Hero Member
  • *****
  • Posts: 2667
    • http://www.cdbc.dk
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #7 on: February 27, 2026, 02:38:25 pm »
Hi Rob
The amount of changes, depend on how /well/ your app-layout is, i.e.: "Separation of Concerns" -> GUI-layer separated from Controlling/Presenting-layer and Business-Model-layer...
Meaning: it's just the gui/form code that I swap in/out, the presenter and model are the same as in a Qt4/5/6-gui (or Gtk2/3/4/n).
If your business logic is entangled in the gui, there will be some work to do...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Fred vS

  • Hero Member
  • *****
  • Posts: 3812
    • StrumPract is the musicians best friend
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #8 on: February 27, 2026, 02:53:04 pm »
Re-re hello Rob.

Could you please provide a list of the LCL widgets you use in your projects?
A screenshot of the result would also be helpful.
I would love to assist you with the conversion.
 :)
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Zoran

  • Hero Member
  • *****
  • Posts: 1987
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #9 on: February 28, 2026, 06:22:45 pm »
No, your project cannot be easily ported to fpGUI or MseGui. That's it.
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

PascalDragon

  • Hero Member
  • *****
  • Posts: 6349
  • Compiler Developer
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #10 on: February 28, 2026, 06:40:23 pm »
No, someone must implement fpgui widgetset :)

Well, there exists a fpGUI widgetset for the LCL, however it might need some love to work properly...

Fred vS

  • Hero Member
  • *****
  • Posts: 3812
    • StrumPract is the musicians best friend
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #11 on: February 28, 2026, 06:40:51 pm »
No, your project cannot be easily ported to fpGUI or MseGui. That's it.

Indeed, the first porting can be difficult, especially understanding the different mechanisms of fpGUI or MSEgui.

But once you succeed, it's like learning to ride a bicycle—you never forget.

And every new porting is a fun game.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

inky

  • New Member
  • *
  • Posts: 49
    • github
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #12 on: March 01, 2026, 02:44:24 pm »
readme in lcl/interfaces/fpgui describes how to use it with lazarus: copy its src directory to this lcl/interfaces/fpgui then in Project Options -> Compiler Options -> Additions and Overrides, choose LCLWidgetType: fpgui, and fpGUIPlatform: x11.

right now that lcl code is abandoned and doesn't work: https://github.com/graemeg/fpGUI/issues/142

sorry pasting from the other thread to this one.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6349
  • Compiler Developer
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #13 on: March 02, 2026, 09:50:51 pm »
right now that lcl code is abandoned and doesn't work: https://github.com/graemeg/fpGUI/issues/142

Issues with the lcl-fpgui widgetsets should be reported on the Lazarus bugtracker, not the fpGUI one (unless it really is an fpGUI issue).

Graeme

  • Hero Member
  • *****
  • Posts: 1492
    • Graeme on the web
Re: MSEGUI and FPGUI was Re: Debian removes FPC/Lazarus
« Reply #14 on: March 03, 2026, 08:25:08 pm »
I've been in recent communications with someone that is interested in continuing development of lcl-fpgui widgetset, and they want to bring it up to date with fpGUI 2.x release. So *fingers-crossed* :-)
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018