Article View: adobe.indesign.sdk
Article #4281Re: Getting Text Caret Position in ID CS.
From: FerdinandSchwrer itip
Date: Fri, 25 Jun 2004 10:30
Date: Fri, 25 Jun 2004 10:30
19 lines
1425 bytes
1425 bytes
Rahul,
that's what Ken assumed in its correction to my answer!
If using InterfacePtr<ITextCaret> iTextCaret( iTextSuite, UseDefaultIID()) outside the TextCSB implementation results in iTextCaret being nil, you should define a method, say, ErrorCode GetCaretXY(PMReal& X, PMReal& Y) and provide an implementation for this method in your IMyTextSuiteTextCSB implementation:
ErrorCode IMyTextSuiteTextCSB::GetCaretXY(PMReal& x, PMReal& y)
{
...
InterfacePtr<ITextCaret> iTextCaret(this, UseDefaultIID())
... get your X/Y values and put them into the arguments
}
then outside the ASB/CSB you'll use iTextSuite->GetCaretXY(x,y) to get the caret position.
did this work?
Regards,
Ferdinand
Technical Details
Message-ID:
<3bb4c13e.7@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<3bb4c13e.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f63e9,5c0b31a7bee7e50c X-Google-Attributes: gidf63e9,public From: Ferdinand_Schw๏ฟฝrer(itip)@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.indesign.sdk Subject: Re: Getting Text Caret Position in ID CS. Message-ID: <3bb4c13e.7@webx.la2eafNXanI> Date: Fri, 25 Jun 2004 03:30:25 -0700 References: <3bb4c13e.-1@webx.la2eafNXanI> Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit