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) :
28 page_index(page_index),
29 x_pos(x_pos),
30 y_pos(y_pos) {}
31
37 BookmarkDestinationInfo(const BookmarkDestinationInfo& other) {
38 this->page_index = other.page_index;
39 this->x_pos = other.x_pos;
40 this->y_pos = other.y_pos;
41 }
42
50 BookmarkDestinationInfo& operator = (const BookmarkDestinationInfo& other) {
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
76 int page_index;
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
145 BookmarkDestinationInfo GetDest();
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
246 Bookmark AddBookmark();
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_
foxit::ofd::Bookmarks
Definition: fs_ofdbookmark.h:176
foxit::ofd::BookmarkDestinationInfo::BookmarkDestinationInfo
BookmarkDestinationInfo(int page_index, float x_pos, float y_pos)
带参数的构造函数。
Definition: fs_ofdbookmark.h:27
foxit::Object
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
foxit::ofd::Bookmark::SetName
bool SetName(const String &name)
设置名称。
foxit::ofd::BookmarkDestinationInfo::y_pos
float y_pos
目标页Y坐标。
Definition: fs_ofdbookmark.h:88
foxit::ofd::Bookmarks::GetBookmark
Bookmark GetBookmark(int index)
获取指定索引的书签对象。
foxit::ofd::BookmarkDestinationInfo
Definition: fs_ofdbookmark.h:17
foxit::ofd::Bookmark::Bookmark
Bookmark(const Bookmark &other)
构造函数，通过另一个书签对象。
foxit::ofd::Bookmark::GetDest
BookmarkDestinationInfo GetDest()
获取书签目标信息。
foxit::ofd::Bookmark::operator==
bool operator==(const Bookmark &other) const
相等操作符。
foxit::ofd::Bookmark::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::ofd::Bookmarks::Bookmarks
Bookmarks(const Bookmarks &other)
构造函数，通过另一个书签集合对象。
foxit::ofd::Bookmarks::operator=
Bookmarks & operator=(const Bookmarks &other)
赋值操作符。
foxit::ofd::Bookmark::SetDest
bool SetDest(const BookmarkDestinationInfo &info)
设置书签目标信息。
foxit::ofd::Bookmark::operator=
Bookmark & operator=(const Bookmark &other)
赋值操作符。
foxit::ofd::Bookmarks::operator==
bool operator==(const Bookmarks &other) const
相等操作符。
foxit::ofd::Bookmark
Definition: fs_ofdbookmark.h:92
foxit::ofd::Bookmarks::operator !=
bool operator !=(const Bookmarks &other) const
不相等操作符。
foxit::ofd::Bookmarks::AddBookmark
Bookmark AddBookmark()
添加书签对象。
foxit::ofd::BookmarkDestinationInfo::page_index
int page_index
目标页索引。
Definition: fs_ofdbookmark.h:76
foxit::ofd::Bookmarks::~Bookmarks
~Bookmarks()
析构函数。
foxit::ofd::BookmarkDestinationInfo::BookmarkDestinationInfo
BookmarkDestinationInfo(const BookmarkDestinationInfo &other)
构造函数，通过另一个书签目标信息对象。
Definition: fs_ofdbookmark.h:37
foxit::FS_HANDLE
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
foxit::ofd::Bookmark::operator !=
bool operator !=(const Bookmark &other) const
不相等操作符。
fs_common.h
通用定义和类的头文件。
foxit::ofd::BookmarkDestinationInfo::Set
void Set(int page_index, float x_pos, float y_pos)
设置值。
Definition: fs_ofdbookmark.h:66
foxit::ofd::Bookmarks::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::Base
Definition: fs_basictypes.h:465
foxit::ofd::Bookmark::GetName
String GetName()
获取名称。
foxit::ofd::BookmarkDestinationInfo::x_pos
float x_pos
目标页X坐标。
Definition: fs_ofdbookmark.h:82
foxit::ofd::Bookmark::~Bookmark
~Bookmark()
析构函数。
foxit::ofd::Bookmarks::GetBookmarkCount
int GetBookmarkCount()
获取书签数量。
foxit
Foxit命名空间。
Definition: fs_taggedpdf.h:27
foxit::ofd::BookmarkDestinationInfo::operator=
BookmarkDestinationInfo & operator=(const BookmarkDestinationInfo &other)
赋值操作符。
Definition: fs_ofdbookmark.h:50
CFX_ByteString
字节字符串类
Definition: fx_string.h:317
foxit::ofd::Bookmarks::RemoveBookmark
bool RemoveBookmark(int index)
删除书签对象。