Xref: utzoo comp.windows.x:33221 comp.windows.x.motif:2026 comp.windows.open-look:694 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!uunet!stan!imp From: imp@Solbourne.COM (Warner Losh) Newsgroups: comp.windows.x,comp.windows.x.motif,comp.windows.open-look Subject: Re: Toolkit for Open Look *and* OSF/Motif Look and Feel Keywords: toolkit, Open Look, OSF/Motif, GUI Message-ID: <1991Feb25.222240.3785@Solbourne.COM> Date: 25 Feb 91 22:22:40 GMT References: <1991Feb19.210822.26826@visix.com> <1991Feb20.170617.15372@cs.umn.edu> <1991Feb25.212238.4525@visix.com> Organization: Solbourne Computer, Inc., Longmont, CO Lines: 41 In article <1991Feb25.212238.4525@visix.com> amanda@visix.com (Amanda Walker) writes: >This was my impression as well. OI, while it uses C++ object >inheritance, still seems pretty C-oriented stylistically. What do you mean that OI is C-oriented stylistally? About the only part of it that I could see is that oi_create_* routines. These were done to get around some short comings in C++. Almost all other actions are performed via member functions. These functions use inheritance so the programmer can, for example, do the same things to a scrolling text object that he/she can do to the non-scrolling version of the object. In addition, the objects in the library are easily expandable via sub-classing. It is fairly easy to derive new classes of objects from pre-existing OI objects. It is a very natural way to view certain things. Implementing an mac-like file browser, for example, would use these techniques to create a class called, say, Icon that is derived from OI_box with a OI_glyph and a OI_static_text inside it. The browser would then subclass off the generic Icon to make more specific icons. OI is designed to make these sorts of things easy. It usually succeeds in its design, but like all other software, there are cases where it falls short. >>So you need a toolkit that is easily extensible. >>Yay for C++ and subclassing... > >Well, C++ isn't the only way to do subclassing. It's not even the only >easy way (although I will grant that Xt's approach is pretty unwieldy). >We use a bare-bones template based system that fits well into "vanilla" >C code, for example. It gives us what we want with a minimum of baggage. But doing it in C++ is, IMHO, a heck of a lot easier than trying to shoe horn it into C. I'd rather spend my time writing the meat of the object, rather than filling in a template and making sure that I call the right routines for the object. Then again, it sounds like this part of the thread is heading off into the Computer Language Jihad.... Warner -- Warner Losh imp@Solbourne.COM We sing about Beauty and we sing about Truth at $10,000 a show.