edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 1 | #ifndef __DEFINED__SkPdfAnnotationDictionary |
| 2 | #define __DEFINED__SkPdfAnnotationDictionary |
| 3 | |
| 4 | #include "SkPdfEnums_autogen.h" |
| 5 | #include "SkPdfArray_autogen.h" |
| 6 | #include "SkPdfDictionary_autogen.h" |
| 7 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 8 | // Entries common to all annotation dictionaries |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 9 | class SkPdfAnnotationDictionary : public SkPdfDictionary { |
| 10 | public: |
edisonn@google.com | 59543d3 | 2013-06-18 22:00:40 +0000 | [diff] [blame] | 11 | virtual SkPdfObjectType getType() const { return kAnnotationDictionary_SkPdfObjectType;} |
| 12 | virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kAnnotationDictionary_SkPdfObjectType + 1);} |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 13 | public: |
| 14 | virtual SkPdfAnnotationDictionary* asAnnotationDictionary() {return this;} |
| 15 | virtual const SkPdfAnnotationDictionary* asAnnotationDictionary() const {return this;} |
| 16 | |
| 17 | private: |
| 18 | virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;} |
| 19 | virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() const {return NULL;} |
| 20 | |
| 21 | virtual SkPdfActionDictionary* asActionDictionary() {return NULL;} |
| 22 | virtual const SkPdfActionDictionary* asActionDictionary() const {return NULL;} |
| 23 | |
| 24 | virtual SkPdfAlternateImageDictionary* asAlternateImageDictionary() {return NULL;} |
| 25 | virtual const SkPdfAlternateImageDictionary* asAlternateImageDictionary() const {return NULL;} |
| 26 | |
| 27 | virtual SkPdfAnnotationActionsDictionary* asAnnotationActionsDictionary() {return NULL;} |
| 28 | virtual const SkPdfAnnotationActionsDictionary* asAnnotationActionsDictionary() const {return NULL;} |
| 29 | |
| 30 | virtual SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteristicsDictionary() {return NULL;} |
| 31 | virtual const SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteristicsDictionary() const {return NULL;} |
| 32 | |
| 33 | virtual SkPdfAppearanceDictionary* asAppearanceDictionary() {return NULL;} |
| 34 | virtual const SkPdfAppearanceDictionary* asAppearanceDictionary() const {return NULL;} |
| 35 | |
| 36 | virtual SkPdfApplicationDataDictionary* asApplicationDataDictionary() {return NULL;} |
| 37 | virtual const SkPdfApplicationDataDictionary* asApplicationDataDictionary() const {return NULL;} |
| 38 | |
| 39 | virtual SkPdfArtifactsDictionary* asArtifactsDictionary() {return NULL;} |
| 40 | virtual const SkPdfArtifactsDictionary* asArtifactsDictionary() const {return NULL;} |
| 41 | |
| 42 | virtual SkPdfAttributeObjectDictionary* asAttributeObjectDictionary() {return NULL;} |
| 43 | virtual const SkPdfAttributeObjectDictionary* asAttributeObjectDictionary() const {return NULL;} |
| 44 | |
| 45 | virtual SkPdfBeadDictionary* asBeadDictionary() {return NULL;} |
| 46 | virtual const SkPdfBeadDictionary* asBeadDictionary() const {return NULL;} |
| 47 | |
| 48 | virtual SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructureElementsDictionary() {return NULL;} |
| 49 | virtual const SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructureElementsDictionary() const {return NULL;} |
| 50 | |
| 51 | virtual SkPdfBorderStyleDictionary* asBorderStyleDictionary() {return NULL;} |
| 52 | virtual const SkPdfBorderStyleDictionary* asBorderStyleDictionary() const {return NULL;} |
| 53 | |
| 54 | virtual SkPdfBoxColorInformationDictionary* asBoxColorInformationDictionary() {return NULL;} |
| 55 | virtual const SkPdfBoxColorInformationDictionary* asBoxColorInformationDictionary() const {return NULL;} |
| 56 | |
| 57 | virtual SkPdfBoxStyleDictionary* asBoxStyleDictionary() {return NULL;} |
| 58 | virtual const SkPdfBoxStyleDictionary* asBoxStyleDictionary() const {return NULL;} |
| 59 | |
| 60 | virtual SkPdfCIDFontDescriptorDictionary* asCIDFontDescriptorDictionary() {return NULL;} |
| 61 | virtual const SkPdfCIDFontDescriptorDictionary* asCIDFontDescriptorDictionary() const {return NULL;} |
| 62 | |
| 63 | virtual SkPdfCIDSystemInfoDictionary* asCIDSystemInfoDictionary() {return NULL;} |
| 64 | virtual const SkPdfCIDSystemInfoDictionary* asCIDSystemInfoDictionary() const {return NULL;} |
| 65 | |
| 66 | virtual SkPdfCMapDictionary* asCMapDictionary() {return NULL;} |
| 67 | virtual const SkPdfCMapDictionary* asCMapDictionary() const {return NULL;} |
| 68 | |
| 69 | virtual SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary() {return NULL;} |
| 70 | virtual const SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary() const {return NULL;} |
| 71 | |
| 72 | virtual SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary() {return NULL;} |
| 73 | virtual const SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary() const {return NULL;} |
| 74 | |
| 75 | virtual SkPdfCatalogDictionary* asCatalogDictionary() {return NULL;} |
| 76 | virtual const SkPdfCatalogDictionary* asCatalogDictionary() const {return NULL;} |
| 77 | |
| 78 | virtual SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDictionary() {return NULL;} |
| 79 | virtual const SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDictionary() const {return NULL;} |
| 80 | |
| 81 | virtual SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() {return NULL;} |
| 82 | virtual const SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() const {return NULL;} |
| 83 | |
| 84 | virtual SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() {return NULL;} |
| 85 | virtual const SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() const {return NULL;} |
| 86 | |
| 87 | virtual SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataDictionary() {return NULL;} |
| 88 | virtual const SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataDictionary() const {return NULL;} |
| 89 | |
| 90 | virtual SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() {return NULL;} |
| 91 | virtual const SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() const {return NULL;} |
| 92 | |
| 93 | virtual SkPdfDeviceNColorSpaceDictionary* asDeviceNColorSpaceDictionary() {return NULL;} |
| 94 | virtual const SkPdfDeviceNColorSpaceDictionary* asDeviceNColorSpaceDictionary() const {return NULL;} |
| 95 | |
| 96 | virtual SkPdfDocumentCatalogActionsDictionary* asDocumentCatalogActionsDictionary() {return NULL;} |
| 97 | virtual const SkPdfDocumentCatalogActionsDictionary* asDocumentCatalogActionsDictionary() const {return NULL;} |
| 98 | |
| 99 | virtual SkPdfDocumentInformationDictionary* asDocumentInformationDictionary() {return NULL;} |
| 100 | virtual const SkPdfDocumentInformationDictionary* asDocumentInformationDictionary() const {return NULL;} |
| 101 | |
| 102 | virtual SkPdfEmbeddedFileParameterDictionary* asEmbeddedFileParameterDictionary() {return NULL;} |
| 103 | virtual const SkPdfEmbeddedFileParameterDictionary* asEmbeddedFileParameterDictionary() const {return NULL;} |
| 104 | |
| 105 | virtual SkPdfEmbeddedFileStreamDictionary* asEmbeddedFileStreamDictionary() {return NULL;} |
| 106 | virtual const SkPdfEmbeddedFileStreamDictionary* asEmbeddedFileStreamDictionary() const {return NULL;} |
| 107 | |
| 108 | virtual SkPdfEmbeddedFontStreamDictionary* asEmbeddedFontStreamDictionary() {return NULL;} |
| 109 | virtual const SkPdfEmbeddedFontStreamDictionary* asEmbeddedFontStreamDictionary() const {return NULL;} |
| 110 | |
| 111 | virtual SkPdfEncodingDictionary* asEncodingDictionary() {return NULL;} |
| 112 | virtual const SkPdfEncodingDictionary* asEncodingDictionary() const {return NULL;} |
| 113 | |
| 114 | virtual SkPdfEncryptedEmbeddedFileStreamDictionary* asEncryptedEmbeddedFileStreamDictionary() {return NULL;} |
| 115 | virtual const SkPdfEncryptedEmbeddedFileStreamDictionary* asEncryptedEmbeddedFileStreamDictionary() const {return NULL;} |
| 116 | |
| 117 | virtual SkPdfEncryptionCommonDictionary* asEncryptionCommonDictionary() {return NULL;} |
| 118 | virtual const SkPdfEncryptionCommonDictionary* asEncryptionCommonDictionary() const {return NULL;} |
| 119 | |
| 120 | virtual SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() {return NULL;} |
| 121 | virtual const SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() const {return NULL;} |
| 122 | |
| 123 | virtual SkPdfFDFDictionary* asFDFDictionary() {return NULL;} |
| 124 | virtual const SkPdfFDFDictionary* asFDFDictionary() const {return NULL;} |
| 125 | |
| 126 | virtual SkPdfFDFFieldDictionary* asFDFFieldDictionary() {return NULL;} |
| 127 | virtual const SkPdfFDFFieldDictionary* asFDFFieldDictionary() const {return NULL;} |
| 128 | |
| 129 | virtual SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary() {return NULL;} |
| 130 | virtual const SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary() const {return NULL;} |
| 131 | |
| 132 | virtual SkPdfFDFNamedPageReferenceDictionary* asFDFNamedPageReferenceDictionary() {return NULL;} |
| 133 | virtual const SkPdfFDFNamedPageReferenceDictionary* asFDFNamedPageReferenceDictionary() const {return NULL;} |
| 134 | |
| 135 | virtual SkPdfFDFPageDictionary* asFDFPageDictionary() {return NULL;} |
| 136 | virtual const SkPdfFDFPageDictionary* asFDFPageDictionary() const {return NULL;} |
| 137 | |
| 138 | virtual SkPdfFDFTemplateDictionary* asFDFTemplateDictionary() {return NULL;} |
| 139 | virtual const SkPdfFDFTemplateDictionary* asFDFTemplateDictionary() const {return NULL;} |
| 140 | |
| 141 | virtual SkPdfFDFTrailerDictionary* asFDFTrailerDictionary() {return NULL;} |
| 142 | virtual const SkPdfFDFTrailerDictionary* asFDFTrailerDictionary() const {return NULL;} |
| 143 | |
| 144 | virtual SkPdfFieldDictionary* asFieldDictionary() {return NULL;} |
| 145 | virtual const SkPdfFieldDictionary* asFieldDictionary() const {return NULL;} |
| 146 | |
| 147 | virtual SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotationDictionary() {return NULL;} |
| 148 | virtual const SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotationDictionary() const {return NULL;} |
| 149 | |
| 150 | virtual SkPdfFileSpecificationDictionary* asFileSpecificationDictionary() {return NULL;} |
| 151 | virtual const SkPdfFileSpecificationDictionary* asFileSpecificationDictionary() const {return NULL;} |
| 152 | |
| 153 | virtual SkPdfFileTrailerDictionary* asFileTrailerDictionary() {return NULL;} |
| 154 | virtual const SkPdfFileTrailerDictionary* asFileTrailerDictionary() const {return NULL;} |
| 155 | |
| 156 | virtual SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() {return NULL;} |
| 157 | virtual const SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() const {return NULL;} |
| 158 | |
| 159 | virtual SkPdfFontDictionary* asFontDictionary() {return NULL;} |
| 160 | virtual const SkPdfFontDictionary* asFontDictionary() const {return NULL;} |
| 161 | |
| 162 | virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;} |
| 163 | virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL;} |
| 164 | |
| 165 | virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;} |
| 166 | virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {return NULL;} |
| 167 | |
| 168 | virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} |
| 169 | virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return NULL;} |
| 170 | |
| 171 | virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;} |
| 172 | virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return NULL;} |
| 173 | |
| 174 | virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return NULL;} |
| 175 | virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() const {return NULL;} |
| 176 | |
| 177 | virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} |
| 178 | virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return NULL;} |
| 179 | |
| 180 | virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {return NULL;} |
| 181 | virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() const {return NULL;} |
| 182 | |
| 183 | virtual SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() {return NULL;} |
| 184 | virtual const SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() const {return NULL;} |
| 185 | |
| 186 | virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return NULL;} |
| 187 | virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() const {return NULL;} |
| 188 | |
| 189 | virtual SkPdfGoToActionDictionary* asGoToActionDictionary() {return NULL;} |
| 190 | virtual const SkPdfGoToActionDictionary* asGoToActionDictionary() const {return NULL;} |
| 191 | |
| 192 | virtual SkPdfGraphicsStateDictionary* asGraphicsStateDictionary() {return NULL;} |
| 193 | virtual const SkPdfGraphicsStateDictionary* asGraphicsStateDictionary() const {return NULL;} |
| 194 | |
| 195 | virtual SkPdfGroupAttributesDictionary* asGroupAttributesDictionary() {return NULL;} |
| 196 | virtual const SkPdfGroupAttributesDictionary* asGroupAttributesDictionary() const {return NULL;} |
| 197 | |
| 198 | virtual SkPdfHideActionDictionary* asHideActionDictionary() {return NULL;} |
| 199 | virtual const SkPdfHideActionDictionary* asHideActionDictionary() const {return NULL;} |
| 200 | |
| 201 | virtual SkPdfIccProfileStreamDictionary* asIccProfileStreamDictionary() {return NULL;} |
| 202 | virtual const SkPdfIccProfileStreamDictionary* asIccProfileStreamDictionary() const {return NULL;} |
| 203 | |
| 204 | virtual SkPdfIconFitDictionary* asIconFitDictionary() {return NULL;} |
| 205 | virtual const SkPdfIconFitDictionary* asIconFitDictionary() const {return NULL;} |
| 206 | |
| 207 | virtual SkPdfImportDataActionDictionary* asImportDataActionDictionary() {return NULL;} |
| 208 | virtual const SkPdfImportDataActionDictionary* asImportDataActionDictionary() const {return NULL;} |
| 209 | |
| 210 | virtual SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() {return NULL;} |
| 211 | virtual const SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() const {return NULL;} |
| 212 | |
| 213 | virtual SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStructureElementsDictionary() {return NULL;} |
| 214 | virtual const SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStructureElementsDictionary() const {return NULL;} |
| 215 | |
| 216 | virtual SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() {return NULL;} |
| 217 | virtual const SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() const {return NULL;} |
| 218 | |
| 219 | virtual SkPdfJavascriptActionDictionary* asJavascriptActionDictionary() {return NULL;} |
| 220 | virtual const SkPdfJavascriptActionDictionary* asJavascriptActionDictionary() const {return NULL;} |
| 221 | |
| 222 | virtual SkPdfJavascriptDictionary* asJavascriptDictionary() {return NULL;} |
| 223 | virtual const SkPdfJavascriptDictionary* asJavascriptDictionary() const {return NULL;} |
| 224 | |
| 225 | virtual SkPdfJbig2DecodeFilterDictionary* asJbig2DecodeFilterDictionary() {return NULL;} |
| 226 | virtual const SkPdfJbig2DecodeFilterDictionary* asJbig2DecodeFilterDictionary() const {return NULL;} |
| 227 | |
| 228 | virtual SkPdfLabColorSpaceDictionary* asLabColorSpaceDictionary() {return NULL;} |
| 229 | virtual const SkPdfLabColorSpaceDictionary* asLabColorSpaceDictionary() const {return NULL;} |
| 230 | |
| 231 | virtual SkPdfLaunchActionDictionary* asLaunchActionDictionary() {return NULL;} |
| 232 | virtual const SkPdfLaunchActionDictionary* asLaunchActionDictionary() const {return NULL;} |
| 233 | |
| 234 | virtual SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() {return NULL;} |
| 235 | virtual const SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() const {return NULL;} |
| 236 | |
| 237 | virtual SkPdfListAttributeDictionary* asListAttributeDictionary() {return NULL;} |
| 238 | virtual const SkPdfListAttributeDictionary* asListAttributeDictionary() const {return NULL;} |
| 239 | |
| 240 | virtual SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFlatedecodeFiltersDictionary() {return NULL;} |
| 241 | virtual const SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFlatedecodeFiltersDictionary() const {return NULL;} |
| 242 | |
| 243 | virtual SkPdfMacOsFileInformationDictionary* asMacOsFileInformationDictionary() {return NULL;} |
| 244 | virtual const SkPdfMacOsFileInformationDictionary* asMacOsFileInformationDictionary() const {return NULL;} |
| 245 | |
| 246 | virtual SkPdfMarkInformationDictionary* asMarkInformationDictionary() {return NULL;} |
| 247 | virtual const SkPdfMarkInformationDictionary* asMarkInformationDictionary() const {return NULL;} |
| 248 | |
| 249 | virtual SkPdfMarkedContentReferenceDictionary* asMarkedContentReferenceDictionary() {return NULL;} |
| 250 | virtual const SkPdfMarkedContentReferenceDictionary* asMarkedContentReferenceDictionary() const {return NULL;} |
| 251 | |
| 252 | virtual SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary() {return NULL;} |
| 253 | virtual const SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary() const {return NULL;} |
| 254 | |
| 255 | virtual SkPdfMetadataStreamDictionary* asMetadataStreamDictionary() {return NULL;} |
| 256 | virtual const SkPdfMetadataStreamDictionary* asMetadataStreamDictionary() const {return NULL;} |
| 257 | |
| 258 | virtual SkPdfMovieActionDictionary* asMovieActionDictionary() {return NULL;} |
| 259 | virtual const SkPdfMovieActionDictionary* asMovieActionDictionary() const {return NULL;} |
| 260 | |
| 261 | virtual SkPdfMovieActivationDictionary* asMovieActivationDictionary() {return NULL;} |
| 262 | virtual const SkPdfMovieActivationDictionary* asMovieActivationDictionary() const {return NULL;} |
| 263 | |
| 264 | virtual SkPdfMovieAnnotationDictionary* asMovieAnnotationDictionary() {return NULL;} |
| 265 | virtual const SkPdfMovieAnnotationDictionary* asMovieAnnotationDictionary() const {return NULL;} |
| 266 | |
| 267 | virtual SkPdfMovieDictionary* asMovieDictionary() {return NULL;} |
| 268 | virtual const SkPdfMovieDictionary* asMovieDictionary() const {return NULL;} |
| 269 | |
| 270 | virtual SkPdfNameDictionary* asNameDictionary() {return NULL;} |
| 271 | virtual const SkPdfNameDictionary* asNameDictionary() const {return NULL;} |
| 272 | |
| 273 | virtual SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() {return NULL;} |
| 274 | virtual const SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() const {return NULL;} |
| 275 | |
| 276 | virtual SkPdfNamedActionsDictionary* asNamedActionsDictionary() {return NULL;} |
| 277 | virtual const SkPdfNamedActionsDictionary* asNamedActionsDictionary() const {return NULL;} |
| 278 | |
| 279 | virtual SkPdfNumberTreeNodeDictionary* asNumberTreeNodeDictionary() {return NULL;} |
| 280 | virtual const SkPdfNumberTreeNodeDictionary* asNumberTreeNodeDictionary() const {return NULL;} |
| 281 | |
| 282 | virtual SkPdfObjectReferenceDictionary* asObjectReferenceDictionary() {return NULL;} |
| 283 | virtual const SkPdfObjectReferenceDictionary* asObjectReferenceDictionary() const {return NULL;} |
| 284 | |
| 285 | virtual SkPdfOpiVersionDictionary* asOpiVersionDictionary() {return NULL;} |
| 286 | virtual const SkPdfOpiVersionDictionary* asOpiVersionDictionary() const {return NULL;} |
| 287 | |
| 288 | virtual SkPdfOutlineDictionary* asOutlineDictionary() {return NULL;} |
| 289 | virtual const SkPdfOutlineDictionary* asOutlineDictionary() const {return NULL;} |
| 290 | |
| 291 | virtual SkPdfOutlineItemDictionary* asOutlineItemDictionary() {return NULL;} |
| 292 | virtual const SkPdfOutlineItemDictionary* asOutlineItemDictionary() const {return NULL;} |
| 293 | |
| 294 | virtual SkPdfPDF_XOutputIntentDictionary* asPDF_XOutputIntentDictionary() {return NULL;} |
| 295 | virtual const SkPdfPDF_XOutputIntentDictionary* asPDF_XOutputIntentDictionary() const {return NULL;} |
| 296 | |
| 297 | virtual SkPdfPSXobjectDictionary* asPSXobjectDictionary() {return NULL;} |
| 298 | virtual const SkPdfPSXobjectDictionary* asPSXobjectDictionary() const {return NULL;} |
| 299 | |
| 300 | virtual SkPdfPageLabelDictionary* asPageLabelDictionary() {return NULL;} |
| 301 | virtual const SkPdfPageLabelDictionary* asPageLabelDictionary() const {return NULL;} |
| 302 | |
| 303 | virtual SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary() {return NULL;} |
| 304 | virtual const SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary() const {return NULL;} |
| 305 | |
| 306 | virtual SkPdfPageObjectDictionary* asPageObjectDictionary() {return NULL;} |
| 307 | virtual const SkPdfPageObjectDictionary* asPageObjectDictionary() const {return NULL;} |
| 308 | |
| 309 | virtual SkPdfPagePieceDictionary* asPagePieceDictionary() {return NULL;} |
| 310 | virtual const SkPdfPagePieceDictionary* asPagePieceDictionary() const {return NULL;} |
| 311 | |
| 312 | virtual SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() {return NULL;} |
| 313 | virtual const SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() const {return NULL;} |
| 314 | |
| 315 | virtual SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() {return NULL;} |
| 316 | virtual const SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() const {return NULL;} |
| 317 | |
| 318 | virtual SkPdfPrinterMarkAnnotationDictionary* asPrinterMarkAnnotationDictionary() {return NULL;} |
| 319 | virtual const SkPdfPrinterMarkAnnotationDictionary* asPrinterMarkAnnotationDictionary() const {return NULL;} |
| 320 | |
| 321 | virtual SkPdfPrinterMarkFormDictionary* asPrinterMarkFormDictionary() {return NULL;} |
| 322 | virtual const SkPdfPrinterMarkFormDictionary* asPrinterMarkFormDictionary() const {return NULL;} |
| 323 | |
| 324 | virtual SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary() {return NULL;} |
| 325 | virtual const SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary() const {return NULL;} |
| 326 | |
| 327 | virtual SkPdfReferenceDictionary* asReferenceDictionary() {return NULL;} |
| 328 | virtual const SkPdfReferenceDictionary* asReferenceDictionary() const {return NULL;} |
| 329 | |
| 330 | virtual SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() {return NULL;} |
| 331 | virtual const SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() const {return NULL;} |
| 332 | |
| 333 | virtual SkPdfResetFormActionDictionary* asResetFormActionDictionary() {return NULL;} |
| 334 | virtual const SkPdfResetFormActionDictionary* asResetFormActionDictionary() const {return NULL;} |
| 335 | |
| 336 | virtual SkPdfResourceDictionary* asResourceDictionary() {return NULL;} |
| 337 | virtual const SkPdfResourceDictionary* asResourceDictionary() const {return NULL;} |
| 338 | |
| 339 | virtual SkPdfRubberStampAnnotationDictionary* asRubberStampAnnotationDictionary() {return NULL;} |
| 340 | virtual const SkPdfRubberStampAnnotationDictionary* asRubberStampAnnotationDictionary() const {return NULL;} |
| 341 | |
| 342 | virtual SkPdfSeparationDictionary* asSeparationDictionary() {return NULL;} |
| 343 | virtual const SkPdfSeparationDictionary* asSeparationDictionary() const {return NULL;} |
| 344 | |
| 345 | virtual SkPdfShadingDictionary* asShadingDictionary() {return NULL;} |
| 346 | virtual const SkPdfShadingDictionary* asShadingDictionary() const {return NULL;} |
| 347 | |
| 348 | virtual SkPdfType1ShadingDictionary* asType1ShadingDictionary() {return NULL;} |
| 349 | virtual const SkPdfType1ShadingDictionary* asType1ShadingDictionary() const {return NULL;} |
| 350 | |
| 351 | virtual SkPdfType2ShadingDictionary* asType2ShadingDictionary() {return NULL;} |
| 352 | virtual const SkPdfType2ShadingDictionary* asType2ShadingDictionary() const {return NULL;} |
| 353 | |
| 354 | virtual SkPdfType3ShadingDictionary* asType3ShadingDictionary() {return NULL;} |
| 355 | virtual const SkPdfType3ShadingDictionary* asType3ShadingDictionary() const {return NULL;} |
| 356 | |
| 357 | virtual SkPdfType4ShadingDictionary* asType4ShadingDictionary() {return NULL;} |
| 358 | virtual const SkPdfType4ShadingDictionary* asType4ShadingDictionary() const {return NULL;} |
| 359 | |
| 360 | virtual SkPdfType5ShadingDictionary* asType5ShadingDictionary() {return NULL;} |
| 361 | virtual const SkPdfType5ShadingDictionary* asType5ShadingDictionary() const {return NULL;} |
| 362 | |
| 363 | virtual SkPdfType6ShadingDictionary* asType6ShadingDictionary() {return NULL;} |
| 364 | virtual const SkPdfType6ShadingDictionary* asType6ShadingDictionary() const {return NULL;} |
| 365 | |
| 366 | virtual SkPdfSignatureDictionary* asSignatureDictionary() {return NULL;} |
| 367 | virtual const SkPdfSignatureDictionary* asSignatureDictionary() const {return NULL;} |
| 368 | |
| 369 | virtual SkPdfSoftMaskDictionary* asSoftMaskDictionary() {return NULL;} |
| 370 | virtual const SkPdfSoftMaskDictionary* asSoftMaskDictionary() const {return NULL;} |
| 371 | |
| 372 | virtual SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() {return NULL;} |
| 373 | virtual const SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() const {return NULL;} |
| 374 | |
| 375 | virtual SkPdfSoundActionDictionary* asSoundActionDictionary() {return NULL;} |
| 376 | virtual const SkPdfSoundActionDictionary* asSoundActionDictionary() const {return NULL;} |
| 377 | |
| 378 | virtual SkPdfSoundAnnotationDictionary* asSoundAnnotationDictionary() {return NULL;} |
| 379 | virtual const SkPdfSoundAnnotationDictionary* asSoundAnnotationDictionary() const {return NULL;} |
| 380 | |
| 381 | virtual SkPdfSoundObjectDictionary* asSoundObjectDictionary() {return NULL;} |
| 382 | virtual const SkPdfSoundObjectDictionary* asSoundObjectDictionary() const {return NULL;} |
| 383 | |
| 384 | virtual SkPdfSourceInformationDictionary* asSourceInformationDictionary() {return NULL;} |
| 385 | virtual const SkPdfSourceInformationDictionary* asSourceInformationDictionary() const {return NULL;} |
| 386 | |
| 387 | virtual SkPdfSquareOrCircleAnnotation* asSquareOrCircleAnnotation() {return NULL;} |
| 388 | virtual const SkPdfSquareOrCircleAnnotation* asSquareOrCircleAnnotation() const {return NULL;} |
| 389 | |
| 390 | virtual SkPdfStandardSecurityHandlerDictionary* asStandardSecurityHandlerDictionary() {return NULL;} |
| 391 | virtual const SkPdfStandardSecurityHandlerDictionary* asStandardSecurityHandlerDictionary() const {return NULL;} |
| 392 | |
| 393 | virtual SkPdfStandardStructureDictionary* asStandardStructureDictionary() {return NULL;} |
| 394 | virtual const SkPdfStandardStructureDictionary* asStandardStructureDictionary() const {return NULL;} |
| 395 | |
| 396 | virtual SkPdfStreamCommonDictionary* asStreamCommonDictionary() {return NULL;} |
| 397 | virtual const SkPdfStreamCommonDictionary* asStreamCommonDictionary() const {return NULL;} |
| 398 | |
| 399 | virtual SkPdfStructureElementAccessDictionary* asStructureElementAccessDictionary() {return NULL;} |
| 400 | virtual const SkPdfStructureElementAccessDictionary* asStructureElementAccessDictionary() const {return NULL;} |
| 401 | |
| 402 | virtual SkPdfStructureElementDictionary* asStructureElementDictionary() {return NULL;} |
| 403 | virtual const SkPdfStructureElementDictionary* asStructureElementDictionary() const {return NULL;} |
| 404 | |
| 405 | virtual SkPdfStructureTreeRootDictionary* asStructureTreeRootDictionary() {return NULL;} |
| 406 | virtual const SkPdfStructureTreeRootDictionary* asStructureTreeRootDictionary() const {return NULL;} |
| 407 | |
| 408 | virtual SkPdfSubmitFormActionDictionary* asSubmitFormActionDictionary() {return NULL;} |
| 409 | virtual const SkPdfSubmitFormActionDictionary* asSubmitFormActionDictionary() const {return NULL;} |
| 410 | |
| 411 | virtual SkPdfTableAttributesDictionary* asTableAttributesDictionary() {return NULL;} |
| 412 | virtual const SkPdfTableAttributesDictionary* asTableAttributesDictionary() const {return NULL;} |
| 413 | |
| 414 | virtual SkPdfTextAnnotationDictionary* asTextAnnotationDictionary() {return NULL;} |
| 415 | virtual const SkPdfTextAnnotationDictionary* asTextAnnotationDictionary() const {return NULL;} |
| 416 | |
| 417 | virtual SkPdfTextFieldDictionary* asTextFieldDictionary() {return NULL;} |
| 418 | virtual const SkPdfTextFieldDictionary* asTextFieldDictionary() const {return NULL;} |
| 419 | |
| 420 | virtual SkPdfThreadActionDictionary* asThreadActionDictionary() {return NULL;} |
| 421 | virtual const SkPdfThreadActionDictionary* asThreadActionDictionary() const {return NULL;} |
| 422 | |
| 423 | virtual SkPdfThreadDictionary* asThreadDictionary() {return NULL;} |
| 424 | virtual const SkPdfThreadDictionary* asThreadDictionary() const {return NULL;} |
| 425 | |
| 426 | virtual SkPdfTransitionDictionary* asTransitionDictionary() {return NULL;} |
| 427 | virtual const SkPdfTransitionDictionary* asTransitionDictionary() const {return NULL;} |
| 428 | |
| 429 | virtual SkPdfTransparencyGroupDictionary* asTransparencyGroupDictionary() {return NULL;} |
| 430 | virtual const SkPdfTransparencyGroupDictionary* asTransparencyGroupDictionary() const {return NULL;} |
| 431 | |
| 432 | virtual SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDictionary() {return NULL;} |
| 433 | virtual const SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDictionary() const {return NULL;} |
| 434 | |
| 435 | virtual SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppearanceStreamDictionary() {return NULL;} |
| 436 | virtual const SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppearanceStreamDictionary() const {return NULL;} |
| 437 | |
| 438 | virtual SkPdfType0FunctionDictionary* asType0FunctionDictionary() {return NULL;} |
| 439 | virtual const SkPdfType0FunctionDictionary* asType0FunctionDictionary() const {return NULL;} |
| 440 | |
| 441 | virtual SkPdfType10HalftoneDictionary* asType10HalftoneDictionary() {return NULL;} |
| 442 | virtual const SkPdfType10HalftoneDictionary* asType10HalftoneDictionary() const {return NULL;} |
| 443 | |
| 444 | virtual SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() {return NULL;} |
| 445 | virtual const SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() const {return NULL;} |
| 446 | |
| 447 | virtual SkPdfType1HalftoneDictionary* asType1HalftoneDictionary() {return NULL;} |
| 448 | virtual const SkPdfType1HalftoneDictionary* asType1HalftoneDictionary() const {return NULL;} |
| 449 | |
| 450 | virtual SkPdfType1PatternDictionary* asType1PatternDictionary() {return NULL;} |
| 451 | virtual const SkPdfType1PatternDictionary* asType1PatternDictionary() const {return NULL;} |
| 452 | |
| 453 | virtual SkPdfType2FunctionDictionary* asType2FunctionDictionary() {return NULL;} |
| 454 | virtual const SkPdfType2FunctionDictionary* asType2FunctionDictionary() const {return NULL;} |
| 455 | |
| 456 | virtual SkPdfType2PatternDictionary* asType2PatternDictionary() {return NULL;} |
| 457 | virtual const SkPdfType2PatternDictionary* asType2PatternDictionary() const {return NULL;} |
| 458 | |
| 459 | virtual SkPdfType3FunctionDictionary* asType3FunctionDictionary() {return NULL;} |
| 460 | virtual const SkPdfType3FunctionDictionary* asType3FunctionDictionary() const {return NULL;} |
| 461 | |
| 462 | virtual SkPdfType5HalftoneDictionary* asType5HalftoneDictionary() {return NULL;} |
| 463 | virtual const SkPdfType5HalftoneDictionary* asType5HalftoneDictionary() const {return NULL;} |
| 464 | |
| 465 | virtual SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() {return NULL;} |
| 466 | virtual const SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() const {return NULL;} |
| 467 | |
| 468 | virtual SkPdfURIActionDictionary* asURIActionDictionary() {return NULL;} |
| 469 | virtual const SkPdfURIActionDictionary* asURIActionDictionary() const {return NULL;} |
| 470 | |
| 471 | virtual SkPdfURIDictionary* asURIDictionary() {return NULL;} |
| 472 | virtual const SkPdfURIDictionary* asURIDictionary() const {return NULL;} |
| 473 | |
| 474 | virtual SkPdfURLAliasDictionary* asURLAliasDictionary() {return NULL;} |
| 475 | virtual const SkPdfURLAliasDictionary* asURLAliasDictionary() const {return NULL;} |
| 476 | |
| 477 | virtual SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary() {return NULL;} |
| 478 | virtual const SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary() const {return NULL;} |
| 479 | |
| 480 | virtual SkPdfViewerPreferencesDictionary* asViewerPreferencesDictionary() {return NULL;} |
| 481 | virtual const SkPdfViewerPreferencesDictionary* asViewerPreferencesDictionary() const {return NULL;} |
| 482 | |
| 483 | virtual SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary() {return NULL;} |
| 484 | virtual const SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary() const {return NULL;} |
| 485 | |
| 486 | virtual SkPdfWebCaptureCommandSettingsDictionary* asWebCaptureCommandSettingsDictionary() {return NULL;} |
| 487 | virtual const SkPdfWebCaptureCommandSettingsDictionary* asWebCaptureCommandSettingsDictionary() const {return NULL;} |
| 488 | |
| 489 | virtual SkPdfWebCaptureDictionary* asWebCaptureDictionary() {return NULL;} |
| 490 | virtual const SkPdfWebCaptureDictionary* asWebCaptureDictionary() const {return NULL;} |
| 491 | |
| 492 | virtual SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionary() {return NULL;} |
| 493 | virtual const SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionary() const {return NULL;} |
| 494 | |
| 495 | virtual SkPdfWebCaptureInformationDictionary* asWebCaptureInformationDictionary() {return NULL;} |
| 496 | virtual const SkPdfWebCaptureInformationDictionary* asWebCaptureInformationDictionary() const {return NULL;} |
| 497 | |
| 498 | virtual SkPdfWebCapturePageSetDictionary* asWebCapturePageSetDictionary() {return NULL;} |
| 499 | virtual const SkPdfWebCapturePageSetDictionary* asWebCapturePageSetDictionary() const {return NULL;} |
| 500 | |
| 501 | virtual SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() {return NULL;} |
| 502 | virtual const SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() const {return NULL;} |
| 503 | |
| 504 | virtual SkPdfWindowsLaunchActionDictionary* asWindowsLaunchActionDictionary() {return NULL;} |
| 505 | virtual const SkPdfWindowsLaunchActionDictionary* asWindowsLaunchActionDictionary() const {return NULL;} |
| 506 | |
| 507 | virtual SkPdfXObjectDictionary* asXObjectDictionary() {return NULL;} |
| 508 | virtual const SkPdfXObjectDictionary* asXObjectDictionary() const {return NULL;} |
| 509 | |
| 510 | virtual SkPdfImageDictionary* asImageDictionary() {return NULL;} |
| 511 | virtual const SkPdfImageDictionary* asImageDictionary() const {return NULL;} |
| 512 | |
| 513 | virtual SkPdfType1FormDictionary* asType1FormDictionary() {return NULL;} |
| 514 | virtual const SkPdfType1FormDictionary* asType1FormDictionary() const {return NULL;} |
| 515 | |
| 516 | public: |
| 517 | private: |
| 518 | public: |
| 519 | SkPdfAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
| 520 | |
| 521 | virtual bool valid() const {return true;} |
| 522 | |
| 523 | SkPdfAnnotationDictionary& operator=(const SkPdfAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} |
| 524 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 525 | /** (Optional) The type of PDF object that this dictionary describes; if present, |
| 526 | * must be Annot for an annotation dictionary. |
| 527 | **/ |
| 528 | bool has_Type() const { |
| 529 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL)); |
| 530 | } |
| 531 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 532 | std::string Type() const { |
| 533 | std::string ret; |
| 534 | if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret; |
| 535 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 536 | return ""; |
| 537 | } |
| 538 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 539 | /** (Required) The type of annotation that this dictionary describes; see Table |
| 540 | * 8.14 on page 499 for specific values. |
| 541 | **/ |
| 542 | bool has_Subtype() const { |
| 543 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL)); |
| 544 | } |
| 545 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 546 | std::string Subtype() const { |
| 547 | std::string ret; |
| 548 | if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret; |
| 549 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 550 | return ""; |
| 551 | } |
| 552 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 553 | /** (Required or optional, depending on the annotation type) Text to be displayed |
| 554 | * for the annotation or, if this type of annotation does not display text, an al- |
| 555 | * ternate description of the annotation's contents in human-readable form. In |
| 556 | * either case, this text is useful when extracting the document's contents in |
| 557 | * support of accessibility to disabled users or for other purposes (see Section |
| 558 | * 9.8.2, "Alternate Descriptions"). |
| 559 | **/ |
| 560 | bool has_Contents() const { |
| 561 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL)); |
| 562 | } |
| 563 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 564 | std::string Contents() const { |
| 565 | std::string ret; |
| 566 | if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret; |
| 567 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 568 | return ""; |
| 569 | } |
| 570 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 571 | /** (Optional; PDF 1.3; not used in FDF files) An indirect reference to the page |
| 572 | * object with which this annotation is associated. |
| 573 | **/ |
| 574 | bool has_P() const { |
| 575 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL)); |
| 576 | } |
| 577 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 578 | SkPdfDictionary* P() const { |
| 579 | SkPdfDictionary* ret; |
| 580 | if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret; |
| 581 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 582 | return NULL; |
| 583 | } |
| 584 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 585 | /** (Required) The annotation rectangle, defining the location of the annotation |
| 586 | * on the page in default user space units. |
| 587 | **/ |
| 588 | bool has_Rect() const { |
| 589 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", NULL)); |
| 590 | } |
| 591 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 592 | SkRect Rect() const { |
| 593 | SkRect ret; |
| 594 | if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", &ret)) return ret; |
| 595 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 596 | return SkRect(); |
| 597 | } |
| 598 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 599 | /** (Optional; PDF 1.4) The annotation name, a text string uniquely identifying |
| 600 | * it among all the annotations on its page. |
| 601 | **/ |
| 602 | bool has_NM() const { |
| 603 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NM", "", NULL)); |
| 604 | } |
| 605 | |
| 606 | /** (Optional; PDF 1.1) The date and time when the annotation was most |
| 607 | * recently modified. The preferred format is a date string as described in Sec- |
| 608 | * tion 3.8.2, "Dates," but viewer applications should be prepared to accept and |
| 609 | * display a string in any format. (See implementation note 59 in Appendix H.) |
| 610 | **/ |
| 611 | bool has_M() const { |
| 612 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", NULL)); |
| 613 | } |
| 614 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 615 | bool isMADate() const { |
| 616 | SkPdfObject* ret = NULL; |
| 617 | if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return false; |
| 618 | return ret->podofo()->GetDataType() == ePdfDataType_Array; |
| 619 | } |
| 620 | |
| 621 | SkPdfDate getMAsDate() const { |
| 622 | SkPdfDate ret = SkPdfDate(); |
| 623 | if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return ret; |
| 624 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 625 | return SkPdfDate(); |
| 626 | } |
| 627 | |
| 628 | bool isMAString() const { |
| 629 | SkPdfObject* ret = NULL; |
| 630 | if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return false; |
| 631 | return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()->GetDataType() == ePdfDataType_HexString; |
| 632 | } |
| 633 | |
| 634 | std::string getMAsString() const { |
| 635 | std::string ret = ""; |
| 636 | if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return ret; |
| 637 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 638 | return ""; |
| 639 | } |
| 640 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 641 | /** (Optional; PDF 1.1) A set of flags specifying various characteristics of the an- |
| 642 | * notation (see Section 8.4.2, "Annotation Flags"). Default value: 0. |
| 643 | **/ |
| 644 | bool has_F() const { |
| 645 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL)); |
| 646 | } |
| 647 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 648 | long F() const { |
| 649 | long ret; |
| 650 | if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret; |
| 651 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 652 | return 0; |
| 653 | } |
| 654 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 655 | /** (Optional; PDF 1.2) A border style dictionary specifying the characteristics of |
| 656 | * the annotation's border (see Section 8.4.3, "Border Styles"; see also imple- |
| 657 | * mentation note 60 in Appendix H). |
| 658 | * Note: This entry also specifies the width and dash pattern for the lines drawn by |
| 659 | * line, square, circle, and ink annotations. See the note under Border (below) for |
| 660 | * additional information. |
| 661 | **/ |
| 662 | bool has_BS() const { |
| 663 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL)); |
| 664 | } |
| 665 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 666 | SkPdfDictionary* BS() const { |
| 667 | SkPdfDictionary* ret; |
| 668 | if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret; |
| 669 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 670 | return NULL; |
| 671 | } |
| 672 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 673 | /** (Optional) An array specifying the characteristics of the annotation's border. |
| 674 | * The border is specified as a "rounded rectangle." |
| 675 | * In PDF 1.0, the array consists of three numbers defining the horizontal cor- |
| 676 | * ner radius, vertical corner radius, and border width, all in default user space |
| 677 | * units. If the corner radii are 0, the border has square (not rounded) corners; |
| 678 | * if the border width is 0, no border is drawn. (See implementation note 61 in |
| 679 | * Appendix H.) |
| 680 | * In PDF 1.1, the array may have a fourth element, an optional dash array |
| 681 | * defining a pattern of dashes and gaps to be used in drawing the border. The |
| 682 | * dash array is specified in the same format as in the line dash pattern parame- |
| 683 | * ter of the graphics state (see "Line Dash Pattern" on page 155). For example, |
| 684 | * a Border value of [0 0 1 [3 2]] specifies a border 1 unit wide, with square |
| 685 | * corners, drawn with 3-unit dashes alternating with 2-unit gaps. Note that no |
| 686 | * dash phase is specified; the phase is assumed to be 0. (See implementation |
| 687 | * note 62 in Appendix H.) |
| 688 | * Note: In PDF 1.2 or later, annotations may ignore this entry and use the BS |
| 689 | * entry (see above) to specify their border styles instead. In PDF 1.2 and 1.3, only |
| 690 | * widget annotations do so; in PDF 1.4, all of the standard annotation types ex- |
| 691 | * cept Link (see Table 8.14 on page 499) use BS rather than Border if both are |
| 692 | * present. For backward compatibility, however, Border is still supported for all |
| 693 | * annotation types. |
| 694 | * Default value: [0 0 1]. |
| 695 | **/ |
| 696 | bool has_Border() const { |
| 697 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Border", "", NULL)); |
| 698 | } |
| 699 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 700 | SkPdfArray Border() const { |
| 701 | SkPdfArray ret; |
| 702 | if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Border", "", &ret)) return ret; |
| 703 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 704 | return SkPdfArray(); |
| 705 | } |
| 706 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 707 | /** (Optional; PDF 1.2) An appearance dictionary specifying how the annotation |
| 708 | * is presented visually on the page (see Section 8.4.4, "Appearance Streams"; |
| 709 | * see also implementation note 60 in Appendix H). |
| 710 | **/ |
| 711 | bool has_AP() const { |
| 712 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL)); |
| 713 | } |
| 714 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 715 | SkPdfDictionary* AP() const { |
| 716 | SkPdfDictionary* ret; |
| 717 | if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret; |
| 718 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 719 | return NULL; |
| 720 | } |
| 721 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 722 | /** (Required if the appearance dictionary AP contains one or more subdictionaries; |
| 723 | * PDF 1.2) The annotation's appearance state, which selects the applicable |
| 724 | * appearance stream from an appearance subdictionary (see Section 8.4.4, |
| 725 | * "Appearance Streams"; see also implementation note 60 in Appendix H). |
| 726 | **/ |
| 727 | bool has_AS() const { |
| 728 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", NULL)); |
| 729 | } |
| 730 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 731 | std::string AS() const { |
| 732 | std::string ret; |
| 733 | if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", &ret)) return ret; |
| 734 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 735 | return ""; |
| 736 | } |
| 737 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 738 | /** (Optional; PDF 1.1) An array of three numbers in the range 0.0 to 1.0, repre- |
| 739 | * senting the components of a color in the DeviceRGB color space. This color |
| 740 | * will be used for the following purposes: |
| 741 | * * The background of the annotation's icon when closed |
| 742 | * * The title bar of the annotation's pop-up window |
| 743 | * * The border of a link annotation |
| 744 | **/ |
| 745 | bool has_C() const { |
| 746 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL)); |
| 747 | } |
| 748 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 749 | SkPdfArray C() const { |
| 750 | SkPdfArray ret; |
| 751 | if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret; |
| 752 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 753 | return SkPdfArray(); |
| 754 | } |
| 755 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 756 | /** (Optional; PDF 1.4) The constant opacity value to be used in painting the |
| 757 | * annotation (see Sections 7.1, "Overview of Transparency," and 7.2.6, "Shape |
| 758 | * and Opacity Computations"). This value applies to all visible elements of |
| 759 | * the annotation in its closed state (including its background and border), but |
| 760 | * not to the pop-up window that appears when the annotation is opened. The |
| 761 | * specified value is used as the initial alpha constant (both stroking and non- |
| 762 | * stroking) for interpreting the annotation's appearance stream, if any (see |
| 763 | * Section 8.4.4, "Appearance Streams," and "Constant Shape and Opacity" on |
| 764 | * page 444). The implicit blend mode (see Section 7.2.4, "Blend Mode") is |
| 765 | * Normal. Default value: 1.0. |
| 766 | * Note: If no explicit appearance stream is defined for the annotation, it will be |
| 767 | * painted by implementation-dependent means that do not necessarily conform to |
| 768 | * the Adobe imaging model; in this case, the effect of this entry is implementation- |
| 769 | * dependent as well. |
| 770 | * Note: This entry is recognized by all of the standard annotation types listed in |
| 771 | * Table 8.14 on page 499 except Link, Movie, Widget, PrinterMark, and TrapNet. |
| 772 | **/ |
| 773 | bool has_CA() const { |
| 774 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL)); |
| 775 | } |
| 776 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 777 | double CA() const { |
| 778 | double ret; |
| 779 | if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret; |
| 780 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 781 | return 0; |
| 782 | } |
| 783 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 784 | /** (Optional; PDF 1.1) The text label to be displayed in the title bar of the anno- |
| 785 | * tation's pop-up window when open and active. |
| 786 | **/ |
| 787 | bool has_T() const { |
| 788 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL)); |
| 789 | } |
| 790 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 791 | std::string T() const { |
| 792 | std::string ret; |
| 793 | if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret; |
| 794 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 795 | return ""; |
| 796 | } |
| 797 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 798 | /** (Optional; PDF 1.3) An indirect reference to a pop-up annotation for enter- |
| 799 | * ing or editing the text associated with this annotation. |
| 800 | **/ |
| 801 | bool has_Popup() const { |
| 802 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", NULL)); |
| 803 | } |
| 804 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 805 | SkPdfDictionary* Popup() const { |
| 806 | SkPdfDictionary* ret; |
| 807 | if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", &ret)) return ret; |
| 808 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 809 | return NULL; |
| 810 | } |
| 811 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 812 | /** (Optional; PDF 1.1) An action to be performed when the annotation is acti- |
| 813 | * vated (see Section 8.5, "Actions"). |
| 814 | * Note: This entry is not permitted in link annotations if a Dest entry is present |
| 815 | * (see "Link Annotations" on page 501). Also note that the A entry in movie anno- |
| 816 | * tations has a different meaning (see "Movie Annotations" on page 510). |
| 817 | **/ |
| 818 | bool has_A() const { |
| 819 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL)); |
| 820 | } |
| 821 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 822 | SkPdfDictionary* A() const { |
| 823 | SkPdfDictionary* ret; |
| 824 | if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret; |
| 825 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 826 | return NULL; |
| 827 | } |
| 828 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 829 | /** (Optional; PDF 1.2) An additional-actions dictionary defining the anno- |
| 830 | * tation's behavior in response to various trigger events (see Section 8.5.2, |
| 831 | * "Trigger Events"). At the time of publication, this entry is used only by wid- |
| 832 | * get annotations. |
| 833 | **/ |
| 834 | bool has_AA() const { |
| 835 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL)); |
| 836 | } |
| 837 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 838 | SkPdfDictionary* AA() const { |
| 839 | SkPdfDictionary* ret; |
| 840 | if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret; |
| 841 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 842 | return NULL; |
| 843 | } |
| 844 | |
edisonn@google.com | afe5e9e | 2013-06-19 17:42:17 +0000 | [diff] [blame^] | 845 | /** (Required if the annotation is a structural content item; PDF 1.3) The integer |
| 846 | * key of the annotation's entry in the structural parent tree (see "Finding Struc- |
| 847 | * ture Elements from Content Items" on page 600). |
| 848 | **/ |
| 849 | bool has_StructParent() const { |
| 850 | return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", NULL)); |
| 851 | } |
| 852 | |
edisonn@google.com | 2924762 | 2013-06-18 16:28:29 +0000 | [diff] [blame] | 853 | long StructParent() const { |
| 854 | long ret; |
| 855 | if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", &ret)) return ret; |
| 856 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 857 | return 0; |
| 858 | } |
| 859 | |
| 860 | }; |
| 861 | |
| 862 | #endif // __DEFINED__SkPdfAnnotationDictionary |