![]() | InDesign SDK 20.5 |
#include <IOwnedItemIcons.h>
Public Types | |
| enum | { kDefaultIID = IID_IOWNEDITEMICONS } |
| enum | ItemType { kTable = 0, kInlineFrame, kHyperlink, kIndexMarker, kTextPageNum, kXMLBeginTag, kXMLEndTag, kNoteTag, kOtherType, kXMLStoryTag, kFootnoteTag, kFootnoteCharacter, kEndnoteCharacter, kAutoText, kHiddenText } |
Public Member Functions | |
| virtual ItemType | GetItemType (UIDRef textModelRef, UTF32TextChar character, TextIndex position, UID storyThreadUID=kInvalidUID)=0 |
| virtual PMReal | GetIconWidth (ItemType type, UIDRef textModelRef, TextIndex position, UID storyThreadUID=kInvalidUID)=0 |
| virtual void | Draw (ItemType type, const PMRect &itemRect, PMReal textYPosition, IGraphicsPort *gPort, UIDRef textModelRef, TextIndex position, int32 lineIndex, UID storyThreadUID=kInvalidUID)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This inteface is used for the detection, drawing and measurement of icons display in story type views for items that have a character in the text stream with an associated owned item. Items like xml tags page numbers and other things are displayed using this interface.
Type of owned item icons supported are defined in this enum
| pure virtual |
Draw an owned item at the given itemRect location. The itemRect width is same as return by GetIconWidth and is the height of the line of text the owned item resides in. The draw routine will draw. You may assume, the background has already been filled with the current galley background color.
| type | - type of owned item icon to draw |
| itemRect | - rectangle bounds to draw icon in |
| textYPosition | - yPosition where text is drawn (used for icons that have text draw in combination with them like xml tags) |
| gPort | - port to draw the icon into. |
| textModelRef | - uid ref of the text model |
| position | - text index the icon is associated with |
| lineIndex | - index of the line the icon is being drawn in |
| storyThreadUID | - if the text index is within track change deleted text should pass in a UID for the story thread of the deleted text. |
| pure virtual |
Return the width of an icon of ItemType. Should include any extra border space need for the icon. This is the. amount of space that will be inserted in the text to draw the icon. It's expected that the caller of this routine has already called GetItemType above and knows that an owned item is at the text index provided to this method.
| type | - type of owned item icon to get width of |
| textModelRef | - uid ref of the text model |
| position | - text index the icon is associated with |
| storyThreadUID | - if the text index is within track change deleted text should pass in a UID for the story thread of the deleted text. |
| pure virtual |
Figure out if the character is a supported owned item and return it's type if so otherwise return kOtherType. for kOtherType there may or may not be an owned item character associated with the character or not. Either way, this interface doesn't support icon display for it.
| textModelRef | - uid ref of the text model |
| character | - character code at the passed in TextIndex (next param). This is mostly to make it quicker to calculate since we typically know the character code already |
| position | - text index to check for an owned item at |
| storyThreadUID | - if the text index is within track change deleted text should pass in a UID for the story thread of the deleted text. |