I wrote 11 days ago:
>>> I am facing the following situation: in my application I have an
>>> image displayed in a (MyBox class) box. Under certain (MyBox
>>> handle()...) conditions, dragging the mouse over the image with a
>>> button pressed must popup a square window containing a
>>> magnification of a (smaller) square area of the original image,
>>> centered on current cursor position.
The intended behaviour is that the magnifying window follows the
dragged mouse and displays the current magnified area centered on
cursor position.
>>> I enabled a handle in the magnifiying window (in the MLBox class
>>> magnifying_box_ widget lying inside) and I disabled the dragging
>>> in the main window in order to avoid any event handling confusion
>>> (in other words: once brought into existence, the magnifying_box_
>>> in the magnifiying window should handle all mouse events until
>>> receiving a FL_RELEASE which should trigger the hide()).
>>> Unfortunately, the magnifying_box_ doesn't get any mouse events
>>> once its window is shown under the cursor: it's still the
>>> background main window who gets them. Am I missing something?!
>>> Should I explicitly call some other method?
>>
>> I haven't been following this - but maybe you need to make your popup
>> window modal, so that it gets all the events in preference to your
>> main window? Would that work?
>
> Well, the popup magnifying window _is_ modal. I tried also
> re-assigning it so with magnifying_window_->set_modal() before
> ->show(), but it still doesn't get events in the magnifying_box_.
> Neither it works if making it non-modal.
> Some other hint?!
---------------------------------
OK, it seems no one has an answer. :-(
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?
For information: I'm using fltk 1.1.7 built on Mandriva 2007 (Linux).
Thank you for your answers,
Z.B.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk