00001 #ifndef __AIPlaced__
00002 #define __AIPlaced__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __AITypes__
00031 #include "AITypes.h"
00032 #endif
00033
00034 #ifndef __AIArt__
00035 #include "AIArt.h"
00036 #endif
00037
00038 #ifndef _AIRaster_
00039 #include "AIRaster.h"
00040 #endif
00041
00042 #include "IAIFilePath.hpp"
00043
00044 #include "AIHeaderBegin.h"
00045
00049
00050
00051
00052
00053
00054
00055 #define kAIPlacedSuite "AI Placed Suite"
00056 #define kAIPlacedSuiteVersion9 AIAPI_VERSION(9)
00057 #define kAIPlacedSuiteVersion kAIPlacedSuiteVersion9
00058 #define kAIPlacedVersion kAIPlacedSuiteVersion
00059
00060
00062 enum AIPlacedObjectType {
00064 kEPSType = 0,
00066 kOtherType
00067 };
00068
00071 enum PlaceMethod {
00073 kAsIs,
00075 kFill,
00077 kFit,
00079 kConform,
00082 kReconform
00083 };
00084
00087 enum PlaceAlignment {
00088 kTopLeft,
00089 kMidLeft,
00090 kBotLeft,
00091
00092 kTopMid,
00093 kMidMid,
00094 kBotMid,
00095
00096 kTopRight,
00097 kMidRight,
00098 kBotRight
00099 };
00100
00102 typedef enum PlaceRequestMode {
00105 kVanillaPlace = 0,
00113 kQueryReplace,
00116 kForceReplace,
00119 kUnlinkPlaced,
00124 kCreateNewArt,
00127 kForceReplaceEx,
00131 kQueryUnlinkPlaced
00132 } ePlaceRequestMode;
00133
00135 typedef enum
00136 {
00138 kAIPlacedHasBlack = (1<<0),
00140 kAIPlacedHasCyan = (1<<1),
00142 kAIPlacedHasMagenta = (1<<2),
00144 kAIPlacedHasYellow = (1<<3),
00146 kAIPlacedHasCustomColors = (1<<4)
00147 } AIPlacedPlateInfo;
00148
00149
00150 typedef enum
00151 {
00152
00153 kAIPlaceTransformTypeNone = 0,
00154
00155 kAIPlacedTransformTypeFitToView = 1
00156
00157 } AIPlaceTransformType;
00158
00159
00160
00161
00162
00163
00164
00165
00169 struct AIPlaceRequestData
00170 {
00171 AIPlaceRequestData() : m_lPlaceMode(0), m_hOldArt(NULL), m_hNewArt(NULL), m_pFilePath(NULL), m_lParam(0), m_filemethod(0), m_disableTemplate(false), m_doShowParamDialog(false), m_PlaceTransformType(kAIPlaceTransformTypeNone){}
00172
00175 ai::int32 m_lPlaceMode;
00176
00178 AIArtHandle m_hOldArt;
00179
00181 AIArtHandle m_hNewArt;
00182
00185 const ai::FilePath *m_pFilePath;
00186
00189 ai::int32 m_lParam;
00190
00192 ai::int16 m_filemethod;
00193
00195 ASBoolean m_disableTemplate;
00196
00198 AIBoolean m_doShowParamDialog;
00199
00201 AIPlaceTransformType m_PlaceTransformType;
00202 };
00203
00204
00205
00206
00207
00208
00209
00210
00256 typedef struct AIPlacedSuite {
00257
00264 AIAPI AIErr (*GetPlacedFileSpecification) ( AIArtHandle placed, ai::FilePath &file );
00265
00273 AIAPI AIErr (*SetPlacedFileSpecification) ( AIArtHandle placed, const ai::FilePath &file );
00274
00281 AIAPI AIErr (*GetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix );
00282
00290 AIAPI AIErr (*SetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix );
00291
00297 AIAPI AIErr (*GetPlacedBoundingBox) ( AIArtHandle placed, AIRealRect *bbox );
00298
00305 AIAPI AIErr (*SetPlacedObject) ( AIArtHandle placed, AIArtHandle *group );
00306
00314 AIAPI AIErr (*CountPlacedCustomColors) ( AIArtHandle art, ai::int32 *count );
00315
00323 AIAPI AIErr (*GetNthPlacedCustomColorName) ( AIArtHandle art, ai::int32 num, ai::UnicodeString& name );
00324
00330 AIAPI AIErr (*MakePlacedObjectNative) ( AIArtHandle placed, AIArtHandle *native, AIBoolean askForParam );
00331
00337 AIAPI AIErr (*GetPlacedType) ( AIArtHandle placed, ai::int16 *pPlacedType );
00338
00345 AIAPI AIErr (*GetPlacedChild) ( AIArtHandle placed, AIArtHandle *group );
00346
00353 AIAPI AIErr (*ExecPlaceRequest)( AIPlaceRequestData &placeRequestData );
00354
00364 AIAPI AIErr (*GetPlacedFileInfoFromArt)( AIArtHandle placed, SPPlatformFileInfo *spFileInfo );
00365
00373 AIAPI AIErr (*GetPlacedFileInfoFromFile)( AIArtHandle placed, SPPlatformFileInfo *spFileInfo );
00374
00379 AIAPI AIErr (*GetPlacedFilePathFromArt)( AIArtHandle placed, ai::UnicodeString &path );
00380
00386 AIAPI AIErr (*ConcatPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *concat );
00387
00388
00389
00399 AIAPI AIErr (*SetPlaceOptions) ( AIArtHandle placed, enum PlaceMethod method, enum PlaceAlignment alignment, AIBoolean clip );
00400
00407 AIAPI AIErr (*GetPlaceOptions) ( AIArtHandle placed, enum PlaceMethod *method, enum PlaceAlignment *alignment, AIBoolean *clip );
00408
00421 AIAPI AIErr (*GetPlacedDimensions) ( AIArtHandle placed, AIRealPoint *size, AIRealRect *viewBounds, AIRealMatrix *viewMatrix,
00422 AIRealRect *imageBounds, AIRealMatrix *imageMatrix );
00423
00424
00425
00430 AIAPI AIErr (*SetPlacedBoundingBox) ( AIArtHandle art, AIRealRect* bbox );
00431
00439 AIAPI AIErr (*GetRasterInfo) ( AIArtHandle art, AIRasterRecord* info, AIBoolean* israster );
00444 AIAPI AIErr (*GetProcessPlatesInfo) (AIArtHandle art, AIPlacedPlateInfo * plateInfo);
00445
00446 } AIPlacedSuite;
00447
00448 #include "AIHeaderEnd.h"
00449
00450 #endif