Adobe.com
Contents Suites Classes Class Index Member Index

AIPhotoshopPrefs.h

Go to the documentation of this file.
00001 #ifndef __AIPhotoshopPrefs_h__
00002 #define __AIPhotoshopPrefs_h__
00003 /*
00004  *        Name: AIPhotoshopPrefs.h
00005  *     Purpose: 
00006  *
00007  * ADOBE SYSTEMS INCORPORATED
00008  * Copyright 1996-2007 Adobe Systems Incorporated.
00009  * All rights reserved.
00010  *
00011  * NOTICE:  Adobe permits you to use, modify, and distribute this file 
00012  * in accordance with the terms of the Adobe license agreement 
00013  * accompanying it. If you have received this file from a source other 
00014  * than Adobe, then your use, modification, or distribution of it 
00015  * requires the prior written permission of Adobe.
00016  *
00017  */
00018 
00019 /*
00020         A subset of the definitions found in the Preferences.h, PhotoshopDefs.h,
00021         and ColorModes.h files, which were taken from the Illustrator 9 PlugInDev 
00022         source tree.
00023         
00024         ...PluginDev:PhotoshopFileFormat:Src:New:Preferences.h
00025         ...PluginDev:PhotoshopFileFormat:Src:PhotoshopDefs.h
00026         ...PluginDev:PhotoshopFileFormat:Src:New:ColorModes.h
00027         
00028         This subset contains only the definitions needed to call the Photoshop
00029         export plug-in from another plug-in, using the public SDK interfaces.
00030         
00031         2/21/00         Andy Bachorski
00032         
00033         
00034         Writers:
00035 
00036                 (afb)           Andy Bachorski
00037 
00038         Change History (most recent first):
00039                          
00040                          9/14/01        afb             Add missing #include of AIRaster.h (for definition of uint8).
00041                          4/23/01        mgupta  Added PSD prefixes to most of the constants
00042 
00043           < >    3/22/01        afb             Updated to match definitions in Preferences.h
00044           
00045 */
00046 
00047 
00048 #include "AIRaster.h"
00049 
00050 #include "AIHeaderBegin.h"
00051 
00052 // ------------------------------------------------------------------
00053 //      mgupta, moved from PhotoshopDefs.h      
00054 //      Color space constants for the menu items
00055 //      and preferences.
00056 const ai::uint8 kRasterizeToRGB = 1;
00057 const ai::uint8 kRasterizeToCMYK = 2;
00058 const ai::uint8 kRasterizeToGrayscale = 3;
00059 const ai::uint8 kRasterizeToBitmap = 4;
00060 
00061 
00062 // ------------------------------------------------------------------
00063 //      mgupta, moved from ColorModes.h 
00064 //      These are the output color spaces 
00065 //      that a user can choose, for writing
00066 //      his psd files.  These values are
00067 //      button id's in the user interface:
00068 
00069 enum PSDPluginColorMode         // ex. PluginColorMode
00070 {
00071         ePluginRGB                      = kRasterizeToRGB,
00072         ePluginCMYK                     = kRasterizeToCMYK,
00073         ePluginGrayscale        = kRasterizeToGrayscale,
00074         ePluginDummy            = 0xFFFFFFFF
00075 }; //omit unsupported modes.
00076 
00077 enum PSDExportFormat
00078 {
00079         eTextNotLive                                    = 0,                    // Export Text As Raster.Scripting plug-in may use this flag.
00080         eUnsupportedTextFormat                  = eTextNotLive, // the text can not be exported in available export formats so export as raster.
00081         ePhotoshop8                                             = 1 << 0,
00082         ePhotoshop6                                             = 1 << 1
00083 };
00084 
00085 enum AntiAliasOptions
00086 {
00087         ANTIALIAS_NONE = 0,
00088         ANTIALIAS_AGM = 1,
00089         ANTIALIAS_SUPERSAMPLING
00090 };
00091 
00092 // ------------------------------------------------------------------------------------
00093 //      Grace 5/21/98
00094 //      Move from Preferences.cpp
00095 //      
00096 //      mgupta April 4, 2001
00097 //      Added default defines
00098 
00099 #define kPSDPreferencePrefix                                    "PhotoshopFileFormat"
00100 
00101 #define kPSDFormatName                                                  "Photoshop psd"
00102 #define kPSDExportFormatName                                    "Photoshop PSD Export"
00103 #define kPSDImportFormatName                                    "Photoshop PSD Import"
00104 #define kPSDFormatExtn                                                  "psd, pdd"
00105 
00106 //rbansal 20010521 Adding the keys for Import Options
00107 #define kPSDImportOption                                                "PSD Import Option"
00108 #define kDefaultPSDImportOption                                 1 //rbansal 20010528 dfaukt option change to Layers to Objects
00109 
00110 #define kPSDImportImageMaps                                             "ImageMaps"
00111 #define kDefaultPSDImportImageMaps                              true
00112 
00113 #define kPSDImportSlices                                                "Slices"
00114 #define kDefaultPSDImportSlices                                 true
00115 //end import slices
00116 
00117 #define kPSDImportHiddenLayers                                  "HiddenLayers"
00118 #define kDefaultPSDImportHiddenLayers                   false
00119 
00120 //Layer Comps
00121 #define kPSDShowPreview                                                 "ShowPreview"
00122 #define kDefaultPSDShowPreview                                  true            
00123 
00124 #define kPSDSelectedLayerCompID                                 "SelectedLayerCompID"
00125 #define kPSDDefaultSelectedLayerCompID          -1
00126 
00127 #define kPSDSelectedLayerCompName                               "SelectedLayerCompName"
00128 #define kPSDDefaultLayerCompName                                ""
00129 
00130 #define kPSDAntiAliasPref                                               "AntiAlias"
00131 #define kPSDDefaultAntiAliasPref                                ANTIALIAS_SUPERSAMPLING
00132 
00133 #define kPSDColorModelPref                                              "ColorModel"
00134 #define kPSDDefaultColorModelPref                               ePluginRGB
00135 
00136 #define kPSDExportFormatPref                                    "ExportFormat"
00137 #define kPSDDefaultExportFormatPref                             ePhotoshop8
00138 
00139 #define kPSDDPIPref                                                             "DPI"
00140 #define kPSDDefaultDPIPref                                              _ShortToAIReal(150)
00141 
00142 //      mgupta, 04/27/01
00143 //      This item will store the custom value the user may have entered
00144 //      ABTS Bug #426012
00145 #define kPSDOtherDPIPref                                                "CustomDpi"
00146 
00147 #define kPSDWriteLayersPref                                             "WriteLayers"
00148 #define kPSDDefaultWriteLayerPref                               true
00149 
00150 #define kPSDWhichProfile                                                "WhichProfile"
00151 
00152 #define kPSDHiddenLayersPref                                    "HiddenLayers"
00153 #define kPSDDefaultHiddenLayersPref                             false
00154 
00155 #define kPSDWriteNestedLayersAsLayersPref               "NestedLayers"
00156 #define kPSDDefaultWriteNestedLayersPref                true
00157 
00158 #define kPSDLiveTextPref                                                "LiveText"
00159 #define kPSDDefaultLiveTextPref                                 true
00160 
00161 #define kPSDWriteSlicesPref                                             "Slices"
00162 #define kPSDDefaultWriteSlicesPref                              true
00163 
00164 #define kPSDWriteImageMapsPref                                  "ImageMaps"
00165 #define kPSDDefaultImageMapsPref                                true
00166 
00167 #define kPSDWriteCompoundShapesPref                             "CompoundShapes"
00168 #define kPSDDefaultCompoundShapesPref                   true
00169 
00170 #define kPSDWriteMaxEditabilityPref                             "Maximize Ediability"
00171 #define kPSDDefaultMaxEditabilityPref                   true
00172 
00173 //      [mgupta: 5/31/2001] ABTS #431842 
00174 #define kPSDNoHiddenLayersWarning                               "NoHiddenLayersWarning"
00175 #define kPSDNo100LayersWarning                                  "No100LayersWarning"
00176 #define kPSDNoImageMapsWarning                                  "NoImageMapsWarning"
00177 #define kPSDNoSelectiveMergeWarning                             "NoSelectiveMergeWarning"
00178 
00179 #define kPSDSuppressUnsupportedDepthWarning             "SuppressUnsupportedDepthWarning"
00180 #define kPSDApplyPixelAspectRatio                               "PixelAspectRatio"
00181 
00182 #define kPSDDefaultTurnOffWarningPref                   false
00183 
00184 // [hsuri: 5/12/2012] Option to preserve spot color information
00185 #define kPSDPreserveSotColors                                   "PreserveSpotColors"
00186 
00187 #define kPSDSpotOptionsApplyToAll                               "SpotOptionApplyToAll"
00188 #define kPSDSpotOptions                                                 "SpotOptions"
00189 #define kPSDSuppressSwatchConflictWarning               "SuppressSwatchConflictWarning"
00190 
00191 #define kPSDSuppressNonSquarePixelWarning               "SuppressNonSquarePixelWarning"
00192 #define kPSDSuppressLibrarySpotInkWarning               "LibrarySpotInkWarning"
00193 #define kAIPSScriptCallSelector                                 "AI Script"
00194 // ------------------------------------------------------------------------------------
00195 
00196 struct PSDExportPrefs           //ex. PluginPrefs
00197 {
00198         ai::int32                       mWhichProfile;
00199         AntiAliasOptions                        mAntiAlias;
00200         AIBoolean                       mWriteLayers;
00201         AIReal                          mResolution;    // dots per inch
00202         PSDPluginColorMode  mColorModel;
00203         AIBoolean                       mIncludeHiddenLayers;
00204         AIBoolean                       mWriteNestedLayersAsLayers;     //nchandra
00205         AIBoolean                       mLiveText;
00206         AIBoolean                       mNo100LayersWarning;
00207         AIBoolean                       mNoImageMapsWarning;
00208         AIBoolean                       bHasSelectiveMerge;
00209         AIBoolean                       mNoSelectiveMergeWarning;       //Ac.
00210         AIBoolean                       mNoHiddenLayersWarning;
00211         AIBoolean                       mWriteSlices;                   //mgupta++
00212         AIBoolean                       mWriteImageMaps;                //mgupta++
00213         AIBoolean                       mWriteCompoundShapes;   //mgupta++
00214         AIReal                          mOtherResolution;               //mgupta++
00215         ai::int32                       mExportFormat;
00216         AIBoolean                       mMaxEditability;
00217         AIBoolean                       mPreserveSpotColors;
00218 };
00219 
00220 
00221 //      nchandra: 20000212 Added this enum for the import types
00222 //      retain transparency is coupled with the psLayersToFlat
00223 enum PSDImportOptions
00224 {
00225         noImport = 0,
00226         psLayersToAIObjects = 1,
00227         psLayersToAIFlat = 2
00228 };
00229 
00230 enum PSDUpdateLinkOptions
00231 {
00232         psKeepLayerVisibilityOverrides = 0,
00233         psUsePhotoshopLayerVisibility = 1,
00234         psUpdateLinkNotApplicable = 2   
00235 };
00236 
00237 struct PSDImportPrefs
00238 {
00239         //Actual import parameters
00240         PSDImportOptions                mImportOption;
00241         PSDUpdateLinkOptions    mUpdateLinkOption;
00242         AIBoolean                       bImportImageMaps;
00243         AIBoolean                       bImportSlices;
00244 
00245         //previous values. used in conjunction with current import operation to
00246         //determine enabling/disabling of controls in import dialog box
00247         AIBoolean                       mHasReadableLayers;
00248         AIBoolean                       bPreviousImportImageMaps;
00249         AIBoolean                       bPreviousImportSlices;
00250         PSDImportOptions        mPreviousOption;
00251         AIBoolean                       mDontChangePreviousIMapImportStatus;
00252         AIBoolean                       mDontChangePreviousSliceImportStatus;
00253         AIBoolean                       mDontChangePreviousHiddenLayerImportStatus;
00254 
00255         AIBoolean                       bNotDragDrop;
00256         AIBoolean           mColorModeMismatch;
00257 
00258         AIBoolean           bApplyPixelAspectRatioCorrection;
00259         AIBoolean           bCBPixelAspectRatioChecked;
00260         AIReal                          mPixelAspectRatio;
00261 
00262         AIBoolean                       bShowLayerCompsPreview;
00263         AIBoolean                       bImportHiddenLayers;
00264         AIBoolean                       bPreviousImportHiddenLayers;
00265         AIBoolean                       bReadImageDone;
00266         ai::int32                               iSelectedLayerCompIndex;
00267 };
00268 
00269 #include "AIHeaderEnd.h"
00270 
00271 #endif //__AIPhotoshopPrefs_h__


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks