![]() | InDesign SDK 20.5 |

Public Types | |
| enum | GenStlEdtUIStringID { kDialogTitle, kStyleListTitle, kNewStyleNameTitle, kRenameStyleTitle, kNameConflictPrompt, kNameRequiredPrompt, kImportTitle, kExportTitle, kExportFileClassName, kExportDefaultFileName, kAlertCannotLoadStyles, kNameReservedPrompt, kLastGenStlEdtUIStringID } |
Public Member Functions | |
| virtual int32 | GetNumStyles ()=0 |
| virtual ErrorCode | GetNthStyleName (int32 index, PMString *pName)=0 |
| virtual ErrorCode | GetNthStyleDescription (int32 index, PMString *pDesc)=0 |
| virtual bool32 | IsNthStyleEditable (int32 index)=0 |
| virtual bool32 | IsNthStyleDeleteable (int32 index)=0 |
| virtual int32 | GetStyleIndexByName (const PMString &pName)=0 |
| virtual bool32 | GetUIString (GenStlEdtUIStringID whichString, PMString *pName)=0 |
| virtual ClassID | GetExportFileRootBossClassID ()=0 |
| virtual void | GetExportFileCreatorAndType (OSType *pCreator, OSType *pType)=0 |
| virtual void | GetImportExportFileMagicByte (DBUtils::MagicBytes magicBytes)=0 |
| virtual void | GetExportFileExtension (PMString *pExt)=0 |
| virtual bool32 | CustomImport (const IDFile *theFile)=0 |
| virtual bool32 | CustomExport (const IDFile *theFile, K2Vector< int32 > &indexList)=0 |
| virtual ErrorCode | ImportStyles (UIDRef uidrefFrom)=0 |
| virtual ErrorCode | ExportStyles (UIDRef uidrefTo, K2Vector< int32 > &indexList)=0 |
| virtual ErrorCode | SetNthStyleName (int32 index, PMString &name)=0 |
| virtual PMString | GetUniqueStyleName (PMString &baseName)=0 |
| virtual ErrorCode | AddStyle (PMString &name)=0 |
| virtual ErrorCode | CopyNthStyle (int32 srcIndex, PMString &newName)=0 |
| virtual ErrorCode | DeleteNthStyle (int32 index)=0 |
| virtual bool32 | EditNthStyle (int32 index, bool16 bNew)=0 |
| virtual void | ListInsert (UID uid, int32 index=-1)=0 |
| virtual void | ListRemove (int32 index)=0 |
| virtual void | ListReplace (UID uid, int32 index)=0 |
| virtual ErrorCode | CopyStyleData (UIDRef srcStyle, UIDRef dstStyle)=0 |
| virtual UIDRef | GetNthStyleRef (int32 index)=0 |
| virtual ErrorCode | InvokeNthStyle (int32 index, bool32 displayUI=kTrue)=0 |
| virtual bool16 | ReferencesFlattenerStyle ()=0 |
| virtual UIDRef | GetReferencedFlattenerStyle (int32 nIndex)=0 |
| virtual PMString | GetFlattenerStyleName (int32 nIndex)=0 |
| virtual void | SetFlattenerStyleName (int32 nIndex, const PMString &strName)=0 |
| virtual bool16 | EnabledInNoPubState ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
String IDs for GetUIString.
| pure virtual |
Adds a new style with specified initial name. If the name is already in the list, the function fails.
| name | IN The name of the new style. |
Implemented in CGenStyleListMgr.
| pure virtual |
Makes a copy of the specified style. Fails if newName already exists in the style list.
| srcIndex | IN The index of the style to copy. |
| newName | IN The name of the new style. |
Implemented in CGenStyleListMgr.
Helper function that copies style data from one style to another.
| srcStyle | IN The style from which to copy the data. |
| dstStyle | IN The style to which to copy the data. |
| pure virtual |
If you have a custom export (i.e., you don't want to use the default implementation provided by GenericStyleEditor) then do your export in here and return kTrue. Otherwise, return kFalse and the standard implemenation (which calls ImportStyles/ExportStyles below) will be used.
| theFile | IN If null, you should bring up UI to pick the file. Otherwise, should be used as the source or destination export file. |
| indexList | IN A list of the style indices that should be copied (corresponds to the user's selection when they clicked Export). |
Implemented in CGenStyleListMgr.
| pure virtual |
If you have a custom import (i.e., you don't want to use the default implementation provided by GenericStyleEditor) then do your import in here and return kTrue. Otherwise, return kFalse and the standard implemenation (which calls ImportStyles/ExportStyles below) will be used.
| theFile | IN If null, you should bring up UI to pick the file. Otherwise, should be used as the source or destination import file. |
Implemented in CGenStyleListMgr.
| pure virtual |
Deletes a style.
| index | IN The index of the style to delete. |
Implemented in CGenStyleListMgr.
| pure virtual |
Invokes UI to edit the styles. Returns true if the user clicked OK (whether or not they actually made changes).
| index | IN The index of the style to edit. |
| bNew | IN True if the style is a new style (ie, this corresponds to the New button). |
| pure virtual |
Tells whether items of this list are enabled in no-pub state. kFalse by default.
Implemented in CGenStyleListMgr.
| pure virtual |
Exports styles to an open export file. The selected styles are copied from the defaults to the indicated database.
| uidrefTo | IN The root of a new export document into which the styles will be copied. |
| indexList | IN A list of the style indices that should be copied (corresponds to the user's selection when they clicked Export). |
Implemented in CGenStyleListMgr.
| pure virtual |
Determines the creator and type of the export/import file.
| pCreator | OUT Receives the creator for the export/import file. |
| pType | OUT Receives the type of the export/import file. |
| pure virtual |
Determines the extension of the export/import file.
| pExt | OUT Receives the extension to use for the import/export file. |
| pure virtual |
Return the class ID of the boss that you want as the root UID in a new export styles document. Your plug-in provides the class definition and ID. Your list mgr interface must live on the boss.
| pure virtual |
For flattener-style-referring lists, obtains the flattener style to which a particular style refers.
| index | IN The index of the style. |
Implemented in CGenStyleListMgr.
| pure virtual |
Get the magic byte of the export/import file. This is a special unique series of characters that you come up with that ensures that the database won't be accidentally imported as a "real" document.
| magicBytes | OUT Receives the magic bytes to use for the import/export file. |
Implemented in CGenStyleListMgr.
| pure virtual |
Obtains the description of the Nth style.
| index | IN The index of the style you're interested in. |
| pDesc | OUT Receives the description of the style. |
Implemented in CGenStyleListMgr.
| pure virtual |
Obtains the name of the Nth style.
| index | IN The index of the style you're interested in. |
| pName | OUT Receives the name of the style. |
Implemented in CGenStyleListMgr.
| pure virtual |
Internal use only. Obtains the UID of the Nth style object. From this you can get/set the client items. Note that this only is used by style lists that use UIDList-based storage.
| index | IN The style to obtain the UIDRef for. |
Implemented in CGenStyleListMgr.
| pure virtual |
Returns the number of styles in the list.
Implemented in CGenStyleListMgr.
| pure virtual |
For flattener-style-referring lists, obtains the flattener style to which a particular style refers.
| index | IN The index of the style. |
Implemented in CGenStyleListMgr.
| pure virtual |
Searches the list for a style with the specified name.
| name | IN The name of the style to look for. |
Implemented in CGenStyleListMgr.
| pure virtual |
Allows you to override the default strings used in the edit styles interface. If you want to override the string, set up 'pname' with the string and return TRUE. If you want to use the default, return FALSE.
| whichString | IN Identifies the string (by ID) that will be shown in the UI. |
| pName | OUT Receives the literal string to show in the UI. |
Generate a unique style name. If the base string is empty, the the new will look something like: style 1, style 2. If the base string contains an exisiting style name, then the new name will look something like: <original name>=""> copy 1, <original name>=""> copy 2.
| baseName | IN The base name for which you want a unique name. |
Implemented in CGenStyleListMgr.
| pure virtual |
Imports styles from an open database.
| uidrefFrom | IN Points to the UID in another database from which we can obtain a corresponding list manager interface and therefore query for the list of styles in that database. Typically this is the root UID in a style import/export file, but technically any database that can be used to pull styles will do. The key is that we can query for IGenStlEdtListMgr on the boss. |
Implemented in CGenStyleListMgr.
| pure virtual |
Selects the specified style and invokes it; used for print/pdf styles where the user can bypass or access the export/print dialog directly from a menu.
| index | IN The index of the style to invoke. |
| displayUI | IN If true, the print/export dialog is presented first (so the user can change as needed). Otherwise, it goes right to printing/exporting. |
| pure virtual |
Returns whether a particular style can be deleted.
| index | IN The index of the style you're interested in. |
Implemented in CGenStyleListMgr.
| pure virtual |
Returns whether a particular style is editable.
| index | IN The index of the style you're interested in. |
Implemented in CGenStyleListMgr.
| pure virtual |
Internal use only. Helper function that inserts a list element when lists are UIDList based. This is a direct window into the UIDList and should not be used except by a style list manager itself.
| uid | IN The UID to insert. |
| index | IN The index before which to insert the UID, or -1 to append. |
Implemented in CGenStyleListMgr.
| pure virtual |
Internal use only. Helper function that removes a list element when lists are UIDList based. This is a direct window into the UIDList and should not be used except by a style list manager itself.
| index | IN The index of the UID to remove. |
Implemented in CGenStyleListMgr.
| pure virtual |
Internal use only. Helper function that replaces a list element when lists are UIDList based. This is a direct window into the UIDList and should not be used except by a style list manager itself.
| uid | IN The UID to replace the existing one with. |
| index | IN The index of the element to replace. |
Implemented in CGenStyleListMgr.
| pure virtual |
Indicates whether this style list type refers to flattener styles as "child" entities (for example, printer styles and pdf export styles). If true, the flattener styles will be included as part of the export/import process.
Implemented in CGenStyleListMgr.
| pure virtual |
For flattener-style-referring lists, associates a flattener style with a list element.
| index | IN The index of the element. |
| strName | IN The name of the flattener style with which to associate the element. |
Implemented in CGenStyleListMgr.
| pure virtual |
Changes the name of the specified style. Will fail if the name already exists in the style list. N.B.: Because the list is always maintained in alphabetical order, this function will generally cause reordering.
| index | IN The index of the style that you want to change the name of. |
| name | IN The name of the new style. |
Implemented in CGenStyleListMgr.