Recent

Author Topic: Good news : LiteZarus 2022  (Read 1021 times)

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Good news : LiteZarus 2022
« on: September 04, 2022, 08:05:52 pm »
Hi ! Remember LiteZarus, eh?


I just wrote a new feature for it, this week :
(1) Allow you to register a duplicated component name.


So, beside there is already a componen registered as "TButton" by LCL package,
you can declare another component with class name TButton.
The only required is your own TButton class should be declared in different unit name (like don't give your unit name "StdCtrls").
Not limited to TButton, it may any TPanel and so.


(2) DesignTime / Designer ready.


Yeah, as you might guessed, what the benefit of having above feature if not for design time?
To switch back to LCL, just activate your form window (click / F12)


Its works ! and free and open source.
and is (actually compatible) Lazarus.


------------------------------
Source code ( or patch it to lazarus your self)
https://github.com/x2nie/Lazarus/commits?author=fathonysl


note : if you have forked my old LiteZarus, you can drop and refork.  It is another new github repository.
Whats your opionion?  8-)



When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

Fred vS

  • Hero Member
  • *****
  • Posts: 3112
    • StrumPract is the musicians best friend
Re: Good news : LiteZarus 2022
« Reply #1 on: September 04, 2022, 08:11:06 pm »
Hello X2nie!
That are the best news of the end of summer. notice from you and new release of LiteZarus.  ;D

Very happy to read you again.

Congrats for the new release (that I will test asap).

Fre;D
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: 3112
    • StrumPract is the musicians best friend
Re: Good news : LiteZarus 2022
« Reply #2 on: September 04, 2022, 08:23:56 pm »
Quote
note : if you have forked my old LiteZarus, you can drop and refork.  It is another new github repository.
Whats your opionion?

So LiteZarus is a branch of Lazarus project now?
https://github.com/x2nie/Lazarus/tree/litezarus

Ha, ok.
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

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Good news : LiteZarus 2022
« Reply #3 on: September 04, 2022, 08:24:34 pm »
Hmm... so what's the benefit?


I think the maximum benefit of having LCL's component name (or VCL or FMX or CLX) for LCL Thirdparty is
obviously it is cool & fun & intuitive & less headache & faster while prototyping.


I hope with this, on few soon Laz4Android will has its own real "TLabel", TButton, and fort.
And same with fpGUI or CustomDrawn with their independent package too.


Another possible situation is when a widgetset can't be handled via LCL. Let say by unresolved coordinate system.
Below is how Text-based (console / terminal) application designed WYSIWYG via lazarus.
In this case, having TButton,TForm,TCheckBox and friends, for Non-LCL, will be a fantastic feature for LiteZarus/Lazarus.
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

Fred vS

  • Hero Member
  • *****
  • Posts: 3112
    • StrumPract is the musicians best friend
Re: Good news : LiteZarus 2022
« Reply #4 on: September 04, 2022, 08:28:51 pm »
Do you think that there is any chance to integrate MSEgui widgetset in LiteZarus too?
(Maybe too difficult for the form-designer.)
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

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Good news : LiteZarus 2022
« Reply #5 on: September 04, 2022, 08:36:43 pm »
Quote
note : if you have forked my old LiteZarus, you can drop and refork.  It is another new github repository.
Whats your opionion?

So LiteZarus is a branch of Lazarus project now?
https://github.com/x2nie/Lazarus/tree/litezarus


To see it in action, you can try to install one (or all altogether) of below packages:
* NotLCLDesigner : Litezarus: /examples/designnonlcl/ (notlcldesigner.lpk + NonLCL1.lpr)
* TUI (text user interface ) : https://github.com/x2nie/TUI
* LUI (widgetset prototype) : https://github.com/x2nie/lui

yeah, not my best, just another widgetset testdrive  :P
« Last Edit: September 04, 2022, 09:18:51 pm by x2nie »
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

Fred vS

  • Hero Member
  • *****
  • Posts: 3112
    • StrumPract is the musicians best friend
Re: Good news : LiteZarus 2022
« Reply #6 on: September 04, 2022, 08:41:40 pm »
Not sure to understand.
Does LiteZarus have his own LCL form-designer independent that can be run from a other application (like fpGUI UIdesigner)?
I have to re-jump deeper in your project;
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

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Good news : LiteZarus 2022
« Reply #7 on: September 04, 2022, 08:59:51 pm »
Do you think that there is any chance to integrate MSEgui widgetset in LiteZarus too?
(Maybe too difficult for the form-designer.)


MSEgui ? I think it is worth to try.  Maybe Ill try it next weekend.


However, to help you do quick jump, if you curious, here what in my head based on my experience:


Any graphical component life in different degree of its original life-cycle when being edited inside The Lazarus Form Editor.
1. your TForm/Form1 (or any windowing root graphical component) run without "application". And should never be run ontop any application unless the Lazarus IDE it self.
2. Lazarus doesn't care how your LFM / DFM / XML being loaded, it will be loaded only by lazarus way.
3. for non LCL, you need to draw your component into an auto-created LCL TFrom, while your actual component being hidden, and it will be always hidden. It is how "Mediator" works.


So, actual "TApplication" is not available during designing form. only the lazarus itself is the running application.


My early approach is to put a real application (such as fpGUI VisualDesiner) running together with Lazarus and communicate via LSP (languange server protocol),
but that will requires lot time to understand both world, and I think studying them will drains quickly my spare time  :o ;D
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Good news : LiteZarus 2022
« Reply #8 on: September 04, 2022, 09:08:05 pm »
Not sure to understand.
Does LiteZarus have his own LCL form-designer independent that can be run from a other application (like fpGUI UIdesigner)?
I have to re-jump deeper in your project;


No, LiteZarus's designer just usual Lazarus one.
But It able to resolve the Component's Class finder, so Litezarus will gives a correct ComponentClass (TComponent class) when asked by a class name (string),
by detecting the used units of the being edited unit.


So, let say there is 2 TButton registered in LIteZarus, and if your code is:
Code: [Select]
unit unit1;


interface
uses MyWidgetset;


type
  TForm1 = class(TMyForm)

    Button1: TButton;
  private
    { Private declarations }
  public
    { Public declarations }
  end;


var
  Form1: TForm1;


implementation


{$R *.lfm}


end.

So LiteZarus will found the "MyWidgetset.TButton" (instead of well known LCL : "StdCtrl.TButton") because your code declared MyWidgetset in it's interface section.

That is the trick.
« Last Edit: September 04, 2022, 09:23:19 pm by x2nie »
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Good news : LiteZarus 2022
« Reply #9 on: September 04, 2022, 09:28:04 pm »
below is the appearance of my LUI.


The different of it with the "NotLCLDesigner" demo is:
each LUI's component type has its own painting method.
This approach (paint by individual component class) is the most similar to actual situation we meet in fpGUI / non-lcl widgetset
While the other one has no paint method in its component class level,
so as the picture in first post in this thread, that whole form is fully drawn by a mediator class, not by component itself.
« Last Edit: September 04, 2022, 09:30:26 pm by x2nie »
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

Fred vS

  • Hero Member
  • *****
  • Posts: 3112
    • StrumPract is the musicians best friend
Re: Good news : LiteZarus 2022
« Reply #10 on: September 04, 2022, 10:04:32 pm »
Great job!

I need to explore deeper, write you later.

Fre;D
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

 

TinyPortal © 2005-2018