InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGenStlEdtListMgr.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Matt Phillips
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IGenStlEdtListMgr__
25 #define __IGenStlEdtListMgr__
26 
27 #include "K2Vector.h"
28 #include "UIDList.h"
29 #include "DBUtils.h"
30 
32 
33 {
34 public:
35 
39  virtual int32 GetNumStyles() = 0;
40 
46  virtual ErrorCode GetNthStyleName(int32 index, PMString *pName) = 0;
47 
53  virtual ErrorCode GetNthStyleDescription(int32 index, PMString *pDesc) = 0;
54 
59  virtual bool32 IsNthStyleEditable(int32 index) = 0;
60 
65  virtual bool32 IsNthStyleDeleteable(int32 index) = 0;
66 
71  virtual int32 GetStyleIndexByName(const PMString& pName) = 0;
72 
74  typedef enum
75  {
76  kDialogTitle, // Title of the Edit Style dialog, def = "Define Styles"
77  kStyleListTitle, // String appearing above list; def = "Styles:"
78  kNewStyleNameTitle, // Title of new-style name dlg; def = "New Style"
79  kRenameStyleTitle, // Title of rename-style name dlg; def = "Rename Style"
80  kNameConflictPrompt, // Prompt when a name conflicts
81  kNameRequiredPrompt, // Prompt when user enters blank name
82  kImportTitle, // Title of import dialog
83  kExportTitle, // Title of export dialog
84  kExportFileClassName, // Name of export document type, e.g., "Style File"
85  kExportDefaultFileName, // Name of export document, e.g., "Exported Printer Styles"
86  kAlertCannotLoadStyles, // Error to display when file isn't of right type.
87  kNameReservedPrompt, // Prompt when a user enters a reserved name (i.e., "[Custom]")
88  kLastGenStlEdtUIStringID
90 
99  virtual bool32 GetUIString(GenStlEdtUIStringID whichString, PMString *pName) = 0;
100 
108 
114  virtual void GetExportFileCreatorAndType(OSType *pCreator, OSType *pType) = 0;
115 
122  virtual void GetImportExportFileMagicByte(DBUtils::MagicBytes magicBytes) = 0;
123 
128  virtual void GetExportFileExtension(PMString *pExt) = 0;
129 
139  virtual bool32 CustomImport(const IDFile* theFile) = 0;
140 
152  virtual bool32 CustomExport(const IDFile* theFile, K2Vector<int32>& indexList) = 0;
153 
164  virtual ErrorCode ImportStyles(UIDRef uidrefFrom) = 0;
165 
174  virtual ErrorCode ExportStyles(UIDRef uidrefTo, K2Vector<int32>& indexList) = 0;
175 
184  virtual ErrorCode SetNthStyleName(int32 index, PMString& name) = 0;
185 
194  virtual PMString GetUniqueStyleName(PMString& baseName) = 0;
195 
202  virtual ErrorCode AddStyle(PMString& name) = 0;
203 
211  virtual ErrorCode CopyNthStyle(int32 srcIndex, PMString& newName) = 0;
212 
218  virtual ErrorCode DeleteNthStyle(int32 index) = 0;
219 
227  virtual bool32 EditNthStyle(int32 index, bool16 bNew) = 0;
228 
236  virtual void ListInsert(UID uid, int32 index = -1) = 0;
237 
244  virtual void ListRemove(int32 index) = 0;
245 
253  virtual void ListReplace(UID uid, int32 index) = 0;
254 
261  virtual ErrorCode CopyStyleData(UIDRef srcStyle, UIDRef dstStyle) = 0;
262 
269  virtual UIDRef GetNthStyleRef(int32 index) = 0;
270 
279  virtual ErrorCode InvokeNthStyle(int32 index, bool32 displayUI = kTrue) = 0;
280 
287  virtual bool16 ReferencesFlattenerStyle() = 0;
288 
295  virtual UIDRef GetReferencedFlattenerStyle( int32 nIndex ) = 0;
296 
303  virtual PMString GetFlattenerStyleName( int32 nIndex ) = 0;
304 
310  virtual void SetFlattenerStyleName( int32 nIndex, const PMString& strName ) = 0;
311 
316  virtual bool16 EnabledInNoPubState() = 0;
317 
318 };
319 
320 #endif // __IGenStlEdtListMgr__
321