On 02.01.2013 14:12, Denton Thomas wrote:
>> On 02.01.2013 13:14, Albrecht Schlosser wrote:
> ..
>>>
>
>>> Fl_Widget *fw = Fl::focus(); // save focus widget
>>> int ret = Fl_Scroll::handle(event);
>>> if (ret && fw != Fl::focus) { // event used and focus changed
> ..
>> Albrecht
>>
>
> Thanks for all this, Albrecht. I started mucking with an Fl_Scroll subclass &
> custom handle(), and decided to track the focus widget in the same way as
> you. I hadn't though to cut the test down to that one if statement - big help.
You're welcome, I'm glad if I could help.
Here's something I forgot: you should also check if the
focus widget after Fl_Scoll::handle() is
(a) a child of your scroll widget, and
(b) NOT one of the scrollbars.
There are public members scrollbar and hscrollbar in Fl_Scroll.
Do NOT assume that the scrollbars are the last members of Fl_Scroll,
since this can change...
> Now working on determining dx/dy. I'll post my subclass when I'm all done.
Looking forward to your post...
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk