|
From: Petr M. <mi...@ph...> - 2003-12-10 08:47:15
|
> >command.h:
> >+#ifdef OS2
> >+extern void pm_raise_terminal_window();
> >+#endif
> >+#ifdef X11
> >+extern void x11_raise_terminal_window( maybe option for 1 window );
> >+#endif
> >
>
> I'm not sure if I like the idea of having platform dependent functions
> in the code.
Whether it is nice or not, it works without touching other terminals. For
example, "set mouse" commands are available also as menu items in the
Presentation Manager terminal. The only way to do this without touching
other terminals was send_gpPMmenu() in mouse.c, instead of a new term API
in pm.trm.
> The paradigm for Gnuplot, as it currently exists, is
> "everything" is a terminal. I propose adding a new terminal function
> and going that route; something descriptive yet generic like
>
> (*term_interactive)->layer()
> (*term_interactive)->attributes()
> (*term_interactive)->any_suggestions()
term_interactive is a good idea.
There can be something like
term->do_some_command(SOME_COMMAND_RAISE, &option1, &option2, NULL);
> >+void
> >+x11_raise_terminal_window( ... )
> >+{
> >+ putc(SET_SPECIAL, PM_pipe);
> >+ putc('^', PM_pipe); /* raise window */
> >+ fflush(PM_pipe);
> >+}
> >.. I think it is X11_pipe or X11_ipc
> >
> >
> >+ code in gplt_x11.c to accept and react to '^' (go through the window list
> >and raise them)
> >
>
> How about a 'v' for "lower". If "raise #" makes sense as a
> command, then wouldn't "lower #" find a similar sort of
> usefulness?
Whatever you may like can be there.
Just notice that "^" is not sent as a new "pipe command", but as a suboption
for a "special" command.
> I originally proposed that there also be functionality for
> minimizing, maximizing, etc. Ethan said this is bloat,
Currently, I don't see any reason for these additional commands -- they can
be achieved anywhere but an icon on the titlebar.
But how would you launch it?
How to do it portable?
set term interactive close
set term interactive 4 maximize
?? rather than
set term [pm or x11 or windows or ...]
---
Petr Mikulik
|