Mako 7.5.0 API
Loading...
Searching...
No Matches
JawsMako::IAnnotation Class Referenceabstract

An interface class for an annotation. More...

#include <interactive.h>

Inheritance diagram for JawsMako::IAnnotation:

Public Types

enum  eAnnotationType {
  eAT3D , eATCaret , eATCircle , eATFileAttachment ,
  eATFreeText , eATHighlight , eATInk , eATLine ,
  eATLink , eATMovie , eATPolygon , eATPolyLine ,
  eATPopup , eATPrinterMark , eATProjection , eATRedact ,
  eATRichMedia , eATScreen , eATSound , eATSquare ,
  eATSquiggly , eATStamp , eATStrikeOut , eATText ,
  eATTrapNet , eATUnderline , eATWatermark , eATWidget ,
  eATOther
}
 Types of annotations, listed with the earliest version of PDF that supported them. More...
 

Public Member Functions

virtual eAnnotationType getType () const =0
 Get the type of the annotation.
 
virtual const FRect & getRect () const =0
 Get the rect in which the appearances should be displayed.
 
virtual void setRect (const FRect &rect)=0
 Set the rect in which the appearances should be displayed.
 
virtual U8String getContents () const =0
 Get the Contents entry in UTF-8.
 
virtual void setContents (const U8String &contents)=0
 Set the Contents entry in UTF-8.
 
virtual IDOMColorPtr getColor () const =0
 Get the color. The use of this color depends on the annotation type. See the PDF 1.7 specification for details.
 
virtual void setColor (const IDOMColorPtr &color)=0
 Set the color. The use of this color depends on the annotation type. See the PDF 1.7 specification for details.
 
virtual IEDLTimePtr getModificationTime () const =0
 Get the Modification date and time of the annotation, if present.
 
virtual void setModificationTime (const IEDLTimePtr &modificationTime)=0
 Set the Modification date and time of the annotation.
 
virtual CAnnotationBorder getBorder () const =0
 Get the annotation's border. See CAnnotationBorder for details.
 
virtual void setBorder (const CAnnotationBorder &border)=0
 Set the annotation's border.
 
virtual uint32 getFlags () const =0
 Get the annotation flags. To interpret these flags please see section 8.4.2 "Annotation Flags" in the PDF 1.7 specification.
 
virtual void setFlags (uint32 flags)=0
 Set the annotation flags. Please see section 8.4.2 "Annotation Flags" for details about these flags.
 
virtual void rotate (uint16 rotate, double pageWidth, double pageHeight)=0
 Rotate the annotation clockwise as if the page was rotated by the same amount.
 
virtual CAnnotationAppearanceVect getAppearances () const =0
 Return all the annotation appearances in a vector.
 
virtual void removeAppearances ()=0
 Remove all annotation appearances.
 
virtual U8String getState () const =0
 Get the current annotation state.
 
virtual void setState (const U8String &state)=0
 Set the current annotation state.
 
virtual IAnnotationAppearancePtr getAppearance (eAppearanceUsage usage, const U8String &state=U8String()) const =0
 Fetch the annotation appearance that should be used for the given annotation usage and state according to the following rules:
 
virtual void addAppearance (const IAnnotationAppearancePtr &appearance)=0
 Add or replace an appearance.
 
virtual bool hasNormalAppearance () const =0
 Does the annotation have a normal appearance? Convenience utility function.
 
virtual IAnnotationPtr clone () const =0
 Clone the annotation. This is a deep clone. The annotation reference will remain the same.
 
virtual bool matchesReference (const IAnnotationReferencePtr &reference) const =0
 Does this annotation match the given IAnnotationReference?
 
virtual IAnnotationReferencePtr getReference () const =0
 Get a reference that can be used to refer to this annotation.
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

An interface class for an annotation.

Member Enumeration Documentation

◆ eAnnotationType

Types of annotations, listed with the earliest version of PDF that supported them.

Enumerator
eAT3D 

(PDF 1.6) 3D annotation

eATCaret 

(PDF 1.5) Caret annotation

eATCircle 

(PDF 1.3) Circle annotation

eATFileAttachment 

(PDF 1.3) File attachment annotation

eATFreeText 

(PDF 1.3) Free text annotation

eATHighlight 

(PDF 1.3) Highlight annotation

eATInk 

(PDF 1.3) Ink annotation

eATLine 

(PDF 1.3) Line annotation

eATLink 

(PDF 1.2) Link annotation

eATMovie 

(PDF 1.2) Movie annotation

eATPolygon 

(PDF 1.5) Polygon annotation

eATPolyLine 

(PDF 1.5) PolyLine annotation

eATPopup 

(PDF 1.3) Popup annotation

eATPrinterMark 

(PDF 1.4) Printer's mark annotation

eATProjection 

(PDF 1.7) Projection annotation

eATRedact 

(PDF 1.7) Redact annotation

eATRichMedia 

(PDF 1.7) RichMedia annotation

eATScreen 

(PDF 1.5) Screen annotation

eATSound 

(PDF 1.2) Sound annotation

eATSquare 

(PDF 1.3) Square annotation

eATSquiggly 

(PDF 1.4) Squiggly underline annotation

eATStamp 

(PDF 1.3) Stamp annotation

eATStrikeOut 

(PDF 1.3) Strikeout annotation

eATText 

(PDF 1.2) Text annotation

eATTrapNet 

(PDF 1.3) Trap network annotation

eATUnderline 

(PDF 1.3) Underline annotation

eATWatermark 

(PDF 1.6) Watermark annotation

eATWidget 

(PDF 1.2) Widget annotation

eATOther 

Other annotation.

Member Function Documentation

◆ addAppearance()

virtual void JawsMako::IAnnotation::addAppearance ( const IAnnotationAppearancePtr & appearance)
pure virtual

Add or replace an appearance.

    If the insert would result in two or more appearances with the same usage
    but different states, then all appearances with the same usage must have
    a defined state (an invalid scenario). If not, an exception will be thrown.
Parameters
appearanceThe annotation appearance

◆ clone()

virtual IAnnotationPtr JawsMako::IAnnotation::clone ( ) const
pure virtual

Clone the annotation. This is a deep clone. The annotation reference will remain the same.

Returns
IAnnotationPtr A smart pointer to the cloned annotation object

◆ getAppearance()

virtual IAnnotationAppearancePtr JawsMako::IAnnotation::getAppearance ( eAppearanceUsage usage,
const U8String & state = U8String() ) const
pure virtual

Fetch the annotation appearance that should be used for the given annotation usage and state according to the following rules:

  • If an exact match is found, it will be returned.
  • If an exact match is not found, but there exists a Normal appearance with the same state, it will be returned.
  • If none of the above yield an appearance, an exception results.
Parameters
usageThe annotation usage
stateThe annotation state
Returns
IAnnotationAppearancePtr A smart pointer to the annotation appearance object

◆ getAppearances()

virtual CAnnotationAppearanceVect JawsMako::IAnnotation::getAppearances ( ) const
pure virtual

Return all the annotation appearances in a vector.

Returns
CAnnotationAppearanceVect The vector of annotation appearances

◆ getBorder()

virtual CAnnotationBorder JawsMako::IAnnotation::getBorder ( ) const
pure virtual

Get the annotation's border. See CAnnotationBorder for details.

Returns
CAnnotationBorder The annotation's border

◆ getColor()

virtual IDOMColorPtr JawsMako::IAnnotation::getColor ( ) const
pure virtual

Get the color. The use of this color depends on the annotation type. See the PDF 1.7 specification for details.

Returns
IDOMColorPtr The annotation color

◆ getContents()

virtual U8String JawsMako::IAnnotation::getContents ( ) const
pure virtual

Get the Contents entry in UTF-8.

Returns
U8String The Contents entry, or an empty string if there is no Contents entry.

◆ getFlags()

virtual uint32 JawsMako::IAnnotation::getFlags ( ) const
pure virtual

Get the annotation flags. To interpret these flags please see section 8.4.2 "Annotation Flags" in the PDF 1.7 specification.

Returns
uint32 The annotation flags

◆ getModificationTime()

virtual IEDLTimePtr JawsMako::IAnnotation::getModificationTime ( ) const
pure virtual

Get the Modification date and time of the annotation, if present.

Returns
IEDLTimePtr The modification date. If the date is not of the expected format, or is missing, a NULL object will be returned

◆ getRect()

virtual const FRect & JawsMako::IAnnotation::getRect ( ) const
pure virtual

Get the rect in which the appearances should be displayed.

Returns
FRect The display rect

◆ getReference()

virtual IAnnotationReferencePtr JawsMako::IAnnotation::getReference ( ) const
pure virtual

Get a reference that can be used to refer to this annotation.

Returns
IAnnotationReferencePtr The annotation reference

◆ getState()

virtual U8String JawsMako::IAnnotation::getState ( ) const
pure virtual

Get the current annotation state.

Returns
U8String The current annotation state, or an empty string if there is no state applicable

◆ getType()

virtual eAnnotationType JawsMako::IAnnotation::getType ( ) const
pure virtual

Get the type of the annotation.

Returns
eAnnotationType The annotation type

◆ hasNormalAppearance()

virtual bool JawsMako::IAnnotation::hasNormalAppearance ( ) const
pure virtual

Does the annotation have a normal appearance? Convenience utility function.

Returns
bool True if the annotation has a normal appearance

◆ matchesReference()

virtual bool JawsMako::IAnnotation::matchesReference ( const IAnnotationReferencePtr & reference) const
pure virtual

Does this annotation match the given IAnnotationReference?

Parameters
referenceThe annotation reference to be matched
Returns
bool True if a match is found, otherwise false

◆ rotate()

virtual void JawsMako::IAnnotation::rotate ( uint16 rotate,
double pageWidth,
double pageHeight )
pure virtual

Rotate the annotation clockwise as if the page was rotated by the same amount.

NB If an annotation has the NoRotate (bit 4) flag set, then the annotation will not be rotated, merely repositioned accordingly.

Parameters
rotateThe angle to rotate. Must be 0, 90, 180 or 270 degrees.
pageWidthThe width of the parent page.
pageHeightThe height of the parent page.

◆ setBorder()

virtual void JawsMako::IAnnotation::setBorder ( const CAnnotationBorder & border)
pure virtual

Set the annotation's border.

Parameters
borderThe border. See CAnnotationBorder for details as not all attributes will be supported for all annotation types and all versions of PDF.

◆ setColor()

virtual void JawsMako::IAnnotation::setColor ( const IDOMColorPtr & color)
pure virtual

Set the color. The use of this color depends on the annotation type. See the PDF 1.7 specification for details.

Parameters
colorThe required color. Setting a NULL value will remove any existing color. If a color is provided it must use a DeviceRGB, DeviceGray or DeviceCMYK color space.

◆ setContents()

virtual void JawsMako::IAnnotation::setContents ( const U8String & contents)
pure virtual

Set the Contents entry in UTF-8.

Parameters
contentsThe Contents entry

◆ setFlags()

virtual void JawsMako::IAnnotation::setFlags ( uint32 flags)
pure virtual

Set the annotation flags. Please see section 8.4.2 "Annotation Flags" for details about these flags.

Parameters
flagsThe annotation flags

◆ setModificationTime()

virtual void JawsMako::IAnnotation::setModificationTime ( const IEDLTimePtr & modificationTime)
pure virtual

Set the Modification date and time of the annotation.

Parameters
modificationTimethe Modification date and time. Must not be NULL.

◆ setRect()

virtual void JawsMako::IAnnotation::setRect ( const FRect & rect)
pure virtual

Set the rect in which the appearances should be displayed.

Parameters
rectThe display rect, which must be non-empty

◆ setState()

virtual void JawsMako::IAnnotation::setState ( const U8String & state)
pure virtual

Set the current annotation state.

Parameters
stateThe annotation state, or an empty string if the state should be removed

The documentation for this class was generated from the following file: