|
AIDictionarySuite Struct Reference
[API Suite List]
This suite provides function to create and manage Illustrator data dictionaries.
More...
#include <AIDictionary.h>
List of all members.
Public Attributes |
AIAPI AIErr(* | CreateDictionary )(AIDictionaryRef *dictionary) |
| Creates a new dictionary.
|
AIAPI ai::int32(* | AddRef )(AIDictionaryRef dictionary) |
| Increments the reference count of a dictionary.
|
AIAPI ai::int32(* | Release )(AIDictionaryRef dictionary) |
| Frees the memory associated with a dictionary when it is no longer needed (the reference count is 0).
|
AIAPI AIErr(* | Clone )(ConstAIDictionaryRef src, AIDictionaryRef *dst) |
| Creates a new dictionary that is an exact duplicate of an existing dictionary.
|
AIAPI AIErr(* | Copy )(AIDictionaryRef dict, ConstAIDictionaryRef src) |
| Makes a copy of a dictionary, replacing the current contents of an existing dictionary.
|
AIAPI ai::uint32(* | Size )(ConstAIDictionaryRef dict) |
| Gets the number of entries in a dictionary.
|
AIAPI AIErr(* | Begin )(ConstAIDictionaryRef dict, AIDictionaryIterator *iterator) |
| Creates a new iterator object for visiting dictionary entries.
|
AIAPI AIDictKey(* | Key )(const char *keyString) |
| Finds a dictionary key, or creates a new one if the specified key does not exist.
|
AIAPI const char *(* | GetKeyString )(AIDictKey key) |
| Retrieves the name string of a key.
|
AIAPI AIBoolean(* | IsKnown )(ConstAIDictionaryRef dictionary, AIDictKey key) |
| Reports whether there is an entry with a given key in a dictionary.
|
AIAPI AIErr(* | DeleteEntry )(AIDictionaryRef dictionary, AIDictKey key) |
| Removes the entry with a given key from a dictionary.
|
AIAPI AIErr(* | GetEntryType )(ConstAIDictionaryRef dictionary, AIDictKey key, AIEntryType *entryType) |
| Retrieves the data type of an entry.
|
AIAPI AIErr(* | CopyEntry )(ConstAIDictionaryRef dictionary1, AIDictionaryRef dictionary2, AIDictKey key1, AIDictKey key2) |
| Copies an entry from one dictionary to another, or to another key in the same dictionary.
|
AIAPI AIErr(* | MoveEntry )(AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, AIDictKey key1, AIDictKey key2) |
| Moves an entry from one dictionary to another (or to another key in the same dictionary), removing the source entry.
|
AIAPI AIErr(* | SwapEntries )(AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, AIDictKey key1, AIDictKey key2) |
| Swaps two entries in two dictionaries, or in the same dictionary.
|
AIAPI AIErr(* | GetArtEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIArtHandle *art) |
| Retrieves an art object from a dictionary entry.
|
AIAPI AIErr(* | NewArtEntry )(AIDictionaryRef dictionary, AIDictKey key, ai::int16 type) |
| Creates an entry which is a new art object of a specified type.
|
AIAPI AIErr(* | MoveArtToEntry )(AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art) |
| Moves an art object from the artwork tree into a dictionary, removing it from the artwork tree.
|
AIAPI AIErr(* | MoveEntryToArt )(AIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *art) |
| Moves an art object from a dictionary into the artwork tree, removing the entry from the dictionary.
|
AIAPI AIErr(* | CopyArtToEntry )(AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art) |
| Copies an art object from the artwork tree into a dictionary.
|
AIAPI AIErr(* | CopyEntryToArt )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *art) |
| Copies an art object from a dictionary into the artwork tree.
|
AIAPI AIErr(* | SetEntryToLayer )(AIDictionaryRef dictionary, AIDictKey key, AILayerHandle layer) |
| Sets an entry in a dictionary to refer to the topmost group of a layer.
|
AIAPI AIErr(* | SetLayerToEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AILayerHandle prep, AILayerHandle *layer) |
| Inserts a new layer in the current document, whose topmost group is the group referenced by a dictionary entry.
|
AIAPI AIEntryRef(* | Get )(ConstAIDictionaryRef dictionary, AIDictKey key) |
| Retrieves a dictionary entry.
|
AIAPI AIErr(* | Set )(AIDictionaryRef dictionary, AIDictKey key, AIEntryRef entry) |
| Sets a dictionary entry.
|
AIAPI AIErr(* | GetBooleanEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIBoolean *value) |
| Retrieves a boolean value from a dictionary entry.
|
AIAPI AIErr(* | SetBooleanEntry )(AIDictionaryRef dictionary, AIDictKey key, AIBoolean value) |
| Sets a boolean value for a dictionary entry.
|
AIAPI AIErr(* | GetIntegerEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int32 *value) |
| Retrieves an integer value from a dictionary entry.
|
AIAPI AIErr(* | SetIntegerEntry )(AIDictionaryRef dictionary, AIDictKey key, ai::int32 value) |
| Sets an integer value for a dictionary entry.
|
AIAPI AIErr(* | GetPointerEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::intptr *value) |
| Retrieves a pointer value from a dictionary entry (pointers may be 64-bit or 32-bit depending on platform).
|
AIAPI AIErr(* | SetPointerEntry )(AIDictionaryRef dictionary, AIDictKey key, ai::intptr value) |
| Sets a pointer value for a temporary dictionary entry.
|
AIAPI AIErr(* | GetRealEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIReal *value) |
| Retrieves a real-number value from a dictionary entry.
|
AIAPI AIErr(* | SetRealEntry )(AIDictionaryRef dictionary, AIDictKey key, AIReal value) |
| Sets a real-number value for a dictionary entry.
|
AIAPI AIErr(* | GetStringEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, const char **value) |
| Retrieves a string value from a dictionary entry.
|
AIAPI AIErr(* | SetStringEntry )(AIDictionaryRef dictionary, AIDictKey key, const char *value) |
| Sets a string value for a dictionary entry.
|
AIAPI AIErr(* | GetBinaryEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, void *value, size_t *size) |
| Retrieves a binary value from a dictionary entry.
|
AIAPI AIErr(* | SetBinaryEntry )(AIDictionaryRef dictionary, AIDictKey key, void *value, size_t size) |
| Sets a binary value for a dictionary entry.
|
AIAPI AIErr(* | GetDictEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef *value) |
| Retrieves a dictionary value from a dictionary entry.
|
AIAPI AIErr(* | SetDictEntry )(AIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef value) |
| Sets a dictionary value for a dictionary entry.
|
AIAPI AIErr(* | GetArrayEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIArrayRef *value) |
| Retrieves an array value from a dictionary entry.
|
AIAPI AIErr(* | SetArrayEntry )(AIDictionaryRef dictionary, AIDictKey key, AIArrayRef value) |
| Sets an array value for a dictionary entry.
|
AIAPI AIErr(* | GetUnicodeStringEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::UnicodeString &value) |
| Retrieves a Unicode string value from a dictionary entry.
|
AIAPI AIErr(* | SetUnicodeStringEntry )(AIDictionaryRef dictionary, AIDictKey key, const ai::UnicodeString &value) |
| Sets a Unicode string value for a dictionary entry.
|
AIAPI AIErr(* | TouchArt )(ConstAIDictionaryRef dictionary) |
| Marks art as changed when a change has been made to the dictionary that affects a user-visible property of any associated art object.
|
Detailed Description
This suite provides function to create and manage Illustrator data dictionaries.
A dictionary is a heterogeneous container whose elements, called entries, are accessed by keys.
Entries are of type AIEntryRef . The AIEntrySuite provides methods to construct and query entries of different types. Entries can contain values of various data types; simple types such as booleans, integers, floats, and strings; and complex types such as arrays, other dictionaries, and references to document objects including art objects, brushes and styles. This makes dictionaries very flexible and powerful containers.
Dictionaries can themselves be stored in other containers such as arrays or other dictionaries. In particular they can be stored in the dictionaries attached to art objects and to the document. When a dictionary is stored in one of these places (directly or indirectly) it is read and written as a part of the document.
Member Data Documentation
Increments the reference count of a dictionary.
- Parameters:
-
| dictionary | The dictionary reference. |
Creates a new dictionary that is an exact duplicate of an existing dictionary.
Performs a deep copy.
- Parameters:
-
| src | The dictionary to copy. |
| dst | [out] A buffer in which to return the new dictionary reference. |
Makes a copy of a dictionary, replacing the current contents of an existing dictionary.
- Parameters:
-
| dict | The dictionary into which to copy contents. |
| src | The dictionary to copy. |
Copies an art object from the artwork tree into a dictionary.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| art | The art object. |
Copies an entry from one dictionary to another, or to another key in the same dictionary.
- Parameters:
-
| dictionary1 | The source dictionary. |
| dictionary2 | The destination dictionary. |
| key1 | The key for the entry to copy. |
| key2 | The key for the new entry. |
Copies an art object from a dictionary into the artwork tree.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| paintOrder | The paint order, relative to the prep object. See AITypes::AIPaintOrder . |
| prep | The prepositional art object. This can be an object whose boundaries might overlap this one, or a compound path or group that might contain this path. |
| art | [out] A buffer in which to return a pointer to the art object. |
- See also:
AIArtSuite
Creates a new dictionary.
Dictionaries are reference counted; the initial reference count is 1.
- Parameters:
-
| dictionary | [out] A buffer in which to return the new dictionary reference. |
- See also:
AddRef() , Release()
Removes the entry with a given key from a dictionary.
- Parameters:
-
| dict | The dictionary. |
| key | The key object. |
Retrieves a dictionary entry.
(Note that this function returns an entry object, not an error code.)
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
- Returns:
- The entry object or a nil entry if an entry with the given key does not exist..
Retrieves an array value from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
Retrieves an art object from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| art | [out] A buffer in which to return the art object. |
Retrieves a binary value from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
| size | [out] A buffer in which to return the number of bytes in the value buffer. |
Retrieves a boolean value from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
Retrieves a dictionary value from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
Retrieves the data type of an entry.
- Parameters:
-
| dict | The dictionary. |
| key | The key object. |
| entryType | [out] A buffer in which to return the entry type. |
- See also:
AIEntrySuite
Retrieves an integer value from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
Retrieves the name string of a key.
(Note that this function returns a string value, not an error code.)
- Parameters:
-
- Returns:
- The key name.
Retrieves a pointer value from a dictionary entry (pointers may be 64-bit or 32-bit depending on platform).
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
Retrieves a real-number value from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
Retrieves a string value from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
Retrieves a Unicode string value from a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | [out] A buffer in which to return the value. |
Reports whether there is an entry with a given key in a dictionary.
(Note that this function returns a boolean value, not an error code.)
- Parameters:
-
| dict | The dictionary. |
| key | The key object. |
Finds a dictionary key, or creates a new one if the specified key does not exist.
(Note that this function returns a key object, not an error code.)
- Parameters:
-
- Returns:
- The key object.
Moves an art object from the artwork tree into a dictionary, removing it from the artwork tree.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| art | The art object. |
Moves an entry from one dictionary to another (or to another key in the same dictionary), removing the source entry.
- Parameters:
-
| dictionary1 | The source dictionary. |
| dictionary2 | The destination dictionary. |
| key1 | The key for the entry to copy and remove. |
| key2 | The key for the new entry. |
Moves an art object from a dictionary into the artwork tree, removing the entry from the dictionary.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| paintOrder | The paint order, relative to the prep object. See AITypes::AIPaintOrder . |
| prep | The prepositional art object. This can be an object whose boundaries might overlap this one, or a compound path or group that might contain this path. |
| art | [out] A buffer in which to return a pointer to the art object. |
- See also:
AIArtSuite
Creates an entry which is a new art object of a specified type.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| art | The art type, an AIArtType value. |
Frees the memory associated with a dictionary when it is no longer needed (the reference count is 0).
- Parameters:
-
| dictionary | The dictionary reference. Upon return, the reference is no longer valid. |
Sets a dictionary entry.
Entries whose keys are prefixed with the character '-' are temporary, and are not saved to file.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| entry | The entry object. |
Sets an array value for a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The new value. |
Sets a binary value for a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The pointer to the buffer containing the new value. |
| size | The number of bytes in the value buffer. |
Sets a boolean value for a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The new value. |
Sets a dictionary value for a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The new value. |
Sets an entry in a dictionary to refer to the topmost group of a layer.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| layer | The layer. |
Sets an integer value for a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The new value. |
Inserts a new layer in the current document, whose topmost group is the group referenced by a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key, which must reference an art object that is a group. |
| paintOrder | The paint order, relative to the prep object. See AITypes::AIPaintOrder . Valid values are kPlaceDefault , kPlaceAbove , kPlaceBelow , kPlaceAboveAll and kPlaceBelowAll . |
| prep | The prepositional art object. This can be an object whose boundaries might overlap this one, or a compound path or group that might contain this path. |
| art | [out] A buffer in which to return the layer object. |
- See also:
AIArtSuite , AILayerSuite
Sets a pointer value for a temporary dictionary entry.
If the key is not temporary i.e. does not begin with "-", it returns kBadParameterErr
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The new value. |
Sets a real-number value for a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The new value. |
Sets a string value for a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The new value. |
Sets a Unicode string value for a dictionary entry.
- Parameters:
-
| dictionary | The dictionary. |
| key | The entry key. |
| value | The new value. |
Gets the number of entries in a dictionary.
(Note that this function returns a numeric value, not an error code.)
- Parameters:
-
- Returns:
- The number of entries.
Swaps two entries in two dictionaries, or in the same dictionary.
- Parameters:
-
| dictionary1 | The source dictionary. |
| dictionary2 | The destination dictionary. |
| key1 | The first key (in dictionary1 , moved to dictionary2 ). |
| key2 | The second key (in dictionary2 , moved to dictionary1 ). |
Marks art as changed when a change has been made to the dictionary that affects a user-visible property of any associated art object.
This causes any styles or plug-in groups containing the affected object to execute.
- Parameters:
-
| dictionary | The dictionary. |
The documentation for this struct was generated from the following file:
|