Message Board for Rorohiko Workflow Resources
https://www.rorohiko.com/cgi-bin/yabb2/YaBB.pl
Documentation >> API Documentation (APIDToolAssistant) >> Context menus w/o selection (version>=1.0.46)
https://www.rorohiko.com/cgi-bin/yabb2/YaBB.pl?num=1224147592

Message started by Kris Coppieters on 10/16/08 at 20:59:52

Title: Context menus w/o selection (version>=1.0.46)
Post by Kris Coppieters on 10/16/08 at 20:59:52
To add context menus that appear without anything selected, you need to create a .spln file (a scripted plugin). Ideally, you'd start by opening the APIDTemplate.indd file, creating a project setup, and taking it from there.

Once you have a proper .spln setup that you can compile to, you can start handing these context menus. The main difference with normal context menus as documented in the APID documentation is that the events are sent directly to the scripted plug-in object instead of to a selected page item.

When your scripted plugin gets a 'loadContextMenu' event, you should build a table that represents the context menu and return it via theScriptedPlugin.tempDataStore - just like you would normally handle 'subjectLoadContextMenu' events for other objects.

When your scripted plugin gets an 'enableMenus' event, it should return a non-zero status value for any event that need to appear in the context menu - just like you would handle normal menu items.

And lastly, the scripted plugin needs to handle any event codes assigned to these context menus.

It's a bit complex to explain in just words. Instead you can download an extensive code sample from

http://www.rorohiko.com/downloads/MenuDemo.zip

This sample shows a number of aspects of menu handling with APIDToolAssistant, as well as how to put check marks in front of menu items.

Message Board for Rorohiko Workflow Resources » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.