MacArthur, Ian (SELEX GALILEO, UK) wrote:
> Still not clear on what the OP actually wants, but here's my hack at
> it...
> 
> This is actually pretty nasty code, so needs a lot of tidying.
> Seems to work OK though... For what it is.

Yep, nice demo !

Here's a minimal enhancement though: in ...

> int drag_btn::handle(int event) {

...

>   case FL_RELEASE:
>     ret = 1;
>     break;

add these two simple cases to give dragging feedback:

   case FL_ENTER:
     window()->cursor(FL_CURSOR_NWSE);
     return 1;

   case FL_LEAVE:
     window()->cursor(FL_CURSOR_ARROW); // or FL_CURSOR_DEFAULT or ?
     return 1;

>   default:
>     break;
>   }
> 
>   return ret;
> } // handle

Really, really good, Ian! This looks much like what I understood from the OP's 
description.

But don't drag one of the buttons out of the window and release the button. 
That's one of the cases that need tidying, isn't it? ;-)

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to