|
AIPluginGroupSuite Struct Reference
[API Suite List]
This suite provides functions for working with plug-in groups.
More...
#include <AIPluginGroup.h>
List of all members.
Public Attributes |
AIAPI AIErr(* | AddAIPluginGroup )(SPPluginRef self, const char *name, AIAddPluginGroupData *data, ai::int32 options, AIPluginGroupHandle *entry) |
| Creates a plug-in group.
|
AIAPI AIErr(* | UseAIPluginGroup )(AIArtHandle art, AIPluginGroupHandle entry) |
| Associates a plug-in group art object with a plug-in group, activating the plug-in group and automatically creating the contained edit and result groups.
|
AIAPI AIErr(* | GetAIPluginGroupName )(AIPluginGroupHandle entry, char **name) |
| Retrieves the name of a plug-in group.
|
AIAPI AIErr(* | GetAIPluginGroupVersion )(AIPluginGroupHandle entry, ai::int32 *major, ai::int32 *minor) |
| Retrieves the version information of a plug-in group.
|
AIAPI AIErr(* | GetAIPluginGroupDescription )(AIPluginGroupHandle entry, char **desc) |
| Retrieves the description of a plug-in group, a localized string that Illustrator uses for error reporting.
|
AIAPI AIErr(* | GetAIPluginGroupOptions )(AIPluginGroupHandle entry, ai::int32 *options) |
| Retrieves the option flags of a plug-in group.
|
AIAPI AIErr(* | GetAIPluginGroupPlugin )(AIPluginGroupHandle entry, SPPluginRef *plugin) |
| Retrieves a reference to the plug-in that created a plug-in group.
|
AIAPI AIErr(* | CountAIPluginGroups )(ai::int32 *count) |
| Gets the number of currently registered plug-in group managers.
|
AIAPI AIErr(* | GetNthAIPluginGroup )(ai::int32 index, AIPluginGroupHandle *entry) |
| Retrieves a reference to a plug-in group by position index in the current list of registered plug-in group managers.
|
AIAPI AIErr(* | GetPluginArtName )(AIArtHandle art, char **name) |
| Retrieves the name of the plug-in group that manages a plug-in group art object.
|
AIAPI AIErr(* | SetPluginArtName )(AIArtHandle art, char *name) |
| Sets the name of the plug-in group that manages a plug-in group art object.
|
AIAPI AIErr(* | GetPluginArtVersion )(AIArtHandle art, ai::int32 *major, ai::int32 *minor) |
| Retrieves the version information for the plug-in group that manages a plug-in group art object.
|
AIAPI AIErr(* | SetPluginArtVersion )(AIArtHandle art, ai::int32 major, ai::int32 minor) |
| Sets the version information for the plug-in group that manages a plug-in group art object.
|
AIAPI AIErr(* | GetPluginArtPluginGroup )(AIArtHandle art, AIPluginGroupHandle *entry) |
| Retrieves the plug-in group that manages a plug-in group art object.
|
AIAPI AIErr(* | SetPluginArtPluginGroup )(AIArtHandle art) |
| Sets the plug-in group that manages a plug-in group art object.
|
AIAPI AIErr(* | GetPluginArtEditArt )(AIArtHandle art, AIArtHandle *editArt) |
| Retrieves the edit group art object from the plug-in group art object.
|
AIAPI AIErr(* | SetPluginArtEditArt )(AIArtHandle art, AIArtHandle editArt) |
| Replaces the edit group of a plug-in group art object.
|
AIAPI AIErr(* | GetPluginArtResultArt )(AIArtHandle art, AIArtHandle *resultArt) |
| Retrieves the result group art object from the plug-in group art object.
|
AIAPI AIErr(* | SetPluginArtResultArt )(AIArtHandle art, AIArtHandle resultArt) |
| Replaces the result group of a plug-in group art object.
|
AIAPI AIErr(* | GetPluginArtDataCount )(AIArtHandle art, size_t *count) |
| Gets the size of the developer-defined data store for a plug-in group art object.
|
AIAPI AIErr(* | SetPluginArtDataCount )(AIArtHandle art, size_t count) |
| Sets the size of the developer-defined data store for a plug-in group art object.
|
AIAPI AIErr(* | GetPluginArtDataRange )(AIArtHandle art, void *data, size_t index, size_t count) |
| Retrieves data from the developer-defined data store for a plug-in group art object.
|
AIAPI AIErr(* | SetPluginArtDataRange )(AIArtHandle art, void *data, size_t index, size_t count) |
| Writes data to the developer-defined data store for a plug-in group art object.
|
AIAPI AIErr(* | MarkPluginArtDirty )(AIArtHandle art) |
| Marks a plug-in group art object as dirty, meaning that the contained art has been modified since the last update operation.
|
AIAPI AIErr(* | MarkPluginArtClean )(AIArtHandle art) |
| Marks a plug-in group art object as clean, meaning that the contained art has not been modified since the last update operation.
|
AIAPI AIErr(* | GetPluginArtClipping )(AIArtHandle art, AIBoolean *clipping) |
| Reports whether a plug-in group art object is a clipping object.
|
AIAPI AIErr(* | SetPluginArtClipping )(AIArtHandle art, AIBoolean clipping) |
| Sets the clipping state of a plug-in group art object.
|
AIAPI AIErr(* | GetAIPluginGroupDefaultName )(AIPluginGroupHandle entry, char **name) |
| Retrieves the default name for a plug-in group, as returned by AIArtSuite::GetArtName() .
|
AIAPI AIErr(* | SetAIPluginGroupDefaultName )(AIPluginGroupHandle entry, const char *name) |
| Sets the default name for a plug-in group, as returned by AIArtSuite::GetArtName() .
|
AIAPI AIErr(* | GetAIPluginGroupAppVersion )(AIPluginGroupHandle entry, AIVersion *appVersion) |
| Retrieves the earliest Illustrator version that this plug-in group supports.
|
AIAPI AIErr(* | SetAIPluginGroupAppVersion )(AIPluginGroupHandle entry, AIVersion appVersion) |
| Sets the earliest Illustrator version that this plug-in group supports.
|
AIAPI AIErr(* | MarkPluginArtSilent )(AIArtHandle art) |
| Prevents subsequent modifications to the edit group from marking the object dirty (changed) and triggering the update notification.
|
AIAPI AIErr(* | PluginArtAdjustColors )(AIArtHandle art, AIAdjustColorFunc adjustColorCallback, void *callbackData, ASBoolean *modifiedSomething, AIBoolean adjustFills, AIBoolean adjustStrokes, AIBoolean selectionOnly) |
Detailed Description
This suite provides functions for working with plug-in groups.
A plug-in group organizes artwork that is acted upon by a particular plug-in. A plug-in group object is a container of plug-in group art objects. It maintains two groups of art objects; one group that the user interacts with (the edit group), and another group that your plug-in generates (the result group). Use the functions in this suite to create these groups and to access their contents.
Register a plug-in group during startup to manage plug-in group art objects of a particular type, using AIPluginGroupSuite::AddAIPluginGroup() . Store the returned plug-in group handle in globals , to use in creating plug-in group art objects. All plug-in group art objects must associate themselves with a plug-in group by calling AIPluginGroupSuite::UseAIPluginGroup() .
A plug-in group art object is an art object with the type kPluginArt . The edit art group and result art group are art objects with the type kGroupArt , but they are not children of the plug-in group art object. Access them with AIPluginGroupSuite::GetPluginArtEditArt() and AIPluginGroupSuite::GetPluginArtResultArt() .
- Members of the edit group are hidden, but are editable and selectable.
- Members of the result group become visible, but are not selectable.
You can define and store arbitrary data with a plug-group art object, using AIPluginGroupSuite::SetPluginArtDataRange() , AIPluginGroupSuite::GetPluginArtDataRange() , AIPluginGroupSuite::SetPluginArtDataCount() , and AIPluginGroupSuite::GetPluginArtDataCount() .
A plug-in that manages plug-in groups can receive these selectors, with kCallerAIPluginGroup as the caller, accompanied by an AIPluginGroupMessage:
kSelectorAINotifyEdits
kSelectorAIUpdateArt
kSelectorAICanShowContents
kSelectorAIInterpolateData
It can also receive these selectors:
kSelectorAIReplaceSymbol (sends AIReplaceSymbolMessageData )
kSelectorAIDisallowsArtTypeQuery (sends AIPluginArtTypeMessageData )
kSelectorAIPerformCustomHitTest (sends AIPluginGroupCustomHitTestData )
kSelectorAICollectPaintStyles (sends AIPluginGroupCollectPaintStylesData )
kSelectorAIApplyPaintStyles (sends AIPluginGroupApplyPaintStylesData )
kSelectorAIAdjustColors (sends AIPluginGroupAdjustColorsData )
The Live Blend tool is an example of how plug-in groups are used. A live blend is created by drawing two objects, then clicking them separately with the blend tool. After the second click, the tool draws a series of intermediate objects between the original source and destination objects to create a smooth blend between them. Only the source and destination objects are selectable or editable. When you edit or move the source or destination objects, the intermediate objects are regenerated. The document contains only the original two objects in the art tree. In this case, the source and destination art objects (as well as the spine which links the two objects) are children of the edit group, and the intermediate objects (as well as a copy of the original source and destination objects) are children of the result group.
First, register the plug-in group:
Create the plug-in group art, typically in response to a menu item or a click in your dialog, then associate the plug-in group art with the plug-in group.
sAIArt->NewArt( kPluginArt, kPlaceAboveAll, NULL, &pluginGroupArt );
sAIPluginGroup->UseAIPluginGroup (pluginGroupArt, g->myPluginGroupHandle );
This activates the plug-in group art and allows you to access its edit and result groups.
Upon activation, your plug-in starts to receive notifications. In response to kSelectorAIUpdateArt or kSelectorAINotifyEdits notifications, you must regenerate the objects in the result group The update message is the easiest and most effective notifier to use. It is sent whenever any of the edit-group objects are modified. In your main loop, listen for the kCallerAIPluginGroup caller and kSelectorAIUpdateArt selector and respond by regenerating the result-group objects according to the new state of the edit-group objects.
Member Data Documentation
Creates a plug-in group.
- Parameters:
-
| self | This plug-in. |
| name | A unique identifying name for the plug-in group. This name is displayed in error messages, and differs from the default name used in the Layers and Appearance palettes; see SetAIPluginGroupDefaultName() . |
| data | The version and error-reporting information for the group. |
| options | Option flags that determine the behavior of members, a logical OR of AIPluginGroupOptions . You cannot change these after they are set. |
| entry | [out] A buffer in which to return the plug-in group object. |
Gets the number of currently registered plug-in group managers.
Use with GetNthAIPluginGroup() to iterate through plug-in groups (which can belong to different plug-ins).
- Parameters:
-
| count | [out] A buffer in which to return the number of groups. |
Retrieves the earliest Illustrator version that this plug-in group supports.
- Parameters:
-
| entry | The plug-in group object. |
| appVersion | [out] A buffer in which to return the version constant. |
- See also:
SetAIPluginGroupAppVersion()
Retrieves the default name for a plug-in group, as returned by AIArtSuite::GetArtName() .
This name is used in the Layers and Appearance palettes, and can differ from the name assigned at creation, which is displayed in error messages; see GetAIPluginGroupName() .
- Parameters:
-
| art | The plug-in group object. |
| name | [out] A buffer in which to return the default name, or NULL , in which case AIArtSuite::GetArtName() returns the description string. |
Retrieves the description of a plug-in group, a localized string that Illustrator uses for error reporting.
- Parameters:
-
| entry | The plug-in group object. |
| desc | [out] A buffer in which to return the description. |
Retrieves the name of a plug-in group.
This name is displayed in error messages, and can differ from the display name (called the default name) used in the Layers and Appearance palettes; see GetAIPluginGroupDefaultName() .
- Parameters:
-
| entry | The plug-in group object. |
| name | [out] A buffer in which to return the name. |
Retrieves the option flags of a plug-in group.
- Parameters:
-
| entry | The plug-in group object. |
| options | [out] A buffer in which to return the options, a logical OR of AIPluginGroupOptions . |
Retrieves a reference to the plug-in that created a plug-in group.
You can pass this reference to functions in the AIPluginSuite .
- Parameters:
-
| entry | The plug-in group object. |
| plugin | [out] A buffer in which to return the plug-in object. |
Retrieves the version information of a plug-in group.
- Parameters:
-
| entry | The plug-in group object. |
| major | [out] A buffer in which to return the major version number. |
| minor | [out] A buffer in which to return the minor version number. |
Retrieves a reference to a plug-in group by position index in the current list of registered plug-in group managers.
Use with CountAIPluginGroups to iterate through plug-in groups (which can belong to different plug-ins).
- Parameters:
-
| n | The 0-based index position. |
| entry | [out] A buffer in which to return the plug-in group object. |
Reports whether a plug-in group art object is a clipping object.
When it is, the result group constructed by the plug-in group manager should contain one or more paths that are set to clip.
- Parameters:
-
| art | The plug-in group art object. |
| clipping | [out] A buffer in which to return true if the object is a clipping object. |
Gets the size of the developer-defined data store for a plug-in group art object.
Store data using SetPluginArtDataRange() , and access it with GetPluginArtDataRange() . The data is stored as a hexadecimal-encoded string of bytes.
- Parameters:
-
| art | The plug-in group art object. |
| count | [out] A buffer in which to return the number of bytes of data stored, or 0 if there is no data associated with the art object. |
Retrieves data from the developer-defined data store for a plug-in group art object.
The data is stored as a hexadecimal-encoded string of bytes.
- Parameters:
-
| art | The plug-in group art object. |
| data | [out] A buffer in which to return the data. |
| index | An offset into the data store at which to start reading. |
| count | A number of bytes to read from the data store. |
Retrieves the edit group art object from the plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| editArt | [out] A buffer in which to return the edit group art object. |
- Note:
- The edit group art object is not a child of the the plug-in group art object. You can access it with this function, and it can be returned by
AIMatchingArtSuite::GetSelectedArt() , which can also return the plug-in group art object itself.
AIMatchingArtSuite::GetSelectedArt() or AIMatchingArtSuite::GetMatchingArt() can return objects in the edit group.
Retrieves the name of the plug-in group that manages a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| name | [out] A buffer in which to return the plug-in group name. |
Retrieves the plug-in group that manages a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| entry | [out] A buffer in which to return the plug-in group object. |
Retrieves the result group art object from the plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| resultArt | [out] A buffer in which to return the result group art object. |
- Note:
- The result group art object is not a child of the the plug-in group art object. You can access it only with this function.
Retrieves the version information for the plug-in group that manages a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| major | [out] A buffer in which to return the major version number. |
| minor | [out] A buffer in which to return the minor version number. |
Marks a plug-in group art object as clean, meaning that the contained art has not been modified since the last update operation.
A menu command or tool action typically modifies the edit art or the object's data, then rebuilds the result art. The modifications trigger a notify-edit message, and also mark the plug-in object dirty, causing a redundant update if the result art has already been updated. Use this function in an external notification handler, after updating the result group, to prevent the redundant update.
- Parameters:
-
| art | The plug-in group art object. |
- See also:
MarkPluginArtDirty() , MarkPluginArtSilent()
- Note:
- This function is intended for use within a GoMenu or AITool handler, or a notification from some other suite. When a handler for
kSelectorAINotifyEdits returns kNoErr , it marks the plug-in object as dirty (in need of kSelectorAIUpdateArt ), even if the handler called this function. To prevent this, the handler must return kMarkValidPluginGroupReply .
Marks a plug-in group art object as dirty, meaning that the contained art has been modified since the last update operation.
This forces an update notification; see kSelectorAIUpdateArt .
Illustrator generally detects when a plug-in group object needs to have the result art rebuilt. It sends an update message when the object is first created, and whenever the group's data or any object in the edit group has been edited (outside of the update message handler itself). You might need to specifically mark the art as changed if objects have external dependencies; for instance, reference to a pattern or other global object, or an artwork attribute such as the page size. If you detect relevant changes through other notifications, you can trigger an update by calling this function.
- Parameters:
-
| art | The plug-in group art object. |
- See also:
MarkPluginArtClean() , MarkPluginArtSilent()
Prevents subsequent modifications to the edit group from marking the object dirty (changed) and triggering the update notification.
Does not prevent the marking of the result group. The status is cleared when the context is popped.
- Parameters:
-
| art | The plug-in group art object. |
- See also:
MarkPluginArtClean() , MarkPluginArtDirty()
- Deprecated:
- As of AI13 (CS3), this function is deprecated in favor of
AIPathStyleSuite::AdjustObjectAIColors() , a more powerful and flexible treatment of colors in global objects such as patterns, gradients, symbols, brushes, and Live Effects. Color filter plug-ins that iterate the artwork contents themselves and only use this function for plug-in groups with that have the flag kPluginGroupManagesPaintStyles , should now use AIPathStyleSuite::AdjustObjectAIColors() to process the entire selection. In this case, the new function emulates the previous behavior; it sends an c\ AIPluginGroupAdjustColorsData message in which both the pattern and style adjustment callbacks do nothing.
Modifies colors in all art managed by a plug-in group, by calling a developer-defined callback function.
- Parameters:
-
| art | The plug-in group art object. |
| adjustColorCallback | The developer-defined callback procedure. |
| callbackData | Optional developer-defined data to pass through to the callback. |
| modifiedSomething | [out] Optional, a buffer in which to return true if any colors were modified. |
| adjustFills | True to modify colors in fill. |
| adjustStrokes | True to modify colors in strokes. |
| selectionOnly | True to modify colors only in selected objects. |
- Returns:
- Any error reported by the callback function.
- Note:
- This function s intended for the use of plug-ins other than the one implementing the plug-in group.
Sets the earliest Illustrator version that this plug-in group supports.
When Illustrator writes out this plug-in group, if writing to an earlier file format, it writes out only the result group.
If not specifically set, the version default is 8. Plug-in groups are not supported in versions earlier than 8.
- Parameters:
-
| entry | The plug-in group object. |
| appVersion | The version constant. |
Sets the default name for a plug-in group, as returned by AIArtSuite::GetArtName() .
This name is used in the Layers and Appearance palettes, and can differ from the name assigned at creation, which is displayed in error messages; see GetAIPluginGroupName() .
- Parameters:
-
| entry | The plug-in group object. |
| name | The new default name, or NULL , in which case AIArtSuite::GetArtName() returns the description string. |
Sets the clipping state of a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| clipping | True to make the object a clipping object, false to turn clipping off. |
- Returns:
kBadParameterErr if the associated group does not specify the option kPluginGroupCanBeClipping .
Sets the size of the developer-defined data store for a plug-in group art object.
Store data using SetPluginArtDataRange() , and access it with GetPluginArtDataRange() . The data is stored as a hexadecimal-encoded string of bytes.
- Parameters:
-
| art | The plug-in group art object. |
| count | The number of bytes of data. |
Writes data to the developer-defined data store for a plug-in group art object.
The data is stored as a hexadecimal-encoded string of bytes.
- Parameters:
-
| art | The plug-in group art object. |
| data | A pointer to the developer-defined data. |
| index | An offset into the data store at which to start writing. |
| count | A number of bytes to write to the data store. |
Replaces the edit group of a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| editArt | The new edit group object, an art object of type kGroupArt . |
Sets the name of the plug-in group that manages a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| name | The new unique identifying name for the plug-in group. |
Sets the plug-in group that manages a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| entry | The new plug-in group object. |
Replaces the result group of a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| resultArt | The new result group object, an art object of type kGroupArt . |
Sets the version information for the plug-in group that manages a plug-in group art object.
- Parameters:
-
| art | The plug-in group art object. |
| major | The new major version number. |
| minor | The new minor version number. |
Associates a plug-in group art object with a plug-in group, activating the plug-in group and automatically creating the contained edit and result groups.
After calling this function, your plug-in starts to receive plug-in group selectors.
You can only access the edit and result groups through this art object; see GetPluginArtEditArt() and GetPluginArtResultArt() .
The art object inherits the plug-in group's name and version attributes, which you can then access either through the group (GetAIPluginGroupName() , for example) or the art object (GetPluginArtName() ). The plug-in group name is used for error messages, and differs from the art object's name, used in the Layers and Appearance palettes; see GetAIPluginGroupDefaultName() .
You can move the art object to a new plug-in group with SetPluginArtPluginGroup() .
- Parameters:
-
The documentation for this struct was generated from the following file:
|