|
From: Daniel J S. <dan...@ie...> - 2007-06-06 22:01:28
|
I'm putting together a quick little patch of the ' ' and 'q' bindings for X11
that we talked of the other day. (Remember, the idea is to disable the inherent
gnuplot_x11 key event handling when the mouse is present.) I then got to
thinking about another related item we just talked about, i.e., plots taking
focus away from the console. The variation of this is that when one does "plot
foo", the x11 window comes to the top, unless the user supplies the -noraise
option; but perhaps the user generally likes the autoraise behavior. In that
case, would it make sense to have a command that raises the console?
There is the "raise {#}" for raising a GUI plot window. Perhaps "raise console"
would be of use. However, that's too lengthy, one would like a very brief
command for this sort of thing.
Anyway, rather than do this:
if (lower) {
#ifdef OS2
pm_lower_terminal_window();
#endif
#ifdef X11
x11_lower_terminal_group();
#endif
#ifdef _Windows
win_lower_terminal_window();
#endif
#ifdef WXWIDGETS
wxt_lower_terminal_group();
#endif
} else {
#ifdef OS2
pm_raise_terminal_window();
#endif
#ifdef X11
x11_raise_terminal_group();
#endif
#ifdef _Windows
win_raise_terminal_window();
#endif
#ifdef WXWIDGETS
wxt_raise_terminal_group();
#endif
}
shouldn't we simply have a term api, even though non-GUI terms will have this
empty, i.e.,
if (lower)
term->order_plot(plot_num,0);
else
term->order_plot(plot_num,inf);
Make the term api general in the sense that plot_num is the identifier of the
plot and the second number is where in the displayer order to move it to. (So
zero is the lowest and inf the highest.) Or will there never be a need for such
general ordering, so just go with 0-bottom, 1-top?
Or is the idea here that we can raise/lower even if the GUI based terminal is
not currently the active one? (I'd argue there should be two different terminal
pointers for such a use, i.e., 'termgui' equals most recent 'term' of the GUI
variety.)
Dan
|