Copy link to clipboard
Copied
Hi
Can I add toolbar icon and connect javascript to them
thanks
Copy link to clipboard
Copied
There is no scripting support to create a tool, you'd need a C++ plugin.
Tool manager requires several configuration settings which can only be supplied during startup (icon, tool type, should it get added as sub-tool, is it about selection or creation, associated key).
A typical tool also introduces a new mouse cursor (separate resources) and associated trackers (e.g. working differently over a text window or specific page items), may be repeatedly called while you move the mouse (dynamic command), cause interactions with the touched areas (temporarily draw dedicated adornments - e.g. those handles and other highlights) or on top of them (draw sprites), have to handle scrolling (maintain active page), establish an own selection or influence the existing one, even be reflected in some larger panels such as the control strip or the info panel.
All doable with a plugin - actually above describes my first plugin, you could even trigger a script event on many occasions, but it would still be wired to a specific use scenario.
Copy link to clipboard
Copied
Hi Robert,
If you don't need the icon to be added specifically to the tools bar (which it sounds very much like you do) then you can create an HTML extension to add an icon to the non-tools bar.
Copy link to clipboard
Copied
how? any examples to create an HTML extension to add an icon to the non-tools bar.
Many Thanks!