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
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
66
enum
HighlightingMode
67
{
68
e_none
,
69
e_invert
,
70
e_outline
,
71
e_push
,
72
e_toggle
73
};
74
83
HighlightingMode
GetHighlightingMode
()
const
;
84
94
void
SetHighlightingMode
(
HighlightingMode
mode=
e_invert
);
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
182
UString
GetStaticCaptionText
()
const
;
183
198
void
SetStaticCaptionText
(
const
UString
& contents);
199
207
UString
GetRolloverCaptionText
()
const
;
208
217
void
SetRolloverCaptionText
(
const
UString
& contents);
218
226
UString
GetMouseDownCaptionText
()
const
;
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
323
enum
IconCaptionRelation
324
{
325
e_NoIcon
,
326
e_NoCaption
,
327
e_CBelowI
,
328
e_CAboveI
,
329
e_CRightILeft
,
330
e_CLeftIRight
,
331
e_COverlayI
332
};
333
341
IconCaptionRelation
GetIconCaptionRelation
()
const
;
342
351
352
void
SetIconCaptionRelation
(
IconCaptionRelation
icr);
353
360
361
366
enum
ScaleCondition
367
{
368
e_Always
,
369
e_WhenBigger
,
370
e_WhenSmaller
,
371
e_Never
372
};
373
381
ScaleCondition
GetScaleCondition
()
const
;
382
390
void
SetScaleCondition
(
ScaleCondition
sd);
391
407
enum
ScaleType
408
{
409
e_Anamorphic
,
410
e_Proportional
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
528
ColorPt
GetTextColor
();
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
Annot.h
Font.h
PDFDoc.h
pdftron::PDF::Action
Definition
Action.h:32
pdftron::PDF::Annot::Annot
Annot(SDF::Obj d=0)
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::Widget::GetScaleType
ScaleType GetScaleType() const
pdftron::PDF::Annots::Widget::GetStaticCaptionText
UString GetStaticCaptionText() const
pdftron::PDF::Annots::Widget::SetHighlightingMode
void SetHighlightingMode(HighlightingMode mode=e_invert)
pdftron::PDF::Annots::Widget::SetRolloverIcon
void SetRolloverIcon(SDF::Obj icon)
pdftron::PDF::Annots::Widget::Widget
Widget(SDF::Obj d=0)
pdftron::PDF::Annots::Widget::SetBorderColor
void SetBorderColor(const ColorPt &col, int compnum)
pdftron::PDF::Annots::Widget::GetFont
Font GetFont() const
pdftron::PDF::Annots::Widget::ScaleCondition
ScaleCondition
Definition
Widget.h:367
pdftron::PDF::Annots::Widget::e_WhenBigger
@ e_WhenBigger
Scale only when the icon is bigger than the annotation rectangle.
Definition
Widget.h:369
pdftron::PDF::Annots::Widget::e_Never
@ e_Never
Never scale.
Definition
Widget.h:371
pdftron::PDF::Annots::Widget::e_Always
@ e_Always
Always scale.
Definition
Widget.h:368
pdftron::PDF::Annots::Widget::e_WhenSmaller
@ e_WhenSmaller
Scale only when the icon is smaller than the annotation rectangle.
Definition
Widget.h:370
pdftron::PDF::Annots::Widget::GetTextColorCompNum
int GetTextColorCompNum()
pdftron::PDF::Annots::Widget::SetFont
void SetFont(const Font &font)
pdftron::PDF::Annots::Widget::SetFitFull
void SetFitFull(bool ff)
pdftron::PDF::Annots::Widget::GetVIconLeftOver
double GetVIconLeftOver() const
pdftron::PDF::Annots::Widget::SetIconCaptionRelation
void SetIconCaptionRelation(IconCaptionRelation icr)
pdftron::PDF::Annots::Widget::SetFontSize
void SetFontSize(double font_size)
pdftron::PDF::Annots::Widget::GetMouseDownIcon
SDF::Obj GetMouseDownIcon() const
pdftron::PDF::Annots::Widget::HighlightingMode
HighlightingMode
Definition
Widget.h:67
pdftron::PDF::Annots::Widget::e_toggle
@ e_toggle
Same as e_push (which is preferred).
Definition
Widget.h:72
pdftron::PDF::Annots::Widget::e_outline
@ e_outline
Invert the annotation's border.
Definition
Widget.h:70
pdftron::PDF::Annots::Widget::e_none
@ e_none
No highlighting.
Definition
Widget.h:68
pdftron::PDF::Annots::Widget::e_invert
@ e_invert
Invert the contents of the annotation rectangle.
Definition
Widget.h:69
pdftron::PDF::Annots::Widget::e_push
@ e_push
Display the annotation's down appearance, if any. If no down appearance is defined,...
Definition
Widget.h:71
pdftron::PDF::Annots::Widget::GetField
Field GetField() const
pdftron::PDF::Annots::Widget::GetBorderColorCompNum
int GetBorderColorCompNum() const
pdftron::PDF::Annots::Widget::GetAction
Action GetAction() const
pdftron::PDF::Annots::Widget::GetHIconLeftOver
double GetHIconLeftOver() const
pdftron::PDF::Annots::Widget::SetVIconLeftOver
void SetVIconLeftOver(double vl)
pdftron::PDF::Annots::Widget::SetScaleType
void SetScaleType(ScaleType st)
pdftron::PDF::Annots::Widget::GetTextColor
ColorPt GetTextColor()
pdftron::PDF::Annots::Widget::GetFontSize
double GetFontSize() const
pdftron::PDF::Annots::Widget::SetHIconLeftOver
void SetHIconLeftOver(double hl)
pdftron::PDF::Annots::Widget::SetMouseDownIcon
void SetMouseDownIcon(SDF::Obj icon)
pdftron::PDF::Annots::Widget::SetRolloverCaptionText
void SetRolloverCaptionText(const UString &contents)
pdftron::PDF::Annots::Widget::GetBackgroundColorCompNum
int GetBackgroundColorCompNum() const
pdftron::PDF::Annots::Widget::SetStaticIcon
void SetStaticIcon(SDF::Obj icon)
pdftron::PDF::Annots::Widget::SetMouseDownCaptionText
void SetMouseDownCaptionText(const UString &contents)
pdftron::PDF::Annots::Widget::GetHighlightingMode
HighlightingMode GetHighlightingMode() const
pdftron::PDF::Annots::Widget::GetIconCaptionRelation
IconCaptionRelation GetIconCaptionRelation() const
pdftron::PDF::Annots::Widget::ScaleType
ScaleType
Definition
Widget.h:408
pdftron::PDF::Annots::Widget::e_Anamorphic
@ e_Anamorphic
Definition
Widget.h:409
pdftron::PDF::Annots::Widget::e_Proportional
@ e_Proportional
Definition
Widget.h:410
pdftron::PDF::Annots::Widget::IconCaptionRelation
IconCaptionRelation
Definition
Widget.h:324
pdftron::PDF::Annots::Widget::e_NoIcon
@ e_NoIcon
Definition
Widget.h:325
pdftron::PDF::Annots::Widget::e_CRightILeft
@ e_CRightILeft
Definition
Widget.h:329
pdftron::PDF::Annots::Widget::e_CLeftIRight
@ e_CLeftIRight
Definition
Widget.h:330
pdftron::PDF::Annots::Widget::e_CBelowI
@ e_CBelowI
Definition
Widget.h:327
pdftron::PDF::Annots::Widget::e_COverlayI
@ e_COverlayI
Definition
Widget.h:331
pdftron::PDF::Annots::Widget::e_CAboveI
@ e_CAboveI
Definition
Widget.h:328
pdftron::PDF::Annots::Widget::e_NoCaption
@ e_NoCaption
Definition
Widget.h:326
pdftron::PDF::Annots::Widget::SetBackgroundColor
void SetBackgroundColor(const ColorPt &c, int compnum)
pdftron::PDF::Annots::Widget::GetRolloverIcon
SDF::Obj GetRolloverIcon() const
pdftron::PDF::Annots::Widget::GetRolloverCaptionText
UString GetRolloverCaptionText() const
pdftron::PDF::Annots::Widget::GetFitFull
bool GetFitFull() const
pdftron::PDF::Annots::Widget::SetStaticCaptionText
void SetStaticCaptionText(const UString &contents)
pdftron::PDF::Annots::Widget::GetStaticIcon
SDF::Obj GetStaticIcon() const
pdftron::PDF::Annots::Widget::SetAction
void SetAction(const Action &action)
pdftron::PDF::Annots::Widget::GetScaleCondition
ScaleCondition GetScaleCondition() const
pdftron::PDF::Annots::Widget::Create
static Widget Create(SDF::SDFDoc &doc, const Rect &pos, Field field)
pdftron::PDF::Annots::Widget::SetTextColor
void SetTextColor(const ColorPt &color, int col_comp)
pdftron::PDF::Annots::Widget::SetScaleCondition
void SetScaleCondition(ScaleCondition sd)
pdftron::PDF::Annots::Widget::GetMouseDownCaptionText
UString GetMouseDownCaptionText() const
pdftron::PDF::Annots::Widget::GetBorderColor
ColorPt GetBorderColor() const
pdftron::PDF::Annots::Widget::Widget
Widget(const Annot &ann)
Definition
Widget.h:44
pdftron::PDF::Annots::Widget::GetBackgroundColor
ColorPt GetBackgroundColor() const
pdftron::PDF::ColorPt
Definition
ColorSpace.h:21
pdftron::PDF::Field
Definition
Field.h:70
pdftron::PDF::Font
Definition
Font.h:56
pdftron::PDF::Rect
Definition
Rect.h:29
pdftron::SDF::Obj
Definition
Obj.h:41
pdftron::SDF::SDFDoc
Definition
SDFDoc.h:68
pdftron::UString
Definition
UString.h:28
pdftron::PDF::Annots
Definition
Caret.h:12
pdftron::PDF
Definition
Action.h:15
pdftron
Definition
BasicTypes.h:10