Loading...
Searching...
No Matches
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
11namespace pdftron {
12 namespace PDF {
13
14class PDFDoc;
15
33{
34public:
35
49 static Bookmark Create(class PDFDoc& in_doc, const UString& in_title);
50
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
118
125
132
139
146
154 Bookmark Find(const UString& in_title);
155
166 Bookmark AddChild(const UString& in_title);
167
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
241
249 bool IsOpen();
250
259 void SetOpen(bool in_open);
260
270
277
283
289 void SetTitle(const UString& title);
290
297
303 void SetAction(Action in_action);
304
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
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
Bookmark & operator=(const Bookmark &in_bookmark)
void SetFlags(int in_flags)
Bookmark AddPrev(const UString &in_title)
void GetColor(double &out_r, double &out_g, double &out_b)
Bookmark(const Bookmark &in_bookmark)
void SetColor(double in_r=0.0, double in_g=0.0, double in_b=0.0)
Bookmark(SDF::Obj in_bookmark_dict)
bool operator==(const Bookmark &in_bookmark)
std::vector< double > GetColor()
SDF::Obj GetSDFObj() const
ptrdiff_t GetHandleInternal()
void SetOpen(bool in_open)
static Bookmark Create(class PDFDoc &in_doc, const UString &in_title)
Bookmark AddChild(const UString &in_title)
void AddNext(Bookmark in_bookmark)
static Bookmark * CreateInternal(ptrdiff_t impl)
void SetTitle(const UString &title)
Bookmark Find(const UString &in_title)
void SetAction(Action in_action)
Bookmark AddNext(const UString &in_title)
Bookmark AddChild(Bookmark in_bookmark)
void AddPrev(Bookmark in_bookmark)