octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PickableParts or HitTest graphic properties


From: Daniel J Sebald
Subject: Re: PickableParts or HitTest graphic properties
Date: Wed, 20 Dec 2017 23:47:49 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 12/20/2017 05:49 PM, Rik wrote:
Does anyone recall whether the PickableParts or HitTest graphic properties
are implemented in Octave?

I've been working quite a bit on improving the legend functionality which
is built atop an axes object.  Unfortunately, it is possible to click on a
legend and then zoom into it which throws everything out of whack.  I would
like to disable mouse interactions with this object entirely.

It appears that the graphics toolkit makes a difference. We'd expect gnuplot g.t. to be slightly different, but I assume you are talking about OpenGL based toolkits.

It appears that FLTK is the toolkit for which mouse rotation in the legend causes a zoom/unzoom. I notice that one can mouse-click on the legend and drag it around (a feature I'm sure many are happy with), but that doesn't work for a garden-variety axes. So, is there something extra in C++ programming for legend? Is it a derived class? If so, the legend class may be overriding the mouse behavior of the axes class in some way already and more alterations could be made.

But there may be an easy fix for the issue you mention (hold on, it will get complicated). The axes (and legend) has a property called 'mousewheelzoom'. Try the following:

octave:19> graphics_toolkit fltk
octave:20> plot(1:50)
octave:21> hl = legend("A line");
octave:22> set(hl, 'mousewheelzoom', 0);

and zooming does not happen. I'd say for a legend set its mousewheelzoom to 0 by default and the user will never know the difference and probably few would ever think to alter the value.

However, here's the complicated part. Recall a few weeks back a discussion about the different behavior of mouse button/wheel drag/zoom for Qt and FLTK? Mousewheel zooming is the undesirable behavior in FLTK legends, but in Qt g.t. legends it is dragging (and zooming). Generate the same plot above but with the Qt g.t. Now press one of the Z+, Z- or drag (i.e., NSEW arrows) buttons and click/drag in the legend. Those are just as bad as mousewheel zoom.

It begs the question, does a "mousewheelzoom" setting imply that mouse wheel should be the zooming mode for plots? FLTK g.t. zooms with wheel, Qt g.t. zooms by clicking at the to-be-centroid point, gnuplot g.t. zooms by selecting the two opposing corners of a box to enlarge (which is sort of my preference; finer control).

Dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]