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

List:       koffice-devel
Subject:    Re: KWord keyboard accessibility enhancements
From:       Thomas Zander <zander () kde ! org>
Date:       2005-10-21 22:52:27
Message-ID: 200510220052.27597.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday 21 October 2005 23:56, Gary Cramblitt wrote:
> Since you sound like you are familiar with the code...  I've been
> trying to figure out a way to select the frame border with the
> keyboard.  In some places I see code like this
>
>    frameSet->frame(0)->setSelected(true)
>
> but I assume this selects the *first* frame of a frameset; not
> necessarily the frame that the caret is in.  Is there a way to know
> which frame the caret is in?

KWFrameSetEdit is your friend :)  it has a currentFrame() method.

> Also, as long as I'm fishing for code hints... I'm also trying to get
> the screen position (in pixels), of the text caret.  It looks like I
> need to get the KoTextCursor object and use its x() and y() properties,
> but I had no luck figuring out how to obtain the KoTextCursor object
> from KWCanvas.  (If I can figure out the screen position of the caret,
> then I can figure out which frame is under it using
> frameset->frameAtPos() or doc->frameUnderMouse().)

KWTextFrameSetEdit->cursor()
In KWCanvas;
        KWTextFrameSetEdit *textedit=dynamic_cast<KWTextFrameSetEdit 
*>(m_currentFrameSetEdit->currentTextEdit());

-- 
Thomas Zander

[Attachment #5 (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


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

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