cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Arbortext Listener C++ - Class Libraries

jsmart-2
4-Participant

Arbortext Listener C++ - Class Libraries

Seeking advice from any Arbortext Developer in C++ who has successfully accessed the Arbortext IDOMEventListener class. Objective, add a custom left mouse click to the interface. 
There are no ACL calls for the mouse interface.
Attached is the Class view in Visual Studio V2022.
There is one undocumented page, C++ sample in the knowledge base shows AttachListener in 10 lines. 

 

Any advice  welcomed will share the magic.

 

 

 

 

 

 

 

 

 

1 REPLY 1

If you just want a click listener and don't care about C++, you can probably do this using Javascript and the AOM within Arbortext. Here's a brief example that watches for a click on a <title> element and takes action on it.

function clickEvent(event)
{
  var node = event.target;
  if (node.nodeName=="title") {
    Application.alert("You clicked " + node.nodeName + "\n");
  }
  event.stopPropagation();
}
var doc = Application.activeDocument;
var o = { handleEvent: clickEvent};
var listener = Packages.org.w3c.dom.events.EventListener(o);
doc.addEventListener("click", listener, true);
Announcements

Top Tags