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
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
131 Bookmark GetFirstChild();
132
138 Bookmark GetLastChild();
139
145 Bookmark GetParent();
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
282 SDF::Obj GetTitleObj();
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
Action.h
pdftron::PDF::Action
Definition Action.h:32
pdftron::PDF::Bookmark::operator=
Bookmark & operator=(const Bookmark &in_bookmark)
pdftron::PDF::Bookmark::SetFlags
void SetFlags(int in_flags)
pdftron::PDF::Bookmark::IsOpen
bool IsOpen()
pdftron::PDF::Bookmark::AddPrev
Bookmark AddPrev(const UString &in_title)
pdftron::PDF::Bookmark::Unlink
void Unlink()
pdftron::PDF::Bookmark::GetLastChild
Bookmark GetLastChild()
pdftron::PDF::Bookmark::RemoveAction
void RemoveAction()
pdftron::PDF::Bookmark::IsValid
bool IsValid() const
pdftron::PDF::Bookmark::Delete
void Delete()
pdftron::PDF::Bookmark::GetPrev
Bookmark GetPrev()
pdftron::PDF::Bookmark::GetTitleObj
SDF::Obj GetTitleObj()
pdftron::PDF::Bookmark::GetOpenCount
int GetOpenCount()
pdftron::PDF::Bookmark::GetColor
void GetColor(double &out_r, double &out_g, double &out_b)
pdftron::PDF::Bookmark::Bookmark
Bookmark(const Bookmark &in_bookmark)
pdftron::PDF::Bookmark::HasChildren
bool HasChildren()
pdftron::PDF::Bookmark::Bookmark
Bookmark()
pdftron::PDF::Bookmark::SetColor
void SetColor(double in_r=0.0, double in_g=0.0, double in_b=0.0)
pdftron::PDF::Bookmark::Bookmark
Bookmark(SDF::Obj in_bookmark_dict)
pdftron::PDF::Bookmark::operator==
bool operator==(const Bookmark &in_bookmark)
pdftron::PDF::Bookmark::GetColor
std::vector< double > GetColor()
pdftron::PDF::Bookmark::GetAction
Action GetAction()
pdftron::PDF::Bookmark::GetFirstChild
Bookmark GetFirstChild()
pdftron::PDF::Bookmark::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Bookmark::GetNext
Bookmark GetNext()
pdftron::PDF::Bookmark::GetHandleInternal
ptrdiff_t GetHandleInternal()
pdftron::PDF::Bookmark::GetParent
Bookmark GetParent()
pdftron::PDF::Bookmark::SetOpen
void SetOpen(bool in_open)
pdftron::PDF::Bookmark::Create
static Bookmark Create(class PDFDoc &in_doc, const UString &in_title)
pdftron::PDF::Bookmark::AddChild
Bookmark AddChild(const UString &in_title)
pdftron::PDF::Bookmark::AddNext
void AddNext(Bookmark in_bookmark)
pdftron::PDF::Bookmark::GetIndent
int GetIndent()
pdftron::PDF::Bookmark::CreateInternal
static Bookmark * CreateInternal(ptrdiff_t impl)
pdftron::PDF::Bookmark::SetTitle
void SetTitle(const UString &title)
pdftron::PDF::Bookmark::GetTitle
UString GetTitle()
pdftron::PDF::Bookmark::Find
Bookmark Find(const UString &in_title)
pdftron::PDF::Bookmark::SetAction
void SetAction(Action in_action)
pdftron::PDF::Bookmark::AddNext
Bookmark AddNext(const UString &in_title)
pdftron::PDF::Bookmark::GetFlags
int GetFlags()
pdftron::PDF::Bookmark::AddChild
Bookmark AddChild(Bookmark in_bookmark)
pdftron::PDF::Bookmark::AddPrev
void AddPrev(Bookmark in_bookmark)
pdftron::PDF::PDFDoc
Definition PDFDoc.h:72
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::UString
Definition UString.h:28
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10