![]() | InDesign SDK 20.5 |
#include <IXMLTagSuite.h>

Public Types | |
| enum | AddOrRetagState { kAddEnabled, kRetagEnabled, kAddDisabled, kRetagDisabled, kNeitherDisabled } |
| enum | { kDefaultIID = IID_IXMLTAGSUITE } |
| enum | MenuType { kInsertChildMenu, kInsertSiblingAfterMenu } |
Public Member Functions | |
| virtual UIDList | GetTags ()=0 |
| virtual ErrorCode | SetTag (const UIDRef &tag, bool16 retag, bool16 allowPresetUI=kTrue)=0 |
| virtual AddOrRetagState | GetAddOrRetagState ()=0 |
| virtual bool16 | CanTag ()=0 |
| virtual bool16 | CanAutoTag ()=0 |
| virtual ErrorCode | AutoTag (bool16 allowPresetUI=kTrue)=0 |
| virtual bool16 | CanUnTag ()=0 |
| virtual ErrorCode | UnTag ()=0 |
| virtual void | GetUnTagString (PMString *untagStr)=0 |
| virtual void | GetMenuNamesForTags (K2Vector< PMString > *menuList, ActionID whichAction) const =0 |
| virtual bool16 | CanAddComment ()=0 |
| virtual ErrorCode | AddComment (const PMString &comment)=0 |
| virtual ErrorCode | ChangeComment (const PMString &comment)=0 |
| virtual bool16 | CanAddProcessingInstruction ()=0 |
| virtual ErrorCode | AddProcessingInstruction (const PMString &target, const PMString &data)=0 |
| virtual ErrorCode | ChangeProcessingInstruction (const PMString &target, const PMString &data)=0 |
| virtual int32 | FillInsertDynamicMenu (IXMLDTDInsertElementListData *insertElementListData, const K2Vector< PMString > &menuList, MenuType menuType)=0 |
| virtual int32 | FillReplaceDynamicMenu (IXMLDTDReplaceElementListData *ReplaceElementListData, const K2Vector< PMString > &menuList)=0 |
| virtual bool16 | CanMapSelectedStoriesStyles () const =0 |
| virtual ErrorCode | MapSelectedStoriesStyles () const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Suite to manipulate tag (IXMLTag) properties in active selection; Provides clean, high level API to use from client code to access and change markup properties of selection. Aggregated on concrete selection bosses for selection formats such as text, layout and 'structure' (selections in the structure view).
States in which selection can be.
| pure virtual |
Create a comment element for the selection
| comment | specifies the text to use for the comment |
| pure virtual |
Create a processing instruction for the selection
| target | specifies the text to use for the target of the PI |
| data | specifies the text to use for the data of the PI |
| pure virtual |
Autotag the selected objects.
In the Tables case we would chose a default tag for story, table, cells. and the clients text selection would not be tagged.
| allowPresetUI | - kTrue if the client doesn't mind if UI pops up during this action |
| pure virtual |
Determine if abstract selection supports the capability to add a comment.
| pure virtual |
Determine if abstract selection supports the capability to add a processing instruction
| pure virtual |
Determine whether or not the current selection can be autotagged. Autotagging means that default tags are chosen for the selection rather than the user picking a specfic tag to use.
| pure virtual |
Can the current selection be tagged via Style to Tag Mapping? return – kTrue - The selection can be tagged, kFalse - The selection cannot be tagged
| pure virtual |
Determine whether or not the current selection can have a tag applied regular elements can but Comments, PIs and DTDs cannot..
| pure virtual |
Determine if abstract selection supports the capability to Untag it.
| pure virtual |
Modify the selected comment to use the new string
| comment | specifies the text to use for the comment |
| pure virtual |
Modify the selected PI to use the new string
| target | specifies the text to use for the target of the PI |
| data | specifies the text to use for the data of the PI |
| pure virtual |
Fill an insert dynamic menu with tag names based on the current selection
| insertElementListData | - A list used to store elements referenced by menu items |
| menuList | - The list of menus to be filled. A menu is denoted by its name (InsertChildTagPopup) |
| menuType | - The type of menu we are building (child or sibling) #return - The number of items added to the menu |
| pure virtual |
Fill a replace dynamic menu with tag names based on the current selection
| replaceElementListData | - A list used to store elements referenced by menu items |
| menuList | - The list of menus to be filled. A menu is denoted by its name (InsertChildTagPopup) #return - The number of items added to the menu |
| pure virtual |
Determine state of the selection; if something's tagged already, then kRetagEnabled would be returned, or if it could be tagged, kAddEnabled.
| pure virtual |
Get a list of menus that should have tags added to them. This allows the CSB to determine which menus get tag actions added to them rather than letting the client code try to figure out who to add tags for.
| *menuList | - This is filled with a list of menus that need entries added to them |
| whichAction | - The action for which we are adding new menu items |
| pure virtual |
Returns a list of tags in the selection; ask each of the enabled CSBs for the XML Tags used, so can return a fairly lengthy list of tags depending on the selection itself.
| pure virtual |
This is what would appear in the context sensitive menu (once translated) for instance, Untag Text
| untagStr | [OUT] parameter holding what would get translated for the end-user to see |
| pure virtual |
Tag the current selection be tagged via Style to Tag Mapping return – kSuccess - the tagging succeeded
| pure virtual |
Applies a tag to the selection; will process e.g. IXMLElementCommands::CreateElement or a low-level command to change the tag associated with an element (kXMLSetElementTagCmdBoss).
You should check the AddOrRetagState first, to determine whether retag makes sense, to determine what to set for this parameter. If there's a text selection in an untagged frame, then the frame itself would need a tag, and a dialog will appear soliciting a tag for the frame.
Selections in the structure-view are simpler to understand; the subtree of nodes selected get the tag applied (through kXMLSetElementTagCmdBoss).
| tag | specifies tag (IXMLTag) to apply to current selection |
| retag | kTrue if retag intended outcome |
| allowPresetUI | kTrue if the client doesn't mind if UI pops up during this action. |
| pure virtual |
Remove tag(s) associated with active selection; can take out a whole chunk of the structure tree, as IXMLElementCommands::DeleteElement may be processed by this method call.