![]() |
00001 //--------------------------------------------------------------------------------------- 00002 // Copyright (c) 2001-2010 by PDFTron Systems Inc. All Rights Reserved. 00003 // Consult legal.txt regarding legal and license information. 00004 //--------------------------------------------------------------------------------------- 00005 00006 #ifndef H_CPPPDFBookmark 00007 #define H_CPPPDFBookmark 00008 00009 00010 #include <PDF/Action.h> 00011 #include <C/PDF/TRN_Bookmark.h> 00012 00013 namespace pdftron { 00014 namespace PDF { 00015 00016 00033 class Bookmark 00034 { 00035 public: 00036 00050 static Bookmark Create(class PDFDoc& in_doc, const UString& in_title); 00051 00055 Bookmark(); 00056 00067 Bookmark(SDF::Obj in_bookmark_dict); 00068 00076 Bookmark(const Bookmark& in_bookmark); 00077 00085 Bookmark& operator=(const Bookmark& in_bookmark); 00086 00094 bool operator==(const Bookmark& in_bookmark); 00095 00104 bool IsValid() const; 00105 00111 bool HasChildren(); 00112 00118 Bookmark GetNext(); 00119 00125 Bookmark GetPrev(); 00126 00132 Bookmark GetFirstChild(); 00133 00139 Bookmark GetLastChild(); 00140 00146 Bookmark GetParent(); 00147 00155 Bookmark Find(const UString& in_title); 00156 00167 Bookmark AddChild(const UString& in_title); 00168 00178 void AddChild(Bookmark in_bookmark); 00179 00188 Bookmark AddNext(const UString& in_title); 00189 00198 void AddNext(Bookmark in_bookmark); 00199 00208 Bookmark AddPrev(const UString& in_title); 00209 00218 void AddPrev(Bookmark in_bookmark); 00219 00223 void Delete(); 00224 00232 void Unlink(); 00233 00241 int GetIndent(); 00242 00250 bool IsOpen(); 00251 00260 void SetOpen(bool in_open); 00261 00270 int GetOpenCount(); 00271 00277 UString GetTitle(); 00278 00283 SDF::Obj GetTitleObj(); 00284 00290 void SetTitle(const UString& title); 00291 00297 Action GetAction(); 00298 00304 void SetAction(Action in_action); 00305 00309 void RemoveAction(); 00310 00319 int GetFlags(); 00320 00329 void SetFlags(int in_flags); 00330 00348 void GetColor(double& out_r, double& out_g, double& out_b); 00349 00362 void SetColor(double in_r = 0.0, double in_g = 0.0, double in_b = 0.0); 00363 00371 SDF::Obj GetSDFObj() const; 00372 00373 00375 Bookmark(TRN_Bookmark impl); 00376 TRN_Bookmark mp_obj; 00378 }; 00379 00380 }; // namespace PDF 00381 }; // namespace pdftron 00382 00383 00384 00385 #include <Impl/PDFDoc.inl> 00386 #endif 00387