Copy link to clipboard
Copied
I want to get event on click on adornment added in hidden text frame . Please help out , how can i achieve this ?
May be we can achieve it by using "IBaseHandler" interface . But how to use this interface is not provided in sdk.
Mouse gestures such as click or drag are implemented by trackers.
Let's say your active tool is kPointerToolBoss, you're on top of a layout window's kLayoutWidgetBoss, then the tracker factory is queried with these parameters to produce a kPointerTrackerBoss.
The pointer tracker uses a bunch of draw events to perform a hit test, to narrow down the actually hit object following layout, spread, layer, page item, nested other page items. The temporary object used across this process is the kBaseVisi
...Copy link to clipboard
Copied
Mouse gestures such as click or drag are implemented by trackers.
Let's say your active tool is kPointerToolBoss, you're on top of a layout window's kLayoutWidgetBoss, then the tracker factory is queried with these parameters to produce a kPointerTrackerBoss.
The pointer tracker uses a bunch of draw events to perform a hit test, to narrow down the actually hit object following layout, spread, layer, page item, nested other page items. The temporary object used across this process is the kBaseVisitorBoss, and on the way it creates appropriate handlers such as kSelectionHitTestHandlerBoss which implement IBaseHandler. Not really of your business.
When the pointer tracker has narrowed down on a particular page item, it uses the hit test suite (suite = considering the selection) to iterate the page item's adornment list and query a tracker. With luck (matching coordinates) this ends up in your adornment's QueryTracker. Therein you'd use the tracker factory to query for your very own tracker (a gesture object, event handler and temporary data) - which can basically do everything: open and track a popup menu like the OpenType adornment, perform dynamic resizing of the frame etc.
So you'd first implement a tracker: own boss and ITracker implementation, IEventHandler=kCTrackerEventHandlerImpl, plus your choice of I***TrackerData. Some recently added trackers unrelated to resize still use IResizeTrackerData, maybe take it as example.
Create a startup service to register the tracker at kSessionBoss / ITrackerFactory.
Tweak your IAdornmentHandleShape (appropriate bounds) so that its QueryTracker is reached.
As said above, create the tracker using the factory. If you have different trackers for text frame vs. image, you'd use the class of the selected page item as parameter.
Within the tracker's begin tracking, do your onClick thing, or turn it into a new gesture with dynamic redraw, drawing a sprite wireshape, scrolling, target highlights and so forth.
Copy link to clipboard
Copied
is it available in any sample plugin ?
Copy link to clipboard
Copied
I don't know. Just search the SDK yourself, with a good text editor.