Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
interactive.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2013-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
5#ifndef JAWSMAKO_INTERACTIVE_H
6#define JAWSMAKO_INTERACTIVE_H
7
15
16#include <jawsmako/types.h>
17#include <jawsmako/hashable.h>
18#include <edl/edlfwd.h>
19#include <edl/idomform.h>
20#include <edl/idomfont.h>
21
22namespace JawsMako
23{
24 using namespace EDL;
25
26 // Forward declarations
27 class ILinkAnnotation;
31 class ICaretAnnotation;
33 class IInkAnnotation;
35 class IPolyAnnotation;
37 class IPopupAnnotation;
39 class ILineAnnotation;
41 class IShapeAnnotation;
43 class ISoundAnnotation;
45 class IStampAnnotation;
47 class ITextAnnotation;
58 class IFormField;
61 class IForm;
66 class IAnnotation;
73 class IThreads;
75
84 {
85 public:
87
93 virtual bool equals(const IAnnotationReferencePtr &other) const = 0;
94 };
95
109
114 typedef enum
115 {
117 eFFRequired = (1 << 1),
118 eFFNoExport = (1 << 2),
119 eFFNoToggleToOff = (1 << 14),
120 eFFRadio = (1 << 15),
121 eFFPushButton = (1 << 16),
122 eFFRadiosInUnison = (1 << 25),
123 eFFMultiline = (1 << 12),
124 eFFPassword = (1 << 13),
125 eFFCombo = (1 << 17),
126 eFFEdit = (1 << 18),
127 eFFSort = (1 << 19),
128 eFFFileSelect = (1 << 20),
129 eFFMultiSelect = (1 << 21),
131 eFFDoNotScroll = (1 << 23),
132 eFFComb = (1 << 24),
133 eFFRichText = (1 << 25),
135 } eFieldFlags;
136
149
155 {
156 public:
158 CFieldOption(const U8String &_label, const U8String &_exportValue = U8String())
159 {
160 label = _label;
161 exportValue = _exportValue;
162 }
164 U8String exportValue; // May be empty if not specified.
165
166 bool operator== (const CFieldOption &other) const
167 {
168 return (label == other.label)
169 && (exportValue == other.exportValue);
170 }
171
172 bool operator!= (const CFieldOption &other) const
173 {
174 return ! (*this == other);
175 }
176
177 };
179
186 class IFormField : public IRCObject
187 {
188 public:
189 virtual ~IFormField() {}
190
202 static JAWSMAKO_API IFormFieldPtr create(const IJawsMakoPtr &jawsMako,
204 const U8String &partialName = U8String(),
205 uint32 flags = 0,
206 const CFormFieldVect &childFields = CFormFieldVect(),
208 const U8String &alternateName = U8String());
209
214 virtual IFormFieldPtr clone() const = 0;
215
222 virtual eFieldType getFieldType() const = 0;
223
224#ifdef SWIG
225 %apply uint32_t &OUTPUT { uint32 &flags };
226#endif
233 virtual bool getFieldFlags(uint32 &flags) const = 0;
234#ifdef SWIG
235 %clear uint32 &flags;
236#endif
237
242 virtual void setFieldFlags(uint32 flags) = 0;
243
248 virtual CFormFieldVect getChildFields() const = 0;
249
255
263 virtual DOMid getFieldId() const = 0;
264
268 virtual void clearChildFields() = 0;
269
276 virtual void addChildField(const IFormFieldPtr &field) = 0;
277
282 virtual void removeChildField(const IFormFieldPtr &field) = 0;
283
290 virtual bool fieldInSubtree(const IFormFieldPtr &field) const = 0;
291
295 virtual void clearChildWidgets() = 0;
296
303 virtual void addChildWidget(const IWidgetAnnotationPtr &widget) = 0;
304
311 virtual void addChildWidget(const IAnnotationReferencePtr &widgetReference) = 0;
312
317 virtual void removeChildWidget(const IWidgetAnnotationPtr &widget) = 0;
318
323 virtual void removeChildWidget(const IAnnotationReferencePtr &widgetReference) = 0;
324
331 virtual bool widgetInSubtree(const IWidgetAnnotationPtr &widget) const = 0;
332
339 virtual bool widgetInSubtree(const IAnnotationReferencePtr &widgetReference) const = 0;
340
346 virtual U8String getPartialName() const = 0;
347
352 virtual void setPartialName(const U8String &name) = 0;
353
362 virtual bool getValue(CU8StringVect &value) const = 0;
363
372 virtual void setValue(const CU8StringVect &value) = 0;
373
378 virtual void setValue(const U8String &value)
379 {
380 CU8StringVect values(1);
381 values[0] = value;
382 setValue(values);
383 }
384
393 virtual bool getDefaultValue(CU8StringVect &value) const = 0;
394
403 virtual void setDefaultValue(const CU8StringVect &value) = 0;
404
409 virtual void setDefaultValue(const U8String &value)
410 {
411 CU8StringVect values(1);
412 values[0] = value;
413 setDefaultValue(values);
414 }
415
416 /*
417 * For Fields containing variable text.
418 */
419
426 virtual bool getDefaultAppearanceString(U8String &defaultAppearanceString) const = 0;
427
432 virtual void setDefaultAppearanceString(const U8String &defaultAppearanceString) = 0;
433
438 virtual eQuadding getQuadding() const = 0;
439
444 virtual void setQuadding(eQuadding quadding) = 0;
445
446 /*
447 * For choice and radio buttons.
448 */
449
456 virtual bool getOptions(CFieldOptionVect &options) const = 0;
457
462 virtual void setOptions(const CFieldOptionVect &options) = 0;
463
469 virtual U8String getAlternateName() const = 0;
470
475 virtual void setAlternateName(const U8String &name) = 0;
476 };
477
483 {
484 public:
486 IInputStreamPtr stream;
487
488 bool operator== (const CXFAPacket &other) const
489 {
490 return (other.name == name)
491 && (other.stream == stream);
492 }
493
494 bool operator!= (const CXFAPacket &other) const
495 {
496 return ! (*this == other);
497 }
498 };
500
507 class IForm : public IRCObject
508 {
509 public:
510 virtual ~IForm() {}
511
517 static JAWSMAKO_API IFormPtr create(const IJawsMakoPtr &jawsMako);
518
523 virtual IFormPtr clone() const = 0;
524
529 virtual CFormFieldVect getFields() const = 0;
530
536
540 virtual void clearFields() = 0;
541
548 virtual void addField(const IFormFieldPtr &field) = 0;
549
554 virtual void removeField(const IFormFieldPtr &field) = 0;
555
559 virtual void clearWidgets() = 0;
560
567 virtual void addWidget(const IWidgetAnnotationPtr &widget) = 0;
568
575 virtual void addWidget(const IAnnotationReferencePtr &widgetReference) = 0;
576
581 virtual void removeWidget(const IWidgetAnnotationPtr &widget) = 0;
582
587 virtual void removeWidget(const IAnnotationReferencePtr &widgetReference) = 0;
588
595 virtual bool fieldInTree(const IFormFieldPtr &field) const = 0;
596
616 virtual CFormFieldVect getPathToField(const IFormFieldPtr &field) const = 0;
617
624 virtual bool widgetInTree(const IWidgetAnnotationPtr &widget) const = 0;
625
632 virtual bool widgetInTree(const IAnnotationReferencePtr &widgetReference) const = 0;
633
653 virtual CFormFieldVect getPathToWidget(const IWidgetAnnotationPtr &widget) const = 0;
654
674 virtual CFormFieldVect getPathToWidget(const IAnnotationReferencePtr &widgetReference) const = 0;
675
682 virtual eFieldType getWidgetFieldType(const IWidgetAnnotationPtr &widget) const = 0;
683
690 virtual uint32 getWidgetFieldFlags(const IWidgetAnnotationPtr &widget) const = 0;
691
698 virtual U8String getWidgetDefaultAppearanceString(const IWidgetAnnotationPtr &widget) const = 0;
699
706 virtual CU8StringVect getWidgetValue(const IWidgetAnnotationPtr &widget) const = 0;
707
714 virtual CU8StringVect getWidgetDefaultValue(const IWidgetAnnotationPtr &widget) const = 0;
715
722 virtual CU8StringVect getFieldValue(const IFormFieldPtr &field) const = 0;
723
730 virtual CU8StringVect getFieldDefaultValue(const IFormFieldPtr &field) const = 0;
731
738 virtual CFieldOptionVect getWidgetOptions(const IWidgetAnnotationPtr &widget) const = 0;
739
746 virtual eQuadding getWidgetQuadding(const IWidgetAnnotationPtr &widget) const = 0;
747
753 virtual bool getNeedAppearances() const = 0;
754
760 virtual void setNeedAppearances(bool needAppearances) = 0;
761
768 virtual CXFAPacketVect getXfaPacketData() const = 0;
769
774 virtual void setXfaPacketData(const CXFAPacketVect &xfaPacketData) = 0;
775 };
776
787
796 {
797 public:
799
808 static JAWSMAKO_API IAnnotationAppearancePtr create(const IJawsMakoPtr &jawsMako, const IDOMFormPtr &form, eAppearanceUsage usage, const U8String &state = U8String());
809
814 virtual IAnnotationAppearancePtr clone() const = 0;
815
820 virtual eAppearanceUsage getUsage() const = 0;
821
827 virtual U8String getState() const = 0;
828
834 virtual IDOMFormPtr getForm() const = 0;
835
843 virtual IDOMNodePtr getScaledAppearance(const FRect &annotRect) const = 0;
844 };
845
860 {
861 public:
873
880 CAnnotationBorder(float inWidth = 1.0f / 72.0f * 96.0f, const eBorderType &inType = eBTSolid, const CEDLVector<float> &inDash = CEDLVector<float>())
881 {
882 width = inWidth;
883 type = inType;
884 dash = inDash;
885 }
886
887 float width;
892 };
893
899 class IAnnotation : public IRCObject
900 {
901 public:
902 virtual ~IAnnotation() {}
903
939
944 virtual eAnnotationType getType() const = 0;
945
950 virtual const FRect &getRect() const = 0;
951
956 virtual void setRect(const FRect &rect) = 0;
957
962 virtual U8String getContents() const = 0;
963
968 virtual void setContents(const U8String &contents) = 0;
969
976 virtual IDOMColorPtr getColor() const = 0;
977
985 virtual void setColor(const IDOMColorPtr &color) = 0;
986
992 virtual IEDLTimePtr getModificationTime() const = 0;
993
998 virtual void setModificationTime(const IEDLTimePtr &modificationTime) = 0;
999
1004 virtual CAnnotationBorder getBorder() const = 0;
1005
1012 virtual void setBorder(const CAnnotationBorder &border) = 0;
1013
1020 virtual uint32 getFlags() const = 0;
1021
1028 virtual void setFlags(uint32 flags) = 0;
1029
1041 virtual void rotate(uint16 rotate, double pageWidth, double pageHeight) = 0;
1042
1048
1052 virtual void removeAppearances() = 0;
1053
1059 virtual U8String getState() const = 0;
1060
1065 virtual void setState(const U8String &state) = 0;
1066
1079 virtual IAnnotationAppearancePtr getAppearance(eAppearanceUsage usage, const U8String &state = U8String()) const = 0;
1080
1089 virtual void addAppearance(const IAnnotationAppearancePtr &appearance) = 0;
1090
1096 virtual bool hasNormalAppearance() const = 0;
1097
1098
1104 virtual IAnnotationPtr clone() const = 0;
1105
1111 virtual bool matchesReference(const IAnnotationReferencePtr &reference) const = 0;
1112
1117 virtual IAnnotationReferencePtr getReference() const = 0;
1118
1119 };
1120
1128 {
1129 public:
1131
1137 virtual U8String getAuthor() const = 0;
1138
1144 virtual void setAuthor(const U8String &author) = 0;
1145
1152 virtual IEDLTimePtr getCreationTime() const = 0;
1153
1158 virtual void setCreationTime(const IEDLTimePtr &creationTime) = 0;
1159
1164 virtual float getOpacity() const = 0;
1165
1170 virtual void setOpacity(float opacity) = 0;
1171
1177 virtual IAnnotationReferencePtr getPopupReference() const = 0;
1178
1185 virtual void setPopup(const IAnnotationReferencePtr &popupReference) = 0;
1186
1193 virtual void setPopup(const IPopupAnnotationPtr &popup) = 0;
1194
1212 virtual IAnnotationAppearancePtr createNormalAppearance() const = 0;
1213
1214 };
1215 #define obj2IMarkupAnnotation(obj) IMarkupAnnotationPtr(dynamic_cast<IMarkupAnnotation *>((IRCObject *) obj), true)
1216
1223 {
1224 public:
1226 CQuadPoint(const FPoint &inP1, const FPoint &inP2, const FPoint &inP3, const FPoint &inP4)
1227 {
1228 p1 = inP1;
1229 p2 = inP2;
1230 p3 = inP3;
1231 p4 = inP4;
1232 }
1237
1238 bool operator== (const CQuadPoint &other) const
1239 {
1240 return (other.p1 == p1)
1241 && (other.p2 == p2)
1242 && (other.p3 == p3)
1243 && (other.p4 == p4);
1244 }
1245
1246 bool operator!= (const CQuadPoint &other) const
1247 {
1248 return ! (*this == other);
1249 }
1250 };
1252
1254
1255
1262 {
1263 public:
1264 CRectInset(double _left = 0.0, double _top = 0.0, double _right = 0.0, double _bottom = 0.0)
1265 {
1266 left = _left;
1267 top = _top;
1268 right = _right;
1269 bottom = _bottom;
1270 }
1271 double left;
1272 double top;
1273 double right;
1274 double bottom;
1275 };
1276
1283 {
1284 public:
1296 static JAWSMAKO_API IWidgetAppearanceCharacteristicsPtr create(const IJawsMakoPtr &jawsMako,
1297 int32 rotation = 0,
1298 const IDOMColorPtr &borderColor = IDOMColorPtr(),
1299 const IDOMColorPtr &backgroundColor = IDOMColorPtr(),
1300 const U8String &caption = U8String(),
1301 const U8String &rolloverCaption = U8String(),
1302 const U8String &alternateCaption = U8String());
1303
1308 virtual int32 getRotation() const = 0;
1309
1314 virtual void setRotation(int32 rotation) = 0;
1315
1320 virtual IDOMColorPtr getBorderColor() const = 0;
1321
1326 virtual void setBorderColor(const IDOMColorPtr &color) = 0;
1327
1332 virtual IDOMColorPtr getBackgroundColor() const = 0;
1333
1338 virtual void setBackgroundColor(const IDOMColorPtr &color) = 0;
1339
1344 virtual U8String getCaption() const = 0;
1345
1350 virtual void setCaption(const U8String &caption) = 0;
1351
1356 virtual U8String getRolloverCaption() const = 0;
1357
1362 virtual void setRolloverCaption(const U8String &caption) = 0;
1363
1368 virtual U8String getAlternateCaption() const = 0;
1369
1374 virtual void setAlternateCaption(const U8String &caption) = 0;
1375 };
1376
1384 {
1385 public:
1387
1400
1413
1437 virtual void createBasicAppearances(const IFormPtr &form,
1438 const U8String &onStateName = U8String(),
1439 const IDOMFontPtr &font = IDOMFontPtr(),
1440 uint32 fontIndex = 0,
1441 float captionSize = 10.0f) = 0;
1442
1464 static JAWSMAKO_API IWidgetAnnotationPtr createTextField(const IJawsMakoPtr &jawsMako,
1465 const IFormPtr &form,
1466 const IPagePtr &page,
1467 const FRect &rect,
1468 const U8String &partialName,
1469 const U8String &text,
1470 float textSize,
1471 const IDOMFontOpenTypePtr &font,
1472 uint32 fontIndex = 0,
1473 eFontEncoding encodingHint = eFELatin,
1474 const IDOMColorPtr &color = IDOMColorPtr(),
1475 bool multiLine = false,
1476 eQuadding quadding = eQLeftJustified,
1477 const U8String &alternateName = U8String());
1478
1493 static JAWSMAKO_API IWidgetAnnotationPtr createCheckButton(const IJawsMakoPtr &jawsMako,
1494 const IFormPtr &form,
1495 const IPagePtr &page,
1496 const FRect &rect,
1497 const U8String &partialName,
1498 const U8String &onValue,
1499 bool on = false,
1500 const U8String &alternateName = U8String());
1501
1503 {
1504 public:
1506 CRadioButtonInfo(const FRect &_rect, const U8String &_onValue) :
1507 rect(_rect), onValue(_onValue) {}
1508
1511
1512 bool operator== (const CRadioButtonInfo &other) const
1513 {
1514 return (other.rect == rect)
1515 && (other.onValue == onValue);
1516 }
1517
1518 bool operator!= (const CRadioButtonInfo &other) const
1519 {
1520 return ! (*this == other);
1521 }
1522 };
1524
1540 static JAWSMAKO_API IFormFieldPtr createRadioButtons(const IJawsMakoPtr &jawsMako,
1541 const IFormPtr &form,
1542 const IPagePtr &page,
1543 const U8String &partialName,
1544 const U8String &value,
1545 const CRadioButtonInfoVect &buttonDetails,
1546 const U8String &alternateName = U8String());
1547
1572 static JAWSMAKO_API IWidgetAnnotationPtr createChoiceField(const IJawsMakoPtr &jawsMako,
1573 const IFormPtr &form,
1574 const IPagePtr &page,
1575 const FRect &rect,
1576 const U8String &partialName,
1577 bool combo,
1578 bool editable,
1579 bool multiSelect,
1580 const CFieldOptionVect &options,
1581 const CU8StringVect &selectedOptions,
1582 float textSize,
1583 const IDOMFontOpenTypePtr &font,
1584 uint32 fontIndex = 0,
1585 eFontEncoding encodingHint = eFELatin,
1586 const IDOMColorPtr &color = IDOMColorPtr(),
1587 const U8String &alternateName = U8String());
1588
1612 static JAWSMAKO_API IWidgetAnnotationPtr createButton(const IJawsMakoPtr &jawsMako,
1613 const IFormPtr &form,
1614 const IPagePtr &page,
1615 const FRect &rect,
1616 const U8String &partialName,
1617 const U8String &caption,
1618 float textSize,
1619 const IDOMFontOpenTypePtr &font,
1620 uint32 fontIndex = 0,
1621 eFontEncoding encodingHint = eFELatin,
1622 const IDOMColorPtr &color = IDOMColorPtr(),
1623 const IDOMColorPtr &backgroundColor = IDOMColorPtr(),
1624 const IPDFDictionaryPtr &actions = IPDFDictionaryPtr(),
1625 const U8String &alternateName = U8String());
1626
1631 virtual eFieldType getFieldType() const = 0;
1632
1638 virtual U8String getPartialName() const = 0;
1639
1644 virtual void setPartialName(const U8String &name) = 0;
1645
1651
1656 virtual void setHighlightMode(eHighlightMode highlightMode) = 0;
1657
1658#ifdef SWIG
1659 %apply uint32_t &OUTPUT { uint32 &flags };
1660#endif
1670 virtual bool getFieldFlags(uint32 &flags) const = 0;
1671#ifdef SWIG
1672 %clear uint32 &flags;
1673#endif
1674
1679 virtual void setFieldFlags(uint32 flags) = 0;
1680
1681
1689 virtual IWidgetAppearanceCharacteristicsPtr getAppearanceCharacteristics() const = 0;
1690
1695 virtual void setAppearanceCharacteristics(const IWidgetAppearanceCharacteristicsPtr &appearanceCharacteristics) = 0;
1696
1705 virtual bool getValue(CU8StringVect &value) const = 0;
1706
1715 virtual void setValue(const CU8StringVect &value) = 0;
1716
1721 virtual void setValue(const U8String &value)
1722 {
1723 CU8StringVect values(1);
1724 values[0] = value;
1725 setValue(values);
1726 }
1727
1736 virtual bool getDefaultValue(CU8StringVect &value) const = 0;
1737
1746 virtual void setDefaultValue(const CU8StringVect &value) = 0;
1747
1752 virtual void setDefaultValue(const U8String &value)
1753 {
1754 CU8StringVect values(1);
1755 values[0] = value;
1756 setDefaultValue(values);
1757 }
1758
1759
1760 /*
1761 * For Fields containing text, such as buttons, choices, and text fields.
1762 */
1763
1770 virtual bool getDefaultAppearanceString(U8String &defaultAppearanceString) const = 0;
1771
1776 virtual void setDefaultAppearanceString(const U8String &defaultAppearanceString) = 0;
1777
1778 /*
1779 * For text fields.
1780 */
1781
1786 virtual eQuadding getQuadding() const = 0;
1787
1792 virtual void setQuadding(eQuadding quadding) = 0;
1793
1794 /*
1795 * For choice and radio button fields.
1796 */
1797
1804 virtual bool getOptions(CFieldOptionVect &options) const = 0;
1805
1810 virtual void setOptions(const CFieldOptionVect &options) = 0;
1811
1816 virtual uint32 getFirstVisibleOption() const = 0;
1817
1822 virtual void setFirstVisibleOption(uint32 option) = 0;
1823
1829 virtual CUInt32Vect getSelectedOptions() const = 0;
1830
1835 virtual void setSelectedOptions(const CUInt32Vect &selectedOptions) = 0;
1836
1841 virtual IPDFDictionaryConstPtr getActionsDictionary() const = 0;
1842
1847 virtual void setActionsDictionary(const IPDFDictionaryPtr &actions) = 0;
1848
1853 virtual IPDFDictionaryConstPtr getAdditionalActionsDictionary() const = 0;
1854
1859 virtual void setAdditionalActionsDictionary(const IPDFDictionaryPtr &actions) = 0;
1860
1866 virtual U8String getAlternateName() const = 0;
1867
1872 virtual void setAlternateName(const U8String &name) = 0;
1873
1874 };
1875 #define obj2IWidgetAnnotation(obj) IWidgetAnnotationPtr(dynamic_cast<IWidgetAnnotation *>((IRCObject *) obj), true)
1876
1884 {
1885 public:
1887
1892 virtual CQuadPointVect getQuadPoints() const = 0;
1893
1898 virtual void setQuadPoints(const CQuadPointVect &quadPoints) = 0;
1899 };
1900 #define obj2ITextMarkupAnnotation(obj) ITextMarkupAnnotationPtr(dynamic_cast<ITextMarkupAnnotation *>((IRCObject *) obj), true)
1901
1909 {
1910 public:
1911 virtual ~ILinkAnnotation() {}
1912
1924 static JAWSMAKO_API ILinkAnnotationPtr create (const IJawsMakoPtr &jawsMako,
1925 const FRect &rect,
1926 const IDOMColorPtr &color,
1927 const IPDFObjectPtr &actionOrDest = IPDFObjectPtr (),
1928 const IPDFNamePtr &highlightMode = IPDFNamePtr (),
1929 const IPDFDictionaryPtr &pa = IPDFDictionaryPtr ()
1930 );
1931
1937 virtual CQuadPointVect getQuadPoints() const = 0;
1938
1943 virtual void setQuadPoints(const CQuadPointVect &quadPoints) = 0;
1944
1949 virtual void setActionOrDest (const IPDFObjectPtr &actionOrDest) = 0;
1950
1957 virtual IPDFObjectPtr getActionOrDest () const = 0;
1958
1964 virtual void setHighlightMode (const IPDFNamePtr &highlightMode) = 0;
1965
1970 virtual IPDFNamePtr getHighlightMode () const = 0;
1971
1976 virtual void setPA (const IPDFDictionaryPtr &pa) = 0;
1977
1982 virtual IPDFDictionaryPtr getPA () const = 0;
1983
1984 };
1985 #define obj2ILinkAnnotation(obj) ILinkAnnotationPtr(dynamic_cast<ILinkAnnotation *>((IRCObject *) obj), true)
1986
1994 {
1995 public:
1997
2004 virtual CRectInset getRectInset() const = 0;
2005
2010 virtual CFPointVect getCalloutLine() const = 0;
2011 };
2012 #define obj2IFreeTextAnnotation(obj) IFreeTextAnnotationPtr(dynamic_cast<IFreeTextAnnotation *>((IRCObject *) obj), true)
2013
2021 {
2022 public:
2024
2030 virtual CRectInset getRectInset() const = 0;
2031 };
2032 #define obj2ICaretAnnotation(obj) ICaretAnnotationPtr(dynamic_cast<ICaretAnnotation *>((IRCObject *) obj), true)
2033
2041 {
2042 public:
2044
2060 static JAWSMAKO_API IShapeAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect,
2062 const IDOMColorPtr &color = IDOMColorPtr(),
2063 const CAnnotationBorder &border = CAnnotationBorder(),
2064 const IDOMColorPtr &interior = IDOMColorPtr(),
2065 const CRectInset &inset = CRectInset());
2066
2072 virtual CRectInset getRectInset() const = 0;
2073
2078 virtual IDOMColorPtr getInteriorColor() const = 0;
2079
2084 virtual void setInteriorColor(const IDOMColorPtr &color) = 0;
2085 };
2086 #define obj2IShapeAnnotation(obj) IShapeAnnotationPtr(dynamic_cast<IShapeAnnotation *>((IRCObject *) obj), true)
2087
2095 {
2096 public:
2097 virtual ~IPolyAnnotation() {}
2098
2104 virtual CFPointVect getPoints() const = 0;
2105
2111 virtual void setPoints(const CFPointVect &points) = 0;
2112 };
2113 #define obj2IPolyAnnotation(obj) IPolyAnnotationPtr(dynamic_cast<IPolyAnnotation *>((IRCObject *) obj), true)
2114
2122 {
2123 public:
2124 virtual ~ILineAnnotation() {}
2125
2132 virtual void getLineEndpoints(FPoint &start, FPoint &end) const = 0;
2133
2140 virtual void setLineEndpoints(const FPoint &start, const FPoint &end) = 0;
2141
2146 virtual float getLeaderLineLength() const = 0;
2147
2152 virtual float getLeaderLineExtensionsLength() const = 0;
2153
2158 virtual float getLeaderLineOffset() const = 0;
2159
2160#ifdef SWIG
2161 %apply float &OUTPUT { float &xOffset };
2162 %apply float &OUTPUT { float &yOffset };
2163#endif
2169 virtual void getCaptionOffset(float &xOffset, float &yOffset) const = 0;
2170#ifdef SWIG
2171 %clear float &xOffset;
2172 %clear float &yOffset;
2173#endif
2174
2179 virtual IDOMColorPtr getInteriorColor() const = 0;
2180
2185 virtual void setInteriorColor(const IDOMColorPtr &color) = 0;
2186
2187 };
2188 #define obj2ILineAnnotation(obj) ILineAnnotationPtr(dynamic_cast<ILineAnnotation *>((IRCObject *) obj), true)
2189
2197 {
2198 public:
2199 virtual ~IInkAnnotation() {}
2200
2210 static JAWSMAKO_API IInkAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect,
2211 const IDOMColorPtr &color = IDOMColorPtr(),
2212 const CFPointVectVect &inkList = CFPointVectVect());
2213
2219 virtual CFPointVectVect getInkList() const = 0;
2220
2226 virtual void setInkList(const CFPointVectVect &inkList) = 0;
2227 };
2228 #define obj2IInkAnnotation(obj) IInkAnnotationPtr(dynamic_cast<IInkAnnotation *>((IRCObject *) obj), true)
2229
2239 {
2240 public:
2242
2250 static JAWSMAKO_API IPopupAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect,
2251 bool open = false);
2252
2257 virtual bool getOpen() const = 0;
2258
2263 virtual void setOpen(bool open) = 0;
2264 };
2265 #define obj2IPopupAnnotation(obj) IPopupAnnotationPtr(dynamic_cast<IPopupAnnotation *>((IRCObject *) obj), true)
2266
2275 {
2276 public:
2278
2283 virtual IInputStreamPtr getSoundAsWav() const = 0;
2284 };
2285 #define obj2ISoundAnnotation(obj) ISoundAnnotationPtr(dynamic_cast<ISoundAnnotation *>((IRCObject *) obj), true)
2286
2293 {
2294 public:
2295 virtual ~ITextAnnotation() {}
2296
2309 static JAWSMAKO_API ITextAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect,
2310 const U8String &contents, bool open = false,
2311 const U8String &iconName = U8String("Note"),
2312 const IPopupAnnotationPtr &popup = IPopupAnnotationPtr());
2313
2318 virtual bool getOpen() const = 0;
2319
2324 virtual void setOpen(bool open) = 0;
2325
2330 virtual U8String getIconName() const = 0;
2331
2336 virtual void setIconName(const U8String &iconName) = 0;
2337
2338 };
2339 #define obj2ITextAnnotation(obj) ITextAnnotationPtr(dynamic_cast<ITextAnnotation *>((IRCObject *) obj), true)
2340
2347 {
2348 public:
2350
2364 static JAWSMAKO_API IRedactionAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect,
2365 const CQuadPointVect &quadPoints = CQuadPointVect(),
2366 const IDOMColorPtr &color = IDOMColorPtr(),
2367 const IDOMColorPtr &interiorColor = IDOMColorPtr());
2373 virtual CQuadPointVect getQuadPoints() const = 0;
2374
2379 virtual void setQuadPoints(const CQuadPointVect &quadPoints) = 0;
2380
2385 virtual IDOMColorPtr getInteriorColor() const = 0;
2386
2392 virtual void setInteriorColor(const IDOMColorPtr &color) = 0;
2393 };
2394 #define obj2IRedactionAnnotation(obj) IRedactionAnnotationPtr(dynamic_cast<IRedactionAnnotation *>((IRCObject *) obj), true)
2395
2402 {
2403 public:
2405
2413 static JAWSMAKO_API IStampAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect,
2414 const U8String &name = U8String("Draft"));
2419 virtual U8String getName() const = 0;
2420
2425 virtual void setName(const U8String &name) = 0;
2426
2432 virtual U8String getIntent() const = 0;
2433
2441 virtual void setIntent(const U8String &intent) = 0;
2442
2443 };
2444#define obj2IStampAnnotation(obj) IStampAnnotationPtr(dynamic_cast<IStampAnnotation *>((IRCObject *) obj), true)
2445
2452 class IThreads : public IRCObject
2453 {
2454 public:
2455 virtual ~IThreads() {}
2456
2457 virtual IThreadsPtr clone() const = 0;
2458 };
2459
2467 {
2468 public:
2469
2475 {
2476 public:
2479 IInputStreamPtr resource;
2480
2481 bool operator== (const CXMLResource &other) const
2482 {
2483 return (other.name == name)
2484 && (other.mimeType == mimeType)
2485 && (other.resource == resource);
2486 }
2487
2488 bool operator!= (const CXMLResource &other) const
2489 {
2490 return ! (*this == other);
2491 }
2492 };
2494
2506 static JAWSMAKO_API IRAInputStreamPtr generateXMLForDocument(const IJawsMakoPtr &jawsMako, const IDocumentPtr &document, CXMLResourceVect &resources);
2507
2513 static JAWSMAKO_API IAnnotationReferencePtr createAnnotationReferenceFromTag(const U8String &tag);
2514 };
2515
2522 {
2523 public:
2525
2533 static JAWSMAKO_API INamedDestinationPtr create(const IJawsMakoPtr &jawsMako, const U8String &name, const IDOMPageRectTargetPtr &target);
2534
2539 virtual INamedDestinationPtr clone() const = 0;
2540
2545 virtual const U8String &getName() const = 0;
2546
2554 virtual IDOMPageRectTargetPtr getTarget() const = 0;
2555 };
2556
2557}
2558
2559#endif
Definition edlvector.h:30
Base class Interface for all Reference Counted objects.
Definition ircobject.h:35
A class representing an annotation's border (described in the PDF Specification as BorderStyle)....
Definition interactive.h:860
float width
Definition interactive.h:887
eBorderType
Types of border.
Definition interactive.h:866
@ eBTSolid
A solid rectangle surrounding the annotation.
Definition interactive.h:867
@ eBTBeveled
A simulated embossed rectangle that appears to be raised above the surface of the page.
Definition interactive.h:869
@ eBTDashed
A dashed rectangle surrounding the annotation.
Definition interactive.h:868
@ eBTInset
A simulated engraved rectangle that appears to be recessed below the surface of the page.
Definition interactive.h:870
@ eBTUnderline
A single line along the bottom of the annotation rectangle.
Definition interactive.h:871
CAnnotationBorder(float inWidth=1.0f/72.0f *96.0f, const eBorderType &inType=eBTSolid, const CEDLVector< float > &inDash=CEDLVector< float >())
Constructor.
Definition interactive.h:880
eBorderType type
The type of border.
Definition interactive.h:889
CEDLVector< float > dash
Definition interactive.h:890
bool operator==(const CFieldOption &other) const
Definition interactive.h:166
CFieldOption(const U8String &_label, const U8String &_exportValue=U8String())
Definition interactive.h:158
CFieldOption()
Definition interactive.h:157
U8String exportValue
Definition interactive.h:164
bool operator!=(const CFieldOption &other) const
Definition interactive.h:172
U8String label
Definition interactive.h:163
FPoint p1
Definition interactive.h:1233
FPoint p4
Definition interactive.h:1236
FPoint p2
Definition interactive.h:1234
bool operator==(const CQuadPoint &other) const
Definition interactive.h:1238
CQuadPoint(const FPoint &inP1, const FPoint &inP2, const FPoint &inP3, const FPoint &inP4)
Definition interactive.h:1226
FPoint p3
Definition interactive.h:1235
CQuadPoint()
Definition interactive.h:1225
bool operator!=(const CQuadPoint &other) const
Definition interactive.h:1246
A class which specifies an inset from a rectangle.
Definition interactive.h:1262
double left
Definition interactive.h:1271
double right
Definition interactive.h:1273
double top
Definition interactive.h:1272
CRectInset(double _left=0.0, double _top=0.0, double _right=0.0, double _bottom=0.0)
Definition interactive.h:1264
double bottom
Definition interactive.h:1274
A class encapsulating an entry in an XFA array.
Definition interactive.h:483
IInputStreamPtr stream
The stream containing the XFA packet.
Definition interactive.h:486
bool operator!=(const CXFAPacket &other) const
Definition interactive.h:494
U8String name
If empty and this is the only packet in the array, it represents the entire XFA package.
Definition interactive.h:485
bool operator==(const CXFAPacket &other) const
Definition interactive.h:488
An interface class for an annotation appearance, describing the graphical. content of an annotation i...
Definition interactive.h:796
virtual eAppearanceUsage getUsage() const =0
Get the usage for this appearance.
virtual IDOMFormPtr getForm() const =0
Get the graphical contents as an IDOMForm. Do not edit this form.
virtual U8String getState() const =0
Get the appearance state for this appearance. Will return an empty string if there is no state associ...
static JAWSMAKO_API IAnnotationAppearancePtr create(const IJawsMakoPtr &jawsMako, const IDOMFormPtr &form, eAppearanceUsage usage, const U8String &state=U8String())
Create a new annotation appearance.
virtual ~IAnnotationAppearance()
Definition interactive.h:798
virtual IAnnotationAppearancePtr clone() const =0
Clone the appearance. This is a deep clone.
virtual IDOMNodePtr getScaledAppearance(const FRect &annotRect) const =0
Get DOM for the annotation scaled appropriately to the given rect. Useful for preparing an annotation...
An interface class for an annotation.
Definition interactive.h:900
virtual uint32 getFlags() const =0
Get the annotation flags. To interpret these flags please see section 8.4.2 "Annotation Flags" in the...
virtual CAnnotationAppearanceVect getAppearances() const =0
Return all the annotation appearances in a vector.
virtual void addAppearance(const IAnnotationAppearancePtr &appearance)=0
Add or replace an appearance.
virtual void setModificationTime(const IEDLTimePtr &modificationTime)=0
Set the Modification date and time of the annotation.
virtual void setBorder(const CAnnotationBorder &border)=0
Set the annotation's border.
virtual void setContents(const U8String &contents)=0
Set the Contents entry in UTF-8.
virtual U8String getContents() const =0
Get the Contents entry in UTF-8.
virtual IAnnotationPtr clone() const =0
Clone the annotation. This is a deep clone. The annotation reference will remain the same.
virtual U8String getState() const =0
Get the current annotation state.
eAnnotationType
Types of annotations, listed with the earliest version of PDF that supported them.
Definition interactive.h:908
@ eATFreeText
(PDF 1.3) Free text annotation
Definition interactive.h:913
@ eATCaret
(PDF 1.5) Caret annotation
Definition interactive.h:910
@ eATWidget
(PDF 1.2) Widget annotation
Definition interactive.h:936
@ eATLink
(PDF 1.2) Link annotation
Definition interactive.h:917
@ eATHighlight
(PDF 1.3) Highlight annotation
Definition interactive.h:914
@ eATInk
(PDF 1.3) Ink annotation
Definition interactive.h:915
@ eATMovie
(PDF 1.2) Movie annotation
Definition interactive.h:918
@ eATProjection
(PDF 1.7) Projection annotation
Definition interactive.h:923
@ eATLine
(PDF 1.3) Line annotation
Definition interactive.h:916
@ eATStamp
(PDF 1.3) Stamp annotation
Definition interactive.h:930
@ eATUnderline
(PDF 1.3) Underline annotation
Definition interactive.h:934
@ eATStrikeOut
(PDF 1.3) Strikeout annotation
Definition interactive.h:931
@ eATFileAttachment
(PDF 1.3) File attachment annotation
Definition interactive.h:912
@ eATText
(PDF 1.2) Text annotation
Definition interactive.h:932
@ eATSound
(PDF 1.2) Sound annotation
Definition interactive.h:927
@ eATOther
Other annotation.
Definition interactive.h:937
@ eATCircle
(PDF 1.3) Circle annotation
Definition interactive.h:911
@ eATRedact
(PDF 1.7) Redact annotation
Definition interactive.h:924
@ eATSquiggly
(PDF 1.4) Squiggly underline annotation
Definition interactive.h:929
@ eATSquare
(PDF 1.3) Square annotation
Definition interactive.h:928
@ eATPolygon
(PDF 1.5) Polygon annotation
Definition interactive.h:919
@ eATTrapNet
(PDF 1.3) Trap network annotation
Definition interactive.h:933
@ eATRichMedia
(PDF 1.7) RichMedia annotation
Definition interactive.h:925
@ eATPolyLine
(PDF 1.5) PolyLine annotation
Definition interactive.h:920
@ eATPrinterMark
(PDF 1.4) Printer's mark annotation
Definition interactive.h:922
@ eATPopup
(PDF 1.3) Popup annotation
Definition interactive.h:921
@ eAT3D
(PDF 1.6) 3D annotation
Definition interactive.h:909
@ eATWatermark
(PDF 1.6) Watermark annotation
Definition interactive.h:935
@ eATScreen
(PDF 1.5) Screen annotation
Definition interactive.h:926
virtual bool matchesReference(const IAnnotationReferencePtr &reference) const =0
Does this annotation match the given IAnnotationReference?
virtual void setState(const U8String &state)=0
Set the current annotation state.
virtual IDOMColorPtr getColor() const =0
Get the color. The use of this color depends on the annotation type. See the PDF 1....
virtual void setRect(const FRect &rect)=0
Set the rect in which the appearances should be displayed.
virtual const FRect & getRect() const =0
Get the rect in which the appearances should be displayed.
virtual IAnnotationReferencePtr getReference() const =0
Get a reference that can be used to refer to this annotation.
virtual void setColor(const IDOMColorPtr &color)=0
Set the color. The use of this color depends on the annotation type. See the PDF 1....
virtual CAnnotationBorder getBorder() const =0
Get the annotation's border. See CAnnotationBorder for details.
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 accordin...
virtual IEDLTimePtr getModificationTime() const =0
Get the Modification date and time of the annotation, if present.
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 void removeAppearances()=0
Remove all annotation appearances.
virtual ~IAnnotation()
Definition interactive.h:902
virtual void setFlags(uint32 flags)=0
Set the annotation flags. Please see section 8.4.2 "Annotation Flags" for details about these flags.
virtual bool hasNormalAppearance() const =0
Does the annotation have a normal appearance? Convenience utility function.
virtual eAnnotationType getType() const =0
Get the type of the annotation.
A generic reference to an annotation. The target annotation might not be loaded. Chiefly used to refe...
Definition interactive.h:84
virtual ~IAnnotationReference()
Definition interactive.h:86
virtual bool equals(const IAnnotationReferencePtr &other) const =0
Determine if another annotation reference refers to the same annotation.
Simple class for tracking streams associated with XML generated by generateXMLForDocument().
Definition interactive.h:2475
U8String name
Definition interactive.h:2477
bool operator==(const CXMLResource &other) const
Definition interactive.h:2481
bool operator!=(const CXMLResource &other) const
Definition interactive.h:2488
IInputStreamPtr resource
Definition interactive.h:2479
U8String mimeType
Definition interactive.h:2478
Definition interactive.h:2467
CEDLVector< CXMLResource > CXMLResourceVect
Definition interactive.h:2493
static JAWSMAKO_API IAnnotationReferencePtr createAnnotationReferenceFromTag(const U8String &tag)
Generate an IAnnotationReference from an Annotation Tag attribute found in the XML.
static JAWSMAKO_API IRAInputStreamPtr generateXMLForDocument(const IJawsMakoPtr &jawsMako, const IDocumentPtr &document, CXMLResourceVect &resources)
Generate an XML version of the Annotations and Forms content in the given IDocument.
A generic interface class for a caret annotation. It is intended that future releases of JawsMako wil...
Definition interactive.h:2021
virtual CRectInset getRectInset() const =0
Get the rect inset describing, relative to the annotation rect, the caret area within the annotation.
virtual ~ICaretAnnotation()
Definition interactive.h:2023
An interface class for a form field. A form field may have multiple child fields and widget annotatio...
Definition interactive.h:187
virtual eQuadding getQuadding() const =0
Get the Quadding (Justification) for variable text.
virtual U8String getPartialName() const =0
Get the partial name of the field, if defined. If not present, an empty string will be returned.
virtual bool getValue(CU8StringVect &value) const =0
Get the value of the field, as an array of strings.
virtual void setFieldFlags(uint32 flags)=0
Set the field flags - see eFieldFlags.
virtual void setValue(const CU8StringVect &value)=0
Set the value of the field, as an array of strings. For fields that can take multiple values,...
virtual IFormFieldPtr clone() const =0
Clone the form field, which includes a deep clone of any child IFormFields.
virtual void addChildWidget(const IWidgetAnnotationPtr &widget)=0
Add a child widget. An exception will be thrown if an annotation with the same reference is already p...
virtual void removeChildWidget(const IAnnotationReferencePtr &widgetReference)=0
Remove the given child widget from the field, by reference.
virtual bool fieldInSubtree(const IFormFieldPtr &field) const =0
Search the IFormField subtree for a field that has the same id as the given field....
virtual ~IFormField()
Definition interactive.h:189
virtual void removeChildWidget(const IWidgetAnnotationPtr &widget)=0
Remove the given child widget from the field.
virtual void addChildField(const IFormFieldPtr &field)=0
Add a child field. An exception will be thrown if the field to be inserted has the same partial name ...
virtual void setPartialName(const U8String &name)=0
Set the partial name of the field.
virtual void removeChildField(const IFormFieldPtr &field)=0
Remove a child field.
virtual bool widgetInSubtree(const IAnnotationReferencePtr &widgetReference) const =0
Search the IFormField subtree for a widget, by reference The search recurses through the children.
virtual DOMid getFieldId() const =0
Get the unique id for this field. This id is preserved across cloning, and therefore all clones of th...
virtual void clearChildFields()=0
Clear the child fields list.
virtual void setDefaultAppearanceString(const U8String &defaultAppearanceString)=0
Set the default appearance string for variable text.
virtual bool getFieldFlags(uint32 &flags) const =0
Get the field flags, if present.
virtual CAnnotationReferenceVect getChildWidgets() const =0
Get references to the child widgets in a vector.
virtual void clearChildWidgets()=0
Clear the child widgets list.
virtual U8String getAlternateName() const =0
Get the alternate name of the field, if defined. If not present, an empty string will be returned.
virtual void setValue(const U8String &value)
Convenience form for fields that only need a single value.
Definition interactive.h:378
virtual bool getDefaultValue(CU8StringVect &value) const =0
Get the default value of the field, as an array of strings.
virtual CFormFieldVect getChildFields() const =0
Get the child fields in a vector.
virtual void addChildWidget(const IAnnotationReferencePtr &widgetReference)=0
Add a child widget by reference. An exception will be thrown if an annotation with the same reference...
static JAWSMAKO_API IFormFieldPtr create(const IJawsMakoPtr &jawsMako, eFieldType type=eFTInherited, const U8String &partialName=U8String(), uint32 flags=0, const CFormFieldVect &childFields=CFormFieldVect(), const CAnnotationReferenceVect &childWidgets=CAnnotationReferenceVect(), const U8String &alternateName=U8String())
Create a new form field.
virtual void setQuadding(eQuadding quadding)=0
Set the Quadding (Justification) for variable text.
virtual eFieldType getFieldType() const =0
Get the type of the field. If eFTInherited is returned, the parent field should be consulted to deter...
virtual bool getOptions(CFieldOptionVect &options) const =0
Get the options for this field.
virtual void setDefaultValue(const U8String &value)
Convenience form for fields that only need a single value.
Definition interactive.h:409
virtual void setAlternateName(const U8String &name)=0
Set the alternate name of the field.
virtual void setDefaultValue(const CU8StringVect &value)=0
Set the value of the field, as an array of strings.
virtual void setOptions(const CFieldOptionVect &options)=0
Set the options for this field.
virtual bool widgetInSubtree(const IWidgetAnnotationPtr &widget) const =0
Search the IFormField subtree for a widget The search recurses through the children.
virtual bool getDefaultAppearanceString(U8String &defaultAppearanceString) const =0
Get the default appearance string for variable text, if set.
An interface class for an interactive form, which tracks a tree of IFormFields and widgets.
Definition interactive.h:508
virtual CFormFieldVect getFields() const =0
Get the top level fields in a vector.
virtual void removeField(const IFormFieldPtr &field)=0
Remove a top level field.
virtual CU8StringVect getWidgetValue(const IWidgetAnnotationPtr &widget) const =0
Determine the value for the widget field, resolving inherited values. Convenience....
virtual CFieldOptionVect getWidgetOptions(const IWidgetAnnotationPtr &widget) const =0
Determine the options value for the widget field, resolving inherited values. Convenience....
virtual U8String getWidgetDefaultAppearanceString(const IWidgetAnnotationPtr &widget) const =0
Determine the default appearance string for the given widget field, resolving inherited values....
virtual void removeWidget(const IAnnotationReferencePtr &widgetReference)=0
Remove the given top level widget, by reference.
virtual bool widgetInTree(const IAnnotationReferencePtr &widgetReference) const =0
Search the field sub for a widget, by reference. The search recurses through the child fields.
virtual CU8StringVect getWidgetDefaultValue(const IWidgetAnnotationPtr &widget) const =0
Determine the default value for the widget field, resolving inherited values. Convenience....
virtual ~IForm()
Definition interactive.h:510
virtual void addWidget(const IWidgetAnnotationPtr &widget)=0
Add a top level widget. An exception will be thrown if an annotation with the same reference is alrea...
virtual CFormFieldVect getPathToWidget(const IWidgetAnnotationPtr &widget) const =0
Find the path to a widget with the same reference as the given widget.
virtual void clearFields()=0
Clear the top level fields list.
virtual eQuadding getWidgetQuadding(const IWidgetAnnotationPtr &widget) const =0
Determine the quadding for the given widget field, resolving inherited values. Convenience....
virtual bool getNeedAppearances() const =0
Get whether a viewer should construct its own appearances for the widgets in this form.
virtual CU8StringVect getFieldValue(const IFormFieldPtr &field) const =0
Determine the value for the field, resolving inherited values. Convenience. An exception is thrown if...
virtual CFormFieldVect getPathToWidget(const IAnnotationReferencePtr &widgetReference) const =0
Find the path to a widget with the given reference.
virtual CU8StringVect getFieldDefaultValue(const IFormFieldPtr &field) const =0
Determine the default value for field, resolving inherited values. Convenience. An exception is throw...
virtual void setXfaPacketData(const CXFAPacketVect &xfaPacketData)=0
Set the XFA packet data for this form.
virtual void addField(const IFormFieldPtr &field)=0
Add a field at the top level. An exception will be thrown if the field to be inserted has the same pa...
virtual uint32 getWidgetFieldFlags(const IWidgetAnnotationPtr &widget) const =0
Determine the flags for the given widget field, resolving inherited values. Convenience....
virtual bool fieldInTree(const IFormFieldPtr &field) const =0
Search the field tree for a field that has the same id as the given field. The search recurses throug...
virtual CFormFieldVect getPathToField(const IFormFieldPtr &field) const =0
Find the path to a field with the same id that is present in the field tree.
virtual CAnnotationReferenceVect getWidgets() const =0
Get references to the top level widgets in a vector.
virtual void setNeedAppearances(bool needAppearances)=0
Set whether a viewer should construct its own appearances for the widgets in this field.
static JAWSMAKO_API IFormPtr create(const IJawsMakoPtr &jawsMako)
Create a new form.
virtual bool widgetInTree(const IWidgetAnnotationPtr &widget) const =0
Search the field sub for a widget. The search recurses through the child fields.
virtual void removeWidget(const IWidgetAnnotationPtr &widget)=0
Remove the given top level widget.
virtual void addWidget(const IAnnotationReferencePtr &widgetReference)=0
Add a top level widget by reference. An exception will be thrown if an annotation with the same refer...
virtual void clearWidgets()=0
Clear the top level widgets list.
virtual CXFAPacketVect getXfaPacketData() const =0
Get the XFA packet data, if present, for this form. This information is not currently used by Mako,...
virtual eFieldType getWidgetFieldType(const IWidgetAnnotationPtr &widget) const =0
Determine the type for the given widget field, resolving inherited values. Convenience....
virtual IFormPtr clone() const =0
Clone the form field, which includes a deep clone of any child IFormFields.
A generic interface class for a free text annotation. It is intended that future releases of JawsMako...
Definition interactive.h:1994
virtual CRectInset getRectInset() const =0
Get the rect inset describing, relative to the annotation rect, the free text area within the annotat...
virtual CFPointVect getCalloutLine() const =0
Get the points that comprise the callout line of the free text annotation.
virtual ~IFreeTextAnnotation()
Definition interactive.h:1996
A generic interface class for a ink annotation. It is intended that future releases of JawsMako will ...
Definition interactive.h:2197
virtual ~IInkAnnotation()
Definition interactive.h:2199
static JAWSMAKO_API IInkAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect, const IDOMColorPtr &color=IDOMColorPtr(), const CFPointVectVect &inkList=CFPointVectVect())
Create an ink annotation.
virtual void setInkList(const CFPointVectVect &inkList)=0
Get the annotation's ink list. All coordinates are relative to the annotation rectangle.
virtual CFPointVectVect getInkList() const =0
Get the annotation's ink list. All coordinates are relative to the annotation rectangle.
An interface class for a line annotation. It is intended that future releases of JawsMako will extend...
Definition interactive.h:2122
virtual void getCaptionOffset(float &xOffset, float &yOffset) const =0
Get the caption offset.
virtual float getLeaderLineOffset() const =0
Get the leader line offset.
virtual float getLeaderLineLength() const =0
Get the length of the leader line.
virtual IDOMColorPtr getInteriorColor() const =0
Get the interior color of the fill used for the line endings.
virtual ~ILineAnnotation()
Definition interactive.h:2124
virtual void setLineEndpoints(const FPoint &start, const FPoint &end)=0
Set the line end points. The points are relative to the annotation rect.
virtual void setInteriorColor(const IDOMColorPtr &color)=0
Set the interior color to be used to fill the line endings.
virtual void getLineEndpoints(FPoint &start, FPoint &end) const =0
Get the line end points. The points are relative to the annotation rect.
virtual float getLeaderLineExtensionsLength() const =0
Get the length of the leader line extensions.
An interface class for markup annotations. It is intended that future releases of JawsMako will exten...
Definition interactive.h:1128
virtual ~IMarkupAnnotation()
Definition interactive.h:1130
virtual float getOpacity() const =0
Get the opacity of the markup annotation.
virtual void setAuthor(const U8String &author)=0
Set the Author of the markup annotation. This is the "T" entry in the annotation, which by convention...
virtual void setPopup(const IPopupAnnotationPtr &popup)=0
Set a reference to a popup, if present.
virtual IAnnotationReferencePtr getPopupReference() const =0
Get a reference to the popup, if present.
virtual void setCreationTime(const IEDLTimePtr &creationTime)=0
Set the creation date and time of the annotation.
virtual U8String getAuthor() const =0
Get the Author of the markup annotation. This is the "T" entry in the annotation, which by convention...
virtual void setOpacity(float opacity)=0
Set the opacity of the markup annotation.
virtual IEDLTimePtr getCreationTime() const =0
Get the creation date and time of the annotation, if present.
virtual void setPopup(const IAnnotationReferencePtr &popupReference)=0
Set or clear the popup, by reference.
virtual IAnnotationAppearancePtr createNormalAppearance() const =0
Create a basic appearance given the current annotation's parameters. This can then be installed by us...
A named destination in a PDF Document.
Definition interactive.h:2522
virtual IDOMPageRectTargetPtr getTarget() const =0
Get the destination.
static JAWSMAKO_API INamedDestinationPtr create(const IJawsMakoPtr &jawsMako, const U8String &name, const IDOMPageRectTargetPtr &target)
Create a named destination with the given name to the given target.
virtual ~INamedDestination()
Definition interactive.h:2524
virtual INamedDestinationPtr clone() const =0
Clone the named destination.
virtual const U8String & getName() const =0
Get the name of this named destination.
An interface class for a polygon or polyline annotation. It is intended that future releases of JawsM...
Definition interactive.h:2095
virtual ~IPolyAnnotation()
Definition interactive.h:2097
virtual CFPointVect getPoints() const =0
Get the points comprising the vertices of the polygon. The points are relative to the annotation rect...
virtual void setPoints(const CFPointVect &points)=0
Set the points comprising the vertices of the polygon. The points are relative to the annotation rect...
An interface class for a popup annotation, which should not exist as a standalone,...
Definition interactive.h:2239
static JAWSMAKO_API IPopupAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect, bool open=false)
Create a popup annotation.
virtual bool getOpen() const =0
Get the annotation's open status.
virtual void setOpen(bool open)=0
Set the annotation's open status.
virtual ~IPopupAnnotation()
Definition interactive.h:2241
A generic interface class for a redaction annotation.
Definition interactive.h:2347
virtual IDOMColorPtr getInteriorColor() const =0
Get the interior color of the fill used for the shape.
virtual void setQuadPoints(const CQuadPointVect &quadPoints)=0
Set the redaction annotation's quad points.
virtual CQuadPointVect getQuadPoints() const =0
Get the redaction annotation's quad points if present. The points are relative to the annotation rect...
static JAWSMAKO_API IRedactionAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect, const CQuadPointVect &quadPoints=CQuadPointVect(), const IDOMColorPtr &color=IDOMColorPtr(), const IDOMColorPtr &interiorColor=IDOMColorPtr())
Create a redaction annotation.
virtual void setInteriorColor(const IDOMColorPtr &color)=0
Set the interior color to be used to fill the line endings.
virtual ~IRedactionAnnotation()
Definition interactive.h:2349
A generic interface class for circle and square annotations. It is intended that future releases of J...
Definition interactive.h:2041
virtual IDOMColorPtr getInteriorColor() const =0
Get the interior color of the fill used for the shape.
static JAWSMAKO_API IShapeAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect, IAnnotation::eAnnotationType type, const IDOMColorPtr &color=IDOMColorPtr(), const CAnnotationBorder &border=CAnnotationBorder(), const IDOMColorPtr &interior=IDOMColorPtr(), const CRectInset &inset=CRectInset())
Create a shape (Rectangle or Circle) annotation with the given parameters. An appearance for the new ...
virtual void setInteriorColor(const IDOMColorPtr &color)=0
Set the interior color to be used to fill the shapes.
virtual ~IShapeAnnotation()
Definition interactive.h:2043
virtual CRectInset getRectInset() const =0
Get the rect inset describing, relative to the annotation rect, the shape area within the annotation.
An interface class for a sound annotation. Allows access to the sound as a WAV stream if the stream i...
Definition interactive.h:2275
virtual IInputStreamPtr getSoundAsWav() const =0
Get the embedded sound (if present) as a WAV stream.
virtual ~ISoundAnnotation()
Definition interactive.h:2277
A generic interface class for a stamp annotation.
Definition interactive.h:2402
virtual U8String getName() const =0
Get the stamp annotation's name.
virtual void setIntent(const U8String &intent)=0
Set the stamp annotation's intent. Note: This is a PDF 2.0 feature. If intent is set to anything othe...
static JAWSMAKO_API IStampAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect, const U8String &name=U8String("Draft"))
Create a stamp annotation.
virtual ~IStampAnnotation()
Definition interactive.h:2404
virtual void setName(const U8String &name)=0
Set the stamp annotation's name.
virtual U8String getIntent() const =0
Get the stamp annotation's intent.
A generic interface class for a text (sticky note) annotation.
Definition interactive.h:2293
virtual void setOpen(bool open)=0
Set the annotation's open status.
virtual bool getOpen() const =0
Get the annotation's open status.
static JAWSMAKO_API ITextAnnotationPtr create(const IJawsMakoPtr &jawsMako, const FRect &rect, const U8String &contents, bool open=false, const U8String &iconName=U8String("Note"), const IPopupAnnotationPtr &popup=IPopupAnnotationPtr())
Create a text annotation.
virtual void setIconName(const U8String &iconName)=0
Set the annotation's icon name.
virtual U8String getIconName() const =0
Get the annotation's icon name. Must not be empty.
virtual ~ITextAnnotation()
Definition interactive.h:2295
A generic interface class for a text markup annotation. It is intended that future releases of JawsMa...
Definition interactive.h:1884
virtual void setQuadPoints(const CQuadPointVect &quadPoints)=0
Set the markup annotation's quad points.
virtual ~ITextMarkupAnnotation()
Definition interactive.h:1886
virtual CQuadPointVect getQuadPoints() const =0
Get the markup annotation's quad points if present.
An interface class for document threads, Currently a stub interface.
Definition interactive.h:2453
virtual ~IThreads()
Definition interactive.h:2455
virtual IThreadsPtr clone() const =0
bool operator!=(const CRadioButtonInfo &other) const
Definition interactive.h:1518
FRect rect
Definition interactive.h:1509
CRadioButtonInfo()
Definition interactive.h:1505
bool operator==(const CRadioButtonInfo &other) const
Definition interactive.h:1512
U8String onValue
Definition interactive.h:1510
CRadioButtonInfo(const FRect &_rect, const U8String &_onValue)
Definition interactive.h:1506
An interface class for a widget annotation. It is intended that future releases of JawsMako will exte...
Definition interactive.h:1384
virtual U8String getAlternateName() const =0
Get the alternate name of the widget.
virtual IPDFDictionaryConstPtr getAdditionalActionsDictionary() const =0
Get the additional actions dictionary (if present) associated with this widget.
virtual eQuadding getQuadding() const =0
Get the Quadding (Justification) for variable text.
static JAWSMAKO_API IWidgetAnnotationPtr createTextField(const IJawsMakoPtr &jawsMako, const IFormPtr &form, const IPagePtr &page, const FRect &rect, const U8String &partialName, const U8String &text, float textSize, const IDOMFontOpenTypePtr &font, uint32 fontIndex=0, eFontEncoding encodingHint=eFELatin, const IDOMColorPtr &color=IDOMColorPtr(), bool multiLine=false, eQuadding quadding=eQLeftJustified, const U8String &alternateName=U8String())
Creator for a simple text annotation, including a basic appearance stream, inserts it into the form,...
virtual eHighlightMode getHighlightMode() const =0
Get the highlight mode.
virtual void setAlternateName(const U8String &name)=0
Set the alternate name of the widget.
static JAWSMAKO_API IWidgetAnnotationPtr createButton(const IJawsMakoPtr &jawsMako, const IFormPtr &form, const IPagePtr &page, const FRect &rect, const U8String &partialName, const U8String &caption, float textSize, const IDOMFontOpenTypePtr &font, uint32 fontIndex=0, eFontEncoding encodingHint=eFELatin, const IDOMColorPtr &color=IDOMColorPtr(), const IDOMColorPtr &backgroundColor=IDOMColorPtr(), const IPDFDictionaryPtr &actions=IPDFDictionaryPtr(), const U8String &alternateName=U8String())
Convenience creator for a push button annotation, including basic appearance streams,...
virtual bool getDefaultAppearanceString(U8String &defaultAppearanceString) const =0
Get the default appearance string for variable text, if set.
static JAWSMAKO_API IFormFieldPtr createRadioButtons(const IJawsMakoPtr &jawsMako, const IFormPtr &form, const IPagePtr &page, const U8String &partialName, const U8String &value, const CRadioButtonInfoVect &buttonDetails, const U8String &alternateName=U8String())
Creator for a set of radio buttons, including basic appearance streams, inserts them into the form in...
virtual eFieldType getFieldType() const =0
Get the field type.
virtual void setDefaultAppearanceString(const U8String &defaultAppearanceString)=0
Set the default appearance string for variable text.
CEDLVector< CRadioButtonInfo > CRadioButtonInfoVect
Definition interactive.h:1523
virtual void setDefaultValue(const CU8StringVect &value)=0
Set the value of the field, as an array of strings.
virtual bool getDefaultValue(CU8StringVect &value) const =0
Get the default value of the field, as an array of strings.
virtual void setValue(const CU8StringVect &value)=0
Set the value of the field, as an array of strings. For fields that can take multiple values,...
virtual void setAppearanceCharacteristics(const IWidgetAppearanceCharacteristicsPtr &appearanceCharacteristics)=0
Set the appearance characteristics.
static JAWSMAKO_API IWidgetAnnotationPtr createChoiceField(const IJawsMakoPtr &jawsMako, const IFormPtr &form, const IPagePtr &page, const FRect &rect, const U8String &partialName, bool combo, bool editable, bool multiSelect, const CFieldOptionVect &options, const CU8StringVect &selectedOptions, float textSize, const IDOMFontOpenTypePtr &font, uint32 fontIndex=0, eFontEncoding encodingHint=eFELatin, const IDOMColorPtr &color=IDOMColorPtr(), const U8String &alternateName=U8String())
Creator for a choice annotation, including basic appearance streams, inserts it into the form,...
virtual CUInt32Vect getSelectedOptions() const =0
Get a vector of 0-indexed indexes into the options for this field. that represent the currently selec...
virtual IPDFDictionaryConstPtr getActionsDictionary() const =0
Get the actions dictionary (if present) associated with this widget.
virtual void setActionsDictionary(const IPDFDictionaryPtr &actions)=0
Set the actions dictionary associated with this widget.
virtual bool getFieldFlags(uint32 &flags) const =0
Get the field flags. Please see the PDF specification for the definition of the flags....
static JAWSMAKO_API IWidgetAnnotationPtr createCheckButton(const IJawsMakoPtr &jawsMako, const IFormPtr &form, const IPagePtr &page, const FRect &rect, const U8String &partialName, const U8String &onValue, bool on=false, const U8String &alternateName=U8String())
Creator for a check button annotation, including basic appearance streams, inserts it into the form,...
virtual void setDefaultValue(const U8String &value)
Convenience form for fields that only need a single value.
Definition interactive.h:1752
virtual void setFirstVisibleOption(uint32 option)=0
Set the index of the first item visible in the list from the options.
virtual void setSelectedOptions(const CUInt32Vect &selectedOptions)=0
Set the currently selected options by 0-indexed indexes into the options.
virtual bool getValue(CU8StringVect &value) const =0
Get the value of the field, as an array of strings.
virtual void setPartialName(const U8String &name)=0
Set the partial name of the widget.
virtual void setValue(const U8String &value)
Convenience form for fields that only need a single value.
Definition interactive.h:1721
virtual void createBasicAppearances(const IFormPtr &form, const U8String &onStateName=U8String(), const IDOMFontPtr &font=IDOMFontPtr(), uint32 fontIndex=0, float captionSize=10.0f)=0
Create a set of very basic appearances given the current annotation's parameters. Replaces any alread...
virtual void setHighlightMode(eHighlightMode highlightMode)=0
Set the hightlight mode.
virtual void setQuadding(eQuadding quadding)=0
Set the quadding (Justification) for variable text.
virtual uint32 getFirstVisibleOption() const =0
Get the index of the first item visible in the list from the options.
virtual U8String getPartialName() const =0
Get the partial name of the widget.
virtual IWidgetAppearanceCharacteristicsPtr getAppearanceCharacteristics() const =0
Get the appearance characteristics of this Widget.
virtual void setOptions(const CFieldOptionVect &options)=0
Set the options for this field.
virtual ~IWidgetAnnotation()
Definition interactive.h:1386
virtual bool getOptions(CFieldOptionVect &options) const =0
Get the options for this field.
virtual void setAdditionalActionsDictionary(const IPDFDictionaryPtr &actions)=0
Set the additional actions dictionary associated with this widget.
virtual void setFieldFlags(uint32 flags)=0
Set the field flags. Refer to the PDF specification 1.7 table 8.70 for details.
Appearance information for a widget annotation.
Definition interactive.h:1283
static JAWSMAKO_API IWidgetAppearanceCharacteristicsPtr create(const IJawsMakoPtr &jawsMako, int32 rotation=0, const IDOMColorPtr &borderColor=IDOMColorPtr(), const IDOMColorPtr &backgroundColor=IDOMColorPtr(), const U8String &caption=U8String(), const U8String &rolloverCaption=U8String(), const U8String &alternateCaption=U8String())
Create a new widget appearance characteristics.
virtual IDOMColorPtr getBorderColor() const =0
Get the border color of the widget.
virtual U8String getRolloverCaption() const =0
Get the rollover caption for the widget.
virtual U8String getCaption() const =0
Get the caption for the widget.
virtual void setBackgroundColor(const IDOMColorPtr &color)=0
Set the background color of the widget.
virtual void setCaption(const U8String &caption)=0
Set the caption for the widget.
virtual IDOMColorPtr getBackgroundColor() const =0
Get the background color of the widget.
virtual U8String getAlternateCaption() const =0
Get the alternate caption for the widget.
virtual void setRotation(int32 rotation)=0
Set the rotation of the widget appearance.
virtual int32 getRotation() const =0
Get the rotation of the widget appearance.
virtual void setBorderColor(const IDOMColorPtr &color)=0
Set the border color of the widget.
virtual void setRolloverCaption(const U8String &caption)=0
Set the rollover caption for the widget.
virtual void setAlternateCaption(const U8String &caption)=0
Set the alternate caption for the widget.
PointTmpl< double > FPoint
Definition edlgeom.h:102
RectTmpl< double > FRect
Definition edlgeom.h:338
CEDLVector< FPoint > CFPointVect
Definition edlgeom.h:106
unsigned short uint16
Definition edltypes.h:33
unsigned int uint32
Definition edltypes.h:34
signed int int32
Definition edltypes.h:29
eAppearanceUsage
The usage scenario for an annotation appearance.
Definition interactive.h:782
@ eAUDown
The down appearance is used when the mouse button is pressed or held down within the annotation’s act...
Definition interactive.h:785
@ eAURollover
The rollover appearance is used when the user moves the cursor into the annotation’s active area with...
Definition interactive.h:784
@ eAUNormal
The normal appearance is used when the annotation is not interacting with the user....
Definition interactive.h:783
eQuadding
The type of quadding (justification) used for variable text in a form field.
Definition interactive.h:143
eHighlightMode
The highlight mode for a Widget annotation.
Definition interactive.h:1393
eFontEncoding
Encoding scheme used for form fonts.
Definition interactive.h:1406
eFieldFlags
Flags used in form fields.
Definition interactive.h:115
eFieldType
The type of a form field. These map to field types present in the pdf specification.
Definition interactive.h:102
@ eQCentered
Definition interactive.h:145
@ eQLeftJustified
Definition interactive.h:144
@ eQInherited
Definition interactive.h:147
@ eQRightJustified
Definition interactive.h:146
@ eHMPush
Definition interactive.h:1397
@ eHMToggle
Definition interactive.h:1398
@ eHMNone
Definition interactive.h:1394
@ eHMInvert
Definition interactive.h:1395
@ eHMOutline
Definition interactive.h:1396
@ eFESimplifiedChinese
Definition interactive.h:1409
@ eFETraditionalChinese
Definition interactive.h:1410
@ eFEKorean
Definition interactive.h:1411
@ eFEJapanese
Definition interactive.h:1408
@ eFELatin
Definition interactive.h:1407
@ eFFDoNotScroll
Definition interactive.h:131
@ eFFNoExport
Definition interactive.h:118
@ eFFReadOnly
Definition interactive.h:116
@ eFFMultiSelect
Definition interactive.h:129
@ eFFSort
Definition interactive.h:127
@ eFFPassword
Definition interactive.h:124
@ eFFNoToggleToOff
Definition interactive.h:119
@ eFFRadiosInUnison
Definition interactive.h:122
@ eFFPushButton
Definition interactive.h:121
@ eFFEdit
Definition interactive.h:126
@ eFFCombo
Definition interactive.h:125
@ eFFComb
Definition interactive.h:132
@ eFFCommitOnSelChanged
Definition interactive.h:134
@ eFFDoNotSpellCheck
Definition interactive.h:130
@ eFFMultiline
Definition interactive.h:123
@ eFFRequired
Definition interactive.h:117
@ eFFRichText
Definition interactive.h:133
@ eFFFileSelect
Definition interactive.h:128
@ eFFRadio
Definition interactive.h:120
@ eFTText
Text box.
Definition interactive.h:105
@ eFTInherited
Inherited.
Definition interactive.h:103
@ eFTButton
Button.
Definition interactive.h:104
@ eFTChoice
Checkbox.
Definition interactive.h:106
@ eFTSignature
Digital signature.
Definition interactive.h:107
EDL::uint64 DOMid
Type used to uniquely idenitify a DOM node.
Definition idomid.h:17
EDLSysString U8String
A UTF-8 String.
Definition types.h:144
An abstract interface for an object that can be hashed.
Definition apexcustompostprocess.h:17
CEDLVector< uint32 > CUInt32Vect
Definition types.h:178
CEDLSysStringVect CU8StringVect
Definition types.h:167
CEDLVector< CXFAPacket > CXFAPacketVect
Definition interactive.h:499
CEDLVector< IAnnotationReferencePtr > CAnnotationReferenceVect
Definition interactive.h:57
CEDLVector< CFPointVect > CFPointVectVect
Definition interactive.h:1253
CEDLVector< CQuadPoint > CQuadPointVect
Definition interactive.h:1251
CEDLVector< IAnnotationPtr > CAnnotationVect
Definition interactive.h:70
CEDLVector< CFieldOption > CFieldOptionVect
Definition interactive.h:178
CEDLVector< IFormFieldPtr > CFormFieldVect
Definition interactive.h:60
CEDLVector< IAnnotationAppearancePtr > CAnnotationAppearanceVect
Definition interactive.h:65
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211
#define JAWSMAKO_API
Definition types.h:29