From: Alan W. I. <ir...@be...> - 2002-03-03 17:02:14
|
On Sun, 3 Mar 2002, Maurice LeBrun wrote: > Alan W. Irwin writes: > > Thanks for answering my questions/comments. > > > > I suggest you could improve the design by printing a warning message when > > outside a viewport but continue to stay in locate mode for that situation so > > that subsequent clicks inside viewports still work (without having to > > reinvoke L). Otherwise, for an example like x01c with lots of area outside > > viewports, the first impression is that locate mode is severely broken. > > (At least that was my impression....;-)) Of course to finish locate mode you > > don't have to click on an area with no viewport. Instead, simply type <ESC> > > as now. > > I only just now got around to looking into this. As it stands, "it's a > feature, not a bug". > > When I was putting this in, Geoff and I discussed the issue and decided the > best course on invalid input -- i.e. clicking outside a viewport/window -- was > to simply turn off locate mode. The program's stdout (or stderr) isn't always > handy so it's handy to have a graphical cue that you're giving bogus input, > and aborting locate mode at that point seems reasonable. I'm still happy with > this decision, but I'll admit documentation is a problem (has been, for a > while, but better recently :). I am now only mildly unhappy with this since I can always use L to get into locate mode again. However, it might be worth changing it to put in some warning message (e.g., "Locate mode is terminated because you are outside a viewport. To restart use L") so that if, e.g., plwarn works, then the user will get this message. > > > By the way, before you (and recently somebody else also) mentioned the L > > command and now <ESC> I had never heard of them and had no idea you could > > use locate mode for any of the examples other than x01c. > > > > Part of the reason it is taking me so long to get up to speed on this > > interactive stuff is I cannot find any documentation. Are there any other > > "locate" commands besides L and <ESC>? Do all interactive drivers have this > > capability? Is there some documentation that I have missed? If you point me > > to some documentation or provide me with some, I will put it in the docbook > > documentation form so everybody can easily find it. Probably the best place > > would be > > http://plplot.sourceforge.net/resources/docbook-manual/plplotdoc-html-0.4.3/interactive-devices.html. > > The internally recognized keys in normal (plotting) mode in the xwin driver > are featured in xwin.c:ProcessKey(). These are: > > /* Handle internal events */ > > switch (gin->keysym) { > > case PLK_Return: > case PLK_Linefeed: > case PLK_Next: > /* Advance to next page (i.e. terminate event loop) on a <eol> */ > /* Check for both <CR> and <LF> for portability, also a <Page Down> */ > dev->exit_eventloop = TRUE; > break; > > case 'Q': > /* Terminate on a 'Q' (not 'q', since it's too easy to hit by mistake) */ > pls->nopause = TRUE; > plexit(""); > break; > > case 'L': > /* Begin locate mode */ > dev->locate_mode = LOCATE_INVOKED_VIA_DRIVER; > CreateXhairs(pls); > break; > } Thanks for this. I have noticed experimentally, that right-clicking the mouse when outside locate mode advances to the next page like CR, but I don't see that right-click implemented above. Also, from the above I don't see how <ESC> is used to leave locate mode. So the above code must only be part of the interactive story. Alan |