Describes a file format that Illustrator can either read or write.
More...
#include <hdicoreFileFormat.h>
|
struct | AddData |
| Wraps information needed to add a new file format. More...
|
|
|
enum | Options {
UnknownOptions = 0
, ReadOption = 1 << 0
, ExportOption = 1 << 1
, WriteOption = 1 << 9
,
ImportArtOption = 1 << 2
, PlaceArtOption = 1 << 3
, ConvertTemplateOption = 1 << 7
, LinkArtOption = 1 << 8
,
ImportStylesOption = 1 << 4
, SuppliesPrintRecordOptionOption = 1 << 5
, IsDefaultOptionOption = 1 << 6
, NoAutoCheckFormatOption = 1 << 10
,
CreateTemplateLayerOption = 1 << 11
, HasExtendedDataOption = 1 << 12
, SkipStartupObjectsOptionOption = 1 << 13
, NoWarningOptionOption = 1 << 14
,
SaveCopyOptionOption = 1 << 15
, SuppressUIOption = 1 << 21
, WriteAsOption = 1 << 22
, CheckAlwaysOption = 1 << 23
,
ContainsPartialParametersOption = 1 << 24
, ImportCompositeFontsOption = 1 << 25
, OpenUntitledCopyOption = 1 << 26
, WriteSwatchLibraryOption = 1 << 27
,
WriteBrushLibraryOption = 1 << 28
, WriteStyleLibraryOption = 1 << 29
, WriteSymbolLibraryOption = 1 << 30
} |
| Used to specify the capabilities of a file format. More...
|
|
enum | ExtendedOptions { NoExtendedOptions = 0
, SaveMultiArtboardsExtendedOption = 1 << 0
} |
| Used to specify the extended capabilities of a file format.
|
|
typedef std::vector< std::string > | ExtVector |
|
typedef std::unique_ptr< AddData > | AddDataUP |
|
typedef std::shared_ptr< AddData > | AddDataSP |
|
typedef std::weak_ptr< AddData > | AddDataWP |
|
|
class | Illustrator |
|
void * | __accessImpl (const FileFormat &) |
|
Describes a file format that Illustrator can either read or write.
◆ Options
Used to specify the capabilities of a file format.
A subset of options are used with the FileFormat constructor that creates wholly new Illustrator file formats. These options specify which operations are supported, and are also sent in a FileFormatMessage to indicate the requested action. Additional options can be set in the FileFormatGoMessageType message to provide more information about the requested operation.
- Note
- The read, embed (import/place), and link operations are very similar in execution. In all cases, Illustrator creates an empty artwork and send the plug-in a message to read the file into the artwork. Special handling is required only if the plug-in needs to do different things depending on the type of operation; for example, the Photoshop file format plug-in has options for preserving Photoshop's layers if it is not linking.
◆ FileFormat() [1/4]
hdi::core::FileFormat::FileFormat |
( |
| ) |
|
Constructs an empty FileFormat object.
- Author
- GW
- Date
- 12/2014
- Note
- To test if a FileFormat object is empty, call isEmpty() on it
-
Empty FileFormat objects do not relate to any actual Illustrator file format; they are designed to be "receivers" of some other FileFormat object via the overloaded assignment operator. Empty FileFormat objects are useless until such time (though it is safe to call any of their methods)
◆ FileFormat() [2/4]
hdi::core::FileFormat::FileFormat |
( |
const FileFormat & |
ff_ | ) |
|
Constructs a new FileFormat object from an existing FileFormat object (copy constructor)
- Author
- GW
- Date
- 12/2014
- Parameters
-
◆ FileFormat() [3/4]
hdi::core::FileFormat::FileFormat |
( |
const AIFileFormatHandle |
aiFileFormat_ | ) |
|
Constructs a new FileFormat object from an AIFileFormatHandle.
- Author
- GW
- Date
- 12/2014
- Parameters
-
◆ FileFormat() [4/4]
Constructs a new FileFormat object from a name and some configuration options.
- Author
- GW
- Date
- 12/2014
- Parameters
-
name_ | Unique name for the file format, as UTF-8 |
data_ | Data that further describes the file format to be added |
opt_ | File format operations that this plug-in supports; a bitwise OR of the Options enum values marked as being applicable to adding a new format |
extOpt_ | Extended capabilities of the new format |
◆ ~FileFormat()
virtual hdi::core::FileFormat::~FileFormat |
( |
| ) |
|
|
virtual |
FileFormat object destructor.
- Author
- GW
- Date
- 12/2014
◆ aiFileFormatHandle()
virtual AIFileFormatHandle hdi::core::FileFormat::aiFileFormatHandle |
( |
| ) |
const |
|
virtual |
Gets the file format handle around which the target object is wrapped.
- Author
- GW
- Date
- 12/2014
- Returns
- AIFileFormatHandle for this 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 Illustrator is not handled by this class (or related classes), then it should probably be added to the hdi_core library.
◆ extensions()
ExtVector hdi::core::FileFormat::extensions |
( |
| ) |
const |
Gets the supported file extensions of the target file format.
- Author
- GW
- Date
- 12/2014
- Returns
- The file extension strings, as UTF-8
◆ isEmpty()
virtual bool hdi::core::FileFormat::isEmpty |
( |
| ) |
const |
|
virtual |
Gets whether the target FileFormat object is empty (constructed with the default ctor)
- Author
- GW
- Date
- 12/2014
- Returns
- true if the target FileFormat object is empty, false otherwise
◆ macType()
int32_t hdi::core::FileFormat::macType |
( |
| ) |
const |
Gets the Mac 4-char code file type identifier.
- Author
- GW
- Date
- 12/2014
- Returns
- The file Mac ID
◆ name()
std::string hdi::core::FileFormat::name |
( |
| ) |
const |
Gets the unique internal name of the target file format.
- Author
- GW
- Date
- 12/2014
- Returns
- The format name, as UTF-8
◆ operator!=()
virtual bool hdi::core::FileFormat::operator!= |
( |
const FileFormat & |
rhs_ | ) |
const |
|
virtual |
Tests whether a given FileFormat object is not the same as another.
- Author
- GW
- Date
- 12/2014
- Parameters
-
rhs_ | FileFormat to compare against (righthand side of inequality operator) |
- Returns
- true for the target and rhs_ being different file formats, false otherwise
◆ operator=()
Assigns one FileFormat object to another.
- Author
- GW
- Date
- 12/2014
- Parameters
-
rhs_ | Existing FileFormat object to copy values from |
- Returns
- The target FileFormat object, but with its values updated to match that of the rhs_ argument
◆ operator==()
virtual bool hdi::core::FileFormat::operator== |
( |
const FileFormat & |
rhs_ | ) |
const |
|
virtual |
Tests whether a given FileFormat object is the same as another.
- Author
- GW
- Date
- 12/2014
- Parameters
-
rhs_ | FileFormat to compare against (righthand side of equality operator) |
- Returns
- true for the target and rhs_ being the same file format, false otherwise
◆ options()
Options hdi::core::FileFormat::options |
( |
| ) |
const |
Gets the options flags of the target file format.
- Author
- GW
- Date
- 12/2014
- Returns
- A bitwise OR of Options enum values
◆ setOptions()
void hdi::core::FileFormat::setOptions |
( |
const Options |
opt_ | ) |
|
Sets the options flags of the target file format.
- Author
- GW
- Date
- 12/2014
- Parameters
-
opt_ | New options flags; a bitwise OR of Options enum values |
◆ title()
std::string hdi::core::FileFormat::title |
( |
| ) |
const |
Gets the display name of the target file format.
- Author
- GW
- Date
- 12/2014
- Returns
- The format title, as UTF-8