Discussion:
Which GUI framework ?
(too old to reply)
DrPi
2020-10-29 18:48:36 UTC
Permalink
Hi,

I'd like to create a PC (Windows) GUI program. This program needs to be
able to create many windows and tabs in one of them. A working thread
receive data from a serial line and send messages to the GUI to print
received content.

I know the most common way is to use GtkAda. The problem is I'm a Ada
beginner and I never used Gkt. So, the effort is double.

I have a quite good knowledge of wxWidgets since I use wxPython for
years. I thought I could use wxAda but is seems the project is dead.


Any other binding to wxWidgets that I'm not aware of ?

Nicolas
Dmitry A. Kazakov
2020-10-29 19:23:55 UTC
Permalink
Post by DrPi
I'd like to create a PC (Windows) GUI program. This program needs to be
able to create many windows and tabs in one of them. A working thread
receive data from a serial line and send messages to the GUI to print
received content.
I know the most common way is to use GtkAda. The problem is I'm a Ada
beginner and I never used Gkt. So, the effort is double.
I have a quite good knowledge of wxWidgets since I use wxPython for
years. I thought I could use wxAda but is seems the project is dead.
Any other binding to wxWidgets that I'm not aware of ?
If that is only Windows (are you serious?), you do not need any. Simply
use Windows GDI API directly. They are callable from Ada more or less
out of the box because Windows handles all objects internally as graphic
resources.

There is Win32Ada thin bindings, but it is incomplete and most of the
time you do not need it.

The Microsoft's way of defining and using types is so idiotic that no
reasonably usable thin Ada bindings are possible. I just declare an Ada
counterpart new as appropriate with parameters of types I want in order
to avoid casting types.

In short, Windows GDI is ugly but it is native and task-safe. (GtkAda is
neither)
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Randy Brukardt
2020-10-29 20:45:09 UTC
Permalink
Post by Dmitry A. Kazakov
Post by DrPi
I'd like to create a PC (Windows) GUI program. This program needs to be
able to create many windows and tabs in one of them. A working thread
receive data from a serial line and send messages to the GUI to print
received content.
I know the most common way is to use GtkAda. The problem is I'm a Ada
beginner and I never used Gkt. So, the effort is double.
I have a quite good knowledge of wxWidgets since I use wxPython for
years. I thought I could use wxAda but is seems the project is dead.
Any other binding to wxWidgets that I'm not aware of ?
If that is only Windows (are you serious?), you do not need any. Simply
use Windows GDI API directly. They are callable from Ada more or less out
of the box because Windows handles all objects internally as graphic
resources.
There is Win32Ada thin bindings, but it is incomplete and most of the time
you do not need it.
For Win32, both Claw (www.rrsoftware.com) and GWindows provide thick Ada
bindings. Much easier to use than raw Win32.

Randy.
Post by Dmitry A. Kazakov
The Microsoft's way of defining and using types is so idiotic that no
reasonably usable thin Ada bindings are possible. I just declare an Ada
counterpart new as appropriate with parameters of types I want in order to
avoid casting types.
In short, Windows GDI is ugly but it is native and task-safe. (GtkAda is
neither)
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
DrPi
2020-10-30 09:38:01 UTC
Permalink
Post by Randy Brukardt
Post by Dmitry A. Kazakov
Post by DrPi
I'd like to create a PC (Windows) GUI program. This program needs to be
able to create many windows and tabs in one of them. A working thread
receive data from a serial line and send messages to the GUI to print
received content.
I know the most common way is to use GtkAda. The problem is I'm a Ada
beginner and I never used Gkt. So, the effort is double.
I have a quite good knowledge of wxWidgets since I use wxPython for
years. I thought I could use wxAda but is seems the project is dead.
Any other binding to wxWidgets that I'm not aware of ?
If that is only Windows (are you serious?), you do not need any. Simply
use Windows GDI API directly. They are callable from Ada more or less out
of the box because Windows handles all objects internally as graphic
resources.
There is Win32Ada thin bindings, but it is incomplete and most of the time
you do not need it.
For Win32, both Claw (www.rrsoftware.com) and GWindows provide thick Ada
bindings. Much easier to use than raw Win32.
Randy.
Interresting. I'll have a look at them.
Thanks.
Post by Randy Brukardt
Post by Dmitry A. Kazakov
The Microsoft's way of defining and using types is so idiotic that no
reasonably usable thin Ada bindings are possible. I just declare an Ada
counterpart new as appropriate with parameters of types I want in order to
avoid casting types.
In short, Windows GDI is ugly but it is native and task-safe. (GtkAda is
neither)
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
DrPi
2020-10-30 09:37:13 UTC
Permalink
Post by Dmitry A. Kazakov
Post by DrPi
I'd like to create a PC (Windows) GUI program. This program needs to
be able to create many windows and tabs in one of them. A working
thread receive data from a serial line and send messages to the GUI to
print received content.
I know the most common way is to use GtkAda. The problem is I'm a Ada
beginner and I never used Gkt. So, the effort is double.
I have a quite good knowledge of wxWidgets since I use wxPython for
years. I thought I could use wxAda but is seems the project is dead.
Any other binding to wxWidgets that I'm not aware of ?
If that is only Windows (are you serious?),
Did I say that ? ;)
I currently do my dev on a Windows machine but a cross-platform
framework is welcome.

you do not need any. Simply
Post by Dmitry A. Kazakov
use Windows GDI API directly. They are callable from Ada more or less
out of the box because Windows handles all objects internally as graphic
resources.
There is Win32Ada thin bindings, but it is incomplete and most of the
time you do not need it.
The Microsoft's way of defining and using types is so idiotic that no
reasonably usable thin Ada bindings are possible. I just declare an Ada
counterpart new as appropriate with parameters of types I want in order
to avoid casting types.
In short, Windows GDI is ugly but it is native and task-safe. (GtkAda is
neither)
Windows GDI... I used it long time ago. Not my best memory.
Dmitry A. Kazakov
2020-10-30 09:54:54 UTC
Permalink
Post by DrPi
I currently do my dev on a Windows machine but a cross-platform
framework is welcome.
Cross-platform would be:

1. GTK (GtkAda)
2. Qt (not sure about the project name)
3. HTTP (Gnoga)
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Chris M Moore
2020-10-30 11:36:27 UTC
Permalink
Post by Dmitry A. Kazakov
Post by DrPi
I currently do my dev on a Windows machine but a cross-platform
framework is welcome.
1. GTK (GtkAda)
2. Qt (not sure about the project name)
3. HTTP (Gnoga)
Or Tk via https://github.com/simonjwright/tcladashell (or
https://github.com/thindil/tashy but I've not used that).
--
sig pending (since 1995)
DrPi
2020-10-31 10:58:51 UTC
Permalink
Post by Chris M Moore
Post by Dmitry A. Kazakov
Post by DrPi
I currently do my dev on a Windows machine but a cross-platform
framework is welcome.
1. GTK (GtkAda)
2. Qt (not sure about the project name)
3. HTTP (Gnoga)
Or Tk via https://github.com/simonjwright/tcladashell (or
https://github.com/thindil/tashy but I've not used that).
I'll have a look.
Thanks.
Jeffrey R. Carter
2020-10-30 12:31:45 UTC
Permalink
I currently do my dev on a Windows machine but a cross-platform framework is
welcome.
Gnoga (https://sourceforge.net/projects/gnoga/) is all Ada (not a binding) and
platform independent.
--
Jeff Carter
"You empty-headed animal-food-trough wiper."
Monty Python & the Holy Grail
04
DrPi
2020-10-31 11:20:41 UTC
Permalink
Post by Jeffrey R. Carter
Post by DrPi
I currently do my dev on a Windows machine but a cross-platform
framework is welcome.
Gnoga (https://sourceforge.net/projects/gnoga/) is all Ada (not a
binding) and platform independent.
Gnoga is very interesting when the GUI is remotely run.
I think using such a system locally is nonsense (very resource hungry).
Luke A. Guest
2020-10-30 09:52:11 UTC
Permalink
Post by DrPi
Hi,
I'd like to create a PC (Windows) GUI program. This program needs to be
able to create many windows and tabs in one of them. A working thread
receive data from a serial line and send messages to the GUI to print
received content.
I know the most common way is to use GtkAda. The problem is I'm a Ada
beginner and I never used Gkt. So, the effort is double.
Gtk isn't all that pleasant either.
Post by DrPi
I have a quite good knowledge of wxWidgets since I use wxPython for
years. I thought I could use wxAda but is seems the project is dead.
Yup, I agree that wxWidgets is much simpler as it was based on MFC, only
portable.

At this time wxAda is dead on my hdd right now and not going to be
resurrected until I get some money coming in.
Post by DrPi
Any other binding to wxWidgets that I'm not aware of ?
No, both efforts were abandoned as it was too much work. I have a start
to a generator, but like I said, it's not happening right now.

Luke.
DrPi
2020-10-31 11:14:46 UTC
Permalink
Post by Luke A. Guest
Post by DrPi
Hi,
I'd like to create a PC (Windows) GUI program. This program needs to
be able to create many windows and tabs in one of them. A working
thread receive data from a serial line and send messages to the GUI to
print received content.
I know the most common way is to use GtkAda. The problem is I'm a Ada
beginner and I never used Gkt. So, the effort is double.
Gtk isn't all that pleasant either.
Post by DrPi
I have a quite good knowledge of wxWidgets since I use wxPython for
years. I thought I could use wxAda but is seems the project is dead.
Yup, I agree that wxWidgets is much simpler as it was based on MFC, only
portable.
At this time wxAda is dead on my hdd right now and not going to be
resurrected until I get some money coming in.
Post by DrPi
Any other binding to wxWidgets that I'm not aware of ?
No, both efforts were abandoned as it was too much work. I have a start
to a generator, but like I said, it's not happening right now.
Luke.
Binding to C++ libraries is a problem.
In python world, there are many ways to achieve this.
If I remember well, the author of wxPython has written its own binding
system for version 3. Before version 3, he used a "standard" one but
with many manual patches.
PySide (Python binding for Qt) authors also have written their own
binding system after using one that was not fulfilling their needs.

It's a pity since I like wxWidgets way of working.
Luke A. Guest
2020-10-31 14:03:36 UTC
Permalink
Post by DrPi
Post by Luke A. Guest
Post by DrPi
Any other binding to wxWidgets that I'm not aware of ?
No, both efforts were abandoned as it was too much work. I have a
start to a generator, but like I said, it's not happening right now.
Luke.
Binding to C++ libraries is a problem.
Yup, see my example of how to do it here:
https://github.com/Lucretia/test_binding
Post by DrPi
In python world, there are many ways to achieve this.
If I remember well, the author of wxPython has written its own binding
system for version 3. Before version 3, he used a "standard" one but
with many manual patches.
I spoke with Robin many times about how to do this. My generator does
what his does in getting the interfaces read in.
Post by DrPi
PySide (Python binding for Qt) authors also have written their own
binding system after using one that was not fulfilling their needs.
It's a pity since I like wxWidgets way of working.
Yeah, same here.

I'm considering setting up gh sponsors, but if I cannot get enough there
to keep me afloat, it's a non-starter. Maybe If I can get a contract
elsewhere first?
DrPi
2020-10-31 16:30:15 UTC
Permalink
Post by Luke A. Guest
Post by DrPi
Post by Luke A. Guest
Post by DrPi
Any other binding to wxWidgets that I'm not aware of ?
No, both efforts were abandoned as it was too much work. I have a
start to a generator, but like I said, it's not happening right now.
Luke.
Binding to C++ libraries is a problem.
https://github.com/Lucretia/test_binding
For a Python program, I've done something similar but much simpler. A
very simple C library interfaces to C++ library. The Python program
accesses the C library through cTypes.
Post by Luke A. Guest
Post by DrPi
In python world, there are many ways to achieve this.
If I remember well, the author of wxPython has written its own binding
system for version 3. Before version 3, he used a "standard" one but
with many manual patches.
I spoke with Robin many times about how to do this. My generator does
what his does in getting the interfaces read in.
Post by DrPi
PySide (Python binding for Qt) authors also have written their own
binding system after using one that was not fulfilling their needs.
It's a pity since I like wxWidgets way of working.
Yeah, same here.
I'm considering setting up gh sponsors, but if I cannot get enough there
to keep me afloat, it's a non-starter. Maybe If I can get a contract
elsewhere first?
Do you know SWIG (http://swig.org/) ?
SWIG manages C++ bindings to many languages... but not Ada. However,
SWIG tools might be of interest, like the tree parser outputting xml.
Maybe SWIG can be modified to manage Ada. Just an idea. But not my skills.
Luke A. Guest
2020-10-31 16:35:26 UTC
Permalink
Post by DrPi
Do you know SWIG (http://swig.org/) ?
I know of it and no thanks. My generator would actually be simpler.
DrPi
2020-10-31 17:48:28 UTC
Permalink
Post by Luke A. Guest
Post by DrPi
Do you know SWIG (http://swig.org/) ?
I know of it and no thanks. My generator would actually be simpler.
For sure, SWIG is not simple.
Azathoth Hastur
2020-11-11 01:43:03 UTC
Permalink
Post by DrPi
Hi,
I'd like to create a PC (Windows) GUI program. This program needs to be
able to create many windows and tabs in one of them. A working thread
receive data from a serial line and send messages to the GUI to print
received content.
I know the most common way is to use GtkAda. The problem is I'm a Ada
beginner and I never used Gkt. So, the effort is double.
I have a quite good knowledge of wxWidgets since I use wxPython for
years. I thought I could use wxAda but is seems the project is dead.
Any other binding to wxWidgets that I'm not aware of ?
Nicolas
gnoga.com use HTML for get gtk qt crap

Loading...