[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Random thoughts on the future interface of PCB



Bob Paddock wrote:
If you switch to gEDA, will you want a native windows build?  Help with that
from anyone who is up on windows is on the wanted list.

I've been poking at 'the perfect windows version' for some time, will
give up on that for now.
I think I just make basic canvas and figure how to to get the basic
HID stuff going.

Is there any step by step guide to get a new HID up and running
(besides trolling the list here for the last few years with grep)?
One thing I don't recall be doing before is that I want to use
wxWindows, so it would have its
own main() loop.  Whats the best way to deal with that?
Did you try to build/test all the demos that come with wxWindows - did you try to build another app, that uses it? - please report. My personal impression when I
went for a widget tool kit was, that it's very complicated and broken.

My best advice is, to avoid wxWindows altogether and use FLTK instead.
It may be C++ but the "nasty" stuff is left out - it's more "better C", so
I find it very easy and convenient.

With FLTK this problem looks like

main()
{
 // define all GUI stuff here

 exitCode = Fl::run();

 // release and clean stuff

 return exitCode;
}

If you want to replace Fl::run() with an augmented event loop:

copy this from Fl.cxx
...
#define FOREVER 1e20

/**
 As long as any windows are displayed this calls Fl::wait()
 repeatedly.  When all the windows are closed it returns zero
 (supposedly it would return non-zero on any errors, but FLTK calls
 exit directly for these).  A normal program will end main()
 with return Fl::run();.
*/
int Fl::run() {
 while (Fl_X::first) wait(FOREVER);
 return 0;
}
...

and modify to your liking. It's not necessary btw. to do that for new threads,
idle processing or adding your own check-callbacks.


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user