Right click menu

PDF-XChange Editor SDK for Developers

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

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
bneuson
User
Posts: 7
Joined: Thu Mar 17, 2016 1:01 pm

Right click menu

Post by bneuson »

Hello,
I am looking for some information regarding the right click menu. I know that most of the tools are available as commands, but I haven't seen the one I need - add/delete control points - in any of the docs or command lists. Is there any way to have this operation bound to a click? I am looking for something similar to a pen tool that will add control points to an annotation, and another that will delete them.
Thanks
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Right click menu

Post by Sasha - Tracker Dev Team »

Hello bneuson,

I did not quite get what do you want to implement. As far as I know, there is no tool that adds/deletes control points (what are they btw?). Please provide a detailed description of what do you want so that we can assist.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Right click menu

Post by Sasha - Tracker Dev Team »

Hello bneuson,

I've read the e-mail and now I understand what you need.
Basically there is no command for adding/removing points from the polygon available right now.
Though you can manipulate them by getting the
https://sdkhelp.pdf-xchange.com/vie ... Annotation
And then if it's a polygon annotation, you can cast it's
https://sdkhelp.pdf-xchange.com/vie ... ation_Data
to the
https://sdkhelp.pdf-xchange.com/vie ... tData_Poly
And from it you can manipulate the
https://sdkhelp.pdf-xchange.com/vie ... y_Vertices
that is the polygon points array.

HTH,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
bneuson
User
Posts: 7
Joined: Thu Mar 17, 2016 1:01 pm

Re: Right click menu

Post by bneuson »

Alex,
Thank you for the reply. The reason I am looking for implementing the right click functionality is so that our application does not have to find the nearest two points to insert the vertex, because the editor already handles that.
Additionally, can the right click menu be disabled? We will likely want to add our own functionality that may use a right click. Is there a way to replace the right click menu with a handler callback?
Thanks,
Billy
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Right click menu

Post by Sasha - Tracker Dev Team »

Hello bneuson,

This is indeed possible and can be done with custom event handler that should be implemented for the pages view. The information on how to implement and use it can be found in this sample:
https://gist.github.com/Polaringu/648a34daff6bd284a773

HTH,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
bneuson
User
Posts: 7
Joined: Thu Mar 17, 2016 1:01 pm

Re: Right click menu

Post by bneuson »

Alex,
Thanks for the link, I'll check that out.
-Billy
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Right click menu

Post by Sasha - Tracker Dev Team »

Hello Billy,

Do check it - the overall algorithm should be the same, though you'll need to catch a mouse button click event.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
bneuson
User
Posts: 7
Joined: Thu Mar 17, 2016 1:01 pm

Re: Right click menu

Post by bneuson »

Alex,
I have the handlers working now. One question I hope you can answer - I am using the IPXC_AnnotData_Poly.Verticies.Insert() function to add a vertex to a polygon object, but the object is not updating. Is there a draw/ update method I must call to make this work?
Thanks,
Billy
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Right click menu

Post by Sasha - Tracker Dev Team »

Hello Billy,

Using the https://sdkhelp.pdf-xchange.com/vie ... angedEvent should help.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply