RE: wxEuphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

> From: jbrown1050 at hotpop.com [mailto:jbrown1050 at hotpop.com]

> You are right. I taken another look (or to be more accurate, 
> many many many
> many many many many many many more looks ... i really need to 
> brush up on my
> asm) at the code produced by g++ (the asm code, as the preprocess
> option just creates code w/o the #include's and #define's and such).
> 
> The asm code for the C class, uses cdecl all the way, and the 
> first parameter,
> would appear to be the 'this' pointer. (I see the first 
> parameter as "-8(%ebp)"
> however ... not sure what that is, its AT&T syntax of course....)

I forgot to mention that you'll want to turn threading off.  Look in
setup.h.  I got errors when I compiled with threads.
Change:
#define wxUSE_THREADS 1
to
#define wxUSE_THREADS 0
(or just comment out, I can't remember exactly how I did it)

Here's how I'm planning to separate Windows and Linux code.  First, I plan
to group related classes together in their own include files, and to make
them modular.  For instance, wxFrame and wxWindow will be in wxWindow.e.
But there will be two additional include files for each .e file: a .ew and
.eu.  The user will actually include the .ew/.ew files, so only the platform
independant code can be put into the .e files.  All the import data is
stored in the .ew file, so we won't have to worry about a 1meg include file
for Hello World.  I've also put a _Platform constant in each .ew file so
that it's possible to automatically identify when someone accidentally mixes
windows and linux include files.

I've only done this conversion for wxWindow and wxFrame so far, but here's
what the beginning of wxFractal.exw now looks like:

-- wxFractal.exw
-- Matt Lewis

without warning
include wxEuphoria.ew
include wxWindow.ew
include wxMenu.e
include wxGraphics.e

object void

constant
frame = create( wxFrame, {0, -1, "Fractal Mountains for wxWindows", -1, -1,
640, 480} ),
canvas = create( wxWindow, {frame}),

menu = new_wxMenu( ),
menu_bar = new_wxMenuBar(),

-- end sample

It's a lot clearer, and the program flow is just like that of a win32lib
app.

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu