Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
hdi::core::Plugin Class Reference

Base plugin class; the heart of any plugin project. More...

#include <hdicorePlugin.h>

Public Types

enum  Options { NoOptions = 0 , AutoSelectsResultsOption = 1 << 0 , RetainsPartialPathSelectionOption = 1 << 1 }
 Allows for configuration of various plug-in behaviors.
 
enum  UndoContext { UnknownUndoContext = 0 , StandardUndoContext = 10 , SilentUndoContext = 20 , AppendUndoContext = 30 }
 Allows for setting of the undo context to other behaviors.
 
typedef std::vector< byteByteVector
 

Public Member Functions

virtual SPPluginRef spPluginRef () const
 Gets the plugin ref around which the target object is wrapped.
 
PlatformPluginPtr platformPlugin () const
 Gets a pointer to the platform object representing the current Plugin instance.
 
virtual std::string filePath () const
 Gets the full path of the plugin file at runtime.
 
virtual std::string fileName () const
 Gets the name of the plugin file at runtime.
 
virtual std::string name () const
 Gets the plugin name.
 
virtual void setName (const std::string &name_)
 Sets the plugin name.
 
virtual Options options () const
 Gets the plugin's options.
 
virtual void setOptions (const Options options_)
 Sets the plugin's options.
 
virtual Dispatcher *const dispatcher () const
 Convenience method to return the Dispatcher instance.
 
virtual Tool *const currentTool () const
 Gets a pointer to the currently selected tool.
 
virtual void undo () const
 Undoes the last set of artwork changes by this specific plugin.
 
virtual bool setUndoKind (const UndoContext uc_)
 Changes the undo context to another type.
 
virtual void setUndoRedoNames (const std::string &undo_, const std::string &redo_)
 Sets the text for the Undo and Redo menu items, which Illustrator uses as needed.
 
virtual bool resourceData (const int32_t type_, const int16_t id_, ByteVector &data__) const
 Acquires a byte vector for a given resource.
 
virtual bool resourceData (const int32_t type_, const std::string &name_, ByteVector &data__) const
 Acquires a byte vector for a given resource.
 
virtual bool toolsSnapToArt () const
 Gets whether tools belonging to this plugin should snap the cursor to artwork.
 
virtual void setToolsSnapToArt (const bool snap_)
 Sets whether tools belonging to this plugin should snap the cursor to artwork.
 
virtual bool toolsSnapToArtBounds () const
 Gets whether tools belonging to this plugin should snap the cursor to artwork bounds.
 
virtual void setToolsSnapToArtBounds (const bool snap_)
 Sets whether tools belonging to this plugin should snap the cursor to artwork bounds.
 
virtual bool toolsSnapToArtboard () const
 Gets whether tools belonging to this plugin should snap the cursor to the artboard edges.
 
virtual void setToolsSnapToArtboard (const bool snap_)
 Sets whether tools belonging to this plugin should snap the cursor to the artboard edges.
 
virtual bool toolsSnapToGrids () const
 Gets whether tools belonging to this plugin should snap the cursor to the Illustrator gridlines.
 
virtual void setToolsSnapToGrids (const bool snap_)
 Sets whether tools belonging to this plugin should snap the cursor to the Illustrator gridlines.
 
virtual bool startingUp () const
 Gets whether the plugin is in the process of starting up.
 
virtual bool hasStartedUp () const
 Gets whether the plugin has already completed starting up.
 
virtual bool postStartingUp () const
 Gets whether the plugin is in the process of post-starting up.
 
virtual bool hasPostStartedUp () const
 Gets whether the plugin has already completed post-starting up.
 
virtual bool preShuttingDown () const
 Gets whether the plugin is in the process of pre-shutting down.
 
virtual bool hasPreShutdown () const
 Gets whether the plugin has already completed pre-shutting down.
 
virtual bool shuttingDown () const
 Gets whether the plugin is in the process of shutting down.
 
virtual bool hasShutdown () const
 Gets whether the plugin has already completed shutting down.
 
virtual std::ostream *const loggingStream (const std::string &name_) const
 Gets a logging stream, by name, for debugging output for the plugin.
 
virtual void setLoggingStream (const std::string &name_, std::ostream *const str_)
 Sets the logging stream, by name, for debugging output for the plugin.
 
virtual Callback *const startupCallback () const
 Gets the callback that's called when the plugin is starting up.
 
virtual void setStartupCallback (const Callback &cb_)
 Sets the callback that's called when the plugin is starting up.
 
virtual Callback *const postStartupCallback () const
 Gets the callback that's called just after the plugin has started up.
 
virtual void setPostStartupCallback (const Callback &cb_)
 Sets the callback that's called just after the plugin has started up.
 
virtual Callback *const preShutdownCallback () const
 Gets the callback that's called just before the plugin will shutdown.
 
virtual void setPreShutdownCallback (const Callback &cb_)
 Sets the callback that's called just before the plugin will shutdown.
 
virtual Callback *const shutdownCallback () const
 Gets the callback that's called when the plugin is shutting down.
 
virtual void setShutdownCallback (const Callback &cb_)
 Sets the callback that's called when the plugin is shutting down.
 
virtual Callback *const menuItemSelectedCallback () const
 Gets the callback that's called when a user selects one of the plugin's menu items.
 
virtual void setMenuItemSelectedCallback (const Callback &cb_)
 Sets the callback that's called when a user selects one of the plugin's menu items.
 
virtual Callback *const menuItemsUpdateCallback () const
 Gets the callback that's called when a user hovers over menu groups that will show this plugin's menu items.
 
virtual void setMenuItemsUpdateCallback (const Callback &cb_)
 Sets the callback that's called when a user hovers over menu groups that will show this plugin's menu items.
 
virtual Callback *const brightnessAdjustedCallback () const
 Gets the callback that's called when the brightness of the app UI is changed via the app preference dialog.
 
virtual void setBrightnessAdjustedCallback (const Callback &cb_)
 Sets the callback that's called when the brightness of the app UI is changed via the app preference dialog.
 
virtual Callback *const toolPreSelectedCallback () const
 Gets the callback that's called just before a tool is selected from the toolbar (i.e. the tool's selection callback has not been called)
 
virtual void setToolPreSelectedCallback (const Callback &cb_)
 Sets the callback that's called just before a tool is selected from the toolbar (i.e. the tool's selection callback has not been called)
 
virtual Callback *const toolPostSelectedCallback () const
 Gets the callback that's called just after a tool is selected from the toolbar (i.e. the tool's selection callback has already been called)
 
virtual void setToolPostSelectedCallback (const Callback &cb_)
 Sets the callback that's called just after a tool is selected from the toolbar (i.e. the tool's selection callback has already been called)
 
virtual Callback *const toolPreDeselectedCallback () const
 Gets the callback that's called just before a tool is deselected (i.e. the tool's deselection callback has not been called)
 
virtual void setToolPreDeselectedCallback (const Callback &cb_)
 Sets the callback that's called just before a tool is deselected (i.e. the tool's deselection callback has not been called)
 
virtual Callback *const toolPostDeselectedCallback () const
 Gets the callback that's called just after a tool is deselected (i.e. the tool's deselection callback has already been called)
 
virtual void setToolPostDeselectedCallback (const Callback &cb_)
 Sets the callback that's called just after a tool is deselected (i.e. the tool's deselection callback has already been called)
 
virtual Callback *const toolPreReselectedCallback () const
 Gets the callback that's called just before a tool is reselected (i.e. the tool's reselection callback has not been called)
 
virtual void setToolPreReselectedCallback (const Callback &cb_)
 Sets the callback that's called just before a tool is reselected (i.e. the tool's reselection callback has not been called)
 
virtual Callback *const toolPostReselectedCallback () const
 Gets the callback that's called just after a tool is reselected (i.e. the tool's reselection callback has already been called)
 
virtual void setToolPostReselectedCallback (const Callback &cb_)
 Sets the callback that's called just after a tool is reselected (i.e. the tool's reselection callback has already been called)
 
virtual Callback *const toolPreTrackedCallback () const
 Gets the callback that's called just before the cursor moves (with the mouse button released; i.e. the tool's track callback has not been called)
 
virtual void setToolPreTrackedCallback (const Callback &cb_)
 Sets the callback that's called just before the cursor moves (with the mouse button released; i.e. the tool's track callback has not been called)
 
virtual Callback *const toolPostTrackedCallback () const
 Gets the callback that's called just after the cursor moves (with the mouse button released; i.e. the tool's track callback has already been called)
 
virtual void setToolPostTrackedCallback (const Callback &cb_)
 Sets the callback that's called just after the cursor moves (with the mouse button released; i.e. the tool's track callback has already been called)
 
virtual Callback *const toolPreMouseDownCallback () const
 Gets the callback that's called just before the mouse button goes down (i.e. the tool's mouse down callback has not been called)
 
virtual void setToolPreMouseDownCallback (const Callback &cb_)
 Sets the callback that's called just before the mouse button goes down (i.e. the tool's mouse down callback has not been called)
 
virtual Callback *const toolPostMouseDownCallback () const
 Gets the callback that's called just after the mouse button goes down (i.e. the tool's mouse down callback has already been called)
 
virtual void setToolPostMouseDownCallback (const Callback &cb_)
 Sets the callback that's called just after the mouse button goes down (i.e. the tool's mouse down callback has already been called)
 
virtual Callback *const toolPreDraggedCallback () const
 Gets the callback that's called just before the mouse button is down and the cursor moves (i.e. the tool's drag callback has not been called)
 
virtual void setToolPreDraggedCallback (const Callback &cb_)
 Sets the callback that's called just before the mouse button is down and the cursor moves (i.e. the tool's drag callback has not been called)
 
virtual Callback *const toolPostDraggedCallback () const
 Gets the callback that's called just after the mouse button is down and the cursor moves (i.e. the tool's drag callback has already been called)
 
virtual void setToolPostDraggedCallback (const Callback &cb_)
 Sets the callback that's called just after the mouse button is down and the cursor moves (i.e. the tool's drag callback has already been called)
 
virtual Callback *const toolPreMouseUpCallback () const
 Gets the callback that's called just before the mouse button comes up (i.e. the tool's mouse up callback has not been called)
 
virtual void setToolPreMouseUpCallback (const Callback &cb_)
 Sets the callback that's called just before the mouse button comes up (i.e. the tool's mouse up callback has not been called)
 
virtual Callback *const toolPostMouseUpCallback () const
 Gets the callback that's called just after the mouse button comes up (i.e. the tool's mouse up callback has already been called)
 
virtual void setToolPostMouseUpCallback (const Callback &cb_)
 Sets the callback that's called just after the mouse button comes up (i.e. the tool's mouse up callback has already been called)
 
virtual Callback *const toolPreDiameterDecreasedCallback () const
 Gets the callback that's called just before the '[' key is hit while a tool is selected (i.e. the tool's diameter decrease callback has not been called)
 
virtual void setToolPreDiameterDecreasedCallback (const Callback &cb_)
 Sets the callback that's called just before the '[' key is hit while a tool is selected (i.e. the tool's diameter decrease callback has not been called)
 
virtual Callback *const toolPostDiameterDecreasedCallback () const
 Gets the callback that's called just after the '[' key is hit while a tool is selected (i.e. the tool's diameter decrease callback has already been called)
 
virtual void setToolPostDiameterDecreasedCallback (const Callback &cb_)
 Sets the callback that's called just after the '[' key is hit while a tool is selected (i.e. the tool's diameter decrease callback has already been called)
 
virtual Callback *const toolPreDiameterIncreasedCallback () const
 Gets the callback that's called just before the ']' key is hit while a tool is selected (i.e. the tool's diameter increase callback has not been called)
 
virtual void setToolPreDiameterIncreasedCallback (const Callback &cb_)
 Sets the callback that's called just before the ']' key is hit while a tool is selected (i.e. the tool's diameter increase callback has not been called)
 
virtual Callback *const toolPostDiameterIncreasedCallback () const
 Gets the callback that's called just after the ']' key is hit while a tool is selected (i.e. the tool's diameter increase callback has already been called)
 
virtual void setToolPostDiameterIncreasedCallback (const Callback &cb_)
 Sets the callback that's called just after the ']' key is hit while a tool is selected (i.e. the tool's diameter increase callback has already been called)
 
virtual Callback *const toolPreEditedCallback () const
 Gets the callback that's called just before a tool is double-clicked in the toolbar (i.e. the tool's edit callback has not been called)
 
virtual void setToolPreEditedCallback (const Callback &cb_)
 Sets the callback that's called just before a tool is double-clicked in the toolbar (i.e. the tool's edit callback has not been called)
 
virtual Callback *const toolPostEditedCallback () const
 Gets the callback that's called just after a tool is double-clicked in the toolbar (i.e. the tool's edit callback has already been called)
 
virtual void setToolPostEditedCallback (const Callback &cb_)
 Sets the callback that's called just after a tool is double-clicked in the toolbar (i.e. the tool's edit callback has already been called)
 
virtual ModalDialog *const aboutBox () const
 Gets the about box modal dialog for the plugin.
 
virtual void setAboutBox (const ModalDialog &dialog_)
 Sets the about box modal dialog for the plugin.
 
virtual ModalDialog *const prefsDialog () const
 Gets the global prefs modal dialog for the plugin.
 
virtual void setPrefsDialog (const ModalDialog &dialog_)
 Sets the global prefs modal dialog for the plugin.
 
virtual MenuItem *const aboutMenuItem () const
 Gets the about box menu item for the plugin.
 
virtual void setAboutMenuItem (const MenuItem &mi_)
 Sets the about box menu item for the plugin.
 
virtual MenuItem *const prefsMenuItem () const
 Gets the global prefs menu item for the plugin.
 
virtual void setPrefsMenuItem (const MenuItem &mi_)
 Sets the global prefs menu item for the plugin.
 

Static Public Member Functions

static Plugin *const instance ()
 Allows access to the singleton Plugin instance object.
 

Friends

__MainError() PluginMain (const char *, const char *, void *)
 Main entry point for all plugins (required by Illustrator). This is called whenever a plugin should perform some action or respond to some message.
 

Detailed Description

Base plugin class; the heart of any plugin project.

Receives startup/shutdown messages, tool messages, menu messages, etc.; allows for preference access, registration access, etc.

Member Function Documentation

◆ aboutBox()

virtual ModalDialog *const hdi::core::Plugin::aboutBox ( ) const
virtual

Gets the about box modal dialog for the plugin.

Author
GW
Date
09/2014
Returns
A pointer to the about box dialog for the plugin, or NULL if none/error
Note
For Illustrator, see also the aboutMenuItem() method. It is common for plugins to have about box modal dialogs that are shown when an "About <Your Plugin Name>" menu item is chosen; however, this process is not automated for the creator of the plugin as not all plugins necessitate this feature. The Plugin class merely offers a convenient place to store said dialog object.
For Photoshop, the process of showing an about box is automated for the creator of the plugin, so long as this method does not return NULL.

◆ aboutMenuItem()

virtual MenuItem *const hdi::core::Plugin::aboutMenuItem ( ) const
virtual

Gets the about box menu item for the plugin.

Author
GW
Date
09/2014
Returns
A pointer to the about box menu item for the plugin, or NULL if none/error
Note
See also the aboutBox() method.
It is common for plugins to have about box modal dialogs that are shown when an "About <Your Plugin Name>" menu item is chosen; however, this process is not automated for the creator of the plugin as not all plugins necessitate this feature. The Plugin class merely offers a convenient place to store said menu item object.

◆ brightnessAdjustedCallback()

virtual Callback *const hdi::core::Plugin::brightnessAdjustedCallback ( ) const
virtual

Gets the callback that's called when the brightness of the app UI is changed via the app preference dialog.

Author
GW
Date
09/2013
Returns
The brightness adjusted callback

◆ currentTool()

virtual Tool *const hdi::core::Plugin::currentTool ( ) const
virtual

Gets a pointer to the currently selected tool.

Author
GW
Date
09/2013
Returns
The currently selected tool, or NULL if none

◆ dispatcher()

virtual Dispatcher *const hdi::core::Plugin::dispatcher ( ) const
virtual

Convenience method to return the Dispatcher instance.

Author
GW
Date
09/2013
Returns
The plugin message dispatcher instance

◆ fileName()

virtual std::string hdi::core::Plugin::fileName ( ) const
virtual

Gets the name of the plugin file at runtime.

Author
GW
Date
09/2013
Returns
Plugin file name as UTF-8, e.g. "MyPlugin.aip"

◆ filePath()

virtual std::string hdi::core::Plugin::filePath ( ) const
virtual

Gets the full path of the plugin file at runtime.

Author
GW
Date
09/2013
Returns
Plugin file path as UTF-8, e.g. "/Applications/Adobe Illustrator CS6/Plug-ins/Tools/MyPlugin.aip"

◆ hasPostStartedUp()

virtual bool hdi::core::Plugin::hasPostStartedUp ( ) const
virtual

Gets whether the plugin has already completed post-starting up.

Author
GW
Date
04/2015
Returns
true if the postStartup callback has completed

◆ hasPreShutdown()

virtual bool hdi::core::Plugin::hasPreShutdown ( ) const
virtual

Gets whether the plugin has already completed pre-shutting down.

Author
GW
Date
04/2015
Returns
true if the preShutdown callback has completed

◆ hasShutdown()

virtual bool hdi::core::Plugin::hasShutdown ( ) const
virtual

Gets whether the plugin has already completed shutting down.

Author
GW
Date
04/2015
Returns
true if the shutdown callback has completed

◆ hasStartedUp()

virtual bool hdi::core::Plugin::hasStartedUp ( ) const
virtual

Gets whether the plugin has already completed starting up.

Author
GW
Date
04/2015
Returns
true if the startup callback has completed

◆ instance()

static Plugin *const hdi::core::Plugin::instance ( )
static

Allows access to the singleton Plugin instance object.

Author
GW
Date
09/2013
Returns
The singleton Plugin object

◆ loggingStream()

virtual std::ostream *const hdi::core::Plugin::loggingStream ( const std::string &  name_) const
virtual

Gets a logging stream, by name, for debugging output for the plugin.

Author
GW
Date
04/2019
Parameters
name_The unique name of the logging stream
Returns
A pointer to the logging stream, or NULL for none (the default)
Warning
The caller should not assume responsibility for the memory of the returned pointer!

◆ menuItemSelectedCallback()

virtual Callback *const hdi::core::Plugin::menuItemSelectedCallback ( ) const
virtual

Gets the callback that's called when a user selects one of the plugin's menu items.

Author
GW
Date
09/2013
Returns
The menu item selection callback

◆ menuItemsUpdateCallback()

virtual Callback *const hdi::core::Plugin::menuItemsUpdateCallback ( ) const
virtual

Gets the callback that's called when a user hovers over menu groups that will show this plugin's menu items.

Author
GW
Date
09/2013
Returns
The menu items update callback

◆ name()

virtual std::string hdi::core::Plugin::name ( ) const
virtual

Gets the plugin name.

Author
GW
Date
09/2013
Returns
The plugin name, as UTF-8

◆ options()

virtual Options hdi::core::Plugin::options ( ) const
virtual

Gets the plugin's options.

Author
GW
Date
09/2013
Returns
Current plugin options

◆ platformPlugin()

PlatformPluginPtr hdi::core::Plugin::platformPlugin ( ) const

Gets a pointer to the platform object representing the current Plugin instance.

Author
GW
Date
12/2015
Returns
A pointer to the platform object for the plugin instance (bundle on Mac, DLL on Windows)

◆ postStartingUp()

virtual bool hdi::core::Plugin::postStartingUp ( ) const
virtual

Gets whether the plugin is in the process of post-starting up.

Author
GW
Date
04/2015
Returns
true if the postStartup callback is currently executing, false otherwise

◆ postStartupCallback()

virtual Callback *const hdi::core::Plugin::postStartupCallback ( ) const
virtual

Gets the callback that's called just after the plugin has started up.

Author
GW
Date
09/2013
Returns
The post-startup callback

◆ prefsDialog()

virtual ModalDialog *const hdi::core::Plugin::prefsDialog ( ) const
virtual

Gets the global prefs modal dialog for the plugin.

Author
GW
Date
09/2014
Returns
A pointer to the prefs dialog for the plugin, or NULL if none/error
Note
See also the prefsMenuItem() method.
It is common for plugins to have global prefs modal dialogs that are shown when a "<Your Plugin Name> Preferences" menu item is chosen; however, this process is not automated for the creator of the plugin as not all plugins necessitate this feature. The Plugin class merely offers a convenient place to store said dialog object.

◆ prefsMenuItem()

virtual MenuItem *const hdi::core::Plugin::prefsMenuItem ( ) const
virtual

Gets the global prefs menu item for the plugin.

Author
GW
Date
09/2014
Returns
A pointer to the prefs menu item for the plugin, or NULL if none/error
Note
See also the prefsDialog() method.
It is common for plugins to have global prefs modal dialogs that are shown when a "<Your Plugin Name> Preferences" menu item is chosen; however, this process is not automated for the creator of the plugin as not all plugins necessitate this feature. The Plugin class merely offers a convenient place to store said menu item object.

◆ preShutdownCallback()

virtual Callback *const hdi::core::Plugin::preShutdownCallback ( ) const
virtual

Gets the callback that's called just before the plugin will shutdown.

Author
GW
Date
09/2013
Returns
The pre-shutdown callback

◆ preShuttingDown()

virtual bool hdi::core::Plugin::preShuttingDown ( ) const
virtual

Gets whether the plugin is in the process of pre-shutting down.

Author
GW
Date
04/2015
Returns
true if the preShutdown callback is currently executing, false otherwise

◆ resourceData() [1/2]

virtual bool hdi::core::Plugin::resourceData ( const int32_t  type_,
const int16_t  id_,
ByteVector &  data__ 
) const
virtual

Acquires a byte vector for a given resource.

Author
GW
Date
09/2013
Parameters
type_Type of resource (four-byte code, e.g. 'PNGI')
id_ID number of the resource
data__Return-by-reference for the resource data
Returns
true if the resource could be read, false otherwise
Note
A maximum size of 10MB is supported; resource data any larger will be truncated.

◆ resourceData() [2/2]

virtual bool hdi::core::Plugin::resourceData ( const int32_t  type_,
const std::string &  name_,
ByteVector &  data__ 
) const
virtual

Acquires a byte vector for a given resource.

Author
GW
Date
09/2013
Parameters
type_Type of resource (four-byte code, e.g. 'PNGI')
name_Name of the resource
data__Return-by-reference for the resource data
Returns
true if the resource could be read, false otherwise
Note
A maximum size of 10MB is supported; resource data any larger will be truncated.

◆ setAboutBox()

virtual void hdi::core::Plugin::setAboutBox ( const ModalDialog dialog_)
virtual

Sets the about box modal dialog for the plugin.

Author
GW
Date
09/2014
Parameters
dialog_New about box modal dialog for the plugin
Note
For Illustrator, see also the setAboutMenuItem() method. It is common for plugins to have about box modal dialogs that are shown when an "About <Your Plugin Name>" menu item is chosen; however, this process is not automated for the creator of the plugin as not all plugins necessitate this feature. The Plugin class merely offers a convenient place to store said dialog object.
For Photoshop, the process of showing an about box is automated for the creator of the plugin, so long as the aboutBox() method does not return NULL.

◆ setAboutMenuItem()

virtual void hdi::core::Plugin::setAboutMenuItem ( const MenuItem mi_)
virtual

Sets the about box menu item for the plugin.

Author
GW
Date
09/2014
Parameters
mi_New about box menu item for the plugin
Note
See also the setAboutBox() method.
Typically, one would want to place this menu item in the built-in group AboutMenuGroup.
It is common for plugins to have about box modal dialogs that are shown when an "About <Your Plugin Name>" menu item is chosen; however, this process is not automated for the creator of the plugin as not all plugins necessitate this feature. The Plugin class merely offers a convenient place to store said menu item object.

◆ setBrightnessAdjustedCallback()

virtual void hdi::core::Plugin::setBrightnessAdjustedCallback ( const Callback cb_)
virtual

Sets the callback that's called when the brightness of the app UI is changed via the app preference dialog.

Author
GW
Date
09/2013
Parameters
cb_New brightness change callback

◆ setLoggingStream()

virtual void hdi::core::Plugin::setLoggingStream ( const std::string &  name_,
std::ostream *const  str_ 
)
virtual

Sets the logging stream, by name, for debugging output for the plugin.

Author
GW
Date
04/2019
Parameters
name_The unique name of the logging stream
str_A pointer to the new logging stream, or NULL for none
Warning
This method does not assume responsibility for the memory of the str_ argument; the caller should manage its memory and, when ready to delete the original object, call the setLoggingStream() method again and pass NULL.

◆ setMenuItemSelectedCallback()

virtual void hdi::core::Plugin::setMenuItemSelectedCallback ( const Callback cb_)
virtual

Sets the callback that's called when a user selects one of the plugin's menu items.

Author
GW
Date
09/2013
Parameters
cb_New menu item selection callback

◆ setMenuItemsUpdateCallback()

virtual void hdi::core::Plugin::setMenuItemsUpdateCallback ( const Callback cb_)
virtual

Sets the callback that's called when a user hovers over menu groups that will show this plugin's menu items.

Author
GW
Date
09/2013
Parameters
cb_New menu items update callback

◆ setName()

virtual void hdi::core::Plugin::setName ( const std::string &  name_)
virtual

Sets the plugin name.

Author
GW
Date
09/2013
Parameters
name_The new plugin name, as UTF-8

◆ setOptions()

virtual void hdi::core::Plugin::setOptions ( const Options  options_)
virtual

Sets the plugin's options.

Author
GW
Date
09/2013
Parameters
options_New options for the plugin

◆ setPostStartupCallback()

virtual void hdi::core::Plugin::setPostStartupCallback ( const Callback cb_)
virtual

Sets the callback that's called just after the plugin has started up.

Author
GW
Date
09/2013
Parameters
cb_New post-startup callback

◆ setPrefsDialog()

virtual void hdi::core::Plugin::setPrefsDialog ( const ModalDialog dialog_)
virtual

Sets the global prefs modal dialog for the plugin.

Author
GW
Date
09/2014
Parameters
dialog_New global prefs modal dialog for the plugin
Note
See also the setPrefsMenuItem() method.
It is common for plugins to have global prefs modal dialogs that are shown when a "<Your Plugin Name> Preferences" menu item is chosen; however, this process is not automated for the creator of the plugin as not all plugins necessitate this feature. The Plugin class merely offers a convenient place to store said dialog object.

◆ setPrefsMenuItem()

virtual void hdi::core::Plugin::setPrefsMenuItem ( const MenuItem mi_)
virtual

Sets the global prefs menu item for the plugin.

Author
GW
Date
09/2014
Parameters
mi_New global prefs menu item for the plugin
Note
See also the setPrefsDialog() method.
Typically, one would want to place this menu item in the built-in group PrefsMenuGroup.
It is common for plugins to have global prefs modal dialogs that are shown when a "<Your Plugin Name> Preferences" menu item is chosen; however, this process is not automated for the creator of the plugin as not all plugins necessitate this feature. The Plugin class merely offers a convenient place to store said menu item object.

◆ setPreShutdownCallback()

virtual void hdi::core::Plugin::setPreShutdownCallback ( const Callback cb_)
virtual

Sets the callback that's called just before the plugin will shutdown.

Author
GW
Date
09/2013
Parameters
cb_New pre-shutdown callback

◆ setShutdownCallback()

virtual void hdi::core::Plugin::setShutdownCallback ( const Callback cb_)
virtual

Sets the callback that's called when the plugin is shutting down.

Author
GW
Date
09/2013
Parameters
cb_New shutdown callback

◆ setStartupCallback()

virtual void hdi::core::Plugin::setStartupCallback ( const Callback cb_)
virtual

Sets the callback that's called when the plugin is starting up.

Author
GW
Date
09/2013
Parameters
cb_New startup callback

◆ setToolPostDeselectedCallback()

virtual void hdi::core::Plugin::setToolPostDeselectedCallback ( const Callback cb_)
virtual

Sets the callback that's called just after a tool is deselected (i.e. the tool's deselection callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool post-deselection callback

◆ setToolPostDiameterDecreasedCallback()

virtual void hdi::core::Plugin::setToolPostDiameterDecreasedCallback ( const Callback cb_)
virtual

Sets the callback that's called just after the '[' key is hit while a tool is selected (i.e. the tool's diameter decrease callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool diameter post-decreased callback

◆ setToolPostDiameterIncreasedCallback()

virtual void hdi::core::Plugin::setToolPostDiameterIncreasedCallback ( const Callback cb_)
virtual

Sets the callback that's called just after the ']' key is hit while a tool is selected (i.e. the tool's diameter increase callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool diameter post-increased callback

◆ setToolPostDraggedCallback()

virtual void hdi::core::Plugin::setToolPostDraggedCallback ( const Callback cb_)
virtual

Sets the callback that's called just after the mouse button is down and the cursor moves (i.e. the tool's drag callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool post-dragging callback

◆ setToolPostEditedCallback()

virtual void hdi::core::Plugin::setToolPostEditedCallback ( const Callback cb_)
virtual

Sets the callback that's called just after a tool is double-clicked in the toolbar (i.e. the tool's edit callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool post-editing callback

◆ setToolPostMouseDownCallback()

virtual void hdi::core::Plugin::setToolPostMouseDownCallback ( const Callback cb_)
virtual

Sets the callback that's called just after the mouse button goes down (i.e. the tool's mouse down callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool post-mouse down callback

◆ setToolPostMouseUpCallback()

virtual void hdi::core::Plugin::setToolPostMouseUpCallback ( const Callback cb_)
virtual

Sets the callback that's called just after the mouse button comes up (i.e. the tool's mouse up callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool post-mouse up callback

◆ setToolPostReselectedCallback()

virtual void hdi::core::Plugin::setToolPostReselectedCallback ( const Callback cb_)
virtual

Sets the callback that's called just after a tool is reselected (i.e. the tool's reselection callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool post-reselection callback

◆ setToolPostSelectedCallback()

virtual void hdi::core::Plugin::setToolPostSelectedCallback ( const Callback cb_)
virtual

Sets the callback that's called just after a tool is selected from the toolbar (i.e. the tool's selection callback has already been called)

Author
GW
Date
09/2013
Parameters
cb_New tool post-selection callback

◆ setToolPostTrackedCallback()

virtual void hdi::core::Plugin::setToolPostTrackedCallback ( const Callback cb_)
virtual

Sets the callback that's called just after the cursor moves (with the mouse button released; i.e. the tool's track callback has already been called)

Author
GW
Date
01/2015
Parameters
cb_New tool post-tracking callback

◆ setToolPreDeselectedCallback()

virtual void hdi::core::Plugin::setToolPreDeselectedCallback ( const Callback cb_)
virtual

Sets the callback that's called just before a tool is deselected (i.e. the tool's deselection callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool pre-deselection callback

◆ setToolPreDiameterDecreasedCallback()

virtual void hdi::core::Plugin::setToolPreDiameterDecreasedCallback ( const Callback cb_)
virtual

Sets the callback that's called just before the '[' key is hit while a tool is selected (i.e. the tool's diameter decrease callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool diameter pre-decreased callback

◆ setToolPreDiameterIncreasedCallback()

virtual void hdi::core::Plugin::setToolPreDiameterIncreasedCallback ( const Callback cb_)
virtual

Sets the callback that's called just before the ']' key is hit while a tool is selected (i.e. the tool's diameter increase callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool diameter pre-increased callback

◆ setToolPreDraggedCallback()

virtual void hdi::core::Plugin::setToolPreDraggedCallback ( const Callback cb_)
virtual

Sets the callback that's called just before the mouse button is down and the cursor moves (i.e. the tool's drag callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool pre-dragging callback

◆ setToolPreEditedCallback()

virtual void hdi::core::Plugin::setToolPreEditedCallback ( const Callback cb_)
virtual

Sets the callback that's called just before a tool is double-clicked in the toolbar (i.e. the tool's edit callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool pre-editing callback

◆ setToolPreMouseDownCallback()

virtual void hdi::core::Plugin::setToolPreMouseDownCallback ( const Callback cb_)
virtual

Sets the callback that's called just before the mouse button goes down (i.e. the tool's mouse down callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool pre-mouse down callback

◆ setToolPreMouseUpCallback()

virtual void hdi::core::Plugin::setToolPreMouseUpCallback ( const Callback cb_)
virtual

Sets the callback that's called just before the mouse button comes up (i.e. the tool's mouse up callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool pre-mouse up callback

◆ setToolPreReselectedCallback()

virtual void hdi::core::Plugin::setToolPreReselectedCallback ( const Callback cb_)
virtual

Sets the callback that's called just before a tool is reselected (i.e. the tool's reselection callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool pre-reselection callback

◆ setToolPreSelectedCallback()

virtual void hdi::core::Plugin::setToolPreSelectedCallback ( const Callback cb_)
virtual

Sets the callback that's called just before a tool is selected from the toolbar (i.e. the tool's selection callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool pre-selection callback

◆ setToolPreTrackedCallback()

virtual void hdi::core::Plugin::setToolPreTrackedCallback ( const Callback cb_)
virtual

Sets the callback that's called just before the cursor moves (with the mouse button released; i.e. the tool's track callback has not been called)

Author
GW
Date
09/2013
Parameters
cb_New tool pre-tracking callback

◆ setToolsSnapToArt()

virtual void hdi::core::Plugin::setToolsSnapToArt ( const bool  snap_)
virtual

Sets whether tools belonging to this plugin should snap the cursor to artwork.

Author
GW
Date
09/2013
Parameters
snap_true if tools should snap the cursor to artwork, false otherwise

◆ setToolsSnapToArtboard()

virtual void hdi::core::Plugin::setToolsSnapToArtboard ( const bool  snap_)
virtual

Sets whether tools belonging to this plugin should snap the cursor to the artboard edges.

Author
GW
Date
09/2013
Parameters
snap_true if tools should snap the cursor to artboard edges, false otherwise

◆ setToolsSnapToArtBounds()

virtual void hdi::core::Plugin::setToolsSnapToArtBounds ( const bool  snap_)
virtual

Sets whether tools belonging to this plugin should snap the cursor to artwork bounds.

Author
GW
Date
09/2013
Parameters
snap_true if tools should snap the cursor to artwork bounds, false otherwise

◆ setToolsSnapToGrids()

virtual void hdi::core::Plugin::setToolsSnapToGrids ( const bool  snap_)
virtual

Sets whether tools belonging to this plugin should snap the cursor to the Illustrator gridlines.

Author
GW
Date
09/2013
Parameters
snap_true if tools should snap the cursor to gridlines, false otherwise

◆ setUndoKind()

virtual bool hdi::core::Plugin::setUndoKind ( const UndoContext  uc_)
virtual

Changes the undo context to another type.

Author
GW
Date
12/2014
Parameters
uc_New undo context
Returns
true if the context was changed, false otherwise

◆ setUndoRedoNames()

virtual void hdi::core::Plugin::setUndoRedoNames ( const std::string &  undo_,
const std::string &  redo_ 
)
virtual

Sets the text for the Undo and Redo menu items, which Illustrator uses as needed.

Author
GW
Date
01/2023
Parameters
undo_String to display for undo item, as UTF-8
redo_String to display for redo item, as UTF-8

◆ shutdownCallback()

virtual Callback *const hdi::core::Plugin::shutdownCallback ( ) const
virtual

Gets the callback that's called when the plugin is shutting down.

Author
GW
Date
09/2013
Returns
The shutdown callback

◆ shuttingDown()

virtual bool hdi::core::Plugin::shuttingDown ( ) const
virtual

Gets whether the plugin is in the process of shutting down.

Author
GW
Date
04/2015
Returns
true if the shutdown callback is currently executing, false otherwise

◆ spPluginRef()

virtual SPPluginRef hdi::core::Plugin::spPluginRef ( ) const
virtual

Gets the plugin ref around which the target object is wrapped.

Author
GW
Date
11/2013
Returns
SPPluginRef for the target object
Note
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of functionality provided by the app is not handled by this class (or related classes), then it should probably be added to the hdi_core library.

◆ startingUp()

virtual bool hdi::core::Plugin::startingUp ( ) const
virtual

Gets whether the plugin is in the process of starting up.

Author
GW
Date
04/2015
Returns
true if the startup callback is currently executing, false otherwise

◆ startupCallback()

virtual Callback *const hdi::core::Plugin::startupCallback ( ) const
virtual

Gets the callback that's called when the plugin is starting up.

Author
GW
Date
09/2013
Returns
The startup callback

◆ toolPostDeselectedCallback()

virtual Callback *const hdi::core::Plugin::toolPostDeselectedCallback ( ) const
virtual

Gets the callback that's called just after a tool is deselected (i.e. the tool's deselection callback has already been called)

Author
GW
Date
01/2015
Returns
The tool post-deselected callback

◆ toolPostDiameterDecreasedCallback()

virtual Callback *const hdi::core::Plugin::toolPostDiameterDecreasedCallback ( ) const
virtual

Gets the callback that's called just after the '[' key is hit while a tool is selected (i.e. the tool's diameter decrease callback has already been called)

Author
GW
Date
01/2015
Returns
The tool diameter post-decreased callback

◆ toolPostDiameterIncreasedCallback()

virtual Callback *const hdi::core::Plugin::toolPostDiameterIncreasedCallback ( ) const
virtual

Gets the callback that's called just after the ']' key is hit while a tool is selected (i.e. the tool's diameter increase callback has already been called)

Author
GW
Date
01/2015
Returns
The tool diameter post-increased callback

◆ toolPostDraggedCallback()

virtual Callback *const hdi::core::Plugin::toolPostDraggedCallback ( ) const
virtual

Gets the callback that's called just after the mouse button is down and the cursor moves (i.e. the tool's drag callback has already been called)

Author
GW
Date
01/2015
Returns
The tool post-dragged callback

◆ toolPostEditedCallback()

virtual Callback *const hdi::core::Plugin::toolPostEditedCallback ( ) const
virtual

Gets the callback that's called just after a tool is double-clicked in the toolbar (i.e. the tool's edit callback has already been called)

Author
GW
Date
01/2015
Returns
The tool post-edited callback

◆ toolPostMouseDownCallback()

virtual Callback *const hdi::core::Plugin::toolPostMouseDownCallback ( ) const
virtual

Gets the callback that's called just after the mouse button goes down (i.e. the tool's mouse down callback has already been called)

Author
GW
Date
01/2015
Returns
The tool post-mouse down callback

◆ toolPostMouseUpCallback()

virtual Callback *const hdi::core::Plugin::toolPostMouseUpCallback ( ) const
virtual

Gets the callback that's called just after the mouse button comes up (i.e. the tool's mouse up callback has already been called)

Author
GW
Date
01/2015
Returns
The tool post-mouse up callback

◆ toolPostReselectedCallback()

virtual Callback *const hdi::core::Plugin::toolPostReselectedCallback ( ) const
virtual

Gets the callback that's called just after a tool is reselected (i.e. the tool's reselection callback has already been called)

Author
GW
Date
01/2015
Returns
The tool post-reselected callback

◆ toolPostSelectedCallback()

virtual Callback *const hdi::core::Plugin::toolPostSelectedCallback ( ) const
virtual

Gets the callback that's called just after a tool is selected from the toolbar (i.e. the tool's selection callback has already been called)

Author
GW
Date
09/2013
Returns
The tool post-selected callback

◆ toolPostTrackedCallback()

virtual Callback *const hdi::core::Plugin::toolPostTrackedCallback ( ) const
virtual

Gets the callback that's called just after the cursor moves (with the mouse button released; i.e. the tool's track callback has already been called)

Author
GW
Date
01/2015
Returns
The tool post-tracked callback

◆ toolPreDeselectedCallback()

virtual Callback *const hdi::core::Plugin::toolPreDeselectedCallback ( ) const
virtual

Gets the callback that's called just before a tool is deselected (i.e. the tool's deselection callback has not been called)

Author
GW
Date
09/2013
Returns
The tool pre-deselected callback

◆ toolPreDiameterDecreasedCallback()

virtual Callback *const hdi::core::Plugin::toolPreDiameterDecreasedCallback ( ) const
virtual

Gets the callback that's called just before the '[' key is hit while a tool is selected (i.e. the tool's diameter decrease callback has not been called)

Author
GW
Date
09/2013
Returns
The tool diameter pre-decreased callback

◆ toolPreDiameterIncreasedCallback()

virtual Callback *const hdi::core::Plugin::toolPreDiameterIncreasedCallback ( ) const
virtual

Gets the callback that's called just before the ']' key is hit while a tool is selected (i.e. the tool's diameter increase callback has not been called)

Author
GW
Date
09/2013
Returns
The tool diameter pre-increased callback

◆ toolPreDraggedCallback()

virtual Callback *const hdi::core::Plugin::toolPreDraggedCallback ( ) const
virtual

Gets the callback that's called just before the mouse button is down and the cursor moves (i.e. the tool's drag callback has not been called)

Author
GW
Date
09/2013
Returns
The tool pre-dragged callback

◆ toolPreEditedCallback()

virtual Callback *const hdi::core::Plugin::toolPreEditedCallback ( ) const
virtual

Gets the callback that's called just before a tool is double-clicked in the toolbar (i.e. the tool's edit callback has not been called)

Author
GW
Date
09/2013
Returns
The tool pre-edited callback

◆ toolPreMouseDownCallback()

virtual Callback *const hdi::core::Plugin::toolPreMouseDownCallback ( ) const
virtual

Gets the callback that's called just before the mouse button goes down (i.e. the tool's mouse down callback has not been called)

Author
GW
Date
09/2013
Returns
The tool pre-mouse down callback

◆ toolPreMouseUpCallback()

virtual Callback *const hdi::core::Plugin::toolPreMouseUpCallback ( ) const
virtual

Gets the callback that's called just before the mouse button comes up (i.e. the tool's mouse up callback has not been called)

Author
GW
Date
09/2013
Returns
The tool pre-mouse up callback

◆ toolPreReselectedCallback()

virtual Callback *const hdi::core::Plugin::toolPreReselectedCallback ( ) const
virtual

Gets the callback that's called just before a tool is reselected (i.e. the tool's reselection callback has not been called)

Author
GW
Date
09/2013
Returns
The tool pre-reselected callback

◆ toolPreSelectedCallback()

virtual Callback *const hdi::core::Plugin::toolPreSelectedCallback ( ) const
virtual

Gets the callback that's called just before a tool is selected from the toolbar (i.e. the tool's selection callback has not been called)

Author
GW
Date
09/2013
Returns
The tool pre-selected callback

◆ toolPreTrackedCallback()

virtual Callback *const hdi::core::Plugin::toolPreTrackedCallback ( ) const
virtual

Gets the callback that's called just before the cursor moves (with the mouse button released; i.e. the tool's track callback has not been called)

Author
GW
Date
09/2013
Returns
The tool pre-tracked callback

◆ toolsSnapToArt()

virtual bool hdi::core::Plugin::toolsSnapToArt ( ) const
virtual

Gets whether tools belonging to this plugin should snap the cursor to artwork.

Author
GW
Date
09/2013
Returns
true if tools should snap the cursor to artwork, false otherwise
Note
This is merely an indicator of whether snapping will occur (it happens automatically); the caller need not manually snap anything.

◆ toolsSnapToArtboard()

virtual bool hdi::core::Plugin::toolsSnapToArtboard ( ) const
virtual

Gets whether tools belonging to this plugin should snap the cursor to the artboard edges.

Author
GW
Date
09/2013
Returns
true if tools should snap the cursor to artboard edges, false otherwise
Note
This is merely an indicator of whether snapping will occur (it happens automatically); the caller need not manually snap anything.

◆ toolsSnapToArtBounds()

virtual bool hdi::core::Plugin::toolsSnapToArtBounds ( ) const
virtual

Gets whether tools belonging to this plugin should snap the cursor to artwork bounds.

Author
GW
Date
09/2013
Returns
true if tools should snap the cursor to artwork bounds, false otherwise
Note
This is merely an indicator of whether snapping will occur (it happens automatically); the caller need not manually snap anything.

◆ toolsSnapToGrids()

virtual bool hdi::core::Plugin::toolsSnapToGrids ( ) const
virtual

Gets whether tools belonging to this plugin should snap the cursor to the Illustrator gridlines.

Author
GW
Date
09/2013
Returns
true if tools should snap the cursor to gridlines, false otherwise
Note
This is merely an indicator of whether snapping will occur (it happens automatically); the caller need not manually snap anything.

◆ undo()

virtual void hdi::core::Plugin::undo ( ) const
virtual

Undoes the last set of artwork changes by this specific plugin.

Author
GW
Date
09/2013

Friends And Related Function Documentation

◆ PluginMain

__MainError() PluginMain ( const char *  ,
const char *  ,
void *   
)
friend

Main entry point for all plugins (required by Illustrator). This is called whenever a plugin should perform some action or respond to some message.

Author
GW
Date
09/2013