[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kafka
Subject: Re: Writing the selection code
From: Thomas <zander () xs4all ! nl>
Date: 2000-11-24 16:07:30
[Download RAW message or body]
>
> OK...so to get a cursor in the HTML widget and add a letter to the DOM, the
> processing would go like this:
>
> - detect a QMouseEvent on the widget and connect it to a slot
Does the DOM stuff not also supply a widget? It this widget is a QScrollView
you can use that, otherwise you have to create a new QScrollView.
In the QScrollView there are a host of predefined methods which you can use,
look under the Protected methods list in the docs.
> - in the slot, position the cursor where the click took place
Yes.
> - also in the slot detect which object if any the mouse was over when the
> click occured
Yes
> - if there was an object go to that node in the dom tree, if not ?
The object == node-in-dom-tree, right?
> - wait for keyboard input and if it occurs add it tot he DOM tree
Inside a new slot.
>
> Is that right? The questions I have are:
>
> - how can a cursor object point to a DOM object? I assume you mean once the
> cursor has been set and the position in the DOM is set, update the posiition
> in the DOM tree each time the cursor moves.
>
You only store the position in the cursor, never in the DOM, so that
won't work.
But as I said I don't know what a QCursor can do for you. You might just want
to create a new cursor object. The cursor object would contain things like:
current paragraph, current node, methods to move the cursor etc.
> - if the position in the HTML widget is going to be set with setPos and
> using a QPoint, how can be line up the text with the cursor?
I don't understand.
> I am having a little trouble visualising your idea...although I am sure it
> will work well. It might be a good idea to write some code for the this to
> get it implemented if you have time.
Alas...
--
Thomas Zander zander@earthling.net
The only thing worse than failure is the fear of trying something new
_______________________________________________
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