It is amazing what can be accomplished stepping out on some fresh air.
Stan, here it is:
class MyWin : public Fl_Window {
public:
MyWin(int W, int H) : Fl_Window(W, H) { }
int handle(int event) {
switch(event) {
case FL_PUSH:
puts("FL_PUSH");
return 1;
case FL_RELEASE:
puts("FL_RELEASE");
return 1;
case FL_KEYDOWN:
hide();
default:
break;
}
return 0;
}
};
int main() {
MyWin win(200, 200);
win.show();
Fl::flush();
Fl::grab(&win);
return Fl::run();
}
Make sure Fl::flush() is called before Fl::grab()... and watch out to
not hang X11 events :-)
> I assume that
> the OP reads all EMails in the thread anyways, so I skip writing
> headers like "This is meant to go to the OP only" and "This is a
> reply to the above quote only". Just like in this mail, I try to
> explain what's going on inside FLTK. Nothing more and nothing less.
:-P
Stan, Matt, sorry for too quick responses and some unneeded random
thoughs. Looks like it is time for some good vacation :-).
--
Sanel
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk