Hi Arjen I sorted the wxWidgets version of this out just before Christmas and updated the rather deficient documentation. If you build the latest docs, you will find a description of PlGraphicsIn on page 175. I also added demonstration functionality of mouse capture to the wxWidgets demo, so if you have a look at that then it will probably help. Look at wxPLplotwindow<WXWINDOW>::OnMouse which is called when a mouse button is released over the window or when the mouse moves over the window, although I didn't process just movement anywhere yet, but I thought it would be useful to put plot coordinates in a status bar at the bottom of the window as you move the mouse over points.
To answer your specifics the state variable should be filled with details of not only the mouse buttons, but also any special keys that are pressed or locks that are on (e.g. shift, ctrl, num lock, caps lock etc). I added a series of masks to ensure these were defined internally rather than relying on comments referring to x11.h, they all begin PL_MASK_. It appears to me that the button field is not really needed as there is a PL_MASK_BUTTON1, PL_MASK_BUTTON2, etc in the state field - these were already being filled in by the x11 driver based on values from X11.h By the way there are up to 5 mouse buttons I think. left, right middle (1, 2, 3) and two extra - I've never had a mouse with them, but I think they are usually by your thumb. I'm not sure if plgetcursor is also supposed to capture key presses. This might interfere with keyboard shortcuts for page advances etc. The docs for plgetcursor says captures "graphics input events" which isn't exactly clear. But I guess that is what the keysym field is for? Phil Phil On 11 January 2016 at 19:41, Arjen Markus <arjen.mar...@deltares.nl> wrote: > Hi everyone, > > > > I am trying to get example x20f to work properly with the new Fortran > bindings and the wingcc driver. The first part is working: I see the various > fields of the structure PLGraphicsIn being filled with plausible values – so > the Fortran bindings are working. However, there are two fields that are not > set in line with the xwin driver: > > - The button field: it seems the left button has value 1 and the > right button should be value 3 – in the window the somewhat confusing > message says to press “button 2”. I guess this is due to mice classically > used on UNIX/X Window systems have/had three buttons. That is a simple > change to the wingcc driver. > > - The state field: this is a bit more troublesome. I have no idea > what it means. Nor what values it can assume. Can anyone enlighten me? > > > > Regards, > > > > Arjen > > > > > > > > DISCLAIMER: This message is intended exclusively for the addressee(s) and > may contain confidential and privileged information. If you are not the > intended recipient please notify the sender immediately and destroy this > message. Unauthorized use, disclosure or copying of this message is strictly > prohibited. The foundation 'Stichting Deltares', which has its seat at > Delft, The Netherlands, Commercial Registration Number 41146461, is not > liable in any way whatsoever for consequences and/or damages resulting from > the improper, incomplete and untimely dispatch, receipt and/or content of > this e-mail. > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Plplot-devel mailing list > Plplot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/plplot-devel > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel