Menu

#402 function plugins for communication with GP

None
closed-accepted
nobody
None
5
2018-10-14
2014-08-14
No Za
No

Hi,

first of all many thanks for implementing function plugins for data handling.

It would be helpfull if this concept would be extended to get information from gnuplot like the Mouse coordinates and Mouse clicks and pressed keys.

e.g.

import for mouse coordinates from "sharedobj[:symbol]"
import for bind {allwindows} [<key-sequence>] from "sharedobj[:symbol]"

best regards
Norbert

Related

Feature Requests: #402

Discussion

  • Ethan Merritt

    Ethan Merritt - 2014-08-14

    Your request is not clear. In what way would that be different from importing a function using the current command and then binding it to a hotkey using the "bind" command?

     
    • No Za

      No Za - 2014-08-14

      Ok, I did not know that the importet functions can be used for this purpose.

      Regarding the mouse:
      Why is bind restrictet to Button1 and why is the Shift modifyer not useable ?

       
  • Ethan Merritt

    Ethan Merritt - 2014-08-14

    Why only Button1? I suppose because binding the other mouse buttons would break labeling and zooming.

    Shift:

    bind "Button1"  "print (MOUSE_SHIFT) ? 'hit with shift' : 'hit without shift'"
    

    But yes, it would be possible to extend the "bind" syntax to allow "Shift-Button1" as an argument. "Alt-Button1" and "Ctrl-Button1" already work.

     
  • No Za

    No Za - 2014-08-14

    Labeling is one of the reasons for my request.

    It would be nice if some time "Shift-Alt-Button2" etc would work.

    Thanks a lot
    Norbert

     
  • Ethan Merritt

    Ethan Merritt - 2018-10-14

    Now in 5.3
    Better late than never?

     
    • No Za

      No Za - 2018-10-14

      Hi,

      Am Sun, 14 Oct 2018 05:50:00 -0000
      schrieb "Ethan Merritt" sfeam@users.sourceforge.net:

      Now in 5.3
      Better late than never?

      I tried to figure out how this work, but there is no documentation nor
      an example available. It would be nice to have a skeleton for such
      funtions. Or better I did not find any.

      Please provide both, because without it it takes probably much more
      time to find out the requirements than to write usefull functions.

      Thanks a lot.

      Norbert


      [feature-requests:#402] function plugins for communication with
      GP

      Status: open
      Group:
      Created: Thu Aug 14, 2014 07:21 AM UTC by No Za
      Last Updated: Thu Aug 14, 2014 11:00 PM UTC
      Owner: nobody

      Hi,

      first of all many thanks for implementing function plugins for data
      handling.

      It would be helpfull if this concept would be extended to get
      information from gnuplot like the Mouse coordinates and Mouse clicks
      and pressed keys.

      e.g.

      import for mouse coordinates from "sharedobj[:symbol]"
      import for bind {allwindows} [<key-sequence>]</key-sequence> from
      "sharedobj[:symbol]"

      best regards
      Norbert


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnuplot/feature-requests/402/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #402

    • No Za

      No Za - 2018-10-14

      Am Sun, 14 Oct 2018 05:50:00 -0000
      schrieb "Ethan Merritt" sfeam@users.sourceforge.net:

      Now in 5.3
      Better late than never?
      Auf jeden Fall! :)

      In any Case :)

      Thanks!

      Best regards
      Norbert


      [feature-requests:#402] function plugins for communication with
      GP

      Status: open
      Group:
      Created: Thu Aug 14, 2014 07:21 AM UTC by No Za
      Last Updated: Thu Aug 14, 2014 11:00 PM UTC
      Owner: nobody

      Hi,

      first of all many thanks for implementing function plugins for data
      handling.

      It would be helpfull if this concept would be extended to get
      information from gnuplot like the Mouse coordinates and Mouse clicks
      and pressed keys.

      e.g.

      import for mouse coordinates from "sharedobj[:symbol]"
      import for bind {allwindows} [<key-sequence>]</key-sequence> from
      "sharedobj[:symbol]"

      best regards
      Norbert


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnuplot/feature-requests/402/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #402

      • Ethan Merritt

        Ethan Merritt - 2018-10-14

        Sorry if I was not clear. What's now in 5.3 is the ability to bind mouse keys 2 or 3, including modifiers alt- ctrl- shift-.

        I may not understand what you are asking for beyond that. Gnuplot has for a long time made the mouse coordinates and key captures available in the user variables MOUSE_foo. For example after typing <alt-f> in response to "pause mouse key"

        gnuplot> pause mouse key
        gnuplot> show var MOUSE
                Variables beginning with MOUSE:
                MOUSE_X = -4.24358274167122
                MOUSE_Y = 2.61868300153139
                MOUSE_X2 = -4.24358274167122
                MOUSE_Y2 = 2.61868300153139
                MOUSE_SHIFT = 0
                MOUSE_ALT = 4
                MOUSE_CTRL = 0
                MOUSE_KEY = 102
                MOUSE_CHAR = "f"
                MOUSE_KEY_WINDOW = 0
        

        You are free to pass any or all of these values to an external library routine. You could even bind such a library call to the key press. Does that help?

         

        Last edit: Ethan Merritt 2018-10-14
  • Ethan Merritt

    Ethan Merritt - 2018-10-14
    • status: open --> closed-accepted
    • Group: -->
     

Log in to post a comment.