From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cafada25186be751 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-27 18:46:39 PST Message-ID: <3E35EC94.345831A7@sympatico.ca> From: David Marceau X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.17-10mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT and cross-platform GUI References: <3E35B974.BB6BEE@easystreet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 27 Jan 2003 21:36:04 -0500 NNTP-Posting-Host: 65.92.168.181 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1043721623 65.92.168.181 (Mon, 27 Jan 2003 21:40:23 EST) NNTP-Posting-Date: Mon, 27 Jan 2003 21:40:23 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:33470 Date: 2003-01-27T21:36:04-05:00 List-Id: achrist@easystreet.com wrote: > > Here's another candidate: > > http://www.japi.de/ > > I just noticed this looking at the GUI toolkit page the other day. > It says that it has an Ada binding. It provides an interface from > a subset of the java GUI toolkit to other langues, including Ada. > > Haven't tried it. > > Al > > root wrote: > > > > Is there any consensus on the best (quickest?) way to write GUI programs > > in Ada? I'm looking the links to the (free) packages I'd need. The plan > > is to write the programs under Linux, but (unfortunately) a MSWindows > > version will also be required. > > > > I don't have much experience with GTK yet -- guess that is about to change. > > > > Me Hi there, I took a look at JAPI you mentioned above. IMHO: -most of the JDK api is missing i.e. AWT/SWING/JOBJECT services -as a result Runnable Objects and Thread Objects may not be instantiated. This is important if you want any multi-task multi-thread gui going on. -the creation of the gui elements do have a flaw that japi team may have regarded as a strength. JAPI GridLayout example creates a frame, creates four buttons, packs the frame and then shows the frame. Where I would suggest more work into japi is to separate the concerns of creating the button instance from associating it with the frame as done by default in just one step. There should be many steps and for good reason. i.e. step 1)create step 2)add ... Why? In the japi context when you create the button, your layout order is the same as the gui object creation order. There may be cases where this might not be possible and especially if we're talking a multi-threaded gui which is dynamically adding/removing runnable-gui-objects on the fly from a thread pool after the runnable has terminated. i.e. button1-4 could be associated to runnables. -In this context you're going to need more information of layout/ordering-gui-elements for on-the-fly packing/repacking. japi doesn't have this. -then there are the steps involved concerning removing listeners on-the-fly and adding listeners on-the-fly. japi doesn't have this either. Please correct me if I am wrong. -last but not least GridBagLayout is the most powerful layout manager and should be supported. japi doesn't have this. Please correct me if I am wrong. I did see GridLayout but not GridBagLayout which is a whole different ball-o-wax. I don't want to be harsh on japi but I do want to highlight that when there might be smoke and mirrors involved I prefer lifting up the fog to put it on an even-level with the other GUI API's out there for ADA. Another way to measure bang per SDK would be LOCS if you have access to source :) IMHO Here are your alternatives for multi-platform GUI with Ada: -Ada with Proprietary Microsoft COM. Bristol Technologies sell a COM implementation for Unix but only runs on certain unix os'es. -Ada with OpenSource GNU AdaGTK runs on any UNIX/LINUX/Windows -Double your gui effort and do it win32/Ada/COM route then do it in Ada/X-Window -do it with Ada to Java and maybe end up using it on anything that has a jvm and an ada compiler i.e. J2ME/JAVACARD/JAVA bytecode Goto the adapower site for ada-to-java solutions. http://www.adapower.com among them if I recall there is jgnat, cafe1815, adajni. Now japi :) There are others. -Ada/TCL/TK/TASH -Ada and straight to graphic hardware from Win32/UNIX without X. -Ada straight to hardware both graphic and everything else. No X no Win32, so I gather this alternative is not for you :) I hope this helps a bit. Good luck since there is a much work just to decide which one will fit your needs best:) Cheers, David Marceau