Foxit PDF SDK
fs_ofdofficenode.h
1 #ifndef FS_OFD_OFFICENODE_H_
2 #define FS_OFD_OFFICENODE_H_
3 
4 #include "common/fs_common.h"
5 
11 namespace foxit {
15 namespace ofd {
16 class OFDPage;
20 namespace graphics {
21 class OFDGraphicsObject;
22 }
23 
25 class OfficeNode FS_FINAL : public Base {
26  public:
28  ~OfficeNode();
29 
35  OfficeNode(const OfficeNode& other);
36 
44  OfficeNode& operator = (const OfficeNode& other);
45 
53  bool operator == (const OfficeNode& other) const;
54 
62  bool operator != (const OfficeNode& other) const;
63 
71  bool IsEmpty() const;
72 
79 
85  String GetText();
86 
92  bool IsGroup();
93 
99  int GetOfficeNodeCount();
100 
109  OfficeNode GetOfficeNode(int index);
110 
119  OfficeNode AddOfficeNode(const String& tag_name, bool group);
120 
129  void RemoveOfficeNode(int index);
130 
137 
147 
156  void AddGraphicsObject(const OFDPage& page, foxit::RectF rect);
157 
166  void AddGraphicsObject(foxit::uint32 page_id, foxit::uint32 obj_id);
167 
176  void RemoveGraphicsObject(foxit::uint32 page_id, foxit::uint32 obj_id);
177 
185  void SetTagName(const String& name);
186 
198  void SetPermission(bool visible, bool printable, bool extractable, const String& replace, bool control_sub);
199 
208  void SetAttributeValue(const String& key, const String& value);
209 
219  void SetOfficeSchema(const String& schema, const String& name_space, const String& root_name);
220 
221  explicit OfficeNode(FS_HANDLE handle);
222 };
223 
224 } // namespace ofd
225 } // namespace foxit
226 
227 #endif // FS_OFD_OFFICENODE_H_
bool operator==(const OfficeNode &other) const
相等操作符。
Definition: fs_ofdofficenode.h:25
int GetGraphicsObjectCount()
获取图元对象数量。
void SetAttributeValue(const String &key, const String &value)
设置属性值。
graphics::OFDGraphicsObject GetGraphicsObject(int index)
获取指定索引的图元对象。
Definition: fs_ofdgraphicsobject.h:177
void SetPermission(bool visible, bool printable, bool extractable, const String &replace, bool control_sub)
设置权限。
OfficeNode AddOfficeNode(const String &tag_name, bool group)
新建一个公文语义子节点,并添加到当前节点下。
void SetTagName(const String &name)
设置标签名称。
OfficeNode(const OfficeNode &other)
构造函数,通过另一个公文语义对象。
void SetOfficeSchema(const String &schema, const String &name_space, const String &root_name)
设置公文语义节点的Schema信息。
bool operator !=(const OfficeNode &other) const
不相等操作符。
void AddGraphicsObject(const OFDPage &page, foxit::RectF rect)
添加图元对象。
OfficeNode & operator=(const OfficeNode &other)
赋值操作符。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:195
bool IsEmpty() const
检查当前对象是否为空。
void RemoveOfficeNode(int index)
删除指定索引的公文语义子节点。
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
通用定义和类的头文件。
OfficeNode GetOfficeNode(int index)
获取指定索引的公文语义子节点。
Definition: fs_basictypes.h:465
String GetTagName()
获取标签名称。
~OfficeNode()
析构函数。
Foxit命名空间。
Definition: fs_pdf3d.h:26
字节字符串类
Definition: fx_string.h:317
void RemoveGraphicsObject(foxit::uint32 page_id, foxit::uint32 obj_id)
删除图元对象。
Definition: fs_ofdpage.h:27
int GetOfficeNodeCount()
获取公文语义子节点数量。
String GetText()
获取文本内容。
bool IsGroup()
判断当前节点是否为组节点。
Definition: fx_coordinates.h:771