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 
215  FillSignObject AddObject(FillSignObjectType type, const PointF& point, float width, float height,
217 
239  FillSignObject AddTextObject(const TextFillSignObjectDataArray& text_data, const PointF& point, float width,
240  float height, common::Rotation rotation = common::e_Rotation0, bool is_comb_field_mode = false);
241 
254  bool RemoveObject(const FillSignObject& fillsign_object);
255 
267  FillSignObject GetObjectAtPoint(const PointF& point);
268 
281  FillSignObject GetObjectAtDevicePoint(const PointF& point, const Matrix& matrix);
282 
283  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
284  explicit FillSign(FS_HANDLE handle = NULL);
285 };
286 
292 class FillSignObject : public Base {
293  public:
294  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
295  explicit FillSignObject(FS_HANDLE handle);
296 
297 #ifndef __EMSCRIPTEN_RENDER__
298 
303  FillSignObject(const FillSignObject& other);
304 #endif
305 
308 
309 #ifndef __EMSCRIPTEN_RENDER__
310 
319 #endif
320 
328  bool operator ==(const FillSignObject& other) const;
329 
337  bool operator != (const FillSignObject& other) const;
338 
346  bool IsEmpty() const;
347 
348 #ifndef __EMSCRIPTEN_RENDER__
349 
350  virtual ~FillSignObject();
351 #endif
352 
361 
389  void Move(const PointF& point, float width, float height, common::Rotation rotation = common::e_Rotation0);
390 
397  RectF GetRect() const;
398 
408  bool GenerateContent();
409 
410 };
411 
417 class TextFillSignObject FS_FINAL : public FillSignObject {
418  public:
424  explicit TextFillSignObject(const FillSignObject& fillsign_object);
425 
426  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
427  explicit TextFillSignObject(FS_HANDLE handle);
428 
431 
434 
441 
447  bool IsCombFieldMode();
448 };
449 
456 class SignatureFillSignObject FS_FINAL: public FillSignObject {
457  public:
463  explicit SignatureFillSignObject(const FillSignObject& fillsign_object);
464 
465  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
466  explicit SignatureFillSignObject(FS_HANDLE handle);
467 
470 
473 
480  bool IsInitialsType();
481 
489  void SetBitmap(const common::Bitmap& bitmap);
490 };
491 } // namespace pdf
492 } // namespace foxit
493 #endif // FS_FILLSIGN_H_
494 
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:472
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:433
foxit::pdf::FillSignObject::GetRect
RectF GetRect() const
Get rectangle, in PDF coordinate system.
foxit::pdf::FillSignObject
Definition: fs_fillsign.h:292
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:430
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:456
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:469
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:307
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:412
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:873
foxit::Base
Definition: fs_basictypes.h:427
foxit::pdf::TextFillSignObject
Definition: fs_fillsign.h:417