Re: position

From: J.M. Maurer <uwog_at_uwog.net>
Date: Mon Feb 09 2009 - 12:20:10 CET

On Mon, 2009-02-09 at 11:36 +1100, Martin Sevior wrote:
> HI Daniel,
> You are correct. There is no method that returns the
> current caret position, nor is their method that sets the caret
> position to an absolute location. There are numerous methods that move
> the caret about the place, like start/end of document, starte/end of
> line, search for text etc.
>
> The currently implemented methods in the Pyhton bindings re those
> needed for the "Write" application used by the One Laptop Per Child
> project as well as our guesses as to what would be usefula nd easy to
> implement.
>
> It is actually extremely easy to add the two methods you requested and
> I'm happy to do this.
>
> I guess you want:
>
> int getCurrentCaretPos()
> void setCaretPos(int ipos)

It's really not those 2 functions ofcourse: we need a proper API to
access the document contents (something like browsers and their DOM
tree).

> Right?
>
> I could also implement:
>
> void setSelection(int posLow, int posHigh)

... especially since you need to know rather low level AbiWord stuff to
really know what those positions are.

> If that is helpful.
>
> As for our plans for pyabiword, well actually we'll follow the
> requests of users of the feature. Ask us what you'd like and if its
> easy we'll just do it. If it's hard we'll explain why and and see how
> we can move forward.

What Martin said, just let us know!

  Marc

> Cheers!
>
> Martin
>
>
> On Mon, Feb 9, 2009 at 6:45 AM, Daniel Carvalho <idnael@gmail.com> wrote:
> >
> > hi
> >
> > is there a way in PyAbiword to get the cursor position, and go back
> > there programatically? (i'm using pyabiword 0.6.1)
> >
> > I see that most of the methods available are only those necessary to
> > implement toolbars or menubars and execute actions in response to
> > these commands. The api is still very incomplete for a python program.
> > What are the future plans for pyabiword?
> >
> > thanks!
> > daniel
> >
Received on Mon Feb 9 12:22:10 2009

This archive was generated by hypermail 2.1.8 : Mon Feb 09 2009 - 12:22:10 CET