All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Widget.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2024 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFAnnotsWidget
6 #define PDFTRON_H_CPPPDFAnnotsWidget
7 
8 #include <PDF/PDFDoc.h>
9 #include <PDF/Annot.h>
10 #include <PDF/Font.h>
11 
12 namespace pdftron {
13  namespace PDF {
14  namespace Annots {
15 
16 
26 class Widget : public Annot
27 {
28  public:
29 
36  Widget(SDF::Obj d = 0);
37 
44  Widget(const Annot& ann) : Annot(ann.GetSDFObj()) {}
45 
55  static Widget Create(SDF::SDFDoc& doc, const Rect& pos, Field field);
56 
61  Field GetField() const;
62 
67  {
73  };
74 
84 
95 
102  Action GetAction() const;
103 
111  void SetAction(const Action& action);
112 
121  int GetBorderColorCompNum() const;
122 
130  ColorPt GetBorderColor() const;
131 
139  void SetBorderColor(const ColorPt& col, int compnum);
140 
149  int GetBackgroundColorCompNum() const;
150 
158  ColorPt GetBackgroundColor() const;
159 
167  void SetBackgroundColor(const ColorPt& c, int compnum);
168 
183 
198  void SetStaticCaptionText(const UString& contents);
199 
208 
217  void SetRolloverCaptionText(const UString& contents);
218 
227 
236  void SetMouseDownCaptionText(const UString& contents);
237 
247  SDF::Obj GetStaticIcon() const;
248 
259  void SetStaticIcon(SDF::Obj icon);
260 
271  SDF::Obj GetRolloverIcon() const;
272 
284  void SetRolloverIcon(SDF::Obj icon);
285 
295  SDF::Obj GetMouseDownIcon() const;
296 
307  void SetMouseDownIcon(SDF::Obj icon);
308 
309 
324  {
332  };
333 
342 
353 
367  {
372  };
373 
382 
391 
408  {
411  };
412 
420  ScaleType GetScaleType() const;
421 
430  void SetScaleType(ScaleType st);
431 
432 
445  double GetHIconLeftOver() const;
446 
460  void SetHIconLeftOver(double hl);
461 
477  double GetVIconLeftOver() const;
478 
495  void SetVIconLeftOver(double vl);
496 
507  bool GetFitFull() const;
508 
519  void SetFitFull(bool ff);
520 
529 
537  int GetTextColorCompNum();
538 
546  void SetTextColor(const ColorPt& color, int col_comp);
547 
554  double GetFontSize() const;
555 
562  void SetFontSize(double font_size);
563 
569  Font GetFont() const;
570 
576  void SetFont(const Font& font);
577 
578  // @cond PRIVATE_DOC
579  #ifndef SWIGHIDDEN
580  Widget(TRN_Annot widget);
581  #endif
582  // @endcond
583 
584 }; //class Widget
585  }; //namespace Annot
586  }; //namespace PDF
587 }; //namespace pdftron
588 #include <Impl/Widget.inl>
589 
590 #endif // PDFTRON_H_CPPPDFAnnotsWidget
SDF::Obj GetStaticIcon() const
SDF::Obj GetSDFObj() const
UString GetStaticCaptionText() const
Same as e_push (which is preferred).
Definition: Widget.h:72
void SetHighlightingMode(HighlightingMode mode=e_invert)
Invert the contents of the annotation rectangle.
Definition: Widget.h:69
Scale only when the icon is smaller than the annotation rectangle.
Definition: Widget.h:370
void SetRolloverCaptionText(const UString &contents)
void SetHIconLeftOver(double hl)
void SetIconCaptionRelation(IconCaptionRelation icr)
void SetStaticCaptionText(const UString &contents)
void SetBorderColor(const ColorPt &col, int compnum)
Invert the annotation&#39;s border.
Definition: Widget.h:70
static Widget Create(SDF::SDFDoc &doc, const Rect &pos, Field field)
void SetTextColor(const ColorPt &color, int col_comp)
void SetScaleCondition(ScaleCondition sd)
ScaleCondition GetScaleCondition() const
void SetFontSize(double font_size)
ColorPt GetBorderColor() const
Widget(const Annot &ann)
Definition: Widget.h:44
void SetScaleType(ScaleType st)
SDF::Obj GetMouseDownIcon() const
void SetStaticIcon(SDF::Obj icon)
HighlightingMode GetHighlightingMode() const
ColorPt GetBackgroundColor() const
void SetAction(const Action &action)
UString GetMouseDownCaptionText() const
int GetBackgroundColorCompNum() const
void SetVIconLeftOver(double vl)
void SetRolloverIcon(SDF::Obj icon)
void SetFont(const Font &font)
Scale only when the icon is bigger than the annotation rectangle.
Definition: Widget.h:369
void SetMouseDownCaptionText(const UString &contents)
double GetHIconLeftOver() const
Display the annotation&#39;s down appearance, if any. If no down appearance is defined, the contents of the annotation rectangle shall be offset to appear as if it were being pushed below the surface of the page.
Definition: Widget.h:71
SDF::Obj GetRolloverIcon() const
IconCaptionRelation GetIconCaptionRelation() const
void SetMouseDownIcon(SDF::Obj icon)
double GetVIconLeftOver() const
int GetBorderColorCompNum() const
void SetBackgroundColor(const ColorPt &c, int compnum)
UString GetRolloverCaptionText() const
ScaleType GetScaleType() const