On 31 Oct 2012, at 18:06, Greg Ercolano wrote:

> On 10/30/12 02:25, Klaus Rudolph wrote:
>> But if I now move to the "not accepted region" of the red box, I could
>> not tell fltk that I am out of my accepted region.
> 
>       Probably someone else who's done this before should weigh in;
> 
>       I can only guess as I haven't done it, and it would take a bit
>       of probing around to figure it out.


Speaking only as someone who has *not* done this before (!) I wondered if there 
may be other ways to do this?

As it stands, it sounds like the approach Greg and Klaus are looking at is 
taking our regular rectangular widgets then deriving new widgets that check 
some active (non-rectangular) region that is a subset of the widgets "natural" 
rectangle.

So... the things I was thinking about were:

1) Perhaps if there were several non-rectangular widgets in a group, say in a 
toolbar for example, then perhaps one "super-widget" could be made that covered 
all the active regions, and which acted as a single entity in terms of 
enter/leave events and so forth, but which tracked movement, focus and clicks 
internally for all its irregularly shaped sub-regions.

Might be more effort to set up, but once done it might work better that trying 
to make multiple derived widgets for each of the shaped buttons...?



2) Perhaps, rather than having one "regular" widget for each shaped widget, 
where the regular widget rectangle was bigger than the desired shape, we could 
cluster many small rectangular buttons together, sort of packed inside the 
bounds of the irregular shape button (and based on some subclass that doesn't 
draw the button face, e.g. maybe boxless.)

All of these "mini-buttons" would trigger the same callback, so that clicking 
anywhere inside the irregular shaped region would (likely!) hit one of the 
mini-buttons and trigger the desired effect.

Well, that's probably enough hack workaround suggestions from me!

I'll leave it to the real programmers to come up with a proper solution now.

Cheers,
-- 
Ian



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

Reply via email to