00001
00002
00003
00004
00005
00006 #ifndef H_PDFTRON_PDF_CPPWRAP_FILEATTACHMENT
00007 #define H_PDFTRON_PDF_CPPWRAP_FILEATTACHMENT
00008
00009 #include <PDF/Annots/Markup.h>
00010
00011 namespace pdftron {
00012 namespace PDF {
00013 namespace Annots {
00018 class FileAttachment : public Markup
00019 {
00020 public:
00024 enum Icon
00025 {
00026 e_Graph,
00027 e_PushPin,
00028 e_Paperclip,
00029 e_Tag,
00030 e_Unknown
00031 };
00032
00038 FileAttachment(SDF::Obj d = 0);
00039
00045 FileAttachment(const Annot& ann) : Markup(ann.GetSDFObj()) {}
00046
00062 static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, FileSpec fs, Icon icon_name = e_PushPin );
00063
00079 static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, const char* path, Icon icon_name = e_PushPin );
00080
00097 static FileAttachment Create(SDF::SDFDoc& doc, const Rect& pos, const char* path, const char* icon_name );
00098
00102 FileSpec GetFileSpec() const;
00103
00110 void SetFileSpec(const FileSpec& file);
00111
00128 bool Export(const UString& save_as = "") const;
00129
00130
00131
00138 Icon GetIcon() const;
00139
00149 void SetIcon(Icon type=e_PushPin);
00150
00161 const char* GetIconName() const;
00162
00173 void SetIconName(const char* icon);
00174
00176 FileAttachment(TRN_Annot fileattachment);
00178
00179 };
00180 };
00181 };
00182 };
00183 #include <Impl/Page.inl>
00184 #endif