Main Page
Namespaces
Classes
Files
File List
File Members
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
59
enum
HighlightingMode
60
{
61
e_none
,
62
e_invert
,
63
e_outline
,
64
e_push
,
65
e_toggle
66
};
67
76
HighlightingMode
GetHighlightingMode
()
const
;
77
87
void
SetHighlightingMode
(
HighlightingMode
mode=
e_invert
);
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
175
UString
GetStaticCaptionText
()
const
;
176
191
void
SetStaticCaptionText
(
const
UString
& contents);
192
200
UString
GetRolloverCaptionText
()
const
;
201
210
void
SetRolloverCaptionText
(
const
UString
& contents);
211
219
UString
GetMouseDownCaptionText
()
const
;
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
316
enum
IconCaptionRelation
317
{
318
e_NoIcon
,
319
e_NoCaption
,
320
e_CBelowI
,
321
e_CAboveI
,
322
e_CRightILeft
,
323
e_CLeftIRight
,
324
e_COverlayI
325
};
326
334
IconCaptionRelation
GetIconCaptionRelation
()
const
;
335
345
void
SetIconCaptionRelation
(
IconCaptionRelation
icr);
346
359
enum
ScaleCondition
360
{
361
e_Always
,
362
e_WhenBigger
,
363
e_WhenSmaller
,
364
e_Never
365
};
366
374
ScaleCondition
GetScaleCondition
()
const
;
375
383
void
SetScaleCondition
(
ScaleCondition
sd);
384
400
enum
ScaleType
401
{
402
e_Anamorphic
,
403
e_Proportional
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
pdftron::PDF::Annots::Widget::e_CBelowI
Definition:
Widget.h:320
pdftron::PDF::Annots::Widget::GetStaticIcon
SDF::Obj GetStaticIcon() const
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::Widget::GetStaticCaptionText
UString GetStaticCaptionText() const
pdftron::PDF::Annots::Widget::e_toggle
Same as e_push (which is preferred).
Definition:
Widget.h:65
pdftron::PDF::Annots::Widget::e_COverlayI
Definition:
Widget.h:324
pdftron::PDF::Annots::Widget::SetHighlightingMode
void SetHighlightingMode(HighlightingMode mode=e_invert)
pdftron::PDF::Annots::Widget::e_invert
Invert the contents of the annotation rectangle.
Definition:
Widget.h:62
pdftron::PDF::Annots::Widget::e_WhenSmaller
Scale only when the icon is smaller than the annotation rectangle.
Definition:
Widget.h:363
pdftron::PDF::Annots::Widget::e_CLeftIRight
Definition:
Widget.h:323
pdftron::PDF::Annots::Widget::SetRolloverCaptionText
void SetRolloverCaptionText(const UString &contents)
pdftron::PDF::Annots::Widget::Widget
Widget(SDF::Obj d=0)
pdftron::PDF::Annots::Widget::SetHIconLeftOver
void SetHIconLeftOver(double hl)
pdftron::PDF::Annots::Widget::SetIconCaptionRelation
void SetIconCaptionRelation(IconCaptionRelation icr)
pdftron::PDF::ColorPt
Definition:
ColorSpace.h:20
pdftron::PDF::Annots::Widget::e_Never
Never scale.
Definition:
Widget.h:364
pdftron::PDF::Annots::Widget::SetStaticCaptionText
void SetStaticCaptionText(const UString &contents)
pdftron::PDF::Annots::Widget::e_Proportional
Definition:
Widget.h:403
pdftron::PDF::Annots::Widget::SetBorderColor
void SetBorderColor(const ColorPt &col, int compnum)
pdftron::PDF::Annots::Widget::e_outline
Invert the annotation's border.
Definition:
Widget.h:63
pdftron::PDF::Annots::Widget::ScaleCondition
ScaleCondition
Definition:
Widget.h:359
pdftron::PDF::Annots::Widget::Create
static Widget Create(SDF::SDFDoc &doc, const Rect &pos, Field field)
pdftron::PDF::Annots::Widget::SetScaleCondition
void SetScaleCondition(ScaleCondition sd)
pdftron::PDF::Rect
Definition:
Rect.h:28
pdftron::PDF::Annots::Widget::GetScaleCondition
ScaleCondition GetScaleCondition() const
pdftron::PDF::Annots::Widget::GetBorderColor
ColorPt GetBorderColor() const
pdftron::PDF::Annots::Widget::Widget
Widget(const Annot &ann)
Definition:
Widget.h:37
pdftron::PDF::Annots::Widget
Definition:
Widget.h:19
pdftron::PDF::Annots::Widget::SetScaleType
void SetScaleType(ScaleType st)
pdftron::PDF::Annots::Widget::GetMouseDownIcon
SDF::Obj GetMouseDownIcon() const
pdftron::SDF::SDFDoc
Definition:
SDFDoc.h:67
pdftron::PDF::Annots::Widget::SetStaticIcon
void SetStaticIcon(SDF::Obj icon)
pdftron::PDF::Annots::Widget::GetHighlightingMode
HighlightingMode GetHighlightingMode() const
pdftron::PDF::Annots::Widget::GetBackgroundColor
ColorPt GetBackgroundColor() const
pdftron::PDF::Annots::Widget::SetAction
void SetAction(const Action &action)
pdftron::PDF::Annots::Widget::e_Always
Always scale.
Definition:
Widget.h:361
pdftron::PDF::Annots::Widget::e_NoCaption
Definition:
Widget.h:319
pdftron::PDF::Annots::Widget::GetMouseDownCaptionText
UString GetMouseDownCaptionText() const
pdftron::PDF::Annots::Widget::GetBackgroundColorCompNum
int GetBackgroundColorCompNum() const
pdftron::PDF::Annots::Widget::SetVIconLeftOver
void SetVIconLeftOver(double vl)
pdftron::PDF::Annots::Widget::SetRolloverIcon
void SetRolloverIcon(SDF::Obj icon)
pdftron::PDF::Annots::Widget::HighlightingMode
HighlightingMode
Definition:
Widget.h:59
pdftron::PDF::Annots::Widget::e_WhenBigger
Scale only when the icon is bigger than the annotation rectangle.
Definition:
Widget.h:362
pdftron::PDF::Annots::Widget::SetMouseDownCaptionText
void SetMouseDownCaptionText(const UString &contents)
pdftron::PDF::Annots::Widget::e_NoIcon
Definition:
Widget.h:318
pdftron::PDF::Annots::Widget::e_Anamorphic
Definition:
Widget.h:402
pdftron::PDF::Annots::Widget::GetAction
Action GetAction() const
pdftron::PDF::Annot
Definition:
Annot.h:32
pdftron::PDF::Annots::Widget::GetField
Field GetField() const
pdftron::PDF::Annots::Widget::GetHIconLeftOver
double GetHIconLeftOver() const
pdftron::PDF::Annots::Widget::e_none
No highlighting.
Definition:
Widget.h:61
pdftron::PDF::Annots::Widget::e_push
Display the annotation'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
pdftron::PDF::Annots::Widget::SetFitFull
void SetFitFull(bool ff)
pdftron::PDF::Action
Definition:
Action.h:29
pdftron::PDF::Annots::Widget::IconCaptionRelation
IconCaptionRelation
Definition:
Widget.h:316
pdftron::PDF::Annots::Widget::GetRolloverIcon
SDF::Obj GetRolloverIcon() const
pdftron::PDF::Field
Definition:
Field.h:67
pdftron::PDF::Annots::Widget::ScaleType
ScaleType
Definition:
Widget.h:400
pdftron::PDF::Annots::Widget::GetIconCaptionRelation
IconCaptionRelation GetIconCaptionRelation() const
pdftron::SDF::Obj
Definition:
Obj.h:40
pdftron::PDF::Annots::Widget::e_CRightILeft
Definition:
Widget.h:322
pdftron::PDF::Annots::Widget::SetMouseDownIcon
void SetMouseDownIcon(SDF::Obj icon)
pdftron::PDF::Annots::Widget::GetVIconLeftOver
double GetVIconLeftOver() const
pdftron::PDF::Annots::Widget::GetFitFull
bool GetFitFull() const
Annot.h
pdftron::PDF::Annots::Widget::e_CAboveI
Definition:
Widget.h:321
pdftron::PDF::Annots::Widget::GetBorderColorCompNum
int GetBorderColorCompNum() const
pdftron::PDF::Annots::Widget::SetBackgroundColor
void SetBackgroundColor(const ColorPt &c, int compnum)
pdftron::UString
Definition:
UString.h:26
pdftron::PDF::Annots::Widget::GetRolloverCaptionText
UString GetRolloverCaptionText() const
pdftron::PDF::Annots::Widget::GetScaleType
ScaleType GetScaleType() const
© 2002-2014
PDFTron Systems Inc.