From: Tomek Walkuski on
Hi,

someone wrote about need such kind of simple, non-GPL in "The future
of Ada is at risk" thread.

In which direction should it go? Portable means: native widgets on all
platform (wxWidgets approach) or imitation of these (Swing approach)?
Do you have any other ideas? Some design suggestions?

I'm asking because I'm interested in this matter, maybe I will find
time to start hacking this :)

I'm trying to put first brick, start the discussion, maybe something
good for the community will emerge?
From: Martin Krischik on
Tomek Walkuski wrote:

> In which direction should it go? Portable means: native widgets on all
> platform (wxWidgets approach) or imitation of these (Swing approach)?
> Do you have any other ideas? Some design suggestions?

I think the wxWidgets idea is the best.

Martin

--
mailto://krischik(a)users.sourceforge.net
Ada programming at: http://ada.krischik.com
From: Lucretia on
On Jan 12, 3:19 pm, Martin Krischik <krisc...(a)users.sourceforge.net>
wrote:
> Tomek Walkuski wrote:
> > In which direction should it go? Portable means: native widgets on all
> > platform (wxWidgets approach) or imitation of these (Swing approach)?
> > Do you have any other ideas? Some design suggestions?
>
> I think the wxWidgets idea is the best.

Yes it is. I originally started to write a binding library to
wxWidgets (http://www.archeia.com/home.html&tags=wxwidgets) but found
it incredibly hard to do.

We have just had a similar conversation on #Ada (freenode) about this.
I think the best way is to create a very thin C lib which exports a
bunch of functions for manipulating the underlying GUI lib and then
build an Ada library on top of that. These C functions could, if you
wanted, for certain platforms be another Ada library which exports to
C (for compatibility to the above layer). This then allows binding to
a GUI which already has a decent Ada port and to those which don't.

Luke.
From: Tomek Walkuski on
On 12 Sty, 19:12, Lucretia <lucret...(a)lycos.co.uk> wrote:
> We have just had a similar conversation on #Ada (freenode) about this.
> I think the best way is to create a very thin C lib which exports a
> bunch of functions for manipulating the underlying GUI lib and then
> build an Ada library on top of that. These C functions could, if you
> wanted, for certain platforms be another Ada library which exports to
> C (for compatibility to the above layer). This then allows binding to
> a GUI which already has a decent Ada port and to those which don't.
>
> Luke.

I think, there is no sense to do binding to wxWidgets. There should be
"clean" implementation of something like wxWidgets.

wxWidgets (and Java's SWT) use native GUIs, like GTK on Linux (I do
not have any experience with Win32 API) which is already in C.

I think that is necessary to prepare own (Ada) abstraction to various
native toolkits.
From: Lucretia on
On Jan 12, 8:40 pm, Tomek Walkuski <tomek.walku...(a)gmail.com> wrote:

> I think, there is no sense to do binding to wxWidgets. There should be
> "clean" implementation of something like wxWidgets.

Well, this is the conclusion I have come to. wxAda is a dead project
(well to me anyway), but anyone wanted to restart to look into it
again, the source is there.

> wxWidgets (and Java's SWT) use native GUIs, like GTK on Linux (I do
> not have any experience with Win32 API) which is already in C.
>
> I think that is necessary to prepare own (Ada) abstraction to various
> native toolkits.

Like I said, a thin C layer abstraction which is then imported into an
Ada library and turned into a proper Ada GUI with native controls,
this is the best way. For example:

Ada GUI Thick bindings
------------------------
Ada GUI Thin bindings
------------------------
C abstraction layer <- Can be provided via C or Ada depending on
lowest layer
------------------------
X11 | GtkAda | QT

I know three is an X11 binding to Ada but it is old and uses
preprocessing and if you want this library to be portable, you've no
hope where that's concerned. Hence the use of a set of C calls whether
these are written in C or Ada (with export(C, ...) pragmas).

Hope that clarifies my point some more.

Luke.