00001 #ifndef __AISwatchList__
00002 #define __AISwatchList__
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 #ifndef __AITypes__
00030 #include "AITypes.h"
00031 #endif
00032
00033 #ifndef __AIColor__
00034 #include "AIColor.h"
00035 #endif
00036
00037 #ifndef __AIDocument__
00038 #include "AIDocument.h"
00039 #endif
00040
00041 #include "AIHeaderBegin.h"
00042
00045
00046
00047
00048
00049
00050 #define kAISwatchListSuite "AI Swatch List Suite"
00051 #define kAISwatchListSuiteVersion7 AIAPI_VERSION(7)
00052 #define kAISwatchListSuiteVersion kAISwatchListSuiteVersion7
00053 #define kAISwatchListVersion kAISwatchListSuiteVersion
00054
00055 #define kAISwatchGroupSuite "AI Swatch Group Suite"
00056 #define kAISwatchGroupSuiteVersion3 AIAPI_VERSION(3)
00057 #define kAISwatchGroupSuiteVersion kAISwatchGroupSuiteVersion3
00058 #define kAISwatchGroupVersion kAISwatchGroupSuiteVersion
00059
00063 #define kAISwatchLibraryDialogChangedNotifier "AI Swatch Library Dialog Changed Notifier"
00064
00071 #define kAISwatchListChangedNotifier "AI Swatch List Changed Notifier"
00072
00077 #define kAISwatchListChangedInternallyNotifier "AI Swatch List Changed Internally Notifier"
00078
00080 #define kAISwatchReplaceColorNotifier "AI Swatch Replace Color Notifier" // used only by SwatchLib
00081
00083 #define kAICreateNewSwatchNotifier "AI Create New Swatch Notifier" // used only by PaintStyle
00084
00087 #define kAICreateNewSwatchWithDefaultParamNotifier "AI Create New Swatch With Default Param Notifier" // used only by PaintStyle
00088
00091 #define kAIDocSwatchesSelectionChangedNotifier "AI Doc Swatches Selection Changed Notifier"
00092
00095 #define kCantDeleteSwatchErr '!XDS'
00096
00098 #define kInvalidSwatchTypeForDest '!vST'
00099
00101 #define kTooManySwatchGroupsErr '>#sg'
00102
00104 #define kTooManySwatchesInGrpErr '>#sw'
00105
00107 #define kMaxNumberSwatchGroups ((ASInt16) 0x7FFF) // 32767
00108
00109 #define kMaxNumberSwatchesPerGroup ((ASInt16) 0xFFFF) // 65535
00110
00111
00112
00113
00114
00115
00116
00118 typedef struct _AISwatchOpaque *AISwatchRef;
00120 typedef struct _AISwatchListOpaque *AISwatchListRef;
00121
00123 typedef struct _AISwatchGroupOpaque *AISwatchGroupRef;
00124
00128 typedef enum
00129 {
00132 kAISGKindGeneric,
00135 kAISGKindSolidColorsOnly,
00137 kAISGKindPatternsOnly,
00139 kAISGKindGradientsOnly
00140 } AISwatchGroupKind;
00141
00142
00143
00144
00145
00146
00147
00181 typedef struct {
00182
00188 ai::int32 ASAPI (*CountSwatches) (AISwatchListRef list);
00189
00196 AISwatchRef ASAPI (*GetFirstSwatch) (AISwatchListRef list);
00197
00210 AISwatchRef ASAPI (*GetNextSwatch) (AISwatchRef prev);
00211
00219 AISwatchRef ASAPI (*GetNthSwatch) (AISwatchListRef list, ai::int32 index);
00220
00227 AISwatchRef ASAPI (*GetSwatchByName) (AISwatchListRef list, const ai::UnicodeString& name);
00228
00245 AISwatchRef ASAPI (*InsertNthSwatch) (AISwatchListRef list, ai::int32 index);
00246
00256 ASErr ASAPI (*RemoveNthSwatch) (AISwatchListRef list, ai::int32 index);
00257
00263 ASErr ASAPI (*GetAIColor) (AISwatchRef swatch, AIColor *aicolor);
00264
00272 ASErr ASAPI (*SetAIColor) (AISwatchRef swatch, AIColor *aicolor);
00273
00278 ASErr ASAPI (*GetSwatchName) (AISwatchRef swatch, ai::UnicodeString& name);
00279
00285 ASErr ASAPI (*SetSwatchName) (AISwatchRef swatch, const ai::UnicodeString& name);
00286
00293 ASErr ASAPI (*GetSwatchList) (AIDocumentHandle document, AISwatchListRef *list);
00294
00304 AISwatchRef ASAPI (*GetSwatchByColor) (AISwatchListRef list, const AIColor *aicolor);
00305
00313 AISwatchRef ASAPI (*GetSwatchByNameAndType) (AISwatchListRef list, const ai::UnicodeString& name, AIColorTag type);
00314
00326 ASErr ASAPI (*RemoveSwatch) (AISwatchListRef list, AISwatchRef swatch, ASBoolean deleteCustomColor);
00327
00328 } AISwatchListSuite;
00329
00330
00331
00332
00353 typedef struct {
00354
00361 ai::int32 ASAPI (*CountSwatchGroups) (AISwatchListRef list);
00362
00370 AISwatchGroupRef (*GetNthSwatchGroup) (AISwatchListRef list, ai::int32 index);
00371
00380 AISwatchGroupRef ASAPI (*GetSwatchGroupByName) (AISwatchListRef list, const ai::UnicodeString& name);
00381
00393 ASErr ASAPI (*NewSwatchGroup) ( AISwatchListRef list, AISwatchGroupKind groupKind,
00394 ai::int32 atIndex, AISwatchGroupRef *newGroup );
00395
00404 ASBoolean ASAPI (*SwatchGroupIsInList) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ai::int32 *indexFoundAt );
00405
00419 ASErr ASAPI (*RemoveNthSwatchGroup) (AISwatchListRef list, ai::int32 index, ASBoolean deleteSwatches );
00420
00434 ASErr ASAPI (*RemoveSwatchGroup) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ASBoolean deleteSwatches);
00435
00445 ASErr ASAPI (*ReorderNthSwatchGroup) (AISwatchListRef list, ai::int32 fromIndex, ai::int32 newIndex );
00446
00458 ASErr ASAPI (*ReorderSwatchGroup) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ai::int32 newIndex );
00459
00465 ASErr ASAPI (*GetSwatchGroupName) (AISwatchGroupRef swatchGroup, ai::UnicodeString& name);
00466
00471 ASErr ASAPI (*SetSwatchGroupName) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name);
00472
00479 AISwatchGroupKind ASAPI (*GetSwatchGroupKind) (AISwatchGroupRef swatchGroup);
00480
00487 ASBoolean ASAPI (*AllowsColorKind) (AISwatchGroupRef swatchGroup, AIColorTag colorKind);
00488
00497 ASErr ASAPI (*ReorderSwatch) (AISwatchGroupRef swatchGroup, AISwatchRef swatch, ai::int32 toIndex );
00498
00510 ASErr ASAPI (*ReorderNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 fromIndex, ai::int32 toIndex );
00511
00517 ai::int32 ASAPI (*CountSwatches) (AISwatchGroupRef swatchGroup);
00518
00525 AISwatchRef ASAPI (*GetNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 index);
00526
00534 AISwatchRef ASAPI (*GetSwatchByName) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name);
00535
00545 AISwatchRef ASAPI (*GetSwatchByColor) (AISwatchGroupRef swatchGroup, const AIColor *aicolor);
00546
00554 AISwatchRef ASAPI (*GetSwatchByNameAndType) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name, AIColorTag type);
00555
00567 AISwatchRef ASAPI (*InsertNthSwatch) (AISwatchGroupRef swatchGroup, AIColor *aicolor, ai::int32 index);
00568
00585 ASErr ASAPI (*RemoveNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 index, ASBoolean deleteCustomColor, bool swatchNotUsed);
00586
00601 ASErr ASAPI (*RemoveSwatch) (AISwatchGroupRef swatchGroup, AISwatchRef swatch, ASBoolean deleteCustomColor);
00602
00615 ASErr ASAPI (*LocateSwatch) (AISwatchListRef list, AISwatchRef swatch, AISwatchGroupRef *containingSwatchGroup, ai::int32 *groupIndex, ai::int32 *swatchIndex);
00616
00630 ASErr ASAPI (*ReorderSwatchBetweenGroups) ( AISwatchGroupRef fromGroup, ai::int32 fromIndex, AISwatchGroupRef toGroup, ai::int32 toIndex );
00631
00645 ASBoolean ASAPI (*WantsToBeOpenIfInListView) ( AISwatchGroupRef swatchGroup );
00646
00663 ASErr ASAPI (*SetWantsToBeOpenIfInListView) ( AISwatchGroupRef swatchGroup, ASBoolean whatItWants );
00664
00665 } AISwatchGroupSuite;
00666
00667
00668 #include "AIHeaderEnd.h"
00669
00670 #endif