Recent

Author Topic: fpGUI Toolkit v1.0 release for FPC 2.6.2  (Read 85074 times)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #15 on: April 21, 2013, 06:33:21 pm »
@Fred vS

You're trying play with LCL-fpGUI framework ... from what I learned, this is still in development (very slowly) ... try just pure fpGUI framework ... all information for this are scattered in various posts here ... just a detail: UI Designer does not include units required in clausule "USES" .... you need to do it yourself...  but it's simple, generally follows the pattern: fpg_edit, fpg_label, fpg_button, fpg_menu, fpg_memo.... fpg_* ...
Well, it is almost true... but there are fpg_tab (PageControl e TabShit) and fpg_tree (TreeView).... fpg_dialogs (ShowMessage and other commons dialogs...)

Another thing,  just do run-> build ... look for the application in the same folder as the "*.lpi" or folder "unit"...

Good Luke!


                                       




Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Fred vS

  • Hero Member
  • *****
  • Posts: 3168
    • StrumPract is the musicians best friend
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #16 on: April 21, 2013, 06:39:58 pm »
@ jmpessoa : many thanks.

Hum, i have try with few of my applications but all crash when trying to run it...

I gonna try to use fpGUI for new-applications-only then...

PS : It was too beautiful if i could use it for my existing app...
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: 3168
    • StrumPract is the musicians best friend
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #17 on: April 21, 2013, 07:51:57 pm »
Hello everybody.  ;)

Like said in wiki i have rebuild Lazarus with fpGUI...

Now, Lazarus refuse to start, i get only the splash screen then it crash.  :-[

Quote
fred@fred-TOSH:~$ startlazarus
TLazarusManager.Run starting /usr/share/lazarus/1.0.8/lazarus ...
EnumFontFamiliesEx is not yet implemented for this widgetset
EnumFontFamiliesEx is not yet implemented for this widgetset
EnumFontFamiliesEx is not yet implemented for this widgetset
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/fred/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
[TMainIDE.Destroy] A
[TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
[TMainIDE.Destroy] END
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00000000006FD6A8
  $00000000008997CE line 2933 of fpgui/corelib/fpg_base.pas
  $000000000091E77B line 268 of fpgui/fpg_menu.pas
  $00000000009202B0 line 768 of fpgui/fpg_menu.pas
  $00000000009666E1 line 161 of fpgui/fpguiwsmenus.pp
  $00000000008A9DC7 line 134 of include/menuitem.inc
  $00000000008AB0D2 line 636 of include/menuitem.inc
  $00000000008AB5EA line 793 of include/menuitem.inc
  $0000000000A9B329 line 1169 of menuintf.pas
  $0000000000A9DECB line 1612 of menuintf.pas
  $000000000067E8DA line 2451 of main.pp
  $000000000067916E line 1506 of main.pp
  $00000000006043A9 line 104 of lazarus.pp
TApplication.HandleException Access violation
  Stack trace:
  $00000000006FD6A8
  $00000000008997CE line 2933 of fpgui/corelib/fpg_base.pas
  $000000000091E77B line 268 of fpgui/fpg_menu.pas
  $00000000009202B0 line 768 of fpgui/fpg_menu.pas
  $00000000009666E1 line 161 of fpgui/fpguiwsmenus.pp
  $00000000008A9DC7 line 134 of include/menuitem.inc
  $00000000008AB0D2 line 636 of include/menuitem.inc
  $00000000008AB5EA line 793 of include/menuitem.inc
  $0000000000A9B329 line 1169 of menuintf.pas
  $0000000000A9DECB line 1612 of menuintf.pas
  $000000000067E8DA line 2451 of main.pp
  $000000000067916E line 1506 of main.pp
  $00000000006043A9 line 104 of lazarus.pp
[FORMS.PP] ExceptionOccurred
[FORMS.PP] ExceptionOccurred
[FORMS.PP] ExceptionOccurred
fred@fred-TOSH:~$

How must i do to come back to Lazarus compiled with gtk2 or Qt. (In console mode because Lazarus does not load any more)

Im loosed, now nothing is working any more...  :'(

[EDIT] Ok, i gonna un-install Lazarus and re-install a new one.  :'(
PS : Be careful when you try to compile Lazarus with fpGUI alpha.
With me, not worked...  :-X
« Last Edit: April 21, 2013, 08:35:58 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

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #18 on: April 21, 2013, 11:02:39 pm »
fpGUI widgetset for lazarus is different history. Graeme occasionally commit fixes (Lazarus widgets = LCL issues from which fpGUI try to escape). Rebuild lazarus with fpGUI even have no sense. I'm using Lazarus only as editor for .pas files so I have powerfull code completition etc. For GUI design you can use fpgui UI designer (you must buid it first) or just write everything in code (it is little faster than LCL runtime component create). Even when you use fpgui designer it convert your design form into .pas code (with special region tags) so you can mix / correct your code in same file
« Last Edit: April 21, 2013, 11:05:40 pm by Dibo »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #19 on: April 21, 2013, 11:21:09 pm »
@Dibo,

Have you some little tutorial about fpGUI component creation and install in fpGUI/UIDesigner  pallete?

Thanks!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #20 on: April 21, 2013, 11:45:35 pm »
I analyzed fpgui demos examples and learn from them. About gui designer, components are "hard" coded into gui designer, there is no component installer like in lazarus, but there is one component TOtherWidget so you can attach your custom component and place it on the form at design time. But you must first understand what fpGUI is and how it works, you can't just convert any component (which you know from Lazarus palette) to fpgui just like that. For support I recommend fpGUI news group instead of Lazarus forum, Graeme is very helpful and available on fpGUI news group. Programming with fpGUI you must change your habbits which you had usign LCL
« Last Edit: April 21, 2013, 11:47:08 pm by Dibo »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #21 on: April 22, 2013, 12:11:43 am »
Thank you Dibo!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #22 on: April 22, 2013, 02:57:00 am »
@Dibo,

Have you some little tutorial about fpGUI component creation and install in fpGUI/UIDesigner  pallete?

Thanks!

Whoa! Really nice.
First, run the compiled "uidesigner" app (or open the project and compile)
Then open the ui designer (project) in the /fpgui-1.0/uidesigner/uidesigner.lpi (in the Lazarus menu, |Project|open project)
Then open the fpgui forms from the fpgui "uidesigner"
Close the Lazarus 'object inspector' and use the fpgui's 'object inspector' instead.
Drag closed your Lazarus components palette. Adjust the windows.

From here you can start to see how to go about adding 'widgets' to the palette of fpgui.

Very cool.

« Last Edit: April 22, 2013, 03:06:16 am by CaptBill »

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #23 on: April 22, 2013, 05:37:16 pm »
Could you explain, with simple words, to simple people (like me) what is the goal of fpGUI ?
It is a GUI toolkit for desktop or mobile (WinCE, Arm-Embedded, Raspberry Pi) platforms. It talks directly to each platforms underlying windowing system (Xlib or GDI), so has no large 3rd partly library requirements. eg: no Qt or GTK libraries are needed. Since v1.0, it also has a 2D vector based graphics engine (experimental), which gives it advanced drawing capabilities - again without requiring GDI+ or Cairo or SDL etc.  http://fpgui.sourceforge.net/images/full/fpgui_agg-powered.png

 fpGUI is implemented in 100% Object Pascal. All widgets (buttons, listboxes etc) are custom drawn and themeable. It is also very easy to extend. A big plus point is that fpGUI produces much smaller executables compared to LCL (+3rd party library requirements), yet it still packs a huge punch.... lots of widgets, easy to customise, drag-and-drop support, unicode support etc. Another very nice thing is that we early on noticed that a cross-platform toolkit needs to be slightly different, so it isn't a Delphi VCL clone (like LCL), simply because VCL is way to Windows centric. This gives us the freedom to extend widgets and class API's to better suite cross-platform development.

fpGUI came about in 2006 when my company started developing cross platform applications. We needed to be able to deploy on Linux and Windows, and our franchisees needed to be able to run a Linux and Windows system side by side, without the user interface of our applications looking different. LCL couldn't do that - and to a large extend still can't. So I started developing fpGUI to fulfill that need, and we now have a few commercial products based on fpGUI.

The support tools have grown with fpGUI too. I implemented a new Forms Designer - we don't see the need for having external *.lfm files, so our form designer generates pure pascal code inside the *.pas files - just like Java and .NET did for years. This means simplified checkins into repositories, search-and-replace can be done on widget properties etc. We also implemented a cross platform help system and viewer - obviously commercial apps need high quality help files, and shipping megabytes of loose HTML files can hardly be called an help system. So fpGUI DocView was born.  http://fpgui.sourceforge.net/screenshots_apps.shtml We are also in the process of developing a cross-platform installer.

Because most of the advanced projects we developed are all commercial, we can't share them with the public. So for fun, I started an experimental IDE called Maximus. This will become a "super demo" of what fpGUI can do. Maximus is included in the examples/apps/ directory. Maximus is an ongoing project too.

I hope this answers your question, and gives you some background on fpGUI.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #24 on: April 22, 2013, 05:48:06 pm »
Now I want to install my components (GUI and NoGUI) in the UI Designer palette ... how to do this? There is a simple example?
Thanks for wanting to try fpGUI. The fpGUI UI Designer is purposely designed with simplicity (for many reasons). So adding new widgets to the component palette is a manual process. Open the uidesigner.lpr project, set your search paths. Then edit the vfdwidgets.pas unit - look inside the RegisterWidgets() method for the existing ones. The BMP palette image can be converted to byte arrays (built-in resources) using the GUI tool found at tools/imageconvert/ - just drag and drop a 16x16 bmp onto the memo, then copy and paste the byte array into the UI Designer code.

Alternatively, the UI Designer can work with unknown widgets. Simply drop the [?] (TOtherWidget) on the form. You will be prompted for the actual widget class and name. Then type in any property assignment values into the Object Inspector's "unknown lines" memo.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #25 on: April 22, 2013, 05:49:01 pm »
Are you going to release the cross platform installer as open source?
That's something i have been looking for :-)

Is it something along the lines of Inno setup?
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #26 on: April 22, 2013, 05:50:00 pm »
Wiki search gives this:
http://wiki.lazarus.freepascal.org/fpGUI_Interface#Creating_your_first_LCL_application_with_fpGUI

That is only if you are creating LCL-based applications, using the LCL-fpGUI widgetset. I don't recommended that, as you loose much of the functionality of a pure fpGUI-based application.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #27 on: April 22, 2013, 06:02:41 pm »
In Compiler Option > Build mode > LCLWidgetType
I choose fpgui ( usually i use qt )

But if i try to compile, i get that error :
Quote
fpgui/fpguiwsdialogs.pp(39,3) Fatal: Can not find unit fpg_base used by FpGuiWSDialogs.

That will create a LCL-based application, but based on the LCL-fpGUI widgetset - some that isn't ready yet, and something I don't recommend, because you loose lots of the functionality of a pure fpGUI-based application. Anyway, the reason you got the error, is because you didn't setup LCL to find the fpGUI source code. Please read the <lazarus>/lcl/interfaces/fpgui/README.txt file for details.

Instead I suggest try the following.:
  • Open and compile the fpgui_toolkit.lpk package found in <fpgui>/src/corelib/(x11 or gdi)/
  • Compile the fpGUI UI Designer in <fpgui>/uidesigner/
  • Setup the UI Designer as an external tool item with a nice keyboard shortcut - I posted instructions earlier
  • Open any of the demos in the <fpgui>/examples/gui/ or <fpgui>/examples/apps/ directories.
  • Compile and Run them

Those examples are purposely kept simple, and each one tries to demo only one topic. This make it easier to learn from them.


Quote
Is the [LCL-fpGUI] roadmap of wiki up-to-date for fpGUI ?
I think it is, I don't really work on the LCL-fpGUI widgetset. But as you can see, there are still lots of things outstanding in the LCL integration. That is why I recommend you rather use fpGUI directly (not via LCL), to get the full potential of fpGUI.

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #28 on: April 22, 2013, 06:14:47 pm »
For support I recommend fpGUI news group instead of Lazarus forum, Graeme is very helpful and available on fpGUI news group.
:) Thanks Dibo for the kind words, and for helping out with some of the questions. It seems there are some confusion between fpGUI and LCL-fpGUI - but that happens with every fpGUI release. I answered a few more messages, so hopefully we have no cleared up the confusion.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

itmitica

  • Jr. Member
  • **
  • Posts: 85
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #29 on: April 22, 2013, 06:17:59 pm »
As far as I can tell (Win8 64bit, WinXp SP3, openSUSE 12.4), it works.

However, the widget sets are not truly native. This means you get odd and ugly looking components. Even more, there is no widget awareness for custom user settings, i.e. higher DPI.

Nice effort overall, but the resulting interfaces, as far as I'm concerned, have less than desirable visual results.

Am I missing something?

--
Mitică

 

TinyPortal © 2005-2018