InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AnnotationItem Class Reference

Public Member Functions

 AnnotationItem ()
 
virtual void SetAnnotationContent (const PMString &content)
 
virtual PMString GetAnnotationContent () const
 
virtual void SetAnnotationType (const AnnotationType &annotType)
 
virtual AnnotationType GetAnnotationType () const
 
virtual void SetAnnotationStatus (const AnnotationStatus &status)
 
virtual AnnotationStatus GetAnnotationStatus () const
 
virtual void SetAnnotationCreator (const PMString &creator)
 
virtual PMString GetAnnotationCreator () const
 
virtual void SetAnnotationSource (const PMString &filepath)
 
virtual PMString GetAnnotationSource () const
 
virtual void SetAnnotationReplies (const std::vector< std::shared_ptr< AnnotationReply >> &replies)
 
virtual void GetAnnotationReplies (std::vector< std::shared_ptr< AnnotationReply >> &replies) const
 
virtual void AppendAnnotationReplies (const std::vector< std::shared_ptr< AnnotationReply >> &replies)
 
virtual void SetAnnotationModified (const IDTime &modified)
 
virtual IDTime GetAnnotationModified () const
 
virtual void ApplyTransformAnnotation (const PMMatrix &transformationMatrix)
 
virtual bool SetMappingBBoxData (const PMRect &bBox)
 
virtual bool GetMappingBBoxData (PMRect &bBox) const
 
virtual bool SetMappingPointData (const PMRect &bBox, const PMPoint &point)
 
virtual bool GetMappingPointData (PMRect &bBox, PMPoint &point) const
 
virtual bool SetMappingTextData (const PMRect &bBox, const std::vector< UTF32TextChar > &targetContextText, const std::vector< UTF32TextChar > &precedingContextText, const std::vector< UTF32TextChar > &succeedingContextText, const bool &insertCommentAfterSucceedingText)
 
virtual bool GetMappingTextData (PMRect &bBox, std::vector< UTF32TextChar > &targetContextText, std::vector< UTF32TextChar > &precedingContextText, std::vector< UTF32TextChar > &succeedingContextText, bool16 &insertCommentAfterSucceedingText) const
 
virtual bool SetTextRectsForMappingTextData (const std::vector< PMRect > &mappingTextRects)
 
virtual bool GetTextRectsForMappingTextData (std::vector< PMRect > &mappingTextRects) const
 
virtual
AnnotMapOrDrawType::eAnnotMappingType 
GetMappingTypeForAnnotation ()
 
virtual
AnnotMapOrDrawType::eAnnotDrawingType 
GetDrawingTypeForAnnotation ()
 
virtual bool SetDrawingDataForPathDrawing (IPathGeometry *path)
 
virtual bool GetDrawingDataForPathDrawing (IPathGeometry *&path) const
 
virtual bool SetDrawingDataForIconDrawing (const PMRsrcID &iconId)
 
virtual bool GetDrawingDataForIconDrawing (PMRsrcID &iconId) const
 
virtual bool SetSegregatedTextualMappingData (const std::vector< std::shared_ptr< SegregatedTextualData >> &segregatedTextualData)
 
virtual bool GetSegregatedTextualMappingData (std::vector< std::shared_ptr< SegregatedTextualData >> &segregatedTextualData) const
 
virtual PMRect GetBoundingBox () const
 

Constructor & Destructor Documentation

AnnotationItem::AnnotationItem ()

Sets the information of a particular annotation.

Member Function Documentation

virtual void AnnotationItem::AppendAnnotationReplies (const std::vector< std::shared_ptr< AnnotationReply >> & replies)
virtual
Appends a List of Replies to a particular annotation.

Parameters
repliesIN is the list of the annotation's replies.
virtual void AnnotationItem::ApplyTransformAnnotation (const PMMatrixtransformationMatrix)
virtual
Transforms the Annotation by a Matrix.

Parameters
transformationMatrixIN is the matrix by which annotation is to be transformed.
virtual PMString AnnotationItem::GetAnnotationContent () const
virtual

Gets the Textual Content of a particular annotation.

Parameters
contentOUT is the annotation's content.
virtual PMString AnnotationItem::GetAnnotationCreator () const
virtual

Gets the Author/Creator Name of a particular annotation.

Parameters
creatorOUT is the annotation's creator – name of the user who created/edited the annotation.
virtual IDTime AnnotationItem::GetAnnotationModified () const
virtual

Gets the Last Modified Time of a particular annotation.

Parameters
modifiedOUT is the annotation's last modified time.
virtual void AnnotationItem::GetAnnotationReplies (std::vector< std::shared_ptr< AnnotationReply >> & replies) const
virtual

Gets the List of Replies of a particular annotation.

Parameters
repliesOUT is the list of all the annotation's replies.
virtual PMString AnnotationItem::GetAnnotationSource () const
virtual

Gets the file path of a particular annotation.

Parameters
filepathOUT is the annotation's filepath – path of the file from which annotation was created.
virtual AnnotationStatus AnnotationItem::GetAnnotationStatus () const
virtual

Gets the Status of a particular annotation.

Parameters
statusOUT is the annotation's current status – whether open or resolved.
virtual AnnotationType AnnotationItem::GetAnnotationType () const
virtual

Gets the Type of a particular annotation.

Parameters
annotTypeOUT is the annotation's type.
virtual PMRect AnnotationItem::GetBoundingBox () const
virtual
Gets the Bounding Box which of annotation.

Parameters
bBoxwill store the annotation's bbox.
virtual bool AnnotationItem::GetDrawingDataForIconDrawing (PMRsrcIDiconId) const
virtual
Gets the icon for drawing of annotation.

Parameters
iconIdis the icon for drawing.
Returns
true/false depending on whether the annoation supports icon drawing or not.
virtual bool AnnotationItem::GetDrawingDataForPathDrawing (IPathGeometry *& path) const
virtual
Gets the path for drawing of annotation.

Parameters
pathis the path for drawing. It can support any type of path.
Returns
true/false depending on whether the annoation supports path drawing or not.
virtual AnnotMapOrDrawType::eAnnotDrawingType AnnotationItem::GetDrawingTypeForAnnotation ()
virtual

Return which kind of drawing is supported by this annotation based on annotation type. Icon or path or text Before setting path drawing data data call this function to confirm if annotation supports this or not.

virtual bool AnnotationItem::GetMappingBBoxData (PMRectbBox) const
virtual
Gets the Bounding Box which is being used to map it to pageItem.

Parameters
bBoxwill store the annotation's bbox.
Returns
true/false depending on whether the annoation supports mapping using BBox or not.
virtual bool AnnotationItem::GetMappingPointData (PMRectbBox,
PMPointpoint 
) const
virtual
Gets the point which is being used to map it to pageItem.

Parameters
bBoxwill store the annotation's bounding box.
pointwill store the annotation's point.
Returns
true/false depending on whether the annoation supports mapping using point or not.
virtual bool AnnotationItem::GetMappingTextData (PMRectbBox,
std::vector< UTF32TextChar > & targetContextText,
std::vector< UTF32TextChar > & precedingContextText,
std::vector< UTF32TextChar > & succeedingContextText,
bool16 & insertCommentAfterSucceedingText 
) const
virtual
Get the text data of annotation which is used to map it to text frame.

Parameters
bBoxwill store the annotation's bounding box.
targetContextTextis the annotation's target context text.
precedingContextTextis the annotation's preceding context text.
succeedingContextTextIN is the annotation's succeeding context text.
insertCommentAfterSucceedingTextIN is the annotation's flag for placing insert comment by side of preceeding context text.
Returns
true/false depending on whether the annoation supports mapping using text or not.
virtual AnnotMapOrDrawType::eAnnotMappingType AnnotationItem::GetMappingTypeForAnnotation ()
virtual

Return which kind of mapping is supported by this annotation based on annotation type. BBox or Point or Text Before setting mapping data call this function to confirm what kind of mapping is supported by this annotation

virtual bool AnnotationItem::GetSegregatedTextualMappingData (std::vector< std::shared_ptr< SegregatedTextualData >> & segregatedTextualData) const
virtual
Sets the segregated textual data for breaking the textual content by InDesign text frames.

Parameters
segregatedTextualDatais the vector of structures of terxtual mapping data pertaing to only one yet unknown InDesign Text frame.
Returns
true/false depending on whether the annoation supports mapping using text or not.
virtual bool AnnotationItem::GetTextRectsForMappingTextData (std::vector< PMRect > & mappingTextRects) const
virtual
Set the BBox of all Text elements present in mapping text data.

Parameters
mappingTextRectswill store the BBox of all Text elements present in mapping text data.
Returns
true/false depending on whether the annoation supports mapping using text or not.
virtual void AnnotationItem::SetAnnotationContent (const PMStringcontent)
virtual

Sets the Textual Content of a particular annotation.

Parameters
contentIN is the annotation's content.
virtual void AnnotationItem::SetAnnotationCreator (const PMStringcreator)
virtual

Sets the Author/Creator Name of a particular annotation.

Parameters
creatorIN is the annotation's creator – name of the user who created/edited the annotation.
virtual void AnnotationItem::SetAnnotationModified (const IDTimemodified)
virtual

Sets the Last Modified Time of a particular annotation.

Parameters
modifiedIN is the annotation's last modified time.
virtual void AnnotationItem::SetAnnotationReplies (const std::vector< std::shared_ptr< AnnotationReply >> & replies)
virtual

Sets the Target Page Index of a particular annotation.

Parameters
targetPageIndexIN is the annotation's target InDesign page index.Gets the Target Page Index of a particular annotation.
targetPageIndexOUT is the annotation's target InDesign page index.Sets the List of Replies of a particular annotation.
repliesIN is the list of all the annotation's replies.
virtual void AnnotationItem::SetAnnotationSource (const PMStringfilepath)
virtual

Sets the file path of a particular annotation.

Parameters
filepathIN is the annotation's filepath – path of the file from which annotation was created.
virtual void AnnotationItem::SetAnnotationStatus (const AnnotationStatus & status)
virtual

Sets the Annotation ID of a particular annotation.

Parameters
annotidIN is the annotation's unique ID.Gets the Annotation ID of a particular annotation.
annotidOUT is the annotation's unique ID.Sets the Status of a particular annotation.
statusIN is the annotation's current status – whether open or resolved.
virtual void AnnotationItem::SetAnnotationType (const AnnotationType & annotType)
virtual

Sets the Type of a particular annotation.

Parameters
annotTypeIN is the annotation's type.
virtual bool AnnotationItem::SetDrawingDataForIconDrawing (const PMRsrcIDiconId)
virtual
Sets the icon for drawing of annotation.

Parameters
iconIdis the icon for drawing.
Returns
true/false depending on whether the annoation supports icon drawing or not. is an optional information. If not provide, default icon will be drawn instead.
virtual bool AnnotationItem::SetDrawingDataForPathDrawing (IPathGeometrypath)
virtual
Information for Drawing Annotation to document. This will indicate how to draw the annoation once it has been mapped to documnet.

  1. These type of annotation will be drawn as icon only. For now annotations already have predefined icon. For now icon will be drawn at top-left point of BBox. User can also pass the icon. If not passed, default icon will be drawn. kTextTypewriter, kTextBox, kTextCallout, kStickyNote.
  1. These type of annotation will be drawn as given path. Any kind of path (e.g. rectangle, circle, free form) can be supported. kFreeformDrawing, kArrow, kLineSegment, kOval, kRectangle, kPolygon, kConnectedLines, kCloud. Use SetDrawingDataForPathDrawing() to set.
  1. Text type annotations will be drawn at text directly. No need to set anything for drawing. kHighlight, kUnderline, kSquiggly, kStrikeThrough, kReplaceText, kInsertText Sets the path for drawing of annotation.
    Parameters
    pathis the path for drawing. It can support any type of path.
    Returns
    true/false depending on whether the annoation supports path drawing or not.
virtual bool AnnotationItem::SetMappingBBoxData (const PMRectbBox)
virtual

All the co-ordinates for path,rect, point etc.. should be in spread co-ordinate space. Information for Mapping Annotation to document Annotations can be mapped to Document via three methods : Bounding Box, Point Or Text data.

  1. These type of annotation are mapped using BBox where the target page item is found by intersection with given BBox. kStickyNote, kTextTypewriter, kTextBox, kFreeformDrawing, kLineSegment, kOval, kRectangle, kPolygon, kStamp, kConnectedLines, kCloud Use SetMappingBBoxData() to set.
  1. These type of annotation are mapped using a single Point where the target page item is found by intersection with given Point. kArrow, kTextCallout Use SetMappingPointData() to set.
  1. These type of annotation are mapped using text data where the target text is found using given text data and preceding test data and succeding text data. Preceding and Succeding text data helps better in finding the text data when there has been some edits in the text. kHighlight, kUnderline, kSquiggly, kStrikeThrough, kReplaceText, kInsertText Use SetMappingTextData() to set.

(Optional information) For mapping text annotations we can also provide BBox of all text parts addiotionally. This will help in improving accuracy of mapping. Use SetTextRectsForMappingTextData to set. Sets the BBox of annotation which will be used to map it to pageItem.

Parameters
targetPointIN is the annotation's mapping bbox.
Returns
true/false depending on whether the annoation supports mapping using BBox or not.
virtual bool AnnotationItem::SetMappingPointData (const PMRectbBox,
const PMPointpoint 
)
virtual
Sets the point of annotation which will be used to map it to pageItem.

Parameters
bBoxwill store the annotation's bbox.
pointIN is the annotation's mapping point.
Returns
true/false depending on whether the annoation supports mapping using point or not.
virtual bool AnnotationItem::SetMappingTextData (const PMRectbBox,
const std::vector< UTF32TextChar > & targetContextText,
const std::vector< UTF32TextChar > & precedingContextText,
const std::vector< UTF32TextChar > & succeedingContextText,
const bool & insertCommentAfterSucceedingText 
)
virtual
Sets the text data of annotation which will be used to map it to text frame.

Parameters
bBoxwill store the annotation's bounding box.
targetContextTextis the annotation's target context text.
precedingContextTextis the annotation's preceding context text.
succeedingContextTextIN is the annotation's succeeding context text.
insertCommentAfterSucceedingTextIN is the annotation's flag for placing insert comment by side of preceeding context text.
Returns
true/false depending on whether the annoation supports mapping using text or not.
virtual bool AnnotationItem::SetSegregatedTextualMappingData (const std::vector< std::shared_ptr< SegregatedTextualData >> & segregatedTextualData)
virtual
Sets the segregated textual data for breaking the textual content by InDesign text frames.

Parameters
segregatedTextualDatais the vector of structures of terxtual mapping data pertaing to only one yet unknown InDesign Text frame.
Returns
true/false depending on whether the annoation supports mapping using text or not. is an optional information.
virtual bool AnnotationItem::SetTextRectsForMappingTextData (const std::vector< PMRect > & mappingTextRects)
virtual
Set the BBox of all Text elements present in mapping text data.

This is an optional parameter which helps in improving the accuracy of text mapping.

Parameters
mappingTextRectswill store the BBox of all Text elements present in mapping text data.
Returns
true/false depending on whether the annoation supports mapping using text or not.