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-2018 by PDFTron Systems 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/Annot.h>
9 
10 namespace pdftron {
11  namespace PDF {
12  namespace Annots {
13 
14 
19 class Widget : public Annot
20 {
21  public:
22 
29  Widget(SDF::Obj d = 0);
30 
37  Widget(const Annot& ann) : Annot(ann.GetSDFObj()) {}
38 
48  static Widget Create(SDF::SDFDoc& doc, const Rect& pos, Field field);
49 
54  Field GetField() const;
55 
60  {
66  };
67 
77 
88 
95  Action GetAction() const;
96 
104  void SetAction(const Action& action);
105 
114  int GetBorderColorCompNum() const;
115 
123  ColorPt GetBorderColor() const;
124 
132  void SetBorderColor(const ColorPt& col, int compnum);
133 
142  int GetBackgroundColorCompNum() const;
143 
151  ColorPt GetBackgroundColor() const;
152 
160  void SetBackgroundColor(const ColorPt& c, int compnum);
161 
176 
191  void SetStaticCaptionText(const UString& contents);
192 
201 
210  void SetRolloverCaptionText(const UString& contents);
211 
220 
229  void SetMouseDownCaptionText(const UString& contents);
230 
240  SDF::Obj GetStaticIcon() const;
241 
252  void SetStaticIcon(SDF::Obj icon);
253 
264  SDF::Obj GetRolloverIcon() const;
265 
277  void SetRolloverIcon(SDF::Obj icon);
278 
288  SDF::Obj GetMouseDownIcon() const;
289 
300  void SetMouseDownIcon(SDF::Obj icon);
301 
302 
317  {
325  };
326 
335 
346 
360  {
365  };
366 
375 
384 
401  {
404  };
405 
413  ScaleType GetScaleType() const;
414 
423  void SetScaleType(ScaleType st);
424 
425 
438  double GetHIconLeftOver() const;
439 
453  void SetHIconLeftOver(double hl);
454 
470  double GetVIconLeftOver() const;
471 
488  void SetVIconLeftOver(double vl);
489 
500  bool GetFitFull() const;
501 
512  void SetFitFull(bool ff);
513 
515  #ifndef SWIGHIDDEN
516  Widget(TRN_Annot widget);
517  #endif
518 
520 }; //class Widget
521  }; //namespace Annot
522  }; //namespace PDF
523 }; //namespace pdftron
524 #include <Impl/Widget.inl>
525 
526 #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:65
void SetHighlightingMode(HighlightingMode mode=e_invert)
Invert the contents of the annotation rectangle.
Definition: Widget.h:62
Scale only when the icon is smaller than the annotation rectangle.
Definition: Widget.h:363
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:63
static Widget Create(SDF::SDFDoc &doc, const Rect &pos, Field field)
void SetScaleCondition(ScaleCondition sd)
ScaleCondition GetScaleCondition() const
ColorPt GetBorderColor() const
Widget(const Annot &ann)
Definition: Widget.h:37
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)
Scale only when the icon is bigger than the annotation rectangle.
Definition: Widget.h:362
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:64
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

© 2002-2014 PDFTron Systems Inc.