Subject: mailing-list for TeXmacs Users
List archive
From : Henri Lesourd <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] A simple
- Date: Thu, 06 Nov 2008 12:58:49 +0100
David Allouche wrote:
On Sun, Oct 26, 2008 at 20:48, Henri Lesourd <address@hidden <mailto:address@hidden>> wrote:
Andrea Gamba wrote:
It would be also nice that the window is always centered when
zooming in/out.
Now it is aligned to the left, do you think it is possible to
change this
setting?
No, there are no Scheme commands to change the alignment
of the displayed text inside the window (nor to move or
resize the TeXmacs window, btw).
Henri, I think you misunderstood Andrea.
What Andrea seems to have in mind is that when changing the shrinking factor, the position at the center of the window should not change.
In more technical terms: texmacs has a several coordinate systems: one in which boxes are positioned on a page, and another in which the page is positioned in the editor's viewport. When the shrinking factor is changed, only one page point can have a invariant viewport position. Let's call this point the "pinned point". According to Andrea, currently the viewport's top-left corner is pinned. And he would like to pin the center of the viewport.
From the perspective of the viewport's implementor, the current behaviour is the simplest fundamental one. It would be reasonable to require that pinning be implemented in scheme.
I expect that texmacs does not provide the necessary glue. Here's what would be needed:
* getting and setting the relative position of the viewport and page coordinate systems
* getting the size of the viewport in page coordinates
Not presuming of what the actual glue should look like. This kind of API is tricky to get right.
As far as I understood when looking at Joris's implementation
of the widgets, there is currently no API at all to scroll
the document inside the editor widget: everything is hardwired
inside the C++ (e.g., how it reproduces the shitty emacs behaviour
of jumping half a page when you want to go down (resp. up) when
the cursor is located at the bottom (resp. top) line of the editor
window).
Thus it's not a matter of the coordinate system, it's a matter
of having a sufficiently sophisticated control on the behaviour
of your UI components at the lower level. Once you have this,
of course you can program the nice Scheme extension you want.
- Re: [TeXmacs] A simple, David Allouche, 11/01/2008
- Re: [TeXmacs] A simple, Henri Lesourd, 11/06/2008
- <Possible follow-up(s)>
- Re: [TeXmacs] A simple, Andrea Gamba, 11/09/2008
- Re: [TeXmacs] A simple, Juan Pablo Romero Méndez, 11/10/2008
Archive powered by MHonArc 2.6.19.