All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FileAttachment.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2020 by PDFTron Systems 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  {
30  };
31 
39  FileAttachment(SDF::Obj d = 0);
40 
47  FileAttachment(const Annot& ann) : Markup(ann.GetSDFObj()) {}
48 
65  static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, FileSpec fs, Icon icon_name = e_PushPin );
66 
83  static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, const UString& path, Icon icon_name = e_PushPin );
84 
102  static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, const UString& path, const char* icon_name );
103 
107  FileSpec GetFileSpec() const;
108 
115  void SetFileSpec(const FileSpec& file);
116 
133  bool Export(const UString& save_as = "") const;
134 
135 
136 
143  Icon GetIcon() const;
144 
154  void SetIcon(Icon type=e_PushPin);
155 
166  const char* GetIconName() const;
167 
178  void SetIconName(const char* iname);
179 
180  // @cond PRIVATE_DOC
181  #ifndef SWIGHIDDEN
182  FileAttachment(TRN_Annot fileattachment);
183  #endif
184  // @endcond
185 
186 }; //class file attachment
187  }; //namespace Annot
188  }; //namespace PDF
189 }; //namespace pdftron
190 
191 #include <Impl/Page.inl>
192 
193 #endif // PDFTRON_H_CPPPDFAnnotsFileAttachment
SDF::Obj GetSDFObj() const
const char * GetIconName() const
void SetIcon(Icon type=e_PushPin)
void SetFileSpec(const FileSpec &file)
The icon has a push pin appearance.
The icon has unrecognized appearance type.
static FileAttachment Create(SDF::SDFDoc &doc, const Rect &pos, FileSpec fs, Icon icon_name=e_PushPin)
void SetIconName(const char *iname)
bool Export(const UString &save_as="") const
The icon has graph appearance.
The icon has a paper clip appearance.