octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #52795] "pickableparts" unimplemented


From: Rik
Subject: [Octave-bug-tracker] [bug #52795] "pickableparts" unimplemented
Date: Thu, 4 Jan 2018 18:57:28 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Update of bug #52795 (project octave):

                  Status:         Patch Submitted => In Progress            

    _______________________________________________________

Follow-up Comment #2:

@Pantxo: I pushed your patch here ().  I re-worded the documentation in
genpropdoc.m slightly to try and make clearer the distinction between
"pickableparts" and "hittest", although it's already not very clear with
Matlab.

I had a few questions.  First, for absolute Matlab compatibility, not all
objects accept the "all" value.  That is why I had the base property contain
the only two universal values "visible" and "none" and I overrode the property
on the individual objects which do support "all".  If it makes for an easier
implementation then we can just keep things the way they are with the base
property having all three values.

Second, I did some testing with the following script tst_pick.m


close all
hax = gca;
hl = plot ([0 1], [1 0], 'r', 'linewidth', 10);
hp = patch;

function cb (h, ~, msg)
  fprintf (2, 'Callback %s executed\n', msg);
  fflush (2);
endfunction

set (hax, 'buttondownfcn', address@hidden, 'Axes'});
set (hl, 'buttondownfcn', address@hidden, 'Line'});
set (hp, 'buttondownfcn', address@hidden, 'Patch'});


One thing I noticed is that even though the Patch object is on top of the Line
object, it is always the Line object callback that is triggered.  Of course,
this happened before PickableParts was implemented so it is unrelated to your
change; it's still wrong though.

It might be useful to get confirmation from someone with access to Matlab, but
I think "PickableParts" only acts on a per object level and doesn't
necessarily affect children.  For example, when PickableParts is set to "none"
on the axes object, I still think you should be able to interact with graphic
objects within the axes.

Finally, I'm not sure our implementation of HitTest is correct.  When HitTest
is "off", is the mouse click passed to the ancestor of the object which
received the click (this is what the Matlab documentation says, but I'm not
sure exactly what it means), or does the object which is behind the object
which received the click get it instead?  The latter is what is implemented,
but I don't think that is right.

A simple test, after using tst_pick.m above, is


hg = hggroup;
set (hg, 'buttondownfcn', address@hidden, 'HgGroup'});
set (hp, 'parent', hg);
set (hp, 'HitTest', 'off');
%% Now click on patch area.  Is HgGroup or Axes callback executed?




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52795>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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