<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 11.02.2016 20:14, Samuel Gougeon
wrote:<br>
</div>
<blockquote cite="mid:56BCDD9E.30301@free.fr" type="cite">Le
11/02/2016 12:01, Jan-Åge Langeland a écrit :
<br>
<blockquote type="cite">.../...
<br>
I would really like to get the cursor position in the callback,
like I do with xclick(), so clicking on different part of the
image can work like a menu (Samuel?):
<br>
</blockquote>
<br>
Why not putting xclick() in the callback ? :) Have a try.
<br>
<br>
</blockquote>
I did try: <br>
<pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(0,0,0);">h</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">callback</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">disp(xclick())</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">;</span> <span style="color:rgb(100,174,100);font-style:italic;">//disp can obviously be replaced with a suitable selection function.</span></pre>
I can get it to work in a two click mode: First click the button,
then click an image next to the button. <br>
<br>
The problem with making one big button with the picture on top, is
that xclick() will not give the correct cursor position when on top
of a button. Just static values [-2. -1. -1.].<br>
<br>
"<span class="term">cbmenu -</span> String: callback associated to a
menu if <code class="literal">xclick</code> returns due to a click
on a menu. In this case, <code class="literal">ibutton</code>, <code
class="literal">xcoord</code>, <code class="literal">ycoord</code>,
and <code class="literal">iwin</code> take arbitrary values".<br>
<br>
Jan Å<br>
<br>
<br>
</body>
</html>