00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __AIDocument__
00018 #define __AIDocument__
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __AITypes__
00028 #include "AITypes.h"
00029 #endif
00030
00031 #ifndef __AIRealMath__
00032 #include "AIRealMath.h"
00033 #endif
00034
00035 #ifndef __AIFileFormat__
00036 #include "AIFileFormat.h"
00037 #endif
00038
00039 #ifndef __ATESuites__
00040 #include "ATETypesDef.h"
00041 #endif
00042
00043 #ifdef __cplusplus
00044 using ATE::TextRangesRef;
00045 using ATE::StoriesRef;
00046 using ATE::StoryRef;
00047 using ATE::DocumentTextResourcesRef;
00048 #endif
00049
00050 #include "AIHeaderBegin.h"
00051 #if defined(ILLUSTRATOR_MINIMAL)
00052 #include "AIDocumentBasicTypes.h"
00053 #endif
00054
00057
00058
00059
00060
00061
00062
00063 #define kAIDocumentSuite "AI Document Suite"
00064 #define kAIDocumentSuiteVersion19 AIAPI_VERSION(19)
00065
00066
00067 #define kAIDocumentSuiteVersion kAIDocumentSuiteVersion19
00068 #define kAIDocumentVersion kAIDocumentSuiteVersion
00069
00072 #define kAIDocumentChangedNotifier "AI Document Changed Notifier"
00073
00075 #define kAIActiveDocumentWindowAboutToBeChangedNotifier "AI Active Document Window About To be Changed Notifier"
00076
00078 #define kAIDocumentAboutToCloseNotifier "AI Document About To Close Notifier"
00079
00081 #define kAIDocumentClosedNotifier "AI Document Closed Notifier"
00082
00084 #define kAIDocumentOpenedNotifier "AI Document Opened Notifier"
00085
00088 #define kAIDocumentSavedNotifier "AI Document Saved Notifier"
00089
00092 #define kAIDocumentWriteOnDiskCompleteNotifier "AI Document Write On Disk Complete Notifier"
00093
00096 #define kAIDocumentWriteOnDiskFailedNotifier "AI Document Write On Disk Failed Notifier"
00097
00099 #define kAIDocumentNewNotifier "AI Document New Notifier"
00100
00102 #define kAIDocumentClrMdlChangedNotifier "AI Document Color Model Changed Notifier"
00103
00105 #define kAIDocumentProfilesChangedNotifier "AI Document Profiles Changed Notifier"
00106
00110 #define kAIDocumentSpotColorModeChangedNotifier "AI Document Spot Color Mode Changed Notifier"
00111
00113 #define kAIDocumentRulerUnitChangedNotifier "AI Document Ruler Unit Changed Notifier"
00114
00119 #define kAIDocumentWritePreprocessNotifier "AI Document Write Preprocess Notifier"
00120
00124 #define kAIDocumentWritePostprocessNotifier "AI Document Write Postprocess Notifier"
00125
00127 #define kAIDocumentCropAreaModifiedNotifier "AI Document Crop Area Modified Notifier"
00128
00130 #define kAIDocumentRulerOriginChangedNotifier "AI Document Ruler Origin Changed Notifier"
00131
00133 #define kAIDocumentBleedsChangedNotifier "AI Document Bleed Value Changed Notifier"
00134
00136 #define kAIDocumentTransparencyGridNotifier "AI Document Transparency Grid Notifier"
00137
00141 struct AIDocumentScaleNotifyData
00142 {
00144 AIReal oldScale{ kAIRealOne };
00145
00147 AIReal newScale{ kAIRealOne };
00148 };
00149
00155 #define kAIDocumentScaleConversionStartedNotifier "AI Document Scale Conversion Started Notifier"
00156
00162 #define kAIDocumentScaleConvertedNotifier "AI Document Scale Converted Notifier"
00163
00171 #define kAIActiveDocumentScaleChangedNotifier "AI Active Document Scale Changed Notifier"
00172
00173
00178 #define kAIDocumentScaleOutOfRangeErr 'DSOR'
00179
00180 #if !defined(ILLUSTRATOR_MINIMAL)
00181
00182 enum AIDocumentRulerUnitValue {
00183 kUnknownUnits = 0,
00185 kInchesUnits,
00187 kCentimetersUnits,
00189 kPointsUnits,
00191 kPicasUnits,
00193 kMillimetersUnits,
00195 kPixelsUnits,
00197 kQUnits,
00199 kFeetInchesUnits,
00201 kMetersUnits,
00203 kYardsUnits,
00205 kFeetsUnits,
00207 kLastUnit = kFeetsUnits
00208 };
00209
00212 enum AIDocumentColorModelValue {
00213 kDocUnknownColor = -1,
00214 kDocGrayColor = 0,
00215 kDocRGBColor,
00216 kDocCMYKColor
00217 };
00218
00221 enum {
00222 kDocTargetGroups,
00223 kDocTargetLeaves,
00224 kDocTargetPainted,
00225 kDocTargetExplicit
00226 };
00227
00242 enum AISpotColorMode {
00245 kAILegacySpotColorMode = 0,
00248 kAIStandardSpotColorMode = 1,
00249 kAIDummySpotColorMode = 0xFFFFFFFF
00250 };
00251 #endif
00252
00258 enum AIExportTriggeredFrom : ai::uint8
00259 {
00260 kAIExportAs,
00261 kAIExportForScreen,
00262 kAISaveForWeb
00263 };
00264
00266 struct AIDocumentWriteOnDiskCompleteNotifyData
00267 {
00268 ai::FilePath documentFilepath;
00269 };
00270
00272 struct AIDocumentWriteOnDiskFailedNotifyData
00273 {
00274 AIErr error = kCantHappenErr;
00275 ai::FilePath documentFilepath;
00276 };
00277
00278
00279
00280
00281
00282
00283
00285 typedef struct {
00287 AIReal width, height;
00289 AIBoolean showPlacedImages;
00292 AIReal outputResolution;
00296 AIBoolean splitLongPaths;
00301 AIBoolean useDefaultScreen;
00306 AIBoolean compatibleGradients;
00310 AIBoolean printTiles;
00316 AIBoolean tileFullPages;
00317
00318 } AIDocumentSetup;
00319
00321 typedef enum {
00322 kStandardCropStyle,
00323 kJapaneseCropStyle
00324 } AICropMarkStyle;
00325
00327 enum class AILibraryType : ai::uint8 {
00328 kAIBrushLibraryType,
00329 kAIStyleLibraryType,
00330 kAISwatchLibraryType,
00331 kAISymbolLibraryType,
00332 };
00333
00334
00336 typedef void *AIDocumentPlatformPrintRecord;
00337
00338
00339 #define kAIDocumentMiPrintRecordVersion 1
00340
00344 typedef struct AIDocumentMiPrintRecord
00345 {
00346 ai::int32 version;
00347 ai::int32 recordSize;
00348 AIRect paperRect;
00349 AIRect imageRect;
00350 } *AIDocumentMiPrintRecordPtr;
00351
00355 typedef struct
00356 {
00357 AIVersion aiVersion;
00358 } AIDocumentVersionInfo;
00359
00360
00362 typedef void *AIDocumentFileFormatParameters;
00363
00364
00365
00366
00367
00368
00369
00370
00381 struct AIDocumentSuite {
00382
00386 AIAPI AIErr (*GetDocumentFileSpecification) ( ai::FilePath &file );
00387
00392 AIAPI AIErr(*GetDocumentFileSpecificationFromHandle) (AIDocumentHandle document, ai::FilePath &file);
00393
00398 AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin );
00399
00406 AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin );
00407
00414 AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin );
00415
00420 AIAPI AIErr (*GetDocumentRulerUnits) ( ai::int16 *units );
00421
00428 AIAPI AIErr (*SetDocumentRulerUnits) ( ai::int16 units );
00429
00435 AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle );
00436
00440 AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle );
00441
00443 AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print );
00444
00446 AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print );
00447
00452 AIAPI AIErr (*GetDocumentSetup) ( AIDocumentSetup *setup );
00453
00458 AIAPI AIErr (*SetDocumentSetup) ( AIDocumentSetup *setup );
00459
00465 AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified );
00466
00472 AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified );
00473
00482 AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat );
00483
00488 AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat );
00489
00497 AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters );
00498
00508 AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters );
00509
00513 AIAPI AIErr (*RedrawDocument) ( void );
00514
00519 AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document );
00520
00530 AIAPI AIErr (*WriteDocument) ( const ai::FilePath &file, const char *fileFormatName, AIBoolean askForParms);
00531
00536 AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print );
00537
00539 AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print );
00540
00547 AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin );
00548
00553 AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething );
00554
00559 AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max );
00560
00566 AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds );
00567
00573 AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists );
00574
00584 AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary );
00585
00590 AIAPI AIErr (*GetDocumentColorModel) ( ai::int16 *colorModel);
00591
00599 AIAPI AIErr (*SetDocumentColorModel) ( ai::int16 colorModel);
00600
00606 AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile* rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile );
00607
00613 AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile );
00614
00621 AIAPI AIErr (*Copy) ();
00622
00629 AIAPI AIErr (*Cut) ();
00630
00637 AIAPI AIErr (*Paste) ();
00638
00644 AIAPI AIErr (*SyncDocument) ( void );
00645
00647 AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget );
00649 AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget );
00650
00661 AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary );
00662
00675 AIAPI AIErr(*GetNonRecordedDictionaryForDocument)(AIDocumentHandle document, struct _AIDictionary** dictionary);
00676
00683 AIAPI int (*GetAIVersion) ();
00684
00692 AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint );
00693
00699 AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt );
00700
00701
00702
00718 AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, ai::int32* pNAlternates, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType);
00719
00728 AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit);
00729
00734 AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL);
00735
00740 AIAPI AIErr (*GetDocumentXAP)(const char **xap);
00741
00747 AIAPI AIErr (*SetDocumentXAP)(const char *xap);
00748
00761 AIAPI AIErr (*SuspendTextReflow)();
00762
00767 AIAPI AIErr (*ResumeTextReflow)();
00768
00792 AIAPI AIErr (*GetTextSelection)( TextRangesRef* pTextSelection );
00793
00797 AIAPI AIErr (*HasTextFocus)( AIBoolean *focus);
00798
00804 AIAPI AIErr (*HasTextCaret)( AIBoolean *caret);
00805
00813 AIAPI AIErr (*GetTextFocus)( StoryRef* pStory);
00814
00819 AIAPI AIErr (*SetTextFocus)( StoryRef story);
00820
00822 AIAPI AIErr (*LoseTextFocus)();
00823
00835 AIAPI AIErr (*GetDocumentTextResources)( DocumentTextResourcesRef* pDocResources);
00836
00843 AIAPI AIErr (*WriteDocumentMacInformationResource)( const ai::FilePath &file );
00844
00856 AIAPI AIErr (*WriteDocumentWithOptions) (const ai::FilePath &file, const char *fileFormatName,
00857 ai::int32 fileFormatOptions, AIDictionaryRef additionalOptionsDict, AIBoolean askForParms);
00858
00865 AIAPI AIErr (*WriteDocumentAsLibrary) (const ai::FilePath &file, AILibraryType libraryType);
00866
00872 AIAPI AIErr (*DocumentHasOverprint)(AIBoolean *hasOverprint);
00873
00886 AIAPI AIErr (*DocumentHasManagedLinks)(AIDocumentHandle document, AIBoolean *hasManagedLinks);
00887
00895 AIAPI AIErr (*GetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode *mode);
00896
00907 AIAPI AIErr (*SetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode mode,
00908 AIBoolean convert, AIBoolean* converted);
00909
00915 AIAPI AIErr (*Undo) ();
00916
00922 AIAPI AIErr (*Redo) ();
00929 AIAPI AIErr (*DocumentRasterAttributes) (AIBoolean *hasDeviceNRasters, AIBoolean *hasOverprint);
00930
00936 AIAPI AIErr (*GetDocumentStartupProfile) (AIDocumentHandle document, AIDocumentStartupProfile *startupProfile );
00937
00942 AIAPI AIErr (*GetDocumentBleeds) (AIRealRect *bleedOffset);
00943
00948 AIAPI AIErr (*SetDocumentBleeds) (const AIRealRect& bleedOffset);
00949
00954 AIAPI AIErr (*SetDocumentPixelPerfectStatus)(AIBoolean isPixelPerfect);
00955
00960 AIAPI AIBoolean (*GetDocumentPixelPerfectStatus)();
00961
00968 AIAPI AIErr (*DeleteSelection)();
00969
00977 AIAPI AIErr(*SetAutoAssignUIDOnArtCreation)(ai::int16 artType, AIBoolean autoAssignUIDOnArtCreation);
00978
00986 AIAPI AIErr(*GetAutoAssignUIDOnArtCreation)(ai::int16 artType, AIBoolean &outAutoAssignUIDOnArtCreation);
00987
00992 AIAPI AIReal (*GetEffectiveScaleFactor)();
00993
01001 AIAPI AIErr(*GetDocumentScale)(AIReal& docScale);
01002
01008 AIAPI AIBoolean(*IsCloudAIDocument)();
01009
01014 AIAPI AIErr(*GetDocumentFileName)(ai::UnicodeString &fileName);
01015
01020 AIAPI AIErr(*GetDocumentFileNameNoExt)(ai::UnicodeString &fileName);
01021
01026 AIAPI AIErr(*GetDocumentFileNameFromHandle)(AIDocumentHandle document, ai::UnicodeString &fileName);
01027
01032 AIAPI AIErr(*GetDocumentFileNameNoExtFromHandle)(AIDocumentHandle document, ai::UnicodeString &fileName);
01033
01038 AIAPI AIErr (*GetLastExportedFilePath) ( const AIExportTriggeredFrom option, ai::FilePath &file);
01039
01044 AIAPI AIErr (*SetLastExportedFilePath) ( const AIExportTriggeredFrom option, ai::FilePath file);
01045 };
01046
01047
01048 #include "AIHeaderEnd.h"
01049
01050
01051 #endif