Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-04

fpGUI Toolkit v0.7-rc2 for FPC 2.4

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

fpGUI v0.7-rc2 is available
---------------------------

An archived source download can be found at the following URL, or the source code could be pulled directly from the source code repository.

http://sourceforge.net/projects/fpgui/files/

For more details, please visit the fpGUI home page:

http://opensoft.homeip.net/fpgui/

The v0.7 release contains a lot of added features compared to the previous release. Below is just a small list of things that changed or was added. A more detailed change-log will be made available when I create the final v0.7 release. The final release will also include updated Class Documentation (in HTML and INF format) and application help for DocView and UI Designer. The FPC Language Reference document will also be made available in INF format.

Some changes in v0.7.rc2
- Fixed some compiler errors for experimental FPC 2.5.1
- Localization of Character Map dialog.
- Insert from Character Map added to TfpgEdit default popup menu.
- ModalResults is now a enum type. Improved integration with UI Designer.
- Memo: problems with deleting selected text is now fixed.
- Improved WinCE support, including reading BMP files.
- Fixed compilation of all example projects.
- Extended available properties that can be edited via the Object Inspector of the UI Designer.
- Fixed issues where dialogs are closed via the window border X button and not the available buttons in the dialog. Developer can define behaviour of X close button.
- Improved TabSheet handling in UI Designer.
- Various improvements to TfpgPageControl and TfpgTabSheet. This includes new tab positions: Bottom, Left, Right and None.
- SelectDirectory dialog was not working under Windows.
- Setting selected directory in SelectDirectory dialog now works.
- New mouse cursor demo.
- Improved the ability to customize the HintWindow. HintWindow demo was extended to show how this can be done.
- Improved Visible property handling especially with child components. Now only the parent Visible property is changed.
- tiOPF: correctly disable event handlers in edit mediators.
- Added a script which generates a fpGUI version number based on Git repository information. Later this will be converted to a object pascal console application.

Some changes in v0.7.rc1
- FPC 2.4.0 compatible.
- Fully tested on 32-bit and 64-bit platforms. Tested on Linux, Windows and the *BSD family.
- Mobile device support is back. Tested on ARM Linux and Windows Mobile devices.
- fpGUI UI Designer has improved a lot and extended it's component palette and Object Inspector.
- Various bug fixes, memory leaks and other enhancements have been applied.
- Units have a more uniform naming style.
- Classes have a more uniform structure/hierarchy with base classes.
- Help support has been added to the core framework
- fpGUI now has it's own help file viewer called DocView. Docview includes the following features:
- document annotation
- bookmarks
- browse history
- exporting articles to plain text or IPF format.
- full text search (including weighting of results to see how relevant the results are)
- Font and Color customization
- Concatenation of help files at run-time so a library of help files can be viewed simultaneously.
- Easy integration via the "external tools" feature of IDE's like Lazarus or MSEide. This allows for context sensitive help.
- History of most recently viewed help files.
- Help file format used is the INF format (IBM's format used it OS/2), which is very compact, incredibly fast and supports full text search.
- A lot of new components have been added, including enhancements to existing components.
- Various new dialogs have been added, which include Color Wheel, Character Map, Database Login etc.
- Improved integration with tiOPF project via the Model-GUI-Mediator design pattern.
- Graphical FPCUnit unit test runner.
- Lots of new language translations for the core fpGUI library.
- A lot of new example projects demoing various GUI components.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Schindler Karl-Michael
to Graeme Geldenhuys

Hi Graeme,

I had another go on the Mac.

the use of the unit users is still an issue. it should be ok to simply ifndef darwin the lines in fpg_x11.pas

Secondly, I did some more debugging regarding the X11 error. It depends on whether the window of the application is the actual toplevel X11 window or not. If there is a top level window, all is fine, if not I found that line 831 in file corelib/x11/fpg_netlayer_x11.pas causes the X11 error. The line with the offending procedure call is this:

  XGetWMProtocols(FDisplay, AWindow, @Protocols, @Count);

Unfortunately, this does not tell me much, since my knwledge of X11 is very limited. maybe something more is needed to open a top level window, mac specific or not.

This is the log from the corresponding gdb session:

(gdb) c
Continuing.

Breakpoint 20, WINDOWADDPROTOCOL (this=0x520020, AWINDOW=6291457, APROTOCOL=0) at corelib/x11/fpg_netlayer_x11.pas:831 831 XGetWMProtocols(FDisplay, AWindow, @Protocols, @Count); 4: COUNT = 0
3: PROTOCOLS = 0x0
2: AWINDOW = 6291457
1: this->FDISPLAY = 0x803a00
(gdb) backtrace
#0 WINDOWADDPROTOCOL (this=0x520020, AWINDOW=6291457, APROTOCOL=0) at corelib/x11/fpg_netlayer_x11.pas:831 #1 0x00051fea in WINDOWSETSUPPORTPING (this=0x520020, AWINDOW=6291457) at corelib/x11/fpg_netlayer_x11.pas:602 #2 0x0004dc92 in DOALLOCATEWINDOWHANDLE (this=0x1c0d1e0, APARENT=0x0) at corelib/x11/fpg_x11.pas:1424 #3 0x00045350 in ALLOCATEWINDOWHANDLE (this=0x1c0d1e0) at corelib/fpg_base.pas:1021 #4 0x00054546 in HANDLESHOW (this=0x1c0d1e0) at corelib/fpg_widget.pas:707 #5 0x00057df4 in HANDLESHOW (this=0x1c0d1e0) at gui/fpg_form.pas:347 #6 0x00057acf in SHOW (this=0x1c0d1e0) at gui/fpg_form.pas:288 #7 0x000111d0 in MAINPROC () at colorlistboxtest.lpr:19 #8 0x00011210 in PASCALMAIN () at colorlistboxtest.lpr:27 #9 0x00020e95 in SYSTEM_FPC_SYSTEMMAIN$LONGINT$PPCHAR$PPCHAR () #10 0x00011159 in _start ()
#11 0x00011088 in start ()
(gdb) step
X Error of failed request: BadAtom (invalid Atom parameter) Major opcode of failed request: 18 (X_ChangeProperty) Atom id in failed request: 0x0
Serial number of failed request: 103
Current serial number in output stream: 104

Reply by email

Graeme Geldenhuys
to Schindler Karl-Michael
Schindler Karl-Michael wrote
I had another go on the Mac. the use of the unit users is still an issue. it should be ok to simply ifndef darwin the lines in fpg_x11.pas

In commit d6402c7, I added some IFDEF's which should allow compilation under darwin. Just a reminder that I have no way of testing under Mac
- it's all experimental.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Schindler Karl-Michael: I had another go on the Mac. the use of the unit users is still an issue. it should be ok…
Schindler Karl-Michael wrote
Secondly, I did some more debugging regarding the X11 error. It depends on whether the window of the application is the actual toplevel X11 window or not. If there is a top level window, all is fine, if not I found that line 831 in file  corelib/x11/fpg_netlayer_x11.pas causes the X11 error. The line with the offending procedure call is this:  XGetWMProtocols(FDisplay, AWindow, @Protocols, @Count);
From the backtrace the initial problem starts with the call to

WindowSetSupportPING() on line 1424 in fpg_x11.pas. Clearly the Mac "window manager" doesn't support all the usual features of modern Linux window managers does. The WindowSetSupportPING() is not a critical feature - PING support simply detects if a program is not responding and then prompts the user if they would like to kill the app or continue waiting.

If you comment line 1424, does that resolve the X11 error you get?

--------------------
    XSetWMProperties(fpgApplication.Display, FWinHandle, nil, nil,
nil, 0, nil, WMHints, nil);
    fpgApplication.netlayer.WindowSetPID(FWinHandle, GetProcessID);
//    fpgApplication.netlayer.WindowSetSupportPING(FWinHandle);

--------------------

I'll research further to see if there is a way I can query window manager features in a more reliable manner.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Schindler Karl-Michael
to Graeme Geldenhuys

Hi

Graeme Geldenhuys wrote
From the backtrace the initial problem starts with the call to WindowSetSupportPING() on line 1424 in fpg_x11.pas. Clearly the Mac "window manager" doesn't support all the usual features of modern Linux window managers does.

To some extend X11 is treated as a step child on Mac OS X.

Show quoted text 6 lines
The WindowSetSupportPING() is not a critical feature - PING support simply detects if a program is not responding and then prompts the user if they would like to kill the app or continue waiting. If you comment line 1424, does that resolve the X11 error you get?

I get the same error with line 1468:

    fpgApplication.netlayer.WindowAddProtocol(FWinHandle, xapplication.xia_wm_delete_window);

commenting out this, i get the error on 1828

  XGetGeometry(xapplication.display, TfpgX11Window(awin).FWinHandle, @rw, @x, @y, @w, @h, @bw, @d);

where I stopped.

I'll research further to see if there is a way I can query window manager features in a more reliable manner.

when asking on the darwin mailing list, i received this answer:

Explicit XSync or XInterAtom() to make sure the messages don't pass, queued in the night, and then you try an operation on an object which was queued but not serviced.

You can see if sync is what's required by turning it on using the server option, so that you get it on every request, whether you want it or not. Documentation on how to do this for Mac OS X's X11 server is at <http://developer.apple.com>.

This does not tell me much, but I'll search around. Maybe, it tells you more than me.

Regards, - Graeme -

Michael

Reply by email

Martin
to Graeme Geldenhuys: fpGUI v0.7-rc2 is available --------------------------- An archived source download can…

All fine and good,
But I couldn't even find out how to install it.

Nothing on the webpage. There is an INSTALL.TXT, it says change into src, and run build.bat (for windows)

I did that 9yes fpc (2.5.1) in path.

I get some output that it compiles something, but no exe is created.

so how to I get some fpgui.exe?

Martin

Graeme Geldenhuys wrote 96 lines
fpGUI v0.7-rc2 is available --------------------------- An archived source download can be found at the following URL, or the source code could be pulled directly from the source code repository. http://sourceforge.net/projects/fpgui/files/ For more details, please visit the fpGUI home page: http://opensoft.homeip.net/fpgui/ The v0.7 release contains a lot of added features compared to the previous release. Below is just a small list of things that changed or was added. A more detailed change-log will be made available when I create the final v0.7 release. The final release will also include updated Class Documentation (in HTML and INF format) and application help for DocView and UI Designer. The FPC Language Reference document will also be made available in INF format. Some changes in v0.7.rc2 - Fixed some compiler errors for experimental FPC 2.5.1 - Localization of Character Map dialog. - Insert from Character Map added to TfpgEdit default popup menu. - ModalResults is now a enum type. Improved integration with UI Designer. - Memo: problems with deleting selected text is now fixed. - Improved WinCE support, including reading BMP files. - Fixed compilation of all example projects. - Extended available properties that can be edited via the Object Inspector of the UI Designer. - Fixed issues where dialogs are closed via the window border X button and not the available buttons in the dialog. Developer can define behaviour of X close button. - Improved TabSheet handling in UI Designer. - Various improvements to TfpgPageControl and TfpgTabSheet. This includes new tab positions: Bottom, Left, Right and None. - SelectDirectory dialog was not working under Windows. - Setting selected directory in SelectDirectory dialog now works. - New mouse cursor demo. - Improved the ability to customize the HintWindow. HintWindow demo was extended to show how this can be done. - Improved Visible property handling especially with child components. Now only the parent Visible property is changed. - tiOPF: correctly disable event handlers in edit mediators. - Added a script which generates a fpGUI version number based on Git repository information. Later this will be converted to a object pascal console application. Some changes in v0.7.rc1 - FPC 2.4.0 compatible. - Fully tested on 32-bit and 64-bit platforms. Tested on Linux, Windows and the *BSD family. - Mobile device support is back. Tested on ARM Linux and Windows Mobile devices. - fpGUI UI Designer has improved a lot and extended it's component palette and Object Inspector. - Various bug fixes, memory leaks and other enhancements have been applied. - Units have a more uniform naming style. - Classes have a more uniform structure/hierarchy with base classes. - Help support has been added to the core framework - fpGUI now has it's own help file viewer called DocView. Docview includes the following features: - document annotation - bookmarks - browse history - exporting articles to plain text or IPF format. - full text search (including weighting of results to see how relevant the results are) - Font and Color customization - Concatenation of help files at run-time so a library of help files can be viewed simultaneously. - Easy integration via the "external tools" feature of IDE's like Lazarus or MSEide. This allows for context sensitive help. - History of most recently viewed help files. - Help file format used is the INF format (IBM's format used it OS/2), which is very compact, incredibly fast and supports full text search. - A lot of new components have been added, including enhancements to existing components. - Various new dialogs have been added, which include Color Wheel, Character Map, Database Login etc. - Improved integration with tiOPF project via the Model-GUI-Mediator design pattern. - Graphical FPCUnit unit test runner. - Lots of new language translations for the core fpGUI library. - A lot of new example projects demoing various GUI components.

Reply by email

Graeme Geldenhuys
to Martin

Martin het geskryf:

Show quoted text 10 lines
All fine and good, But I couldn't even find out how to install it. Nothing on the webpage. There is an INSTALL.TXT, it says change into src, and run build.bat (for windows) I did that 9yes fpc (2.5.1) in path. I get some output that it compiles something, but no exe is created. so how to I get some fpgui.exe?

:-)

fpGUI is a toolkit not an application. You followed the instructions to compile the toolkit, so you should have the compiled units in <fpgui>\lib\i386-win32\

If you read the INSTALL.TXT file further you would have seen at the bottom instructions on how to compile the demos from the command line. This applies to the fpGUI UI Designer and DocView as well. The format is always as follows:
fpc @extrafpc.cfg <program_unit>

eg:
cd <fpgui>\uidesigner
fpc @extrafpc.cfg uidesigner.lpr

Alternatively, you can used Lazarus IDE, and simply open the fpgui_toolkit.lpk file located at:
<fpgui>\src\corelib\gdi\fpgui_toolkit.lpk

This will allow Lazarus IDE to find the fpGUI source code. Then simply open any example project via the standard *.lpi files and press Ctrl+F9

All this information is in the readme.txt file in the docs directory.

Regards,
- Graeme -

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

Reply by email

Graeme Geldenhuys
to Martin: But I couldn't even find out how to install it. Nothing on the webpage. There is an…
Martin wrote
Nothing on the webpage.

Just to let you know, I am busy redesigning the whole fpGUI website - ready for the release of v0.7. The new website contains a lot more helpful information and IDE integration of UI Designer and DocView supporting both Lazarus IDE and MSEide etc.. So soon the website should also be more useful for newcomers.

If you have any further issues, don't hesitate to ask.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email