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-2025 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 class PDFDoc;
15 
32 class Bookmark
33 {
34 public:
35 
49  static Bookmark Create(class PDFDoc& in_doc, const UString& in_title);
50 
54  Bookmark();
55 
66  Bookmark(SDF::Obj in_bookmark_dict);
67 
75  Bookmark(const Bookmark& in_bookmark);
76 
84  Bookmark& operator=(const Bookmark& in_bookmark);
85 
93  bool operator==(const Bookmark& in_bookmark);
94 
103  bool IsValid() const;
104 
110  bool HasChildren();
111 
117  Bookmark GetNext();
118 
124  Bookmark GetPrev();
125 
132 
139 
146 
154  Bookmark Find(const UString& in_title);
155 
166  Bookmark AddChild(const UString& in_title);
167 
177  Bookmark AddChild(Bookmark in_bookmark);
178 
187  Bookmark AddNext(const UString& in_title);
188 
197  void AddNext(Bookmark in_bookmark);
198 
207  Bookmark AddPrev(const UString& in_title);
208 
217  void AddPrev(Bookmark in_bookmark);
218 
222  void Delete();
223 
231  void Unlink();
232 
240  int GetIndent();
241 
249  bool IsOpen();
250 
259  void SetOpen(bool in_open);
260 
269  int GetOpenCount();
270 
276  UString GetTitle();
277 
283 
289  void SetTitle(const UString& title);
290 
296  Action GetAction();
297 
303  void SetAction(Action in_action);
304 
308  void RemoveAction();
309 
318  int GetFlags();
319 
328  void SetFlags(int in_flags);
329 
347  std::vector<double> GetColor();
348 
349 #ifndef SWIG
350  void GetColor(double& out_r, double& out_g, double& out_b);
351 #endif
352 
365  void SetColor(double in_r = 0.0, double in_g = 0.0, double in_b = 0.0);
366 
374  SDF::Obj GetSDFObj() const;
375 
376  //for xamarin use only
377  static Bookmark* CreateInternal(ptrdiff_t impl);
378  ptrdiff_t GetHandleInternal();
379 
380 
381 // @cond PRIVATE_DOC
382 #ifndef SWIGHIDDEN
383  Bookmark(TRN_Bookmark impl);
384  TRN_Bookmark mp_obj;
385 #endif
386 // @endcond
387 };
388 
389  }; // namespace PDF
390 }; // namespace pdftron
391 
392 #include <Impl/PDFDoc.inl>
393 
394 #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)