Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!ukc!slxsys!dircon!uad1077 From: uad1077@dircon.uucp (Ian Kemmish) Newsgroups: comp.windows.x Subject: Re: MOTIF vs Athena. Practical to conditionalize? Message-ID: <1990PMThu.13.10635@dircon.uucp> Date: 13 Dec 90 22:33:56 GMT References: <3132@gazette.bcm.tmc.edu> <7036@mitech.com> <3165@gazette.bcm.tmc.edu> Organization: The Direct Connection, UK Lines: 60 In article <3165@gazette.bcm.tmc.edu> etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) writes: > > >|> Here is a question. How difficult is it to conditionalize or >|> abstract ones code such that different widget sets can be used >|> depending on the local configuration/availability? >|> >|> Then if somebody has the MOTIF set on his system your application >|> could look 3d/MOTIF, and if *not* then you would use Athena >|> (and the person would probably not notice the difference, not being >|> *used* to the 3d look, since he doesn't have it on his machine). >|> >|> -gjc >|> >|> p.s. Just a suggestion in the form of a question. > > >Sometimes it is not too hard. It your application is nothing >but a bunch of buttons then it is a snap. > >However, sometimes it is not so easy. For instance, toggle >widgets are handled completely differently in Athena Widgets >than they are in MOTIF (when using mutually exclusive toggles). > Hmmm, my news program appears to have dropped one or more attributions. Sorry. If you know beforehand that you want a portable program, then life is not too bad. I have a 15,000 drawing program, based loosely on Freehand from Aldus for the Mac. Of this, about 2,000 each are for Motif or Athena. They are in separate files. The main body of the program is driven almost entirely by callbacks from this code. There are only a couple of dozen lines with ifdefs in the rest of the program. These are mostly to handle interrogating and forcing sets of radio buttons. The biggest problem so far was getting *just* a shift button press event. In Athena it works no problem. In Motif, I only ever seemed to get it at the next `normal' event. Yuk. The second biggest problem was having dialogue boxes that can accept text. Motif seems to be very picky about exaclty what type of shell widgets you use. Athena is a lot more permissive. The third biggest problem was the general size, sloth and bugginess of Motif, both in design and implementation. Still struggling with that one. Compared to Motif, doing NURBS in a window system with no graphics library to speak of was almost easy! Hope this helps. -- Ian D. Kemmish Tel. +44 767 601 361 18 Durham Close uad1077@dircon.UUCP Biggleswade ukc!dircon!uad1077 Beds SG18 8HZ United Kingd uad1077%dircon@ukc.ac.uk