set StdCursor!!

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
Audros
User
Posts: 63
Joined: Fri Jun 08, 2018 1:39 pm

set StdCursor!!

Post by Audros » Thu Apr 04, 2019 8:32 am

Hello,
we have developed own commands in pdf xchange editor and I need to change the default cursor "stdcursor" to Cross.
in the guide I found the setStdCursor function in the sdk, but in the C # code, I can not find it in the IUIX_Inst object.
Can u help us?
Best regard

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13524
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: set StdCursor!!

Post by Tracker Supp-Stefan » Thu Apr 04, 2019 10:28 am

Hello Audros,

I've asked my collleagues in the dev team to take a look here and we will post some further advise shortly!

Regards,
Stefan

Audros
User
Posts: 63
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros » Thu Apr 04, 2019 10:34 am

Hello
Thanks.
Best regard

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13524
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: set StdCursor!!

Post by Tracker Supp-Stefan » Thu Apr 04, 2019 11:24 am

Hello Audros,

Please take a look at these C# samples:
https://github.com/tracker-software/PDF ... ter/CSharp

And this is the method you should implement:
https://sdkhelp.tracker-software.com/vi ... tStdCursor

The values you can use are listed here:
https://sdkhelp.tracker-software.com/vi ... _StdCursor

Regards,
Stefan

Audros
User
Posts: 63
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros » Thu Apr 04, 2019 11:29 am

Hello
i search SetStdCursor in this project but i don't find it.
Best regard
Attachments
screenshot.png

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13524
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: set StdCursor!!

Post by Tracker Supp-Stefan » Thu Apr 04, 2019 11:38 am

Hello Audros,

Please try with the following:

Code: Select all

Parent.uiInst.SetCursor(Parent.uiInst.GetCursorID("cross"));
Regards,
Stefan

Audros
User
Posts: 63
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros » Thu Apr 04, 2019 11:43 am

Hello,
We already use that, it changes the cursor totaly, but we want just to change standard cursor, and let the cursor change when we pass over annotation, like with callout for example, when we activate it, we have cross look when we point to an empty slot in the pdf.

the code we tried are
uiInst.SetCursor(frm.uiInst.GetCursorID("cross"));
pEvent.Handled = true;


or
uiInst.SetCursor(frm.uiInst.GetCursorID("cross"));

frm.uiInst.LockCursor().
Thanks

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13524
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: set StdCursor!!

Post by Tracker Supp-Stefan » Thu Apr 04, 2019 11:46 am

Hello Audros,

Please take a look here:
Additional explanation for custom event handlers

For some further guidance.

Regards,
Stefan

Audros
User
Posts: 63
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros » Thu Apr 04, 2019 11:54 am

Thank you,
i get a look on it before, the problem is that When a user clicks on a button the cursor should change to the cross (like when you click a tool). But when we fly over an area the text for example put in the pdf, we need that the cursor changes its appearance, as it is implementer in your annotations;

User avatar
Sasha - Tracker Dev Team
User
Posts: 4310
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: set StdCursor!!

Post by Sasha - Tracker Dev Team » Fri Apr 05, 2019 7:46 am

Hello Audros,

As the cursor is being changed on the MouseMove event, you will have to monitor by yourself, whether you are over something or not.
These methods will prove useful.
IPXC_PageText::HitTest
IPXV_PagesView::GetAnnotFromPt
IPXV_PagesView::GetLinkFromPt
Also, you may want to make your own HitTestContentItem method to handle all of the Content Items correctly. For this one, you will have to run through all of the content and see, whether the IPXC_ConentItem has a Bound Box that intersects with current mouse position point.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Audros
User
Posts: 63
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros » Fri Apr 05, 2019 9:20 am

Hello,
Ok thank you, we success to do that :)

Best regard

User avatar
Sasha - Tracker Dev Team
User
Posts: 4310
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: set StdCursor!!

Post by Sasha - Tracker Dev Team » Fri Apr 05, 2019 9:36 am

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Audros
User
Posts: 63
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros » Fri Apr 05, 2019 11:58 am

Hello,
One more question, please, how can we know if the mouse is on content pdf or on cmdbar zone
Best regards
Attachments
Sans titre.png

User avatar
Sasha - Tracker Dev Team
User
Posts: 4310
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: set StdCursor!!

Post by Sasha - Tracker Dev Team » Fri Apr 05, 2019 12:00 pm

Hello Audros,

If you are catching the event via the PagesView's object event handler, then your mouse is there.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Audros
User
Posts: 63
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros » Fri Apr 05, 2019 12:13 pm

Hello,
Ah ok, i see that, thank you

User avatar
Sasha - Tracker Dev Team
User
Posts: 4310
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: set StdCursor!!

Post by Sasha - Tracker Dev Team » Fri Apr 05, 2019 12:42 pm

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply