From: Joao C. <jc...@fe...> - 2002-03-03 19:11:53
|
On Sunday 03 March 2002 17:01, Alan W. Irwin wrote: | 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).=20 | > > 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. There is a difference -- when the xhairs appear as a result of a call=20 to plGetCursor() (using -locate in x01c), the user program will=20 receive the button events, while when the xhairs appear as a result=20 of typing 'L', the event are just printed, and the user program has=20 no knowledge of that. And I think that the visual clue, disappearing of the xhairs, is=20 enought (the xwin driver is not fully interactive -- it hasn't a=20 message area, e.g.): the user program knows that plGetCursor() has=20 failed and the xhairs have disapeared, and if necessary it will=20 invoke the call again, while if invoked via the 'L' key, the user=20 sees the xhair disappearing, and will reinvoke the xhairs again. Joao | > > 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.=20 | > > Are there any other "locate" commands besides L and <ESC>? Do | > > all interactive drivers have this capability? Yes, the tk driver share those "driver invoked" capabilities, but has=20 other capabilities as well, use the button Help->on keys | > > 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.=20 | > > Probably the best place would be | > > http://plplot.sourceforge.net/resources/docbook-manual/plplotd | > >oc-html-0.4.3/interactive-devices.html. I have several empty drivers/README.<driver> in my local plplot cvs=20 copy, but I had not yet the time to write them. I intend to give an=20 overview of the common cmd line options for all drivers, the driver=20 specific cmd line options, driver capabilities and special uses,=20 required libs, etc. Those can then be incorporated in a drivers=20 manual chapter. | > | > 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 =3D TRUE; | > break; | > | > case 'Q': | > /* Terminate on a 'Q' (not 'q', since it's too easy to hit by | > mistake) */ pls->nopause =3D TRUE; | > plexit(""); | > break; | > | > case 'L': | > /* Begin locate mode */ | > dev->locate_mode =3D 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. The above code is for the keys, other code deal with mouse events. | 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. Yes, while in locate mode you can also use the cursor keys (with=20 SHIT, CTRL, ALT, etc modifiers) to move the cursor. Joao | | Alan |