From: Petr M. <mi...@ph...> - 2004-05-07 08:25:41
|
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. Thus: A. Currently, there is no indication in the terminal windows that it is doing "pause mouse". Solution: change cursor to big cross -- ie like a ruler after "r", but the cross follows mouse until "pause mouse" stops. B. Mousing hotkeys (including those "hardcoded" to x11 like "q" and "space") should be disabled during "pause mouse". 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. 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. Question: - Should the command be "pause mouse hotkey" or "pause mouse nohotkeys"? - 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) Then, this API will be general enough to send mousing events without adding new term functions. E.g. term->set_special(TERM_SPECIAL_RULER, ruler_type, x, y) 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 What do you think? Could somebody start to implement this? -- PM |