Foxit PDF SDK
fs_fillsign.h
Go to the documentation of this file.
1 
15 #ifndef FS_FILLSIGN_H_
16 #define FS_FILLSIGN_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfpage.h"
20 
26 namespace foxit {
30 namespace pdf {
31 class FillSignObject;
32 
36 class TextFillSignObjectData FS_FINAL : public Base {
37  public:
47  this->text_state = text_state;
48  this->text = text;
49  }
50 
53 
60  text_state = text_data.text_state;
61  text = text_data.text;
62  }
63 
72  text_state = text_data.text_state;
73  text = text_data.text;
74  return (*this);
75  }
76 
86  this->text_state = text_state;
87  this->text = text;
88  }
89 
94 };
95 
98 
99 
104 class FillSign FS_FINAL : public Base {
105  public:
111  typedef enum _FillSignObjectType {
113  e_FillSignObjectTypeText = 0,
115  e_FillSignObjectTypeCrossMark = 1,
117  e_FillSignObjectTypeCheckMark = 2,
119  e_FillSignObjectTypeRoundRectangle = 3,
121  e_FillSignObjectTypeLine = 4,
123  e_FillSignObjectTypeDot = 5,
125  e_FillSignObjectTypeSignature = 6,
127  e_FillSignObjectTypeInitialsSignature = 7
128  } FillSignObjectType;
129 
130 
138  explicit FillSign(const PDFPage& page);
139 
145  FillSign(const FillSign& other);
146 
154  FillSign& operator = (const FillSign& other);
155 
157  ~FillSign();
158 
166  bool operator == (const FillSign& other) const;
167 
175  bool operator != (const FillSign& other) const;
176 
184  bool IsEmpty() const;
185 
220  FillSignObject AddObject(FillSignObjectType type, const PointF& point, float width, float height,
222 
244  FillSignObject AddTextObject(const TextFillSignObjectDataArray& text_data, const PointF& point, float width,
245  float height, common::Rotation rotation = common::e_Rotation0, bool is_comb_field_mode = false);
246 
259  bool RemoveObject(const FillSignObject& fillsign_object);
260 
272  FillSignObject GetObjectAtPoint(const PointF& point);
273 
286  FillSignObject GetObjectAtDevicePoint(const PointF& point, const Matrix& matrix);
287 
288  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
289  explicit FillSign(FS_HANDLE handle = NULL);
290 };
291 
297 class FillSignObject : public Base {
298  public:
299  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
300  explicit FillSignObject(FS_HANDLE handle);
301 
302 #ifndef __EMSCRIPTEN_RENDER__
303 
308  FillSignObject(const FillSignObject& other);
309 #endif
310 
313 
314 #ifndef __EMSCRIPTEN_RENDER__
315 
324 #endif
325 
333  bool operator ==(const FillSignObject& other) const;
334 
342  bool operator != (const FillSignObject& other) const;
343 
351  bool IsEmpty() const;
352 
353 #ifndef __EMSCRIPTEN_RENDER__
354 
355  virtual ~FillSignObject();
356 #endif
357 
366 
394  void Move(const PointF& point, float width, float height, common::Rotation rotation = common::e_Rotation0);
395 
402  RectF GetRect() const;
403 
413  bool GenerateContent();
414 
415 };
416 
422 class TextFillSignObject FS_FINAL : public FillSignObject {
423  public:
429  explicit TextFillSignObject(const FillSignObject& fillsign_object);
430 
431  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
432  explicit TextFillSignObject(FS_HANDLE handle);
433 
436 
439 
446 
452  bool IsCombFieldMode();
453 };
454 
461 class SignatureFillSignObject FS_FINAL: public FillSignObject {
462  public:
468  explicit SignatureFillSignObject(const FillSignObject& fillsign_object);
469 
470  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
471  explicit SignatureFillSignObject(FS_HANDLE handle);
472 
475 
478 
485  bool IsInitialsType();
486 
494  void SetBitmap(const common::Bitmap& bitmap);
495 };
496 } // namespace pdf
497 } // namespace foxit
498 #endif // FS_FILLSIGN_H_
499 
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
foxit::pdf::SignatureFillSignObject::SetBitmap
void SetBitmap(const common::Bitmap &bitmap)
Set a bitmap.
foxit::pdf::FillSignObject::GenerateContent
bool GenerateContent()
Generate content for current fill-sign object.
foxit::common::e_Rotation0
No rotation.
Definition: fs_common.h:59
foxit::pdf::TextFillSignObjectDataArray
Definition: fs_fillsign.h:97
foxit::pdf::TextFillSignObject::GetTextDataArray
TextFillSignObjectDataArray GetTextDataArray()
Get text data array.
foxit::pdf::SignatureFillSignObject::~SignatureFillSignObject
~SignatureFillSignObject()
Destructor.
Definition: fs_fillsign.h:477
fs_common.h
Header file for common definitions and classes.
foxit::pdf::FillSignObject::operator!=
bool operator!=(const FillSignObject &other) const
Not equal operator.
foxit::pdf::TextFillSignObjectData::TextFillSignObjectData
TextFillSignObjectData()
Constructor.
Definition: fs_fillsign.h:52
foxit::pdf::FillSignObject::GetType
FillSign::FillSignObjectType GetType()
Get fill-sign type.
foxit::pdf::TextFillSignObject::~TextFillSignObject
~TextFillSignObject()
Destructor.
Definition: fs_fillsign.h:438
foxit::pdf::FillSignObject::GetRect
RectF GetRect() const
Get rectangle, in PDF coordinate system.
foxit::pdf::FillSignObject
Definition: fs_fillsign.h:297
foxit::pdf::FillSign::FillSignObjectType
FillSignObjectType
Enumeration for fill-sign object type.
Definition: fs_fillsign.h:111
foxit::pdf::TextFillSignObjectData::text_state
graphics::TextState text_state
Text state information.
Definition: fs_fillsign.h:91
foxit::pdf::TextFillSignObjectData
Definition: fs_fillsign.h:36
foxit::pdf::TextFillSignObjectData::text
WString text
Text content string.
Definition: fs_fillsign.h:93
foxit::pdf::TextFillSignObject::TextFillSignObject
TextFillSignObject()
Constructor.
Definition: fs_fillsign.h:435
CFX_PSVTemplate
Definition: fx_coordinates.h:30
foxit::common::Rotation
Rotation
Enumeration for rotation.
Definition: fs_common.h:57
operator==
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
fs_pdfpage.h
Header file for PDF page related definitions and classes.
foxit::pdf::TextFillSignObject::IsCombFieldMode
bool IsCombFieldMode()
Check whether current mode is comb field mode or not.
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
operator!=
bool operator!=(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are not equal.
Definition: fs_basictypes.h:140
foxit::pdf::FillSignObject::Move
void Move(const PointF &point, float width, float height, common::Rotation rotation=common::e_Rotation0)
Move current fill-sign object.
foxit::pdf::SignatureFillSignObject
Definition: fs_fillsign.h:461
foxit::pdf::TextFillSignObjectData::operator=
TextFillSignObjectData & operator=(const TextFillSignObjectData &text_data)
Assign operator.
Definition: fs_fillsign.h:71
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:780
CFX_FloatRect
Definition: fx_coordinates.h:771
foxit::pdf::SignatureFillSignObject::SignatureFillSignObject
SignatureFillSignObject()
Constructor.
Definition: fs_fillsign.h:474
foxit::pdf::TextFillSignObjectData::TextFillSignObjectData
TextFillSignObjectData(const graphics::TextState &text_state, WString text)
Constructor, with parameters.
Definition: fs_fillsign.h:46
foxit::pdf::FillSignObject::FillSignObject
FillSignObject()
Constructor.
Definition: fs_fillsign.h:312
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:411
foxit::pdf::FillSignObject::~FillSignObject
virtual ~FillSignObject()
Destructor.
foxit::pdf::SignatureFillSignObject::IsInitialsType
bool IsInitialsType()
Check if current annotation is an initials signature fill-sign object.
foxit::pdf::FillSignObject::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::pdf::TextFillSignObjectData::Set
void Set(const graphics::TextState &text_state, WString text)
Set value.
Definition: fs_fillsign.h:85
CFX_Matrix
Definition: fx_coordinates.h:1076
foxit::pdf::FillSignObject::operator==
bool operator==(const FillSignObject &other) const
Equal operator.
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1452
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::pdf::TextFillSignObjectData::TextFillSignObjectData
TextFillSignObjectData(const TextFillSignObjectData &text_data)
Constructor, with another text fill-sign object data.
Definition: fs_fillsign.h:59
foxit::pdf::FillSign
Definition: fs_fillsign.h:104
foxit::pdf::FillSignObject::operator=
FillSignObject & operator=(const FillSignObject &other)
Assign operator.
foxit::pdf::graphics::TextState
Definition: fs_pdfgraphicsobject.h:857
foxit::Base
Definition: fs_basictypes.h:413
foxit::pdf::TextFillSignObject
Definition: fs_fillsign.h:422