[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: Cursor Movements
From:       David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date:       2003-03-12 16:30:38
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 12 March 2003 14:30, Bharathi S wrote:
> On Tue, 11 Mar 2003, Ulrich Kuettler wrote:
> 
> Thanks for reply,
> 
> > AFAIK the cursor is drawn by each application itself. 
> 
> Yes, I understood. :)
> 
> Presently we are trying to providing Indian Language support for
> Koffice Application. Here Cursor positioning is the major problem,
> Bcoz of 1:2, 2:1, *:* mapping b/w Encoding and Glyph.

I don't know what those things are, obviously. Can you detail a bit?

Is it like the (Asian) XIM input stuff? Qt handles that one, although
the application has to call setMicroFocusHint(x,y,w,h). (KWord does so,
see kword/kwtextframeset.cc:764).

I suppose that no Qt application supports this at the moment?

> We DON'T want to modify the application src codes. So We want to
> provide this support thru some extra layer of function library 
> b/w the app and Tool Kit/Xlib. The extra lib will handle only the 
> cursor position calculation and update the app with new position.

So is it mainly about _where_ the cursor is drawn? Or is this 
like a secondary cursor? That only shows up now and then?
How do you know where it should appear? This depends on the text
around it, right? In that case I don't see how XLib would have any clue.
Only the app knows what's around the cursor.
But if the calculations or whatever that have to be done each time
can obviously be factorized at some level, for instance Qt.

> So If any one explain how this cursor movement is handled inside
> the App(Ex: KWord), it will easy for us to handle it.

Well it's very simple, we lay out the characters, recording their position and size,
and we draw the cursor between two characters...

The code for the actual drawing is at KoTextParag::drawCursorDefault,
koffice/lib/kotext/qrichtext.cpp:4103, but I'm not sure this is of interest in your case.

I need to know more about what's specific to the Indian language.
Can't characters be treated as "adjacent boxes", the cursor being between
two boxes? If not, how does that work?

- -- 
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+b2Cv72KcVAmwbhARAtVUAKCqrM0/yFJju47is4Zgv0mtPWR0+QCdELua
lX4HJr9dK2wq2Ll5KYGxHbQ=
=laVo
-----END PGP SIGNATURE-----

____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
http://mail.kde.org/mailman/listinfo/koffice

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic