Right click menu

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

Right click menu

Post by bneuson » Thu Mar 17, 2016 1:09 pm

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

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

Re: Right click menu

Post by Sasha - Tracker Dev Team » Thu Mar 17, 2016 2:53 pm

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

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

Re: Right click menu

Post by Sasha - Tracker Dev Team » Fri Mar 18, 2016 1:38 pm

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
http://sdkhelp.tracker-software.com/vie ... Annotation
And then if it's a polygon annotation, you can cast it's
http://sdkhelp.tracker-software.com/vie ... ation_Data
to the
http://sdkhelp.tracker-software.com/vie ... tData_Poly
And from it you can manipulate the
http://sdkhelp.tracker-software.com/vie ... y_Vertices
that is the polygon points array.

HTH,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Mon Mar 21, 2016 3:42 pm

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

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

Re: Right click menu

Post by Sasha - Tracker Dev Team » Tue Mar 22, 2016 3:45 pm

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Wed Mar 23, 2016 12:23 pm

Alex,
Thanks for the link, I'll check that out.
-Billy

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

Re: Right click menu

Post by Sasha - Tracker Dev Team » Wed Mar 23, 2016 12:35 pm

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Wed Mar 23, 2016 4:00 pm

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

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

Re: Right click menu

Post by Sasha - Tracker Dev Team » Thu Mar 24, 2016 8:01 am

Hello Billy,

Using the http://sdkhelp.tracker-software.com/vie ... angedEvent should help.

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

Post Reply