|
From: Petr M. <mi...@ph...> - 2008-07-12 15:37:23
|
> > > > 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.
Fine, it can do replot.
> > > 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....
Yes, it allows me to change it something else as well as back to the default
value -- or even to do something else and then call the default function,
which is not currently possible.
> > 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) ...
Then this needs a change to terminals -- I would agree on this.
---
PM
|