On Mon, 2001-12-03 at 17:24, Barry Callahan wrote: > Hello, all. > > First, I'd like to apologise to all of you who are on both the GLADE-users and > GTK-list mailing lists, who are going to receive two copies of this message. I > felt it best to cross-post to make sure I (hopefully) found somebody who can > answer all of my questions.
Well, I'll be damned. ;) Manners on Monday! I'd like to offer the same apology. I write to the Glade list as well (although I'm not a subscribee) since somebody might want to do some Glade-related stuff regarding the stuff I mention at the bottom of this letter. Furthermore because since the questioner asked in both places, I think it's only fair that the users of the other list get an answer in case they're curious abouth this as well. > I'd like to be able to develop applications in C++ where the source code is as > platform-independant as possible. It's been my experience that differences in > things such as byte-ordering and library interface can be accomodated in the > preprocessor via #if and #define statements in the source. > > But when it came to the code for the program's UI, I've found it's VERY > platform-dependant, requiring a complete re-design for each platform... You will almost definately always have this problem when you want the applications to use the native look & feel of whichever platform you're aiming for. Unless you use some emulation techniques (like Qt does), but I find that an extremely silly solution, if you're doing C++ to begin with, but of course, that's a matter of opinion. If you're going for emulation, you might as well use Java. :) Java Swing also has this annoying habit of being so darn special when it comes to graphical user interface. Emulating the look & feel of each platform *will* create problems, e.g. mouse-scrolling not working, only in *your* application, and some font messup would be just typical. So in any case I highly recommend simply gaining experience in creating user interfaces that are easily made on another platform. :) This is of course amongs the aims of wxWindows, and you don't have to actually *re-design* your program every single time. Just a few fixes, especially because the de facto layout differs from platform to platform. For example, "OK" should be on the left to "Cancel" on MacOS, while in Windows you have that "OK", "Apply", "Cancel", keeping the buttons at the bottom of e.g. configuration windows, but keeping "OK" on the right side to "Cancel" on modal dialogs (don't correct me if I'm wrong, this is just an example). > That is, (possibly) until I ran across GLADE (http://glade.gnome.org) this > morning. Maybe I'm guilty of a little too much wishful thinking, but that's why > I'm emailing the gtk and glade lists... I figure that if somebody knows whether > GLADE/GTK+ is the answer to my search, or if I'm just "smoking crack", that > person is on one or both of these lists. :) Glade is of course one hell of a piece of software. I love it. Too bad it doesn't generate wxWindows code (to my knowledge). ;) Uh... well, if you don't mind having the Gtk+ look & feel on your "Windows" application, then Glade apps should compile with the CygWin package on Windows. Note that the interface is sluggier on Windows than on X Windows, as you'll find to be the case when using GIMP or X-Chat on Windows. If you don't mind about that though, then I suppose Glade and Gtk+/Gtk-- are closing up on your bed. > Essentially, I have three specific questions: Rock'n'roll. > 1) It would appear that I can build GLADE-generated code natively on any > platform to which GTK+, automake, and autoconf have been ported. Is this > correct? I am not 100% sure, but I can't see what on Earth should stop you. First of all, you can generate C/C++ code with Glade, which should get you up to 99% sure, but if you want to use run-time XML files to generate the interface, then I'm not that sure. Then you'll need a CygWin port of 'libglade', but I suppose you'll find one if you look hard enough. But as I said... 99% on the source generation method. > 2) Since I know GIMP and GTK+ have been ported to Win32 > (http://www.gimp.org/~tml/gimp/win32) and that automake and autoconf work under > CygWin, (I've never tried using them from an MS-DOS prompt) I'm assuming (see > #1) that I can build GLADE-produced UIs on Windows. Has anyone tried building > an application for Windows CE/PocketPC using GLADE? I have absolutely no idea, sorry. I haven't seen Windows CE in my life. :) (And I'm perfectly satisfied with that situation.) > 3) Thanks to http://www.macgimp.org, I know that GTK has been ported to MacOS X. > Does anyone know if it can be made to work under MacOS Classic? (<= OS 9.x) Well, again, you have the Gtk+ look & feel inside an operating system that comes from totally different GUI philosophy. MacOS is especially eccentric (and so far the most practical in my personal opinion), e.g. keeping the menubar always at the top of the screen, and only having *one* menubar visible at a time. I can't see a reason for Gtk+ not working on MacOS prior to 10, but I seriously doubt that anyone has ever bothered to do it. MacOS X is entirely based on UNIX philosophy so the codenerds have shifted there in great haste since the realease of 10, explaining the cool things which arise among the MacOS people as we speak... but I can't say I find that likely with the older versions of MacOS. If you can't find it on Google, it probably doesn't exist. > > Thanks for taking the time to read my questions, and double-thanks to those who > choose to answer any of my questions. Heck, what are mailing lists for? :) You're welcome, and good luck with whatever you're trying to do. There's one thing I want to tell you about. There's a cross-platform (free) library called wxWindows, which you'll find on http://www.wxwindows.org. It's the coolest thing I've seen so far, although I haven't had the patience to actually compile any wxWindows source code on Windows yet. May God damn, blast, compound and f**k the Windows command prompt. (Sorry, I couldn't help myself.) Anyway, you can read all about it on the website, and as you'll see, ports already exist for Gtk+, Motif (for some twisted reason), Win32, MacOS X and MacOS. Aaaaand ports are being done on OS/2 and some more no-name OSes (and may they all live long and prosper). Note that they may not all be entirely updated. I think the MacOS X and MacOS Oldy versions are only available in the development versions, but of course they will become stable sooner or later. Note that they *do not* emulate the look & feel of each operating system (like e.g. Qt & Java Swing do), but binds itself into each operating system natively. I haven't used it much myself, I've only done some messing around with it (since I can't find any time to do much C++ coding due to work), but it's my understanding that you need no additional libraries to run compiled binaries on Windows, and you should only need the Gtk+ library to run it on X Windows, but of course you need the wxWindows if you're going to compile it, so that's still an issue when it comes to open-source deployment. :) Don't take my word for it, though. Just check out the website, it's very cool, and the API is *very* nice. Sorry to the rest if I sound like an advertiser, but this just sounds like the stuff you're looking for. :) > Barry Rave. > _______________________________________________ > gtk-list mailing list > [EMAIL PROTECTED] > http://mail.gnome.org/mailman/listinfo/gtk-list _______________________________________________ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
