|
From: Ethan A M. <merritt@u.washington.edu> - 2008-07-12 03:49:45
|
On Friday 11 July 2008, you wrote:
> > > After the addition of new automatic GPVAL_ variables, I wish to be able to
> > > rebound some hotkeys, for example:
> > >
> > > bind Right "if (GPVAL_SPLOT) builtin_rotate_right; \
> > > else set xrange [GPVAL_X_MIN+100:GPVAL_X_MAX+100]; reread"
> > >
> > > I propose to move the "builtin_" functions from the default "bind" command
> > > among other functions callable from the command line.
> >
> > What happens if mousing is not active when you call such a function?
> > Suppose, for instance, that I am viewing using
> > "set term png; set output '|display png:-'
> > which I frequently do.
> >
> > Does calling the function print an error?
>
> no
>
> > Does it force a replot even though this terminal wouldn't normally
> > respond to hotkeys?
>
> no
Why not? That seems to me to be the main use of the function.
You could make minor adjustments to the view angle even for non-mousing
terminals.
> > Does it silently change the view angle internally without changing the
> > displayed image?
>
> In principle, it does not matter. The function is expected to be called for
> interactive terminals only.
Then I am not sure I see what is the argument for making it a generally
available function. I suppose it allows you to change the key bindings to
something else....
> For other terminals, the behaviour does not make
> good sense. Then it can change the parameters but not call replot. I think
> the interactive terminals can be distinguished by presence of set_cursor()
> function.
>
> I think it could be useful to add flag GPVAL_TERM_INTERACTIVE = {0|1} in
> order to distinguish these terminals.
I think that is the wrong mechanism.
If it is a terminal property it should be a terminal flag:
if (term->flags | TERM_INTERACTIVE) ...
except that there already is a global TBOOLEAN that would probably serve:
if (mouse_setting.on) ...
--
Ethan A Merritt
|