Foxit PDF SDK
fs_ofdbookmark.h
1 #ifndef FS_OFD_BOOKMARK_H_
2 #define FS_OFD_BOOKMARK_H_
3 
4 #include "common/fs_common.h"
5 
11 namespace foxit {
15 namespace ofd {
17 class BookmarkDestinationInfo FS_FINAL : public Object {
18  public:
27  explicit BookmarkDestinationInfo(int page_index, float x_pos, float y_pos) :
29  x_pos(x_pos),
30  y_pos(y_pos) {}
31 
38  this->page_index = other.page_index;
39  this->x_pos = other.x_pos;
40  this->y_pos = other.y_pos;
41  }
42 
51  this->page_index = other.page_index;
52  this->x_pos = other.x_pos;
53  this->y_pos = other.y_pos;
54  return *this;
55  }
56 
66  void Set(int page_index, float x_pos, float y_pos) {
67  this->page_index = page_index;
68  this->x_pos = x_pos;
69  this->y_pos = y_pos;
70  }
71 
77 
82  float x_pos;
83 
88  float y_pos;
89 };
90 
92 class Bookmark FS_FINAL : public Base {
93  public:
95  ~Bookmark();
96 
102  Bookmark(const Bookmark& other);
103 
111  Bookmark& operator = (const Bookmark& other);
112 
120  bool operator == (const Bookmark& other) const;
121 
129  bool operator != (const Bookmark& other) const;
130 
138  bool IsEmpty() const;
139 
146 
154  bool SetDest(const BookmarkDestinationInfo& info);
155 
161  String GetName();
162 
170  bool SetName(const String& name);
171 
172  explicit Bookmark(FS_HANDLE handle);
173 };
174 
176 class Bookmarks FS_FINAL : public Base {
177  public:
179  ~Bookmarks();
180 
186  Bookmarks(const Bookmarks& other);
187 
195  Bookmarks& operator = (const Bookmarks& other);
196 
204  bool operator == (const Bookmarks& other) const;
205 
213  bool operator != (const Bookmarks& other) const;
214 
222  bool IsEmpty() const;
223 
229  int GetBookmarkCount();
230 
239  Bookmark GetBookmark(int index);
240 
247 
256  bool RemoveBookmark(int index);
257 
258  explicit Bookmarks(FS_HANDLE handle);
259 };
260 
261 } // namespace ofd
262 } // namespace foxit
263 
264 #endif // FS_OFD_BOOKMARK_H_
Definition: fs_ofdbookmark.h:176
BookmarkDestinationInfo(int page_index, float x_pos, float y_pos)
带参数的构造函数。
Definition: fs_ofdbookmark.h:27
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
bool SetName(const String &name)
设置名称。
float y_pos
目标页Y坐标。
Definition: fs_ofdbookmark.h:88
Bookmark GetBookmark(int index)
获取指定索引的书签对象。
Definition: fs_ofdbookmark.h:17
Bookmark(const Bookmark &other)
构造函数,通过另一个书签对象。
BookmarkDestinationInfo GetDest()
获取书签目标信息。
bool operator==(const Bookmark &other) const
相等操作符。
bool IsEmpty() const
检查当前对象是否为空。
Bookmarks(const Bookmarks &other)
构造函数,通过另一个书签集合对象。
Bookmarks & operator=(const Bookmarks &other)
赋值操作符。
bool SetDest(const BookmarkDestinationInfo &info)
设置书签目标信息。
Bookmark & operator=(const Bookmark &other)
赋值操作符。
bool operator==(const Bookmarks &other) const
相等操作符。
Definition: fs_ofdbookmark.h:92
bool operator !=(const Bookmarks &other) const
不相等操作符。
Bookmark AddBookmark()
添加书签对象。
int page_index
目标页索引。
Definition: fs_ofdbookmark.h:76
~Bookmarks()
析构函数。
BookmarkDestinationInfo(const BookmarkDestinationInfo &other)
构造函数,通过另一个书签目标信息对象。
Definition: fs_ofdbookmark.h:37
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
bool operator !=(const Bookmark &other) const
不相等操作符。
通用定义和类的头文件。
void Set(int page_index, float x_pos, float y_pos)
设置值。
Definition: fs_ofdbookmark.h:66
bool IsEmpty() const
检查当前对象是否为空。
Definition: fs_basictypes.h:465
String GetName()
获取名称。
float x_pos
目标页X坐标。
Definition: fs_ofdbookmark.h:82
~Bookmark()
析构函数。
int GetBookmarkCount()
获取书签数量。
Foxit命名空间。
Definition: fs_pdf3d.h:26
BookmarkDestinationInfo & operator=(const BookmarkDestinationInfo &other)
赋值操作符。
Definition: fs_ofdbookmark.h:50
字节字符串类
Definition: fx_string.h:317
bool RemoveBookmark(int index)
删除书签对象。