[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kafka
Subject: Re: Writing the selection code
From: Stephan Heigl <stephan () eisscholle ! de>
Date: 2000-11-24 18:09:42
[Download RAW message or body]
doesn anyone no what
Node::getCursor(long offset,int &x.int &y, int &height)
is?
Does it return the position of a cursor-like line ( | ) with the position of
the current node and the height of this object/node?
and what is Node::offset good for? i did serveral test with different
doc-structures but it stayed at value 0.
On Friday 24 November 2000 17:07, Thomas wrote:
> > 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...
--
--
regards,
stephan
___________________________________________________
Website: www.eisscholle.de
ICQ: 12707332
Jabber: stephan@jabber.com
_______________________________________________
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