My Project
fs_bookmark.h
Go to the documentation of this file.
1 
15 #ifndef FS_BOOKMARK_H_
16 #define FS_BOOKMARK_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/actions/fs_action.h"
21 
27 namespace foxit {
31 namespace pdf {
58 class Bookmark FS_FINAL : public Base{
59  public:
65  typedef enum _Style {
67  e_StyleNormal = 0x00,
69  e_StyleItalic = 0x01,
71  e_StyleBold = 0x02
72  } Style;
73 
80  typedef enum _Position {
93  } Position;
94 
95 
103  Bookmark(const PDFDoc& pdf_doc, objects::PDFDictionary* bookmark_dict);
109  Bookmark(const Bookmark& other);
117  Bookmark& operator = (const Bookmark& other);
118 
126  bool operator == (const Bookmark& other) const;
134  bool operator != (const Bookmark& other) const;
135 
143  bool IsEmpty() const;
144 
146  ~Bookmark();
147 
159 
166  bool HasChild();
167 
174 
186 
202 
216  void SetDestination(const Destination& destination);
217 
227  WString GetTitle() const;
228 
240  void SetTitle(const WString& title);
241 
252  RGB GetColor() const;
253 
266  void SetColor(RGB color);
267 
279  uint32 GetStyle() const;
280 
295  void SetStyle(uint32 style);
296 
312  Bookmark Insert(const WString& title, Position position);
313 
331  bool MoveTo(const Bookmark& dest_bookmark, Position position);
332 
344 
363  void SetAction(const actions::Action& action);
364 
376  bool RemoveAction();
377 
389  bool IsRoot();
390 
397  bool IsFirstChild();
398 
405  bool IsLastChild();
406 
413 
414  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
415  explicit Bookmark(FS_HANDLE handle = NULL);
416 
417 };
418 } // namespace pdf
419 } // namespace foxit
420 #endif // FS_BOOKMARK_H_
421 
void SetColor(RGB color)
Set the color used for displaying title.
bool operator !=(const Bookmark &other) const
Not equal operator.
bool RemoveAction()
Remove action.
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
void SetStyle(uint32 style)
Set the style.
A bookmark is the first child of another specified bookmark.
Definition: fs_bookmark.h:82
Definition: fs_action.h:417
bool MoveTo(const Bookmark &dest_bookmark, Position position)
Move current bookmark to be child or sibling of another bookmark.
bool IsEmpty() const
Check whether current object is empty or not.
Destination GetDestination()
Get the destination.
A bookmark is the first sibling of another specified bookmark.
Definition: fs_bookmark.h:90
void SetDestination(const Destination &destination)
Set the destination.
Bookmark & operator=(const Bookmark &other)
Assign operator.
Header file for common definitions and classes.
~Bookmark()
Destructor.
bool HasChild()
Check if current bookmark has child bookmark(s).
RGB GetColor() const
Get the color used for displaying title.
Header file for destination and action related definitions and classes.
bool operator==(const Bookmark &other) const
Equal operator.
Bookmark(const PDFDoc &pdf_doc, objects::PDFDictionary *bookmark_dict)
Constructor, with parameters.
Bookmark Insert(const WString &title, Position position)
Insert a new bookmark according to the relationship position to current bookmark.
objects::PDFDictionary * GetDict() const
Get PDF dictionary of current bookmark.
Show bookmark title as normal text.
Definition: fs_bookmark.h:67
Show bookmark title as italic text.
Definition: fs_bookmark.h:69
Header file for PDF object related definitions and classes.
Foxit namespace.
Definition: fs_connectedpdf.h:26
A bookmark is the next sibling of another specified bookmark.
Definition: fs_bookmark.h:88
Definition: fs_action.h:64
Definition: fs_bookmark.h:58
Bookmark GetParent()
Get the parent bookmark.
Definition: fs_pdfobject.h:763
A bookmark is the last child of another specified bookmark.
Definition: fs_bookmark.h:84
WString GetTitle() const
Get the title.
bool IsRoot()
Check if current bookmark is the root bookmark.
bool IsLastChild()
Check if current bookmark is the last child of its parent bookmark.
#define NULL
The null-pointer value.
Definition: fx_system.h:773
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:214
Definition: fs_pdfdoc.h:338
Show bookmark title as bold text.
Definition: fs_bookmark.h:71
Position
Enumeration for bookmark position.
Definition: fs_bookmark.h:80
bool IsFirstChild()
Check if current bookmark is the first child of its parent bookmark.
A bookmark is the previous sibling of another specified bookmark.
Definition: fs_bookmark.h:86
uint32 GetStyle() const
Get the style.
Style
Enumeration for bookmark style type.
Definition: fs_bookmark.h:65
Bookmark GetNextSibling()
Get the next sibling bookmark.
A bookmark is the last sibling of another specified bookmark.
Definition: fs_bookmark.h:92
Bookmark GetFirstChild()
Get the first child bookmark.
WIDE STRING CLASS.
Definition: fx_string.h:1470
actions::Action GetAction()
Get action.
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:198
void SetTitle(const WString &title)
Set the title.
Definition: fs_basictypes.h:342
void SetAction(const actions::Action &action)
Set action.

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.