On Wed, Jan 28, 2015 at 10:59:04AM -0800, Alan Irwin wrote:
> On 2015-01-28 13:39-0000 Phil Rosenberg wrote:
> 
> > Hi All
> > I am trying to add the plGetCursor functionality into the wxWidgets
> > driver. It will need to be implemented rather differently to before
> > because of the separation between the gui process and the calling
> > process. However, looking at the old implementation, the documentation
> > and the examples last night I am not really clear on what the aim or
> > the behaviour of this function should be.
> >
> > Is the intention that when you call this function it returns the last
> > user input that occurred with the gui, or is the intention that
> > calling this function blocks until the user interacts with the plot
> > and then returns the nature of this input?
> 
> The latter.
> 
> >
> > Presumably the input it is looking for is key presses and the location
> > of mouse button presses, not just mouse cursor movements without a
> > mouse press?
> 
> As Arjen said the xwin driver should be the model here.
> 
> Operationally, the way this works for that driver is a cursor is
> displayed on the screen which the user can move around with the mouse
> using drag & drop.  Once the user is satisfied with that cursor
> position, then he strikes some key or some mouse button, and 
> the position of the cursor and the identity of the key
> or mouse button that was struck is returned.
> 
> Such fundamental interactive capability can be used as a basis of
> quite sophisticated interactive applications that use the identity of
> the key struck as a one-letter menu for a whole host of different
> interactive operations that depend on the cursor position when the key
> was struck.  As far as I know, nobody is currently using PLplot this
> way (perhaps because we don't strongly advertise this cursor
> capability).  However, I do remember using one such application in the
> 80's that was based on some plotting package (obviously not PLplot)
> that was available then, and that application was quite powerful
> because it used both key and mouse button identities for control
> rather than just limiting itself to the latter.

It always struck me that this was a somewhat quirky aspect of our API. It
is useful for the xwin driver, but if you are using Qt or Wxwidgets, 
this is probably not the way you would handle cursor / mouse events 
since it doesn't fit with the underlying toolkit model. That being said,
it is relatively simple, will work with multiple devices, and gives you
a cursor position in useful plplot coordinates, so it is probably
worth implementing properly.

Andrew

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to