fs_annot.h
Go to the documentation of this file.
1 
15 #ifndef FS_ANNOT_H_
16 #define FS_ANNOT_H_
17 
18 #include "common/fs_common.h"
19 #include "common/file/fs_file.h"
20 #include "common/fs_image.h"
22 
28 namespace foxit {
32 namespace pdf {
33 // forward declaration
34 class PDFPage;
35 class FileSpec;
36 namespace actions {
37 class Action;
38 } // namespace actions
39 namespace annots {
40 class Note;
41 class Popup;
42 } // namespace annots
43 namespace interform {
44 class Field;
45 class Control;
46 } // namespace interform
47 
51 class DefaultAppearance FS_FINAL : public Object {
52  public:
58  typedef enum _Flags {
60  e_FlagFont = 0x0001,
62  e_FlagTextColor = 0x0002,
64  e_FlagFontSize = 0x0004
65  } Flags;
66 
67 
82  : flags(flags)
83  , font(font)
86 
89  : flags(0)
90  , text_size(0)
91  , text_color(0x000000) {}
92 
98  DefaultAppearance(const DefaultAppearance& default_appearance)
99  : flags(default_appearance.flags)
100  , font(default_appearance.font)
101  , text_size(default_appearance.text_size)
102  , text_color(default_appearance.text_color) {}
103 
111  DefaultAppearance& operator = (const DefaultAppearance& default_appearance) {
112  flags = default_appearance.flags;
113  font = default_appearance.font;
114  text_size = default_appearance.text_size;
115  text_color = default_appearance.text_color;
116  return *this;
117  }
118 
126  bool operator == (const DefaultAppearance& default_appearance) const {
127  return (flags == default_appearance.flags && font == default_appearance.font &&
128  fabs(text_size-default_appearance.text_size) <= FLT_EPSILON &&
129  text_color == default_appearance.text_color);
130  }
131 
139  bool operator != (const DefaultAppearance& default_appearance) const {
140  return (flags != default_appearance.flags || font != default_appearance.font ||
141  fabs(text_size - default_appearance.text_size) > FLT_EPSILON ||
142  text_color != default_appearance.text_color);
143  }
144 
162  this->flags = flags;
163  this->font = font;
164  this->text_size = text_size;
165  this->text_color = text_color;
166  }
167 
187  float text_size;
194 };
198 namespace annots {
200 class BorderInfo FS_FINAL : public Object {
201  public:
207  typedef enum _Style {
209  e_Solid = 0,
217  e_Dashed = 1,
241  e_Inset = 4,
250  } Style;
251 
252 
271  BorderInfo(float width, Style style, float intensity, float dash_phase, const FloatArray& dashes) {
272  this->width = width;
273  this->style = style;
274  this->cloud_intensity = intensity;
275  this->dash_phase = dash_phase;
276  this->dashes = dashes;
277  }
278 
281  : width(1.0f)
283  , cloud_intensity(0)
284  , dash_phase(0) {}
285 
288 
294  BorderInfo(const BorderInfo& border_info) {
295  this->width = border_info.width;
296  this->style = border_info.style;
297  this->cloud_intensity = border_info.cloud_intensity;
298  this->dash_phase = border_info.dash_phase;
299  this->dashes = border_info.dashes;
300  }
301 
309  BorderInfo& operator = (const BorderInfo& border_info) {
310  this->width = border_info.width;
311  this->style = border_info.style;
312  this->cloud_intensity = border_info.cloud_intensity;
313  this->dash_phase = border_info.dash_phase;
314  this->dashes = border_info.dashes;
315  return *this;
316  }
317 
325  bool operator == (const BorderInfo& border_info) const {
326  if (fabs(width - border_info.width) > FLT_EPSILON || style != border_info.style ||
327  fabs(cloud_intensity - border_info.cloud_intensity) > FLT_EPSILON ||
328  fabs(dash_phase - border_info.dash_phase) > FLT_EPSILON ||
329  dashes.GetSize() != border_info.dashes.GetSize())
330  return false;
331  for (int i=0; i<dashes.GetSize(); i++) {
332  if (fabs(dashes[i]-border_info.dashes[i])>FLT_EPSILON)
333  return false;
334  }
335  return true;
336  }
337 
345  bool operator != (const BorderInfo& border_info) const{
346  if (fabs(width - border_info.width) > FLT_EPSILON || style != border_info.style ||
347  fabs(cloud_intensity - border_info.cloud_intensity) > FLT_EPSILON ||
348  fabs(dash_phase - border_info.dash_phase) > FLT_EPSILON ||
349  dashes.GetSize() != border_info.dashes.GetSize())
350  return true;
351  for (int i=0; i<dashes.GetSize(); i++) {
352  if (fabs(dashes[i]-border_info.dashes[i])>FLT_EPSILON)
353  return true;
354  }
355  return false;
356  }
357 
378  void Set(float width, Style style, float intensity, float dash_phase, const FloatArray& dashes) {
379  this->width = width;
380  this->style = style;
381  this->cloud_intensity = intensity;
382  this->dash_phase = dash_phase;
383  this->dashes = dashes;
384  }
385 
391  float width;
392 
398 
411 
417  float dash_phase;
418 
425 };
426 
437 class QuadPoints FS_FINAL : public Object {
438  public:
447  QuadPoints(const PointF& first, const PointF& second, const PointF& third, const PointF& fourth) {
448  this->first = first;
449  this->second = second;
450  this->third = third;
451  this->fourth = fourth;
452  }
453 
456 
462  QuadPoints(const QuadPoints& quad_points) {
463  first = quad_points.first;
464  second = quad_points.second;
465  third = quad_points.third;
466  fourth = quad_points.fourth;
467  }
468 
476  QuadPoints& operator = (const QuadPoints& quad_points) {
477  first = quad_points.first;
478  second = quad_points.second;
479  third = quad_points.third;
480  fourth = quad_points.fourth;
481  return *this;
482  }
483 
491  bool operator == (const QuadPoints& quad_points) const {
492  return (first == quad_points.first && second == quad_points.second &&
493  third == quad_points.third && fourth == quad_points.fourth);
494  }
495 
503  bool operator != (const QuadPoints& quad_points) const {
504  return (first != quad_points.first || second != quad_points.second ||
505  third != quad_points.third || fourth != quad_points.fourth);
506  }
507 
518  void Set(const PointF& first, const PointF& second, const PointF& third, const PointF& fourth) {
519  this->first = first;
520  this->second = second;
521  this->third = third;
522  this->fourth = fourth;
523  }
524 
533 };
534 
536 FSDK_DEFINE_ARRAY(QuadPointsArray, QuadPoints)
537 
538 
542 class IconFit FS_FINAL : public Object {
543  public:
549  typedef enum _ScaleWayType {
551  e_ScaleWayAlways = 1,
553  e_ScaleWayBigger = 2,
555  e_ScaleWaySmaller = 3,
557  e_ScaleWayNever = 4
558  } ScaleWayType;
559 
560 
563  : scale_way_type((ScaleWayType)0)
564  , is_proportional_scaling(false)
565  , horizontal_fraction(0)
566  , vertical_fraction(0)
567  , fit_bounds(false) {}
568 
592  IconFit(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction,
593  float vertical_fraction, bool fit_bounds)
594  : scale_way_type(type)
595  , is_proportional_scaling(is_proportional_scaling)
596  , horizontal_fraction(horizontal_fraction)
597  , vertical_fraction(vertical_fraction)
598  , fit_bounds(fit_bounds) {}
599 
605  IconFit(const IconFit& icon_fit)
606  : scale_way_type(icon_fit.scale_way_type)
607  , is_proportional_scaling(icon_fit.is_proportional_scaling)
608  , horizontal_fraction(icon_fit.horizontal_fraction)
609  , vertical_fraction(icon_fit.vertical_fraction)
610  , fit_bounds(icon_fit.fit_bounds) {}
611 
619  IconFit& operator = (const IconFit& icon_fit) {
620  scale_way_type = icon_fit.scale_way_type;
621  is_proportional_scaling = icon_fit.is_proportional_scaling;
622  horizontal_fraction = icon_fit.horizontal_fraction;
623  vertical_fraction = icon_fit.vertical_fraction;
624  fit_bounds = icon_fit.fit_bounds;
625  return *this;
626  }
627 
635  bool operator == (const IconFit& icon_fit) const {
636  return (scale_way_type == icon_fit.scale_way_type &&
637  is_proportional_scaling == icon_fit.is_proportional_scaling &&
638  fabs(horizontal_fraction - icon_fit.horizontal_fraction) <= FLT_EPSILON &&
639  fabs(vertical_fraction - icon_fit.vertical_fraction) <= FLT_EPSILON &&
640  fit_bounds == icon_fit.fit_bounds);
641  }
642 
650  bool operator != (const IconFit& icon_fit) const {
651  return (scale_way_type != icon_fit.scale_way_type ||
652  is_proportional_scaling != icon_fit.is_proportional_scaling ||
653  fabs(horizontal_fraction - icon_fit.horizontal_fraction) > FLT_EPSILON ||
654  fabs(vertical_fraction - icon_fit.vertical_fraction) > FLT_EPSILON ||
655  fit_bounds != icon_fit.fit_bounds);
656  }
657 
683  void Set(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction,
684  float vertical_fraction, bool fit_bounds) {
685  this->scale_way_type = type;
686  this->is_proportional_scaling = is_proportional_scaling;
687  this->horizontal_fraction = horizontal_fraction;
688  this->vertical_fraction = vertical_fraction;
689  this->fit_bounds = fit_bounds;
690  }
691 
723 };
724 
756 class Annot : public Base {
757  public:
763  typedef enum _Type {
770  e_Note = 1,
772  e_Link = 2,
776  e_Line = 4,
778  e_Square = 5,
780  e_Circle = 6,
794  e_Stamp = 13,
796  e_Caret = 14,
798  e_Ink = 15,
800  e_PSInk = 16,
804  e_Sound = 18,
806  e_Movie = 19,
812  e_Widget = 20,
814  e_Screen = 21,
818  e_TrapNet = 23,
822  e_3D = 25,
824  e_Popup = 26,
826  e_Redact = 27
827  } Type;
828 
834  typedef enum _Flags {
842  e_FlagInvisible = 0x0001,
849  e_FlagHidden = 0x0002,
858  e_FlagPrint = 0x0004,
866  e_FlagNoZoom = 0x0008,
874  e_FlagNoRotate = 0x0010,
883  e_FlagNoView = 0x0020,
894  e_FlagReadOnly = 0x0040,
902  e_FlagLocked = 0x0080,
918  } Flags;
919 
925  typedef enum _HighlightingMode {
937 
943  typedef enum _Property {
965  } Property;
966 
972  typedef enum _MKEntry {
1029  } MKEntry;
1030 
1036  typedef enum _MKIconCaptionRelation {
1052 
1058  typedef enum _AppearanceType {
1065  } AppearanceType;
1066 
1067 
1068  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1069  explicit Annot(FS_HANDLE handle);
1077  Annot(const PDFPage& page, objects::PDFDictionary* annot_dict);
1083  Annot(const Annot& annot);
1085  Annot() {}
1093  Annot& operator = (const Annot& annot);
1101  bool operator ==(const Annot& other) const;
1109  bool operator != (const Annot& other) const;
1110 
1112  virtual ~Annot();
1113 
1121  bool IsEmpty() const;
1122 
1128  PDFPage GetPage() const;
1135  bool IsMarkup() const;
1141  Type GetType() const;
1147  int GetIndex() const;
1153  WString GetContent() const;
1167  void SetContent(const WString& content);
1174  DateTime GetModifiedDateTime() const;
1182  void SetModifiedDateTime(const DateTime& date_time);
1189  uint32 GetFlags() const;
1198  void SetFlags(uint32 flags);
1204  WString GetUniqueID() const;
1212  void SetUniqueID(const WString& unique_id);
1219  RectF GetRect() const;
1229  bool Move(const RectF& rect);
1243  BorderInfo GetBorderInfo() const;
1257  void SetBorderInfo(const BorderInfo& border);
1266  RGB GetBorderColor() const;
1278  void SetBorderColor(RGB color);
1291  bool ResetAppearanceStream();
1311  RectI GetDeviceRect(bool is_transform_icon, const Matrix& matrix);
1335  bool RemoveProperty(Property property);
1336 
1343 
1359  objects::PDFStream* GetAppearanceStream(AppearanceType type, const char* appearance_state = "") const;
1360 };
1361 
1363 FSDK_DEFINE_ARRAY(AnnotArray, Annot)
1364 
1365 
1366 class ShadingColor FS_FINAL : public Object {
1367  public:
1374  ShadingColor(ARGB firstcolor, ARGB secondcolor)
1375  : first_color(firstcolor)
1376  , second_color(secondcolor) {}
1377 
1380  : first_color(0xFFFFFFFF)
1381  , second_color(0xFFFFFFFF) {}
1382 
1388  ShadingColor(const ShadingColor& shading_color)
1389  : first_color(shading_color.first_color)
1390  , second_color(shading_color.second_color) {}
1391 
1399  ShadingColor& operator = (const ShadingColor& shading_color) {
1400  this->first_color = shading_color.first_color;
1401  this->second_color = shading_color.second_color;
1402  return *this;
1403  }
1404 
1412  bool operator == (const ShadingColor& shading_color) const {
1413  return (first_color == shading_color.first_color && second_color == shading_color.second_color);
1414  }
1415 
1423  bool operator != (const ShadingColor& shading_color) const {
1424  return (first_color != shading_color.first_color || second_color != shading_color.second_color);
1425  }
1426 
1435  void Set(ARGB firstcolor, ARGB secondcolor) {
1436  this->first_color = firstcolor;
1437  this->second_color = secondcolor;
1438  }
1439 
1444 };
1445 
1456  public:
1462  virtual void Release() = 0;
1471  virtual String GetProviderID() {
1472  return String();
1473  }
1483  return String();
1484  }
1494  virtual bool HasIcon(Annot::Type annot_type, const char* icon_name) {
1495  return false;
1496  }
1507  virtual bool CanChangeColor(Annot::Type annot_type, const char* icon_name) {
1508  return false;
1509  }
1520  virtual PDFPage GetIcon(Annot::Type annot_type, const char* icon_name, ARGB color);
1535  virtual bool GetShadingColor(Annot::Type annot_type, const char* icon_name,
1536  RGB referenced_color, int shading_index, ShadingColor& out_shading_color) {
1537  return false;
1538  }
1552  virtual float GetDisplayWidth(Annot::Type annot_type, const char* icon_name) {
1553  return 0.0f;
1554  }
1568  virtual float GetDisplayHeight(Annot::Type annot_type, const char* icon_name) {
1569  return 0.0f;
1570  }
1571 
1572  protected:
1573  ~IconProviderCallback() {}
1574 };
1575 
1576 class Markup;
1578 FSDK_DEFINE_ARRAY(MarkupArray, Markup)
1579 
1580 
1598 class Markup : public Annot {
1599  public:
1605  typedef enum _StateModel {
1609  e_StateModelMarked = 1,
1613  e_StateModelReview = 2
1614  } StateModel;
1615 
1621  typedef enum _State {
1626  e_StateMarked = 1,
1631  e_StateUnmarked = 2,
1636  e_StateAccepted = 3,
1641  e_StateRejected = 4,
1646  e_StateCancelled = 5,
1651  e_StateCompleted = 6,
1656  e_StateNone = 7
1657  } State;
1658 
1664  typedef enum _EndingStyle {
1666  e_EndingStyleNone = 0,
1668  e_EndingStyleSquare = 1,
1670  e_EndingStyleCircle = 2,
1672  e_EndingStyleDiamond = 3,
1674  e_EndingStyleOpenArrow = 4,
1680  e_EndingStyleClosedArrow = 5,
1682  e_EndingStyleButt = 6,
1684  e_EndingStyleROpenArrow = 7,
1686  e_EndingStyleRClosedArrow = 8,
1688  e_EndingStyleSlash = 9
1689  } EndingStyle;
1690 
1691 
1697  explicit Markup(const Annot& annot);
1698  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1699  explicit Markup(FS_HANDLE handle);
1701  Markup() {}
1702 
1704  ~Markup() {}
1705 
1723  Popup GetPopup();
1740  void SetPopup(const Popup& popup);
1746  WString GetTitle() const;
1754  void SetTitle(const WString& title);
1760  WString GetSubject() const;
1768  void SetSubject(const WString& subject);
1777  float GetOpacity() const;
1790  void SetOpacity(float opacity);
1812  String GetIntent() const;
1848  void SetIntent(const String& intent);
1855  DateTime GetCreationDateTime() const;
1863  void SetCreationDateTime(const DateTime& date_time);
1869  int GetReplyCount();
1878  Note GetReply(int index) const;
1884  Note AddReply();
1895  bool RemoveReply(int index);
1901  bool RemoveAllReplies();
1902 
1919  bool IsGrouped();
1920 
1938  Markup GetGroupHeader();
1939 
1956  MarkupArray GetGroupElements();
1957 
1973  bool Ungroup();
1974 
1996  int GetStateAnnotCount(StateModel model);
1997 
2022  Note GetStateAnnot(StateModel model, int index);
2023 
2076  Note AddStateAnnot(StateModel model, State state);
2077 
2087  bool RemoveAllStateAnnots();
2088 
2089 };
2090 
2112 class Note FS_FINAL : public Markup {
2113  public:
2115  Note() {}
2121  explicit Note(const Annot& annot);
2122  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2123  explicit Note(FS_HANDLE handle);
2125  ~Note() {}
2126 
2139  bool GetOpenStatus() const;
2154  void SetOpenStatus(bool status);
2166  String GetIconName() const;
2184  void SetIconName(const char* icon_name);
2194  Markup GetReplyTo();
2201  bool IsStateAnnot();
2202 
2215 
2227  State GetState();
2228 
2251  void SetState(State state);
2252 
2253 };
2254 
2266 class TextMarkup: public Markup {
2267  public:
2275  explicit TextMarkup(const Annot& annot);
2278 
2313  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2314 };
2315 
2332 class Highlight FS_FINAL : public TextMarkup {
2333  public:
2341  explicit Highlight(const Annot& annot);
2344 };
2345 
2362 class Underline FS_FINAL : public TextMarkup {
2363  public:
2371  explicit Underline(const Annot& annot);
2374 };
2375 
2392 class StrikeOut FS_FINAL : public TextMarkup {
2393  public:
2401  explicit StrikeOut(const Annot& annot);
2404 };
2405 
2422 class Squiggly FS_FINAL : public TextMarkup {
2423  public:
2431  explicit Squiggly(const Annot& annot);
2434 };
2435 
2449 class Link FS_FINAL : public Annot {
2450  public:
2452  Link() {}
2458  explicit Link(const Annot& annot);
2459  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2460  explicit Link(FS_HANDLE handle);
2462  ~Link() {}
2463 
2496  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2497 
2506 
2517 
2525 
2540  void SetAction(const actions::Action& action);
2541 
2547  bool RemoveAction();
2548 };
2549 
2563 class Square FS_FINAL : public Markup {
2564  public:
2566  Square() {}
2572  explicit Square(const Annot& annot);
2574  ~Square() {}
2575 
2582  RGB GetFillColor() const;
2583 
2591  void SetFillColor(RGB fill_color);
2592 
2602  RectF GetInnerRect() const;
2614  void SetInnerRect(const RectF& inner_rect);
2615 };
2616 
2630 class Circle FS_FINAL : public Markup {
2631  public:
2633  Circle() {}
2639  explicit Circle(const Annot& annot);
2641  ~Circle() {}
2642 
2649  RGB GetFillColor() const;
2650 
2661  void SetFillColor(RGB fill_color);
2662 
2672  RectF GetInnerRect() const;
2673 
2687  void SetInnerRect(const RectF& inner_rect);
2688 };
2689 
2710 class FreeText FS_FINAL : public Markup {
2711  public:
2719  explicit FreeText(const Annot& annot);
2722 
2733  RGB GetFillColor() const;
2747  void SetFillColor(RGB fill_color);
2748 
2758 
2772  void SetAlignment(common::Alignment alignment);
2773 
2784  RectF GetInnerRect() const;
2785 
2800  void SetInnerRect(const RectF& inner_rect);
2801 
2811 
2834  bool SetDefaultAppearance(const DefaultAppearance& default_ap);
2835 
2847 
2862  void SetCalloutLineEndingStyle(EndingStyle ending_style);
2863 
2878 
2901  void SetCalloutLinePoints(const PointFArray& point_array);
2902 
2915  void SetTextMatrix(const Matrix& text_matrix);
2916 
2925  Matrix GetTextMatrix() const;
2926 };
2927 
2945 class Line FS_FINAL : public Markup {
2946  public:
2952  typedef enum _CapPos {
2957  } CapPos;
2958 
2959 
2961  Line() {}
2967  explicit Line(const Annot& annot);
2969  ~Line() {}
2970 
2992  void SetLineStartStyle(EndingStyle ending_style);
3001  EndingStyle GetLineEndStyle() const;
3014  void SetLineEndStyle(EndingStyle ending_style);
3015 
3026  RGB GetStyleFillColor() const;
3027 
3041  void SetStyleFillColor(RGB color);
3042 
3051  PointF GetStartPoint() const;
3064  void SetStartPoint(const PointF& point);
3065 
3074  PointF GetEndPoint() const;
3087  void SetEndPoint(const PointF& point);
3088 
3097  bool HasCaption() const;
3110  void EnableCaption(bool cap);
3111 
3139  void SetCaptionPositionType(CapPos cap_position);
3152  Offset GetCaptionOffset() const;
3168  void SetCaptionOffset(const Offset& offset);
3169 
3184  float GetLeaderLineLength() const;
3202  void SetLeaderLineLength(float length);
3212  float GetLeaderLineExtensionLength() const;
3225  void SetLeaderLineExtensionLength(float extension_length);
3226 
3237  float GetLeaderLineOffset() const;
3251  void SetLeaderLineOffset(float offset);
3252 
3266  void SetMeasureRatio(const String& ratio);
3288  void SetMeasureUnit(int measure_type, const String& unit);
3299  String GetMeasureUnit(int measure_type);
3311  void SetMeasureConversionFactor(int measure_type, float factor);
3322  float GetMeasureConversionFactor(int measure_type);
3323 };
3324 
3341 class Ink FS_FINAL : public Markup {
3342  public:
3344  Ink() {}
3350  explicit Ink(const Annot& annot);
3352  ~Ink() {}
3379 
3411  void SetInkList(const common::Path& ink_list);
3412 };
3413 
3436 class Stamp FS_FINAL : public Markup {
3437  public:
3439  Stamp() {}
3445  explicit Stamp(const Annot& annot);
3447  ~Stamp();
3459  String GetIconName() const;
3481  void SetIconName(const char* icon_name);
3492  void SetBitmap(const common::Bitmap& bitmap);
3493 
3516  void SetImage(const common::Image& image, int frame_index, int compress);
3517 };
3518 
3531 class Screen FS_FINAL : public Annot {
3532  public:
3534  Screen() {}
3540  explicit Screen(const Annot& annot);
3542  virtual ~Screen() {}
3543 
3566  void SetImage(const common::Image& image, int frame_index, int compress);
3567 
3576 
3584 
3597  void SetRotation(common::Rotation rotate);
3598 
3606 
3615  float GetOpacity() const;
3628  void SetOpacity(float opacity);
3629 
3635  WString GetTitle() const;
3643  void SetTitle(const WString& title);
3644 
3678  void SetAction(const actions::Action& action);
3687  void RemoveAction();
3688 };
3689 
3708 class Polygon FS_FINAL : public Markup {
3709  public:
3711  Polygon() {}
3717  explicit Polygon(const Annot& annot);
3728  RGB GetFillColor() const;
3729 
3741  void SetFillColor(RGB fill_color);
3742 
3752 
3764  void SetVertexes(const PointFArray& vertexes);
3765 };
3766 
3786 class PolyLine FS_FINAL : public Markup {
3787  public:
3795  explicit PolyLine(const Annot& annot);
3808  RGB GetStyleFillColor() const;
3820  void SetStyleFillColor(RGB fill_color);
3821 
3831 
3843  void SetVertexes(const PointFArray& vertexes);
3866  void SetLineStartStyle(EndingStyle starting_style);
3875  EndingStyle GetLineEndStyle() const;
3889  void SetLineEndStyle(EndingStyle ending_style);
3890 };
3891 
3903 class Caret FS_FINAL : public Markup {
3904  public:
3906  Caret() {}
3912  explicit Caret(const Annot& annot);
3914  ~Caret() {}
3915 
3925  RectF GetInnerRect() const;
3939  void SetInnerRect(const RectF& inner_rect);
3940 };
3941 
3954 class FileAttachment FS_FINAL : public Markup {
3955  public:
3963  explicit FileAttachment(const Annot& annot);
3966 
3974  bool SetFileSpec(const FileSpec& file_spec);
3975 
3983 
3994  String GetIconName() const;
3995 
4011  void SetIconName(const char* icon_name);
4012 };
4013 
4023 class Popup FS_FINAL : public Annot {
4024  public:
4026  Popup() {}
4032  explicit Popup(const Annot& annot);
4033  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4034  explicit Popup(FS_HANDLE handle);
4036  ~Popup() {}
4037 
4050  bool GetOpenStatus() const;
4065  void SetOpenStatus(bool status);
4066 };
4085 class PSInk FS_FINAL : public Annot {
4086  public:
4088  PSInk() {}
4094  explicit PSInk(const Annot& annot);
4095  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4096  explicit PSInk(FS_HANDLE handle);
4098  ~PSInk() {}
4099 };
4100 
4113 class Widget FS_FINAL : public Annot {
4114  public:
4116  Widget() {}
4122  explicit Widget(const Annot& annot);
4123  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4124  explicit Widget(FS_HANDLE handle);
4126  ~Widget();
4133 
4140 
4151 
4164 
4175 
4199  void SetAction(const actions::Action& action);
4200 
4209  void RemoveAction();
4210 
4222  bool HasMKEntry(MKEntry mk_entry);
4234  void RemoveMKEntry(MKEntry mk_entry);
4260  void SetMKRotation(common::Rotation rotation);
4271  RGB GetMKBorderColor() const;
4282  void SetMKBorderColor(RGB color);
4293  RGB GetMKBackgroundColor() const;
4304  void SetMKBackgroundColor(RGB color);
4318  WString GetMKNormalCaption() const;
4332  void SetMKNormalCaption(const wchar_t* caption);
4347  WString GetMKRolloverCaption() const;
4362  void SetMKRolloverCaption(const wchar_t* caption);
4376  WString GetMKDownCaption() const;
4390  void SetMKDownCaption(const wchar_t* caption);
4417  void SetMKNormalIconBitmap(const common::Bitmap& bitmap);
4433  void SetMKNormalIconImage(const common::Image& image, int frame_index);
4462  void SetMKRolloverIconBitmap(const common::Bitmap& bitmap);
4479  void SetMKRolloverIconImage(const common::Image& image, int frame_index);
4506  void SetMKDownIconBitmap(const common::Bitmap& bitmap);
4522  void SetMKDownIconImage(const common::Image& image, int frame_index);
4536  IconFit GetMKIconFit() const;
4552  void SetMKIconFit(const IconFit& icon_fit);
4553 
4582 
4583 };
4584 
4600 class Redact FS_FINAL : public Markup {
4601  public:
4603  Redact() {}
4609  explicit Redact(const Annot& annot);
4610  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4611  explicit Redact(FS_HANDLE handle);
4613  ~Redact();
4614 
4621  RGB GetFillColor() const;
4629  void SetFillColor(RGB fill_color);
4630 
4637  RGB GetApplyFillColor() const;
4638 
4646  void SetApplyFillColor(RGB fill_color);
4647 };
4648 } // namespace annots
4649 } // namespace pdf
4650 } // namespace foxit
4651 
4652 #endif // FS_ANNOT_H_
4653 
FloatArray dashes
A dash array that represents the dash patterns.
Definition: fs_annot.h:424
Annotation flag: read only.
Definition: fs_annot.h:894
void SetFillColor(RGB fill_color)
Set fill color.
Definition: fs_annot.h:1455
WString GetUniqueID() const
Get unique ID.
StateModel GetStateModel()
Get the state model.
Rollover caption entry. "RC" in MK dictionary.
Definition: fs_annot.h:990
~Line()
Destructor.
Definition: fs_annot.h:2969
Square()
Constructor.
Definition: fs_annot.h:2566
void SetStyleFillColor(RGB fill_color)
Set fill color for some line ending styles.
~FreeText()
Destructor.
Definition: fs_annot.h:2721
IconFit()
Constructor.
Definition: fs_annot.h:562
void SetBorderColor(RGB color)
Set border color.
Definition: fs_pdfobject.h:385
PointFArray GetVertexes()
Get vertexes.
IconFit GetMKIconFit() const
Get the icon fit information in the MK dictionary.
WString GetMKNormalCaption() const
Get the normal caption string in the MK dictionary.
State
Enumeration for markup annotation's state.
Definition: fs_annot.h:1621
Definition: fs_annot.h:1366
Definition: fs_annot.h:2266
Definition: fs_annot.h:2362
~Popup()
Destructor.
Definition: fs_annot.h:4036
Definition: fs_annot.h:3531
Redact()
Constructor.
Definition: fs_annot.h:4603
PointFArray GetCalloutLinePoints() const
Get a point of callout line points.
void Set(const PointF &first, const PointF &second, const PointF &third, const PointF &fourth)
Set value.
Definition: fs_annot.h:518
Definition: fs_image.h:36
MKIconCaptionRelation
Enumeration for icon and caption relative position in annotation's MK dictionary.
Definition: fs_annot.h:1036
Annotation type: squiggly annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:790
Annotation flag: no view.
Definition: fs_annot.h:883
RectF GetInnerRect() const
Get the inner rectangle.
Definition: fs_annot.h:3954
Markup()
Constructor.
Definition: fs_annot.h:1701
PDFPage GetPage() const
Get the related PDF page.
WString GetContent() const
Get content.
Annotation type: file attachment annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:802
PointF Offset
Offset information, in float.
Definition: fs_basictypes.h:355
Annot()
Constructor.
Definition: fs_annot.h:1085
QuadPointsArray GetQuadPoints() const
Get quadrilaterals.
bool IsStateAnnot()
Check if current note annotation is used as a state annotation.
Down icon (or alternate icon) entry. "IX" in MK dictionary.
Definition: fs_annot.h:1014
Markup GetReplyTo()
Get the markup annotation, which current note annotation is in reply to.
float width
Border width, in points.
Definition: fs_annot.h:391
Annotation type: free text annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:774
State GetState()
Get the state.
StrikeOut()
Constructor.
Definition: fs_annot.h:2395
CFX_Object Object
Object type.
Definition: fs_basictypes.h:216
Annotation type: pop-up annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:824
PolyLine()
Constructor.
Definition: fs_annot.h:3789
ARGB first_color
First color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1441
actions::Action GetAction()
Get action.
void SetFlags(uint32 flags)
Set annotation flags.
Definition: fs_annot.h:1363
Screen()
Constructor.
Definition: fs_annot.h:3534
IconFit(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
Constructor, with parameters.
Definition: fs_annot.h:592
bool HasCaption() const
Check whether the content of current line annotation should be replicated as a caption in the appeara...
Icon and caption relation entry. "TP" in MK dictionary.
Definition: fs_annot.h:1028
float GetLeaderLineOffset() const
Get the length of leader line offset.
void SetMKRolloverIconBitmap(const common::Bitmap &bitmap)
Set the rollover icon bitmap in the MK dictionary.
void SetFillColor(RGB fill_color)
Set fill color.
Indicates property pdf::DefaultAppearance::text_color is meaningful.
Definition: fs_annot.h:62
Definition: fs_annot.h:542
void SetMKNormalIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as normal icon in the MK dictionary.
HighlightingMode GetHighlightingMode()
Get highlighting mode.
Annotation flag: print.
Definition: fs_annot.h:858
bool operator!=(const BorderInfo &border_info) const
Not equal operator.
Definition: fs_annot.h:345
Definition: fs_basictypes.h:366
BorderInfo GetBorderInfo() const
Get border information.
RGB GetApplyFillColor() const
Get the filling color which is used for rollover appearance and will be used after redaction is appli...
BorderInfo(const BorderInfo &border_info)
Constructor, with another BorderInfo object.
Definition: fs_annot.h:294
Definition: fs_annot.h:200
Style
Enumeration for PDF annotation border style.
Definition: fs_annot.h:207
bool HasMKEntry(MKEntry mk_entry)
Check if a specified entry exists in the MK dictionary.
~Highlight()
Destructor.
Definition: fs_annot.h:2343
virtual bool GetShadingColor(Annot::Type annot_type, const char *icon_name, RGB referenced_color, int shading_index, ShadingColor &out_shading_color)
A callback function used to get the shading colors if current icon provider supports for a specified ...
Definition: fs_annot.h:1535
virtual String GetProviderVersion()
A callback function used to get provider version.
Definition: fs_annot.h:1482
Definition: fs_annot.h:2563
No caption; icon only.
Definition: fs_annot.h:1040
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:211
void SetTextMatrix(const Matrix &text_matrix)
Set matrix in default appearance data for text in current free text annotation.
void SetLineStartStyle(EndingStyle starting_style)
Set line ending style of the start point.
void SetMKRolloverIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as rollover icon in the MK dictionary.
Annotation type: unknown.
Definition: fs_annot.h:765
Caption above the icon.
Definition: fs_annot.h:1044
DefaultAppearance GetDefaultAppearance()
Get default appearance data.
Type
Enumeration for PDF annotation type.
Definition: fs_annot.h:763
Annotation type: redact annotation.
Definition: fs_annot.h:826
void SetIconName(const char *icon_name)
Set icon name.
Definition: fs_annot.h:1598
int GetSize() const
Get the number of elements in the array.
Definition: fx_basic.h:1309
void SetIconName(const char *icon_name)
Set icon name.
Annotation's normal appearance.
Definition: fs_annot.h:1060
Definition: fs_annot.h:536
Flags
Enumeration for PDF annotation flags.
Definition: fs_annot.h:834
Header file for file operation related definitions and functions.
objects::PDFStream * GetAppearanceStream(AppearanceType type, const char *appearance_state="") const
Get annotation's appearance stream with specified type and state.
DefaultAppearance(const DefaultAppearance &default_appearance)
Constructor, with another DefaultAppearance object.
Definition: fs_annot.h:98
void SetCalloutLineEndingStyle(EndingStyle ending_style)
Set line ending style of the start point in a callout line.
void EnableCaption(bool cap)
Set the flag which is used to decide whether the content of current line annotation should be replica...
Definition: fs_annot.h:51
Annotation type: square annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:778
float cloud_intensity
Intensity of the cloudy effect.
Definition: fs_annot.h:410
~Caret()
Destructor.
Definition: fs_annot.h:3914
RGB GetStyleFillColor() const
Get fill color for ending styles.
EndingStyle GetLineEndStyle() const
Get line ending style of the end point.
void SetInkList(const common::Path &ink_list)
Set ink list data.
void SetFillColor(RGB fill_color)
Set fill color.
void SetHighlightingMode(HighlightingMode mode)
Set highlighting mode.
RectF GetInnerRect() const
Get the inner rectangle.
Underline()
Constructor.
Definition: fs_annot.h:2365
void SetMKIconCaptionRelation(MKIconCaptionRelation relation)
Set the relation of icon and caption in the MK dictionary.
Annotation property: creation date.
Definition: fs_annot.h:953
void Set(float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
Set value.
Definition: fs_annot.h:378
void SetMKDict(pdf::objects::PDFDictionary *dict)
Set the appearance characteristics dictionary (known as "MK" dictionary as well).
Definition: fs_annot.h:4113
RGB GetFillColor() const
Get fill color.
Definition: fs_annot.h:3708
WIDE STRING CLASS.
Definition: fx_string.h:1463
void SetOpenStatus(bool status)
Set open status.
Definition: fs_annot.h:2112
void SetAlignment(common::Alignment alignment)
Set alignment value.
Annotation type: movie annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:806
Annotation property: modified date.
Definition: fs_annot.h:947
actions::Action GetAction()
Get action.
DateTime GetModifiedDateTime() const
Get last modified date time.
Normal icon entry. "I" in MK dictionary.
Definition: fs_annot.h:1002
bool IsEmpty() const
Check whether current object is empty or not.
virtual ~Screen()
Destructor.
Definition: fs_annot.h:3542
void SetIconName(const char *icon_name)
Set icon name.
Caption below the icon.
Definition: fs_annot.h:1042
RGB GetStyleFillColor() const
Get fill color for some line ending styles.
RectF GetInnerRect() const
Get the inner rectangle.
bool operator==(const BorderInfo &border_info) const
Equal operator.
Definition: fs_annot.h:325
FileSpec GetFileSpec()
Get the file specification.
Annotation flag: no rotate.
Definition: fs_annot.h:874
void SetLineEndStyle(EndingStyle ending_style)
Set line ending style of the end point.
RGB GetFillColor() const
Get fill color.
RGB GetFillColor() const
Get fill color.
Annotation type: screen annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:814
bool operator==(const QuadPoints &quad_points) const
Equal operator.
Definition: fs_annot.h:491
void SetEndPoint(const PointF &point)
Set the end point.
RGB GetMKBackgroundColor() const
Get the background color in the MK dictionary.
objects::PDFDictionary * GetOptionalContent() const
Get the PDF dictionary of annotation's optional content.
bool IsMarkup() const
Check if current annotation is a markup annotation.
~StrikeOut()
Destructor.
Definition: fs_annot.h:2403
ScaleWayType scale_way_type
The circumstances under which the icon should be scaled inside the annotation rectangle....
Definition: fs_annot.h:696
~PolyLine()
Destructor.
Definition: fs_annot.h:3797
DefaultAppearance()
Constructor.
Definition: fs_annot.h:88
Annotation property: fill color.
Definition: fs_annot.h:964
DefaultAppearance(uint32 flags, const common::Font &font, float text_size, RGB text_color)
Constructor, with parameters.
Definition: fs_annot.h:81
ShadingColor(const ShadingColor &shading_color)
Constructor, with another ShadingColor object.
Definition: fs_annot.h:1388
Annotation property: border color.
Definition: fs_annot.h:957
Widget()
Constructor.
Definition: fs_annot.h:4116
float vertical_fraction
The vertical fraction of left-over space to allocate at the left and bottom of the icon.
Definition: fs_annot.h:715
void SetAction(const actions::Action &action)
Set action.
Definition: fs_pdfform.h:1062
Highlight()
Constructor.
Definition: fs_annot.h:2335
float horizontal_fraction
The horizontal fraction of left-over space to allocate at the left and bottom of the icon.
Definition: fs_annot.h:710
Annotation flag: toggle no view.
Definition: fs_annot.h:909
void SetFillColor(RGB fill_color)
Set fill color.
~Underline()
Destructor.
Definition: fs_annot.h:2373
Definition: fs_annot.h:3436
Definition: fs_annot.h:2954
Header file for image and bitmap related definitions and classes.
void SetBitmap(const common::Bitmap &bitmap)
Set bitmap to current stamp annotation.
void SetLeaderLineLength(float length)
Set the length of leader line.
Definition: fs_annot.h:4600
FreeText()
Constructor.
Definition: fs_annot.h:2713
BorderInfo & operator=(const BorderInfo &border_info)
Assign operator.
Definition: fs_annot.h:309
void Set(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
Set value.
Definition: fs_annot.h:683
ShadingColor(ARGB firstcolor, ARGB secondcolor)
Constructor, with parameters.
Definition: fs_annot.h:1374
String GetMeasureUnit(int measure_type)
Get the label for displaying the units for measuring.
Border style: Solid.
Definition: fs_annot.h:209
~Note()
Destructor.
Definition: fs_annot.h:2125
Type GetType() const
Get actual annotation type of current annotation.
Offset GetCaptionOffset() const
Get caption offset values.
Annotation flag: no zoom.
Definition: fs_annot.h:866
bool operator!=(const DefaultAppearance &default_appearance) const
Not equal operator.
Definition: fs_annot.h:139
Annotation's rollover appearance.
Definition: fs_annot.h:1062
bool operator!=(const Annot &other) const
Not equal operator.
IconFit(const IconFit &icon_fit)
Constructor, with another IconFit object.
Definition: fs_annot.h:605
float GetLeaderLineExtensionLength() const
Get the length of leader line extension.
MKEntry
Enumeration for annotation's MK dictionary (an appearance characteristics) entry.
Definition: fs_annot.h:972
void SetMeasureConversionFactor(int measure_type, float factor)
Set the conversion factor for measuring.
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:125
common::Rotation GetMKRotation() const
Get the rotation value in the MK dictionary.
String GetMeasureRatio()
Get the scale ratio string for measuring.
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
float GetOpacity() const
Get opacity value.
common::Path GetInkList()
Get ink list data.
Annotation's down appearance.
Definition: fs_annot.h:1064
uint32 flags
Flags to indicate which properties of DefaultAppearance are meaningful.
Definition: fs_annot.h:175
ARGB second_color
Second color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1443
void SetMeasureRatio(const String &ratio)
Set the scale ratio string for measuring.
Definition: fs_annot.h:2630
Highlighting mode: Invert, which is to invert the contents of the annotation rectangle.
Definition: fs_annot.h:929
Line()
Constructor.
Definition: fs_annot.h:2961
PointF GetEndPoint() const
Get the end point.
Annotation type: polygon annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:782
void SetMKIconFit(const IconFit &icon_fit)
Set the icon fit information in the MK dictionary.
uint32 GetFlags() const
Get annotation flags.
common::Bitmap GetMKDownIconBitmap()
Get the down icon bitmap in the MK dictionary.
Border style: Beveled.
Definition: fs_annot.h:233
Circle()
Constructor.
Definition: fs_annot.h:2633
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:209
void SetMKBorderColor(RGB color)
Set the border color in the MK dictionary.
Highlighting mode: Outline, which is to invert the annotation's border.
Definition: fs_annot.h:931
common::Font font
(Useful only when pdf::DefaultAppearance::flags includes DefaultAppearance::e_FlagFont) Font for defa...
Definition: fs_annot.h:181
void Set(ARGB firstcolor, ARGB secondcolor)
Set value.
Definition: fs_annot.h:1435
MKIconCaptionRelation GetMKIconCaptionRelation() const
Get the relation of icon and caption in the MK dictionary.
common::Rotation GetRotation()
Get the rotation of the image used for the appearance of current screen annotation.
bool Move(const RectF &rect)
Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.
void SetContent(const WString &content)
Set content.
EndingStyle GetLineStartStyle() const
Get line ending style of the start point.
bool is_proportional_scaling
A boolean value which indicates whether use proportional scaling or not.
Definition: fs_annot.h:705
bool GetOpenStatus() const
Get open status.
Definition: fs_annot.h:2392
common::Bitmap GetMKNormalIconBitmap()
Get the normal icon bitmap in the MK dictionary.
PointF fourth
Fourth point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:532
Popup()
Constructor.
Definition: fs_annot.h:4026
CFX_PointF PointF
Point information, in float.
Definition: fs_basictypes.h:353
Definition: fs_annot.h:3903
Definition: fs_annot.h:4085
Annot & operator=(const Annot &annot)
Assign operator.
Annotation type: widget annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:812
Annotation type: note annotation, which is just "Text" annotation - one of standard annotation in <PD...
Definition: fs_annot.h:770
virtual void Release()=0
A callback function used to release current IconProviderCallback object itself.
StateModel
Enumeration for markup annotation's state model.
Definition: fs_annot.h:1605
void SetQuadPoints(const QuadPointsArray &quad_points_array)
Set quadrilaterals.
~Squiggly()
Destructor.
Definition: fs_annot.h:2433
void SetAction(const actions::Action &action)
Set action.
~Polygon()
Destructor.
Definition: fs_annot.h:3719
Annotation type: ink annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:798
Annotation type: link annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:772
Border color entry. "BC" in MK dictionary.
Definition: fs_annot.h:976
bool fit_bounds
A boolean value that indicates whether to scale button appearance to fit fully within bounds or not.
Definition: fs_annot.h:722
pdf::objects::PDFDictionary * GetMKDict() const
Get the appearance characteristics dictionary (known as "MK" dictionary as well).
PointF second
Second point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:528
RGB GetFillColor() const
Get fill color.
Definition: fs_common.h:1453
void SetCaptionPositionType(CapPos cap_position)
Set the position type of caption.
virtual PDFPage GetIcon(Annot::Type annot_type, const char *icon_name, ARGB color)
A callback function used to get the icon as PDF page contents for a specified type.
void SetTitle(const WString &title)
Set title of current screen annotation.
EndingStyle
Enumeration for line ending style.
Definition: fs_annot.h:1664
Definition: fs_annot.h:3341
RGB GetMKBorderColor() const
Get the border color in the MK dictionary.
Caret()
Constructor.
Definition: fs_annot.h:3906
ScaleWayType
Enumeration for the type of icon scaling way.
Definition: fs_annot.h:549
Annotation flag: locked.
Definition: fs_annot.h:902
void SetRotation(common::Rotation rotate)
Set the rotation of the image used for the appearance of current screen annotation.
void SetVertexes(const PointFArray &vertexes)
Set vertexes.
~Ink()
Destructor.
Definition: fs_annot.h:3352
void SetMKNormalCaption(const wchar_t *caption)
Set the normal caption string in the MK dictionary.
Annotation type: pressure sensitive ink annotation.
Definition: fs_annot.h:800
QuadPoints & operator=(const QuadPoints &quad_points)
Assign operator.
Definition: fs_annot.h:476
void SetFillColor(RGB fill_color)
Set fill color.
Definition: fs_pdfform.h:145
void SetMKNormalIconBitmap(const common::Bitmap &bitmap)
Set a bitmap as normal icon in the MK dictionary.
Definition: fs_annot.h:2956
Rollover icon entry. "RI" in MK dictionary.
Definition: fs_annot.h:1008
void RemoveAction()
Remove action.
bool operator!=(const QuadPoints &quad_points) const
Not equal operator.
Definition: fs_annot.h:503
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
void SetMeasureUnit(int measure_type, const String &unit)
Set the label for displaying the units for measuring.
void SetImage(const common::Image &image, int frame_index, int compress)
Set image to current stamp annotation, with a specified frame index.
interform::Field GetField()
Get associated form field.
Definition: fs_pdfpage.h:306
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
CFX_ByteString String
Byte string.
Definition: fs_basictypes.h:220
Border style: Underline.
Definition: fs_annot.h:225
Property
Enumeration for some PDF annotation property.
Definition: fs_annot.h:943
Annotation flag: invisible.
Definition: fs_annot.h:842
Header file for common definitions and classes.
virtual ~Annot()
Destructor.
bool GetOpenStatus() const
Get open status.
Annotation type: trap network annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:818
common::Alignment GetAlignment() const
Get alignment value.
QuadPoints(const PointF &first, const PointF &second, const PointF &third, const PointF &fourth)
Constructor, with parameters.
Definition: fs_annot.h:447
Matrix GetTextMatrix() const
Get matrix in default appearance data for text in current free text annotation.
Definition: fs_annot.h:1578
EndingStyle GetLineEndStyle() const
Get line ending style of the end point.
PointF GetStartPoint() const
Get the start point.
float GetMeasureConversionFactor(int measure_type)
Get the conversion factor for measuring.
interform::Control GetControl()
Get associated form control.
void SetMKRolloverCaption(const wchar_t *caption)
Set the rollover caption string in the MK dictionary.
void SetImage(const common::Image &image, int frame_index, int compress)
Set image to current screen annotation, with a specified frame index.
Definition: fx_coordinates.h:458
common::Bitmap GetMKRolloverIconBitmap()
Get the rollover icon bitmap in the MK dictionary.
Annotation type: polyline annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:784
Ink()
Constructor.
Definition: fs_annot.h:3344
Caption overlaid directly on the icon.
Definition: fs_annot.h:1050
int GetIndex() const
Get the index of current annotation in the page which current annotation belongs to.
Alignment
Enumeration for alignment (horizontal).
Definition: fs_common.h:237
PointF third
Third point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:530
float text_size
(Useful only when pdf::DefaultAppearance::flags includes DefaultAppearance::e_FlagFontSize) Text size...
Definition: fs_annot.h:187
Definition: fs_annot.h:2710
void SetCalloutLinePoints(const PointFArray &point_array)
Set points for callout line.
Indicates property pdf::DefaultAppearance::font is meaningful.
Definition: fs_annot.h:60
Header file for PDF object related definitions and classes.
Highlighting mode: Toggle. This is only useful for widget annotation.
Definition: fs_annot.h:935
Definition: fs_basictypes.h:333
Annotation type: printer's mark annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:816
TextMarkup()
Constructor.
Definition: fs_annot.h:2269
void SetMKDownIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as down icon in the MK dictionary.
Highlighting mode: No highlighting.
Definition: fs_annot.h:927
Caption to the right of the icon.
Definition: fs_annot.h:1046
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
String GetIconName() const
Get icon name.
bool operator==(const Annot &other) const
Equal operator.
virtual bool CanChangeColor(Annot::Type annot_type, const char *icon_name)
A callback function used to check if current icon provider supports to change color for a specified t...
Definition: fs_annot.h:1507
WString GetMKRolloverCaption() const
Get the rollover caption string in the MK dictionary.
Definition: fs_filespec.h:24
DefaultAppearance & operator=(const DefaultAppearance &default_appearance)
Assign operator.
Definition: fs_annot.h:111
void SetOpacity(float opacity)
Set opacity value.
PointF first
First point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:526
HighlightingMode
Enumeration for PDF annotation highlighting mode.
Definition: fs_annot.h:925
FileAttachment()
Constructor.
Definition: fs_annot.h:3957
Annotation type: highlight annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:786
void SetOpenStatus(bool status)
Set open status.
void SetLineEndStyle(EndingStyle ending_style)
Set line ending style of the end point.
~BorderInfo()
Destructor.
Definition: fs_annot.h:287
Definition: fs_annot.h:756
QuadPoints(const QuadPoints &quad_points)
Constructor, with another QuadPoints object.
Definition: fs_annot.h:462
bool RemoveProperty(Property property)
Remove a specified annotation's property.
objects::PDFDictionary * GetDict() const
Get annotation's dictionary object.
Polygon()
Constructor.
Definition: fs_annot.h:3711
Indicates property pdf::DefaultAppearance::text_size is meaningful.
Definition: fs_annot.h:64
Annotation type: sound annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:804
Annotation type: strikeout annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:792
Definition: fs_common.h:1176
void SetStartPoint(const PointF &point)
Set the start point.
Definition: fs_pdfobject.h:762
RectI GetDeviceRect(bool is_transform_icon, const Matrix &matrix)
Get annotation rectangle in device coordinate system.
bool SetFileSpec(const FileSpec &file_spec)
Set a file specification, which should specify an embedded file.
Rotation
Enumeration for rotation.
Definition: fs_common.h:219
Icon fit information entry. "IF" in MK dictionary.
Definition: fs_annot.h:1020
PSInk()
Constructor.
Definition: fs_annot.h:4088
Foxit namespace.
Definition: fs_connectedpdf.h:26
virtual bool HasIcon(Annot::Type annot_type, const char *icon_name)
A callback function used to check if current icon provider supports icon for a specified type.
Definition: fs_annot.h:1494
Annotation type: underline annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:788
~PSInk()
Destructor.
Definition: fs_annot.h:4098
Definition: fs_action.h:424
RGB text_color
(Useful only when pdf::DefaultAppearance::flags includes DefaultAppearance::e_FlagTextColor) Text col...
Definition: fs_annot.h:193
Rotation entry. "R" in MK dictionary.
Definition: fs_annot.h:974
void SetMKDownCaption(const wchar_t *caption)
Set the down caption string in the MK dictionary.
BYTE STRING CLASS.
Definition: fx_string.h:317
WString GetMKDownCaption() const
Get the down caption string in the MK dictionary.
float GetLeaderLineLength() const
Get the length of leader line.
Annotation type: line annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:776
Squiggly()
Constructor.
Definition: fs_annot.h:2425
bool operator==(const DefaultAppearance &default_appearance) const
Equal operator.
Definition: fs_annot.h:126
Border style: Cloudy.
Definition: fs_annot.h:249
void SetMKBackgroundColor(RGB color)
Set the background color in the MK dictionary.
void RemoveMKEntry(MKEntry mk_entry)
Remove a specified entry from the MK dictionary.
void SetMKRotation(common::Rotation rotation)
Set the rotation value in the MK dictionary.
void SetVertexes(const PointFArray &vertexes)
Set vertexes.
AppearanceType
Enumeration for the type of annotation's appearance.
Definition: fs_annot.h:1058
float dash_phase
Dash phase.
Definition: fs_annot.h:417
Style style
Border style. Please refer to values starting from BorderInfo::e_Solid and this should be one of thes...
Definition: fs_annot.h:397
CapPos GetCaptionPositionType() const
Get the position type of caption.
Annotation type: caret annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:796
~Square()
Destructor.
Definition: fs_annot.h:2574
Definition: fs_annot.h:4023
void SetModifiedDateTime(const DateTime &date_time)
Set last modified date time.
Annotation type: 3D annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:822
bool SetDefaultAppearance(const DefaultAppearance &default_ap)
Set default appearance data.
Border style: Inset.
Definition: fs_annot.h:241
No icon; captin only.
Definition: fs_annot.h:1038
void SetBorderInfo(const BorderInfo &border)
Set border information.
~Circle()
Destructor.
Definition: fs_annot.h:2641
void SetApplyFillColor(RGB fill_color)
Set the filling color which is used for rollover appearance and will be used after redaction is appli...
EndingStyle GetCalloutLineEndingStyle() const
Get line ending style of the start point in a callout line.
Definition: fs_annot.h:3786
Flags
Enumeration for default appearance flags.
Definition: fs_annot.h:58
bool operator!=(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are not equal.
Definition: fs_basictypes.h:137
BorderInfo()
Constructor.
Definition: fs_annot.h:280
RectF GetInnerRect() const
Get the inner rectangle.
void SetLineStartStyle(EndingStyle ending_style)
Set line ending style of the start point.
Annotation type: watermark annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:820
String GetIconName() const
Get icon name.
EndingStyle GetLineStartStyle() const
Get line ending style of the start point.
void SetUniqueID(const WString &unique_id)
Set unique ID.
Definition: fx_coordinates.h:914
PointFArray GetVertexes()
Get vertexes.
void Set(uint32 flags, const common::Font &font, float text_size, RGB text_color)
Set value.
Definition: fs_annot.h:161
Definition: fs_annot.h:2945
RGB GetFillColor() const
Get fill color.
~FileAttachment()
Destructor.
Definition: fs_annot.h:3965
void SetLeaderLineExtensionLength(float extension_length)
Set the length of leader line extension.
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
Definition: fs_annot.h:437
RGB GetBorderColor() const
Get border color.
Definition: fs_annot.h:2422
String GetIconName() const
Get icon name.
virtual float GetDisplayWidth(Annot::Type annot_type, const char *icon_name)
A callback function used to get the width for display of a specified icon, in device size(pixel norma...
Definition: fs_annot.h:1552
virtual float GetDisplayHeight(Annot::Type annot_type, const char *icon_name)
A callback function used to get the height for display of a specified icon, in device size(pixel norm...
Definition: fs_annot.h:1568
Annotation type: circle annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:780
WString GetTitle() const
Get title of current screen annotation.
Caption to the left of the icon.
Definition: fs_annot.h:1048
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
CapPos
Enumeration for the position type of caption.
Definition: fs_annot.h:2952
Note()
Constructor.
Definition: fs_annot.h:2115
Stamp()
Constructor.
Definition: fs_annot.h:3439
ShadingColor()
Constructor.
Definition: fs_annot.h:1379
virtual String GetProviderID()
A callback function used to get provider ID.
Definition: fs_annot.h:1471
~Markup()
Destructor.
Definition: fs_annot.h:1704
void SetCaptionOffset(const Offset &offset)
Set caption offset values.
Definition: fs_annot.h:2332
Normal caption entry. "CA" in MK dictionary.
Definition: fs_annot.h:984
Down caption (or alternate caption) entry. "AC" in MK dictionary.
Definition: fs_annot.h:996
~TextMarkup()
Destructor.
Definition: fs_annot.h:2277
Background color entry. "BG" in MK dictionary.
Definition: fs_annot.h:978
void RemoveAction()
Remove action.
void SetMKDownIconBitmap(const common::Bitmap &bitmap)
Set the down icon bitmap in the MK dictionary.
RectF GetRect() const
Get rectangle, in PDF coordinate system.
QuadPoints()
Constructor.
Definition: fs_annot.h:455
Annotation flag: locked contents.
Definition: fs_annot.h:917
Annotation type: stamp annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:794
Definition: fs_image.h:426
Annotation flag: hidden.
Definition: fs_annot.h:849
Border style: Dashed.
Definition: fs_annot.h:217
void SetState(State state)
Set the state.
void SetStyleFillColor(RGB color)
Set fill color for ending styles.
bool ResetAppearanceStream()
Reset appearance stream.
Definition: fx_coordinates.h:627
void SetLeaderLineOffset(float offset)
Set the length of leader line offset.
Highlighting mode: Push, which is to display the annotation's down appearance, if any.
Definition: fs_annot.h:933
BorderInfo(float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
Constructor, with parameters.
Definition: fs_annot.h:271

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.