Page 1 of 1

set StdCursor!!

Posted: Thu Apr 04, 2019 8:32 am
by Audros
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

Re: set StdCursor!!

Posted: Thu Apr 04, 2019 10:28 am
by Tracker Supp-Stefan
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

Re: set StdCursor!!

Posted: Thu Apr 04, 2019 10:34 am
by Audros
Hello
Thanks.
Best regard

Re: set StdCursor!!

Posted: Thu Apr 04, 2019 11:24 am
by Tracker Supp-Stefan
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

Re: set StdCursor!!

Posted: Thu Apr 04, 2019 11:29 am
by Audros
Hello
i search SetStdCursor in this project but i don't find it.
Best regard

Re: set StdCursor!!

Posted: Thu Apr 04, 2019 11:38 am
by Tracker Supp-Stefan
Hello Audros,

Please try with the following:

Code: Select all

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

Re: set StdCursor!!

Posted: Thu Apr 04, 2019 11:43 am
by Audros
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

Re: set StdCursor!!

Posted: Thu Apr 04, 2019 11:46 am
by Tracker Supp-Stefan
Hello Audros,

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

For some further guidance.

Regards,
Stefan

Re: set StdCursor!!

Posted: Thu Apr 04, 2019 11:54 am
by Audros
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;

Re: set StdCursor!!

Posted: Fri Apr 05, 2019 7:46 am
by Sasha - Tracker Dev Team
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

Re: set StdCursor!!

Posted: Fri Apr 05, 2019 9:20 am
by Audros
Hello,
Ok thank you, we success to do that :)

Best regard

Re: set StdCursor!!

Posted: Fri Apr 05, 2019 9:36 am
by Sasha - Tracker Dev Team
:)

Re: set StdCursor!!

Posted: Fri Apr 05, 2019 11:58 am
by Audros
Hello,
One more question, please, how can we know if the mouse is on content pdf or on cmdbar zone
Best regards

Re: set StdCursor!!

Posted: Fri Apr 05, 2019 12:00 pm
by Sasha - Tracker Dev Team
Hello Audros,

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

Cheers,
Alex

Re: set StdCursor!!

Posted: Fri Apr 05, 2019 12:13 pm
by Audros
Hello,
Ah ok, i see that, thank you

Re: set StdCursor!!

Posted: Fri Apr 05, 2019 12:42 pm
by Sasha - Tracker Dev Team
:)