Loading...
Searching...
No Matches
Widget.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 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
12namespace pdftron {
13 namespace PDF {
14 namespace Annots {
15
16
26class Widget : public Annot
27{
28 public:
29
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
74
84
95
103
111 void SetAction(const Action& action);
112
122
131
139 void SetBorderColor(const ColorPt& col, int compnum);
140
150
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
248
260
272
285
296
308
309
333
342
351
353
360
361
373
382
391
412
421
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
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
Annot(SDF::Obj d=0)
SDF::Obj GetSDFObj() const
ScaleType GetScaleType() const
UString GetStaticCaptionText() const
void SetHighlightingMode(HighlightingMode mode=e_invert)
void SetRolloverIcon(SDF::Obj icon)
void SetBorderColor(const ColorPt &col, int compnum)
@ e_WhenBigger
Scale only when the icon is bigger than the annotation rectangle.
Definition Widget.h:369
@ e_Always
Always scale.
Definition Widget.h:368
@ e_WhenSmaller
Scale only when the icon is smaller than the annotation rectangle.
Definition Widget.h:370
void SetFont(const Font &font)
double GetVIconLeftOver() const
void SetIconCaptionRelation(IconCaptionRelation icr)
void SetFontSize(double font_size)
SDF::Obj GetMouseDownIcon() const
@ e_toggle
Same as e_push (which is preferred).
Definition Widget.h:72
@ e_outline
Invert the annotation's border.
Definition Widget.h:70
@ e_none
No highlighting.
Definition Widget.h:68
@ e_invert
Invert the contents of the annotation rectangle.
Definition Widget.h:69
@ e_push
Display the annotation's down appearance, if any. If no down appearance is defined,...
Definition Widget.h:71
double GetHIconLeftOver() const
void SetVIconLeftOver(double vl)
void SetScaleType(ScaleType st)
void SetHIconLeftOver(double hl)
void SetMouseDownIcon(SDF::Obj icon)
void SetRolloverCaptionText(const UString &contents)
int GetBackgroundColorCompNum() const
void SetStaticIcon(SDF::Obj icon)
void SetMouseDownCaptionText(const UString &contents)
HighlightingMode GetHighlightingMode() const
IconCaptionRelation GetIconCaptionRelation() const
void SetBackgroundColor(const ColorPt &c, int compnum)
SDF::Obj GetRolloverIcon() const
UString GetRolloverCaptionText() const
void SetStaticCaptionText(const UString &contents)
SDF::Obj GetStaticIcon() const
void SetAction(const Action &action)
ScaleCondition GetScaleCondition() const
static Widget Create(SDF::SDFDoc &doc, const Rect &pos, Field field)
void SetTextColor(const ColorPt &color, int col_comp)
void SetScaleCondition(ScaleCondition sd)
UString GetMouseDownCaptionText() const
ColorPt GetBorderColor() const
Widget(const Annot &ann)
Definition Widget.h:44
ColorPt GetBackgroundColor() const