|
From: Daniel J S. <dan...@ie...> - 2003-12-08 18:05:10
|
Petr Mikulik wrote: >>And so far I have not been clever enough to figure out how to make this >>work *at all* under X11 unless X11 is in fact the current terminal type. >> >> > >x11.trm would send "^" character to the pipe. Then 0 (all windows), or 1 >(one window) + number. Then gplt_x11.c would browse through the list of all >windows and either raise all of them, or just that one explicitly specified. > >Is this possible to implement? > Implementing such a thing would be fairly easy. But, I think the point here was that in order to do this, the x11 terminal would have to be the current terminal. That is set term x11 plot sin(x) set term postscript raise 1 might not work because after doing the "set term postscript" the terminal pointer in not pointing to x11 anymore. It sounds to me that the strategy here is to now break the terminals into two classes, the normal group of terminals and a visual GUI set of terminals, i.e., the terminal in which one is viewing interactively. The "raise" would only apply to the interactive terminal. That means that the source code should have an addition terminal pointer, say interactive_term, that the raise command operates on. (I'm also arguing that if you are going to go through this trouble, the function should be more than just raise... also minimize, maximize, close, hide, etc.) Would it be possible to configure Gnuplot's compilation so that it can figure out which terminal should be the "interactive" one? How about this idea? Say the GUI-based terminals (x11, Windows, pm, etc.) have an option called "interactive", e.g., set term x11 interactive This will set the hypothesized interactive_term variable. (If the compilation is only for x11, perhaps interactive_term should have a default of the x11 terminal.) Then "raise" will send the required terminal command to that, so that if one types "set term postscript", any raise commands still go to the x11 terminal. If interactive_term is zero, then the command gets sent to the current terminal, which in some cases will be an empty function. Dan |