Is there any way to get the current cursor? In my case, I want to change the focus inside handle(), which might change the cursor and since the widgets do the "remember the old cursor" hack to avoid calling cursor() too many times as per the documentation's recommendation, they won't notice that the cursor has changed and won't reset it to its proper state (as an aside, why isn't the remember the old cursor hack inside Fl_Window::cursor()?). So I want to save the old cursor, do the focus, and restore it... except I can't figure out how to get the current cursor. Spelunking in the source reveals a temping looking 'Fl_X *x... x->cursor = ...' but 'cursor' doesn't appear to be declared in the Fl_X class, so perhaps some kind of magic is going on in there. FL_X is undocumented anyway, so maybe I'm not supposed to go there.
And what's with this undocumented fl_cursor? The comments say they want to pretend the cursor is a draw function not an attribute of the window, but the only documented interface is window->cursor(...). Allow me to vent a little: BTW, is it just me, or is the fltk src really hard to read? I'm talking about mixed tabs and spaces that screw up indentation, lots of single letter variable names with wide scope: void Fl_Window::cursor(Fl_Cursor c, Fl_Color c1, Fl_Color c2) and my favorite so far, Fl_Window::i, which of course is always referred to with implicit 'this' so it just looks like a bare undeclared 'i'. And of course the similarly awesomely named FL_X (declared in Fl_x.cxx and x.H, naturally, and called 'x' in the source... not to be confused with the 'x()' method!) has an 'i' but it's a method this time. Trying to understand Fl_Tile::handle was the hardest I've ever worked trying to read *anything* including handwritten balinese astrological charts, and eventually I gave up on adapting it and rewrote my own version using small functions, Point and Rect data types, and the like. No offense intended to the author of course. Is there any interest in general code quality cleanup? Would patches be accepted? I'm talking about starting with simple things like eliminating mixed tabs and spaces, and variable renames that have no effect on client code. Like most people, I can't promise time to devote to larger scale cleanups, but if I got the impression that little things would be accepted I'd be more encouraged about fixing things as I came across them. And getting used to making small cleanups is what eventually leads to the large scale stuff. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

