|
From: Ben A. <bpa...@ma...> - 2009-02-16 02:48:01
|
On Feb 15, 2009, at 5:15 PM, Petr Mikulik wrote:
>>> gnuplot:
>>> - I will commit the patch to define GPVAL_TERM_WINDOWID.
>>
>> ok
>
> It was just committed.
>
>>> Octave:
>>> - It will use "set term ..." without "size and position" by default.
>>> - It will have a flag to see whether user has changed (gcf,
>>> 'position')
>>> explicitly; only in this case, it will use "set term .. size
>>> position".
>>> - If user wants get(gcf), then Octave will find the current values
>>> by:
>>> 1a. launch new gnuplot instance with
>>> set term x11 position 100,100 size 100,100
>>> 1b. by means of GPVAL_TERM_WINDOWID and xwininfo, get the
>>> current value of position => these are the correction factors
>>> with respect to the above 100,100
>>> 1c. close this dummy gnuplot session
>>> 2. get xwininfo from the gcf's session and correct it by the above
>>> factors
>>>
>>> Note that 1. can be done once only.
>>>
>>> Note this will work on X11 only. More portable way is that
>>> terminals report
>>> some GPVAL_ variables about their position on the desktop, but it
>>> would just
>>> increase the piping traffic and I doubt it's worth the effort.
>>
>> I'm not following the Octave part. What are the correction factors
>> to be
>> determined by 1a,b,c?
>
> You wanted to know what is the difference between position and size
> of the
> full x11 window (as obtained by xwininfo) and the gnuplot's drawing
> canvas.
> Furthermore, if you combine xwininfo with "unset mouse" and "set
> mouse", you
> can see whether the x11 window is increased in size ("set term x11")
> or not
> ("set term wxt").
ok ... It hadn't occurred to me to toggle the mouse on/off.
Ben
|