4#ifndef PDF_ANNOTATION_TYPES_H
5#define PDF_ANNOTATION_TYPES_H
7#include "PdfAnnotationActionBase.h"
8#include "PdfFileSpec.h"
9#include "PdfDestination.h"
10#include "PdfDictionary.h"
15 class PdfQuadPointsProvider
17 friend class PdfAnnotationLink;
18 friend class PdfAnnotationTextMarkupBase;
19 friend class PdfAnnotationRedact;
31 nullable<const PdfArray&> GetQuadPoints()
const
33 auto& dict =
static_cast<const T&
>(*this).GetDictionary();
35 auto obj = dict.FindKey(
"QuadPoints");
36 if (obj ==
nullptr || !obj->TryGetArray(arr))
50 void SetQuadPoints(nullable<const PdfArray&> quadPoints)
52 auto& dict =
static_cast<T&
>(*this).GetDictionary();
53 if (quadPoints ==
nullptr)
54 dict.RemoveKey(
"QuadPoints");
56 dict.AddKey(
"QuadPoints"_n, *quadPoints);
60 class PODOFO_API PdfAnnotationTextMarkupBase :
public PdfAnnotation,
public PdfQuadPointsProvider<PdfAnnotationTextMarkupBase>
62 friend class PdfAnnotationSquiggly;
63 friend class PdfAnnotationHighlight;
64 friend class PdfAnnotationStrikeOut;
65 friend class PdfAnnotationUnderline;
67 PdfAnnotationTextMarkupBase(PdfPage& page, PdfAnnotationType annotType,
const Rect& rect);
68 PdfAnnotationTextMarkupBase(PdfObject& obj, PdfAnnotationType annotType);
72 class PODOFO_API PdfAnnotationCaret final :
public PdfAnnotation
74 friend class PdfAnnotation;
76 PdfAnnotationCaret(PdfPage& page,
const Rect& rect);
77 PdfAnnotationCaret(PdfObject& obj);
81 class PODOFO_API PdfAnnotationFileAttachment final :
public PdfAnnotation
83 friend class PdfAnnotation;
85 PdfAnnotationFileAttachment(PdfPage& page,
const Rect& rect);
86 PdfAnnotationFileAttachment(PdfObject& obj);
95 void SetFileAttachment(
const nullable<PdfFileSpec&>& fileSpec);
102 nullable<PdfFileSpec&> GetFileAttachment();
103 nullable<const PdfFileSpec&> GetFileAttachment()
const;
106 nullable<PdfFileSpec&> getFileAttachment();
109 nullable<std::unique_ptr<PdfFileSpec>> m_FileSpec;
112 class PODOFO_API PdfAnnotationFreeText final :
public PdfAnnotation
114 friend class PdfAnnotation;
116 PdfAnnotationFreeText(PdfPage& page,
const Rect& rect);
117 PdfAnnotationFreeText(PdfObject& obj);
120 class PODOFO_API PdfAnnotationHighlight final :
public PdfAnnotationTextMarkupBase
122 friend class PdfAnnotation;
124 PdfAnnotationHighlight(PdfPage& page,
const Rect& rect);
125 PdfAnnotationHighlight(PdfObject& obj);
128 class PODOFO_API PdfAnnotationInk final :
public PdfAnnotation
130 friend class PdfAnnotation;
132 PdfAnnotationInk(PdfPage& page,
const Rect& rect);
133 PdfAnnotationInk(PdfObject& obj);
136 class PODOFO_API PdfAnnotationLine final :
public PdfAnnotation
138 friend class PdfAnnotation;
140 PdfAnnotationLine(PdfPage& page,
const Rect& rect);
141 PdfAnnotationLine(PdfObject& obj);
144 class PODOFO_API PdfAnnotationLink final :
public PdfAnnotationActionBase,
public PdfQuadPointsProvider<PdfAnnotationLink>
146 friend class PdfAnnotation;
148 PdfAnnotationLink(PdfPage& page,
const Rect& rect);
149 PdfAnnotationLink(PdfObject& obj);
155 void SetDestination(nullable<const PdfDestination&> destination);
161 nullable<PdfDestination&> GetDestination();
162 nullable<const PdfDestination&> GetDestination()
const;
165 nullable<PdfDestination&> getDestination();
166 void onActionSet()
override;
169 nullable<std::unique_ptr<PdfDestination>> m_Destination;
172 class PODOFO_API PdfAnnotationModel3D final :
public PdfAnnotation
174 friend class PdfAnnotation;
176 PdfAnnotationModel3D(PdfPage& page,
const Rect& rect);
177 PdfAnnotationModel3D(PdfObject& obj);
180 class PODOFO_API PdfAnnotationMovie final :
public PdfAnnotation
182 friend class PdfAnnotation;
184 PdfAnnotationMovie(PdfPage& page,
const Rect& rect);
185 PdfAnnotationMovie(PdfObject& obj);
188 class PODOFO_API PdfAnnotationPolygon final :
public PdfAnnotation
190 friend class PdfAnnotation;
192 PdfAnnotationPolygon(PdfPage& page,
const Rect& rect);
193 PdfAnnotationPolygon(PdfObject& obj);
196 class PODOFO_API PdfAnnotationPolyLine final :
public PdfAnnotation
198 friend class PdfAnnotation;
200 PdfAnnotationPolyLine(PdfPage& page,
const Rect& rect);
201 PdfAnnotationPolyLine(PdfObject& obj);
204 class PODOFO_API PdfAnnotationPopup final :
public PdfAnnotation
206 friend class PdfAnnotation;
208 PdfAnnotationPopup(PdfPage& page,
const Rect& rect);
209 PdfAnnotationPopup(PdfObject& obj);
214 void SetOpen(
const nullable<bool>& value);
218 bool GetOpen()
const;
221 class PODOFO_API PdfAnnotationPrinterMark final :
public PdfAnnotation
223 friend class PdfAnnotation;
225 PdfAnnotationPrinterMark(PdfPage& page,
const Rect& rect);
226 PdfAnnotationPrinterMark(PdfObject& obj);
229 class PODOFO_API PdfAnnotationScreen final :
230 public PdfAnnotationActionBase,
231 public PdfAppearanceCharacteristicsProvider<PdfAnnotationScreen>
233 friend class PdfAnnotation;
235 PdfAnnotationScreen(PdfPage& page,
const Rect& rect);
236 PdfAnnotationScreen(PdfObject& obj);
239 class PODOFO_API PdfAnnotationSquiggly final :
public PdfAnnotationTextMarkupBase
241 friend class PdfAnnotation;
243 PdfAnnotationSquiggly(PdfPage& page,
const Rect& rect);
244 PdfAnnotationSquiggly(PdfObject& obj);
248 class PODOFO_API PdfAnnotationStrikeOut final :
public PdfAnnotationTextMarkupBase
250 friend class PdfAnnotation;
252 PdfAnnotationStrikeOut(PdfPage& page,
const Rect& rect);
253 PdfAnnotationStrikeOut(PdfObject& obj);
256 class PODOFO_API PdfAnnotationSound final :
public PdfAnnotation
258 friend class PdfAnnotation;
260 PdfAnnotationSound(PdfPage& page,
const Rect& rect);
261 PdfAnnotationSound(PdfObject& obj);
264 class PODOFO_API PdfAnnotationSquare final :
public PdfAnnotation
266 friend class PdfAnnotation;
268 PdfAnnotationSquare(PdfPage& page,
const Rect& rect);
269 PdfAnnotationSquare(PdfObject& obj);
272 class PODOFO_API PdfAnnotationCircle final :
public PdfAnnotation
274 friend class PdfAnnotation;
276 PdfAnnotationCircle(PdfPage& page,
const Rect& rect);
277 PdfAnnotationCircle(PdfObject& obj);
280 class PODOFO_API PdfAnnotationStamp final :
public PdfAnnotation
282 friend class PdfAnnotation;
284 PdfAnnotationStamp(PdfPage& page,
const Rect& rect);
285 PdfAnnotationStamp(PdfObject& obj);
288 class PODOFO_API PdfAnnotationText final :
public PdfAnnotation
290 friend class PdfAnnotation;
292 PdfAnnotationText(PdfPage& page,
const Rect& rect);
293 PdfAnnotationText(PdfObject& obj);
298 void SetOpen(
const nullable<bool>& value);
302 bool GetOpen()
const;
305 class PODOFO_API PdfAnnotationTrapNet final :
public PdfAnnotation
307 friend class PdfAnnotation;
309 PdfAnnotationTrapNet(PdfPage& page,
const Rect& rect);
310 PdfAnnotationTrapNet(PdfObject& obj);
313 class PODOFO_API PdfAnnotationUnderline final :
public PdfAnnotationTextMarkupBase
315 friend class PdfAnnotation;
317 PdfAnnotationUnderline(PdfPage& page,
const Rect& rect);
318 PdfAnnotationUnderline(PdfObject& obj);
322 class PODOFO_API PdfAnnotationWatermark final :
public PdfAnnotation
324 friend class PdfAnnotation;
326 PdfAnnotationWatermark(PdfPage& page,
const Rect& rect);
327 PdfAnnotationWatermark(PdfObject& obj);
330 class PODOFO_API PdfAnnotationWebMedia final :
public PdfAnnotation
332 friend class PdfAnnotation;
334 PdfAnnotationWebMedia(PdfPage& page,
const Rect& rect);
335 PdfAnnotationWebMedia(PdfObject& obj);
338 class PODOFO_API PdfAnnotationRedact final :
public PdfAnnotation,
public PdfQuadPointsProvider<PdfAnnotationRedact>
340 friend class PdfAnnotation;
342 PdfAnnotationRedact(PdfPage& page,
const Rect& rect);
343 PdfAnnotationRedact(PdfObject& obj);
346 class PODOFO_API PdfAnnotationProjection final :
public PdfAnnotation
348 friend class PdfAnnotation;
350 PdfAnnotationProjection(PdfPage& page,
const Rect& rect);
351 PdfAnnotationProjection(PdfObject& obj);
354 class PODOFO_API PdfAnnotationRichMedia final :
public PdfAnnotation
356 friend class PdfAnnotation;
358 PdfAnnotationRichMedia(PdfPage& page,
const Rect& rect);
359 PdfAnnotationRichMedia(PdfObject& obj);
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13