>> Has anyone ever implemented a magnifying lens mechanism on images
>> with behaviour more or less similar to my intentions? If yes, how
>> was that made?
>
> The problem may be that pressing a mouse button on a window may
> "capture" the mouse and connect it to the window that you clicked
> into, ignoring any newly popped up windows until you release the moue
> button again. However, this depends very much on your window manager,
> something we have very little influence on from the FLTK side of the
> world.
Well, for now I'm using KDE. In the section "Window Behavior" of KDE
control module, I have the following related settings:
- Focus policy: Focus Follows Mouse (other available: Click to Focus,
Focus Under Mouse, Focus Strictly Under Mouse; the two latter do not
make any difference for the magnifying_window_ box still not getting
events, they just disturb normal shift between desktops).
- Auto raise: disabled
- Delay focus: disabled
- Click raise active window: enabled (with no interesting effect if
disabled).
- Inactive Inner Window: mouse buttons 2, 3: "Activate & Pass Click",
left button "Activate, Raise & Pass Click" (also available: "Activate"
and "Activate & Raise")
- Focus stealing prevention level: Low (other available "None",
"Normal", "High", "Extreme" -- none of these has the intended effect)
> My suggested solution would be to customize the drawing function of
> the widget containing the image, and then - depending on some flag
> you would set in the handle() function - draw the magnifying class on
> top of the image, avoiding another window altogether. You can even go
> and create an image with a magnifying glass, antialiase edges and a
> drop shadow to give the impression of depth... . Plus, if the
> magnifier must overlap other parts of the window, you can draw it in
> the top-levels draw() function, but you must make sure to set damage
> flags correctly when the mouse moves. The only drawback is, that you
> magnifying glass can not leave the top-level window.
Please correct me if I got you wrong: your idea would be to insert
the magnifying MLBox as "floating" widget into the MyBox containing
window? The MyBox draw() should then contain a reference to drawing
an overlapping MLBox on top of the image?! or just building a moving
square containing the magnified part with no special MLBox class
mention would answer rather well?!
Regards,
Z.B.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk