1. cross platform GUI suggestions for Euphoria
- Posted by cense <cense at MAIL.RU> Oct 01, 2000
- 406 views
- Last edited Oct 02, 2000
I was just cruising around the internet the other day looking for a IDE for linux when i came across a library called "Amulet". Amulet is a free, public domain cross platform C++ class library that allows for generic GUI creation across: - all X11 ( that means XFree86 on linux and others ) - Microsoft Win95/98 and NT - Macintosh Because it is public domain, commercial software can be produced with it royalty free and there are basically no restrictions on it. Im not too familar with wxWindows and i dont know what platforms it supports but i think Amulet is at least worth a look as well. It just might be a better solution for our *euphorian* needs, but i wont make a judgement considering i dont know wxWindows. Again, this is just a suggestions and i encourage anyone that is interested (this would be you David Cuny i assume) in this subject to visit the Amulet web site: -- evil, corruption and bad taste ^cense
2. Re: cross platform GUI suggestions for Euphoria
- Posted by David Cuny <dcuny at LANSET.COM> Oct 01, 2000
- 391 views
- Last edited Oct 02, 2000
cense wrote: > Amulet is a free, public domain cross platform C++ class > library that allows for generic GUI creation across: > > - all X11 ( that means XFree86 on linux and others ) > - Microsoft Win95/98 and NT > - Macintosh According to my favorite GUI toolkit page at http://www.geocities.com/SiliconValley/Vista/7184/guitool.html Amulet gets a rank of "good" (which beats most tookits) and says it's a "research-oriented toolkit from CMU. native look and feel. High-level support for interactive interfaces: Direct Manipulation Behaviors, Undo, Animation, etc. original project at CMU completed and No longer supported. However, another group has picked up development as OpenAmulet." OpenAmulet is at: http://www.openip.org/oa_overview.html I didn't get a chance to read it in depth, and there aren't any screenshots, either.Interfacing with C++ libraries can be problematic, since generally you have to derive new classes when you create new controls - something that's problematic when it comes to building a non-C++ interface. -- David Cuny
3. Re: cross platform GUI suggestions for Euphoria
- Posted by mic _ <stabmaster_ at HOTMAIL.COM> Oct 02, 2000
- 387 views
>I know about the C++ Object Oriented part being hard to wrap up properly. I wouldn't say it's hard, I'd say it's freaking impossible (just about). f.x. // No, I don't know C++, I'm just guessing here.. class blah { public void do_something(); } How would you ever get hold of do_something() using Euphoria's C interface? I suppose, under Windows you could try some fancy stuff using the dll functions in the Win API (get the address of 'blah'. figure out at wich offset the address of 'do_something()' is stored. use some asm to push all parameters. call 'do_something()'.). This would however a) be slow. b) take a lot of effort. Maybe I've missed some better way of doing this. If so, I'd be intersted to see your suggestion. _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.
4. Re: cross platform GUI suggestions for Euphoria
- Posted by Kenneth Rhodes <hermanhesse at EXCITE.COM> Oct 01, 2000
- 388 views
- Last edited Oct 02, 2000
Isn't WxWindows also in C++? > Interfacing with C++ libraries can be problematic, since generally > you have to derive new classes when you create new controls - something > that's problematic when it comes to building a non-C++ interface. > > -- David Cuny _______________________________________________________ Say Bye to Slow Internet! http://www.home.com/xinbox/signup.html
5. Re: cross platform GUI suggestions for Euphoria
- Posted by David Cuny <dcuny at LANSET.COM> Oct 02, 2000
- 399 views
mic wrote: >> I know about the C++ Object Oriented part being >> hard to wrap up properly. > > I wouldn't say it's hard, I'd say it's freaking impossible > (just about). When you write a wrapper, you need to use a C++ compiler. You define the interface something like this: extern "C" __declspec(dllexport) blah_do_something( blah self ) { self->do_something() } Here's the rundown: [ extern "C" ] This prevents that C++ compiler from mangling the routine name, so it's visible in the DLL. Otherwise, you have no guarantee what the routine name will look like once the C++ compiler gets done with it. [ __declspec(dllexport) ] Only needed on the Windows platform. This tells the compiler and linker that this routine is going to be exported (visible) in the DLL. [ blah_do_something ] The class name is prefixed to the function, to make it unique from all those other 'do_something' routines in the other classes. Actually, you probably want to name it something like 'wrap_blah_do_something' out of sheer paranoia. [ (blah this) ] In C++, you can just call the routine like this: someBlah.my_routine() and the object is implicitly passed. We have to make this explicit in our interface. [ self->do_something() ] This is the actual call. We take the object that we passed, and call the routine. It's actually a pretty mechanical process, once you've done it a couple of times. There's actually a program called SWIG that is designed to process C/C++ libraries, and generate this sort of wrapper automatically. I've written a fairly simple module to SWIG that will generate the source code for DLLs as well as the Euphoria code to link to the compiled DLL. Unfortunately, I can no longer get my code to work properly - calls to stdio cause the program to choke. I blame the Borland compiler, and after struggling with it for a while, gave up and have rewritten the SWIG code in Euphoria. It doesn't handle as large a class of C/C++ code, but it's decent. It was going well, but I got sidetracked into writing a yacc-like front end to a LL1 grammar parser... I hope this clarifies things. -- David Cuny
6. Re: cross platform GUI suggestions for Euphoria
- Posted by cense <cense at mail.ru> Oct 02, 2000
- 393 views
On Sun, 01 Oct 2000, David Cuny wrote: >> According to my favorite GUI toolkit page at >> >> http://www.geocities.com/SiliconValley/Vista/7184/guitool.html >> >> Amulet gets a rank of "good" (which beats most tookits) and says it's a >> "research-oriented toolkit from CMU. native look and feel. High-level >> support for interactive interfaces: Direct Manipulation Behaviors, Undo, >> Animation, etc. original project at CMU completed and No longer supported. >> However, another group has picked up development as OpenAmulet." >> >> OpenAmulet is at: >> >> http://www.openip.org/oa_overview.html >> >> I didn't get a chance to read it in depth, and there aren't any screenshots, >> either.Interfacing with C++ libraries can be problematic, since generally >> you have to derive new classes when you create new controls - something >> that's problematic when it comes to building a non-C++ interface. >> >> -- David Cuny I know about the C++ Object Oriented part being hard to wrap up properly. You are the Guru in this area, not me, so ultimately you know whats better. It was just a simple suggestion that i came about the other day. No harm in just asking i guess. -- evil, corruption and bad taste ^cense
7. Re: cross platform GUI suggestions for Euphoria
- Posted by David Cuny <dcuny at LANSET.COM> Oct 02, 2000
- 391 views
Kenneth Rhodes wrote: > Isn't WxWindows also in C++? Yes. The issue with the C++ toolkits isn't that you can't write interfaces to them - see my prior e-mail for details. The problem is when they rely on extending virtual functions to add functionality (like Java's Swing does). For example, imagine you had a PushButton class in a C++ library. The coder was nice enough to create hooks to events, such as onPush: class PushButton { public: virtual onPush(); } If you want a pushbutton that prints "Hello" when you push it, you just derive a new PushButton class: class HelloPushButton: public PushButton { public: onPush() { puts( "Hello, World!\n" ); } } Wrapping something like this is a royal pain. It's possible, but you basically have derive classes for the interfaces, and put hooks in them: class wrap_PushButton: public PushButton { public: onPush() { /* callback hook goes here */ }; setOnPushHook( ... ) { /* set hook for onPush */ }; } Bleah! In wxWindows, you have a top-level class called wxApp that needs hooks like this. But you can create lower level objects and attach callback code to them *without* having to go in hand manually adding the hook code. This makes it a lot easier to work with than most C++ libraries (like V). Plus, there are a number of languages (like wxPython) that have built interfaces to wxWindows, so I know that it's possible to do so. That doesn't mean that I personally have the skill to do it, however. The more I work on this project, the more it feels like I'm treading water at best. -- David Cuny
8. Re: cross platform GUI suggestions for Euphoria
- Posted by mic _ <stabmaster_ at HOTMAIL.COM> Oct 02, 2000
- 402 views
>When you write a wrapper, you need to use a C++ compiler. You define the >interface something like this: > > extern "C" __declspec(dllexport) blah_do_something( blah self ) { > self->do_something() > } > Indeed. Though I prefer to call dll functions directly from Euphoria and not via these kinds of "slave" functions (wich I why I think that pure C is the dialect of choise when writing DLL:s). Btw, should you really declare blah_do_something() as "C"? As far as I know, Euphoria uses the stdcall convention when calling C functions.. _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.
9. Re: cross platform GUI suggestions for Euphoria
- Posted by Bernie <xotron at PCOM.NET> Oct 02, 2000
- 385 views
On Sun, 1 Oct 2000 21:39:11 -0600, cense <cense at MAIL.RU> wrote: >I was just cruising around the internet the other day looking for a IDE for >linux cense: If you want a IDE for Linux go here: http://www.tu-chemnitz.de/~sho/rho/rhide-beta.html Bernie
10. Re: cross platform GUI suggestions for Euphoria
- Posted by David Cuny <dcuny at LANSET.COM> Oct 02, 2000
- 396 views
mic wrote: > Btw, should you really declare blah_do_something() as "C"? > As far as I know, Euphoria uses the stdcall convention when > calling C functions.. This has nothing to do with calling conventions. The 'extern "C"' declaration prevents the C++ compiler from mangling the name of the routine in the DLL. Similar to Euphoria, C++ will _mangle_ routine names to prevent namespace collisions. This bit of code prevents that from happening. -- David Cuny
11. Re: cross platform GUI suggestions for Euphoria
- Posted by cense <cense at mail.ru> Oct 02, 2000
- 411 views
On Mon, 02 Oct 2000, Bernie wrote: >> On Sun, 1 Oct 2000 21:39:11 -0600, cense <cense at MAIL.RU> wrote: >> >> >I was just cruising around the internet the other day looking for a IDE for >> >linux >> cense: >> If you want a IDE for Linux go here: >> >> http://www.tu-chemnitz.de/~sho/rho/rhide-beta.html >> >> Bernie I know all about RHIDE, but thanks for the suggestion. I tried it once and it did not compile and gave up very easily because i was feeling *really* lazy. I use "moonshine" and "motor". I was just looking for what else is out there. thanks anyway. -- evil, corruption and bad taste ^cense
12. Re: cross platform GUI suggestions for Euphoria
- Posted by Jeffrey Fielding <JJProg at CYBERBURY.NET> Oct 02, 2000
- 405 views
- Last edited Oct 03, 2000
On Mon, 2 Oct 2000, cense wrote: > On Mon, 02 Oct 2000, Bernie wrote: > >> On Sun, 1 Oct 2000 21:39:11 -0600, cense <cense at MAIL.RU> wrote: > >> > >> >I was just cruising around the internet the other day looking for a IDE > >> >for > >> >linux > >> cense: > >> If you want a IDE for Linux go here: > >> > >> http://www.tu-chemnitz.de/~sho/rho/rhide-beta.html > >> > >> Bernie > > I know all about RHIDE, but thanks for the suggestion. I tried it once and it > did not compile and gave up very easily because i was feeling *really* lazy. I > use "moonshine" and "motor". I was just looking for what else is out > there. thanks anyway. > > /me likes emacs - of course, it's not exactly an IDE... but you could probably make it one with a bit of scripting. There's an amusing t-shirt they have at thinkgeek.com: (imagining a world where emacs is bad): "Why are we hiding from the police, daddy?" "Because they use vi, son. We use emacs." Jeff Fielding
13. Re: cross platform GUI suggestions for Euphoria
- Posted by cense <cense at mail.ru> Oct 02, 2000
- 390 views
- Last edited Oct 03, 2000
On Mon, 02 Oct 2000, Jeffrey Fielding wrote: >> On Mon, 2 Oct 2000, cense wrote: >> >> > On Mon, 02 Oct 2000, Bernie wrote: >> > >> On Sun, 1 Oct 2000 21:39:11 -0600, cense <cense at MAIL.RU> wrote: >> > >> >> > >> >I was just cruising around the internet the other day looking for a IDE >> > >> >for >> > >> >linux >> > >> cense: >> > >> If you want a IDE for Linux go here: >> > >> >> > >> http://www.tu-chemnitz.de/~sho/rho/rhide-beta.html >> > >> >> > >> Bernie >> > >> > I know all about RHIDE, but thanks for the suggestion. I tried it once and >> > it >> > did not compile and gave up very easily because i was feeling *really* >> > lazy. I >> > use "moonshine" and "motor". I was just looking for what else is out >> > there. thanks anyway. >> > >> > >> /me likes emacs - of course, it's not exactly an IDE... but you could >> probably make it one with a bit of scripting. There's an amusing t-shirt >> they have at thinkgeek.com: (imagining a world where emacs is bad): >> "Why are we hiding from the police, daddy?" >> "Because they use vi, son. We use emacs." >> >> Jeff Fielding Nice shirt. I myslef dont use vi or emacs im a pico/nano kinda guy, i like their simplicity and ease of use. Of course their tiny size halps them fit on a boot disk very well :) -- evil, corruption and bad taste ^cense