Loading...
Searching...
No Matches
FileAttachment.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFAnnotsFileAttachment
6#define PDFTRON_H_CPPPDFAnnotsFileAttachment
7
8#include <PDF/Annots/Markup.h>
9
10 namespace pdftron {
11 namespace PDF {
12 namespace Annots {
17 class FileAttachment : public Markup
18{
19 public:
23 enum Icon
24 {
25 e_Graph,
26 e_PushPin,
27 e_Paperclip,
28 e_Tag,
29 e_Unknown
30 };
31
39 FileAttachment(SDF::Obj d = 0);
40
47 FileAttachment(const Annot& ann) : Markup(ann.GetSDFObj()) {}
48
71 static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, FileSpec fs, Icon icon_name = e_PushPin );
72 static FileAttachment CreateAnnot(SDF::SDFDoc& doc, const Rect& pos, FileSpec fs, Icon icon_name = e_PushPin);
73
96 static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, const UString& path, Icon icon_name = e_PushPin );
97 static FileAttachment CreateAnnot(SDF::SDFDoc& doc, const Rect& pos, const UString& path, Icon icon_name = e_PushPin);
98
116 static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, const UString& path, const char* icon_name );
117
121 FileSpec GetFileSpec() const;
122
129 void SetFileSpec(const FileSpec& file);
130
147 bool Export(const UString& save_as = "") const;
148
149
150
157 Icon GetIcon() const;
158
168 void SetIcon(Icon type=e_PushPin);
169
180 const char* GetIconName() const;
181
192 void SetIconName(const char* iname);
193
194 // @cond PRIVATE_DOC
195 #ifndef SWIGHIDDEN
196 FileAttachment(TRN_Annot fileattachment);
197 #endif
198 // @endcond
199
200}; //class file attachment
201 }; //namespace Annot
202 }; //namespace PDF
203}; //namespace pdftron
204
205#include <Impl/Page.inl>
206
207#endif // PDFTRON_H_CPPPDFAnnotsFileAttachment
Markup.h
pdftron::PDF::Annot::Annot
Annot(SDF::Obj d=0)
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::FileAttachment::SetIcon
void SetIcon(Icon type=e_PushPin)
pdftron::PDF::Annots::FileAttachment::FileAttachment
FileAttachment(SDF::Obj d=0)
pdftron::PDF::Annots::FileAttachment::SetIconName
void SetIconName(const char *iname)
pdftron::PDF::Annots::FileAttachment::CreateAnnot
static FileAttachment CreateAnnot(SDF::SDFDoc &doc, const Rect &pos, FileSpec fs, Icon icon_name=e_PushPin)
pdftron::PDF::Annots::FileAttachment::Create
static FileAttachment Create(SDF::SDFDoc &doc, const Rect &pos, const UString &path, Icon icon_name=e_PushPin)
pdftron::PDF::Annots::FileAttachment::Create
static FileAttachment Create(SDF::SDFDoc &doc, const Rect &pos, const UString &path, const char *icon_name)
pdftron::PDF::Annots::FileAttachment::CreateAnnot
static FileAttachment CreateAnnot(SDF::SDFDoc &doc, const Rect &pos, const UString &path, Icon icon_name=e_PushPin)
pdftron::PDF::Annots::FileAttachment::SetFileSpec
void SetFileSpec(const FileSpec &file)
pdftron::PDF::Annots::FileAttachment::GetIcon
Icon GetIcon() const
pdftron::PDF::Annots::FileAttachment::GetFileSpec
FileSpec GetFileSpec() const
pdftron::PDF::Annots::FileAttachment::Icon
Icon
Definition FileAttachment.h:24
pdftron::PDF::Annots::FileAttachment::e_Paperclip
@ e_Paperclip
The icon has a paper clip appearance.
Definition FileAttachment.h:27
pdftron::PDF::Annots::FileAttachment::e_Graph
@ e_Graph
The icon has graph appearance.
Definition FileAttachment.h:25
pdftron::PDF::Annots::FileAttachment::e_PushPin
@ e_PushPin
The icon has a push pin appearance.
Definition FileAttachment.h:26
pdftron::PDF::Annots::FileAttachment::e_Tag
@ e_Tag
The icon has tag appearance.
Definition FileAttachment.h:28
pdftron::PDF::Annots::FileAttachment::e_Unknown
@ e_Unknown
The icon has unrecognized appearance type.
Definition FileAttachment.h:29
pdftron::PDF::Annots::FileAttachment::GetIconName
const char * GetIconName() const
pdftron::PDF::Annots::FileAttachment::FileAttachment
FileAttachment(const Annot &ann)
Definition FileAttachment.h:47
pdftron::PDF::Annots::FileAttachment::Export
bool Export(const UString &save_as="") const
pdftron::PDF::Annots::FileAttachment::Create
static FileAttachment Create(SDF::SDFDoc &doc, const Rect &pos, FileSpec fs, Icon icon_name=e_PushPin)
pdftron::PDF::Annots::Markup::Markup
Markup(SDF::Obj d=0)
pdftron::PDF::FileSpec
Definition FileSpec.h:38
pdftron::PDF::Rect
Definition Rect.h:29
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::SDF::SDFDoc
Definition SDFDoc.h:68
pdftron::UString
Definition UString.h:28
pdftron::PDF::Annots
Definition Caret.h:12
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10