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

List:       kde-kafka
Subject:    Writing the selection code
From:       Jonathan Bacon <f9808590 () wlv ! ac ! uk>
Date:       2000-11-23 16:21:46
[Download RAW message or body]

Hello all,

Over the pas few days I have been getting to grips with DOM, and I have 
it straight, I can begin writing some of the selection methods.

What we need are the following methods:

 - To be able to click in the view and select an object
 - To be able to click inthe view and select where to write some text
 - To be able to highlight some text
 - To be able to highlight objects

I think the primary ones that need to be done are the text based 
methods.

In both types of method (object and text), we need to do two things:

 - Find the position of the selection (or the start and end positions 
for highlighing). this could be done using something like QCursor, 
QMouseEvent or something. Suggestions?

 - Update the DOM tree with what the user does. If for example we want 
to type text in it would find the node where the mouse is, take in 
keyboard input for one letter, update the DOM, move the cursor 
(keyboard) right one letter and repeat. For updating the DOM we can use 
the KHTML DOM calls, and there is also a method which returns the DOM 
node the user clicks on. This could be reimplemented.

If anyone has suggestions on a better way, or would like to get their 
hands dirty, please speak up.

I am gonna be working on this selection code at the moment, and I will 
be commiting some of the stuff as soon as it is done.

Would anyone else like to write some code?

	Jono

--------------------------------------
Jono Bacon - [vmlinuz] -- jono@kde.org
KDE/Qt Developer - Founder of Linux UK
--------------------------------------

_______________________________________________
Kde-kafka mailing list
Kde-kafka@master.kde.org
http://master.kde.org/mailman/listinfo/kde-kafka

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

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