[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44676] ginput() does not return mouse button
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value with Qt |
Date: |
Tue, 31 Mar 2015 17:49:08 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0 |
Update of bug #44676 (project octave):
Summary: ginput() does not return mouse button value =>
ginput() does not return mouse button value with Qt
_______________________________________________________
Follow-up Comment #7:
I think we have a small Matlab incompatibility here. Matlab's
WindowButtonDownFcn is just a callback without arguments. In Octave, the file
ginput.m expects that the first argument to the callback is the button
number.
function ginput_windowbuttondownfcn (src, button)
point = get (gca (), "currentpoint");
ginput_accumulator (1, point(1,1), point(1,2), button);
endfunction
And in __init_fltk__.cc
if (fp.get_windowbuttondownfcn ().is_defined ())
fp.execute_windowbuttondownfcn (Fl::event_button ());
so it works for FLTK.
In Canvas.cc, however,
gh_manager::post_callback (figObj.get_handle (),
"windowbuttondownfcn");
gh_manager::post_callback (currentObj.get_handle (),
"buttondownfcn", button_number (event));
so it doesn't work for Qt.
Easiest solution would be to add "button_number (event)" to the
windowbuttondownfcn callback.
Alternatively, we can do what Matlab user's would do and check the
"SelectionType" property of current figure to determine if it was "normal",
"extended", or "alt".
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44676>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value, Philip Nienhuis, 2015/03/31
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value, John Donoghue, 2015/03/31
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value, Michael Godfrey, 2015/03/31
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value, Rik, 2015/03/31
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value, John Donoghue, 2015/03/31
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value with Qt, Rik, 2015/03/31
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value, John W. Eaton, 2015/03/31
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value with Qt,
Rik <=
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value with Qt, Rik, 2015/03/31
- [Octave-bug-tracker] [bug #44676] ginput() does not return mouse button value with Qt, Philip Nienhuis, 2015/03/31