All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Bookmark.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2023 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFBookmark
6 #define PDFTRON_H_CPPPDFBookmark
7 
8 #include <PDF/Action.h>
9 #include <C/PDF/TRN_Bookmark.h>
10 
11 namespace pdftron {
12  namespace PDF {
13 
14 
31 class Bookmark
32 {
33 public:
34 
48  static Bookmark Create(class PDFDoc& in_doc, const UString& in_title);
49 
53  Bookmark();
54 
65  Bookmark(SDF::Obj in_bookmark_dict);
66 
74  Bookmark(const Bookmark& in_bookmark);
75 
83  Bookmark& operator=(const Bookmark& in_bookmark);
84 
92  bool operator==(const Bookmark& in_bookmark);
93 
102  bool IsValid() const;
103 
109  bool HasChildren();
110 
116  Bookmark GetNext();
117 
123  Bookmark GetPrev();
124 
131 
138 
145 
153  Bookmark Find(const UString& in_title);
154 
165  Bookmark AddChild(const UString& in_title);
166 
176  Bookmark AddChild(Bookmark in_bookmark);
177 
186  Bookmark AddNext(const UString& in_title);
187 
196  void AddNext(Bookmark in_bookmark);
197 
206  Bookmark AddPrev(const UString& in_title);
207 
216  void AddPrev(Bookmark in_bookmark);
217 
221  void Delete();
222 
230  void Unlink();
231 
239  int GetIndent();
240 
248  bool IsOpen();
249 
258  void SetOpen(bool in_open);
259 
268  int GetOpenCount();
269 
275  UString GetTitle();
276 
282 
288  void SetTitle(const UString& title);
289 
295  Action GetAction();
296 
302  void SetAction(Action in_action);
303 
307  void RemoveAction();
308 
317  int GetFlags();
318 
327  void SetFlags(int in_flags);
328 
346  std::vector<double> GetColor();
347 
348 #ifndef SWIG
349  void GetColor(double& out_r, double& out_g, double& out_b);
350 #endif
351 
364  void SetColor(double in_r = 0.0, double in_g = 0.0, double in_b = 0.0);
365 
373  SDF::Obj GetSDFObj() const;
374 
375  //for xamarin use only
376  static Bookmark* CreateInternal(ptrdiff_t impl);
377  ptrdiff_t GetHandleInternal();
378 
379 
380 // @cond PRIVATE_DOC
381 #ifndef SWIGHIDDEN
382  Bookmark(TRN_Bookmark impl);
383  TRN_Bookmark mp_obj;
384 #endif
385 // @endcond
386 };
387 
388  }; // namespace PDF
389 }; // namespace pdftron
390 
391 #include <Impl/PDFDoc.inl>
392 
393 #endif // PDFTRON_H_CPPPDFBookmark
void SetAction(Action in_action)
static Bookmark Create(class PDFDoc &in_doc, const UString &in_title)
Bookmark AddChild(const UString &in_title)
static Bookmark * CreateInternal(ptrdiff_t impl)
bool IsValid() const
bool operator==(const Bookmark &in_bookmark)
Bookmark Find(const UString &in_title)
ptrdiff_t GetHandleInternal()
Bookmark AddNext(const UString &in_title)
Bookmark AddPrev(const UString &in_title)
Bookmark & operator=(const Bookmark &in_bookmark)
void SetColor(double in_r=0.0, double in_g=0.0, double in_b=0.0)
SDF::Obj GetSDFObj() const
void SetTitle(const UString &title)
void SetOpen(bool in_open)
std::vector< double > GetColor()
void SetFlags(int in_flags)