An interface class for an annotation. More...
#include <interactive.h>
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. | |
An interface class for an annotation.
Types of annotations, listed with the earliest version of PDF that supported them.
|
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.
appearance | The annotation appearance |
|
pure virtual |
Clone the annotation. This is a deep clone. The annotation reference will remain the same.
|
pure virtual |
Fetch the annotation appearance that should be used for the given annotation usage and state according to the following rules:
usage | The annotation usage |
state | The annotation state |
|
pure virtual |
Return all the annotation appearances in a vector.
|
pure virtual |
Get the annotation's border. See CAnnotationBorder for details.
|
pure virtual |
Get the color. The use of this color depends on the annotation type. See the PDF 1.7 specification for details.
|
pure virtual |
Get the Contents entry in UTF-8.
|
pure virtual |
Get the annotation flags. To interpret these flags please see section 8.4.2 "Annotation Flags" in the PDF 1.7 specification.
|
pure virtual |
Get the Modification date and time of the annotation, if present.
|
pure virtual |
Get the rect in which the appearances should be displayed.
|
pure virtual |
Get a reference that can be used to refer to this annotation.
|
pure virtual |
Get the current annotation state.
|
pure virtual |
Get the type of the annotation.
|
pure virtual |
Does the annotation have a normal appearance? Convenience utility function.
|
pure virtual |
Does this annotation match the given IAnnotationReference?
reference | The annotation reference to be matched |
|
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.
rotate | The angle to rotate. Must be 0, 90, 180 or 270 degrees. |
pageWidth | The width of the parent page. |
pageHeight | The height of the parent page. |
|
pure virtual |
Set the annotation's border.
border | The border. See CAnnotationBorder for details as not all attributes will be supported for all annotation types and all versions of PDF. |
|
pure virtual |
Set the color. The use of this color depends on the annotation type. See the PDF 1.7 specification for details.
color | The 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. |
|
pure virtual |
Set the Contents entry in UTF-8.
contents | The Contents entry |
|
pure virtual |
Set the annotation flags. Please see section 8.4.2 "Annotation Flags" for details about these flags.
flags | The annotation flags |
|
pure virtual |
Set the Modification date and time of the annotation.
modificationTime | the Modification date and time. Must not be NULL. |
|
pure virtual |
Set the rect in which the appearances should be displayed.
rect | The display rect, which must be non-empty |
|
pure virtual |
Set the current annotation state.
state | The annotation state, or an empty string if the state should be removed |