From: Ethan M. <merritt@u.washington.edu> - 2004-05-07 22:18:34
|
On Friday 07 May 2004 01:25 am, Petr Mikulik wrote: > As I use the new ginput.m for accessing gnuplot mousing events from > Octave, I can see some current "inconvencies". In principle, we would be > of advantage to get ginput(n) functionality of Matlab. I've never used Matlab. Perhaps you could cut-and-paste a man page description of ginput(n) so that I know what you have in mind? > B. Mousing hotkeys (including those "hardcoded" to x11 like "q" and > "space") should be disabled during "pause mouse". Why would you want to do that? I should think it would be useful to be able to zoom, unzoom, and rotate during mouse mode. Same for the space key. > Solution and functionality: If a hotkey is pressed during "pause mouse", > then it stops pausing, and set MOUSE_BUTTON=0 and MOUSE_HOTKEY=keycode > for the key pressed. I am still not understanding why an application would want to do this. If you want character input rather than mouse coordinates, then why are you issuing a 'pause mouse' command in the first place? Also, if you make 'pause mouse' terminate on key press then you will become sensitive to the mouse focus settings of your window manager. > Usage - example: Pressing "q" in gnuplot's terminal window will pass the > "q" to the caller by MOUSE_HOTKEY, and it may quit mouse tracking and > evaluation functionality. You want a way to back out of a 'pause mouse' command without actually sending mouse coordinates, is that right? This makes sense to me. Normally you could do this by hitting ctrl-C in the terminal window, but in a scripted environment that may be inconvenient. As a matter of ergonomics I wouldn't choose 'q' for this, however. If people get used to typing 'q' in the plot window they are going to regret it eventually. Would it be sufficient to activate a SIGINT handling routine for the plot window during pause mouse, so that you can type ctrl-C in it? > - x11_set_cursor(), pm_set_cursor() etc. should be changed from > > term_set_cursor(int type, int x, int y) > to > term_set_special(int what, int option, int x, int y) Those are functionally equivalent, aren't they? Your first pair of examples below use an extra parameter, but it doesn't gain anything other the second pair. > term->set_special(TERM_SPECIAL_HOTKEYS, 1, 0, 0) // enable hotkeys > term->set_special(TERM_SPECIAL_HOTKEYS, 0, 0, 0) // disable > term->set_special(TERM_SPECIAL_RAISE, 0, 0, 0) // used by "raise" and > term->set_special(TERM_SPECIAL_LOWER, 0, 0, 0) // "lower" commands > Could somebody start to implement this? It does not sound difficult, but I am far from understanding the the design goal or intended application. Are you really asking for a way to type character input into the plot window? -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |