#include <IXMLTagCommands.h>
|
| enum | { kDefaultIID = IID_IXMLTAGCOMMANDS } |
| |
|
| virtual ErrorCode | CreateTag (const UIDRef &tagList, const WideString &tagName, UID tagColor=kInvalidUID, UID *createdTag=nil)=0 |
| |
| virtual ErrorCode | DeleteTag (const UIDRef &tagList, UID tag, UID tagReplaceWith)=0 |
| |
| virtual ErrorCode | DeleteTags (const UIDRef &tagList, const UIDList &tagsToDelete, UID tagReplaceWith)=0 |
| |
| virtual ErrorCode | DeleteUnusedTags (const UIDRef &tagList)=0 |
| |
| virtual ErrorCode | SetTagName (IDataBase *db, UID tag, const WideString &tagName)=0 |
| |
| virtual ErrorCode | SetTagColor (IDataBase *db, UID tag, UID color)=0 |
| |
| virtual ErrorCode | SaveTagList (const UIDRef &tagList, const IDFile &theFile)=0 |
| |
| virtual ErrorCode | LoadTagList (const UIDRef &tagList, const IDFile &theFile)=0 |
| |
| virtual ErrorCode | LoadTagList (const UIDRef &tagList, const std::string &assetRef)=0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
Encapsulates commands to change the properties of tags (IXMLTag) and the tag collection (IXMLTagList).
| virtual ErrorCode IXMLTagCommands::CreateTag | ( | const UIDRef & | tagList, | | | const WideString & | tagName, | | | UID | tagColor = kInvalidUID, | | | UID * | createdTag = nil | | ) | | |
| pure virtual |
Method for creating an XML tag. Returns the UID of the newly created tag or the UID of an existing tag if a tag by that name already exists. Will return an error if the tag name specified is not valid. This and related methods may process a command of type kXMLCreateTagCmdBoss behind the facade
- Parameters
| tagList | the tag list (IXMLTagList) to which the tag is to be added |
| tagName | specifes the name for the tag (without begin/end markers), see IXMLTag |
| createdTag | [OUT] ptr to UID for created tag |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise
| virtual ErrorCode IXMLTagCommands::DeleteTag | ( | const UIDRef & | tagList, | | | UID | tag, | | | UID | tagReplaceWith | | ) | | |
| pure virtual |
Delete a tag. Requires a tag that can be used to replace the deleted tag with. This and related methods may process a command of type kXMLDeleteTagCmdBoss behind the facade
- Parameters
| tagList | tag list (IXMLTagList) from which tag should be deleted |
| tag | specifies to the tag to be deleted |
| tagReplaceWith | specifies the tag to replace the one being deleted with |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise
| virtual ErrorCode IXMLTagCommands::DeleteTags | ( | const UIDRef & | tagList, | | | const UIDList & | tagsToDelete, | | | UID | tagReplaceWith | | ) | | |
| pure virtual |
Delete a set of tags. Requires a tag that can be used to replace the deleted tag with. This and related methods may process a command of type kXMLDeleteTagCmdBoss behind the facade
- Parameters
| tagList | (IXMLTagList) from which tags should be deleted |
| tagsToDelete | UIDList of tags to remove |
| tagReplaceWith | specifies one tag to replace all those in deleted list by |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise
| virtual ErrorCode IXMLTagCommands::DeleteUnusedTags | ( | const UIDRef & | tagList | ) | |
| pure virtual |
Find the set of tags that are not referenced by any element and delete them. This and related methods may process a command of type kXMLDeleteUnusedTagsCmdBoss behind the facade
- Parameters
| tagList | specifies tag-list (IXMLTagList) from which tags should be deleted |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise
| virtual ErrorCode IXMLTagCommands::LoadTagList | ( | const UIDRef & | tagList, | | | const IDFile & | theFile | | ) | | |
| pure virtual |
Load the tag list from another InDesign document or an xml file. This and related methods may process a command of type kLoadTagListCmdBoss behind the facade
- Parameters
| tagList | tag-list (IXMLTagList) into which the tags are to be loaded |
| theFile | target file from which tag-list is to be loaded |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise
| virtual ErrorCode IXMLTagCommands::LoadTagList | ( | const UIDRef & | tagList, | | | const std::string & | assetRef | | ) | | |
| pure virtual |
Load the tag list from cloud document represented by assetRef.
- Parameters
| tagList | tag-list (IXMLTagList) into which the tags are to be loaded |
| assetRef | asset reference of the targeted cloud document from which tag-list is to be loaded |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise
| virtual ErrorCode IXMLTagCommands::SaveTagList | ( | const UIDRef & | tagList, | | | const IDFile & | theFile | | ) | | |
| pure virtual |
Save the list of tags to the specified file. This and related methods may process a command of type kSaveTagListCmdBoss behind the facade
- Parameters
| tagList | (IXMLTagList) specifies tag-list to be saved out |
| theFile | specifies destination file |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise
| virtual ErrorCode IXMLTagCommands::SetTagColor | ( | IDataBase * | db, | | | UID | tag, | | | UID | color | | ) | | |
| pure virtual |
Method to change the color of a tag. This and related methods may process a command of type kXMLSetTagColorCmdBoss behind the facade
- Parameters
| db | database containing the tag-list (IXMLTagList) |
| tag | specifies the tag whose color is to be changed |
| color | specifies the new color for the tag |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise
Method to change the name of a tag. This and related methods may process a command of type kXMLSetTagNameCmdBoss behind the facade
- Parameters
| db | database containing the tag-list (IXMLTagList) |
| tag | specifies the tag to be renamed |
| tagName | specifies the new name for the tag (see IXMLTag) |
- Returns
- kSuccess if the operation succeeded, kFailure otherwise