![]() |
#include <Widget.h>
Public Types | |
enum | HighlightingMode { e_none, e_invert, e_outline, e_push, e_toggle } |
This enum specifies the Highlighting mode of the widget annotation. More... | |
enum | IconCaptionRelation { e_NoIcon, e_NoCaption, e_CBelowI, e_CAboveI, e_CRightILeft, e_CLeftIRight, e_COverlayI } |
An enumeration indicating where to position the text of the annotation’s caption relative to its icon. More... | |
enum | ScaleCondition { e_Always, e_WhenBigger, e_WhenSmaller, e_Never } |
This enum represents the circumstances under which the icon shall be scaled inside the annotation rectangle . More... | |
enum | ScaleType { e_Anamorphic, e_Proportional } |
This enum represents the scale type of the annotation. More... | |
Public Member Functions | |
Widget (SDF::Obj d=0) | |
Creates a widget annotation and initializes it using given Cos/SDF object. | |
Widget (const Annot &ann) | |
Creates a widget annotation and initializes it using given annotation object. | |
Field | GetField () const |
Returns the field associated with the Widget. | |
HighlightingMode | GetHighlightingMode () const |
void | SetHighlightingMode (HighlightingMode mode=e_invert) |
Sets the HighlightingMode for the widget annotation. | |
Action | GetAction () const |
Returns the action of the widget annotation. | |
void | SetAction (const Action &action) |
Sets the action of the widget annotation (Optional; PDF 1.2 ). | |
SDF::Obj | GetTriggerAction () const |
Returns the additional actions of the annotation. | |
void | SetTriggerAction (SDF::Obj action) |
Assigns additional actions to the annotation (Optional; PDF 1.1 ). | |
int | GetRotation () const |
Returns the rotation value of the annotation. | |
void | SetRotation (int rot) |
Sets the rotation value of the annotation. | |
int | GetBorderColorCompNum () const |
Returns the number indicating border color space of the annotation. | |
ColorPt | GetBorderColor () const |
Returns the border color of the annotation. | |
void | SetBorderColor (const ColorPt &c, int CompNum) |
Sets the border color of the annotation. | |
int | GetBackgroundColorCompNum () const |
Returns the number indicating background color space of the annotation. | |
ColorPt | GetBackgroundColor () const |
Returns the background color of the annotation. | |
void | SetBackgroundColor (const ColorPt &c, int CompNum) |
Sets the background color of the annotation. | |
UString | GetStaticCaptionText () const |
Returns static caption text of the annotation. | |
void | SetStaticCaptionText (const UString &ct) |
Sets static caption text of the annotation. | |
UString | GetRolloverCaptionText () const |
Returns the rollover caption text of the annotation. | |
void | SetRolloverCaptionText (const UString &ct) |
Sets the roll over caption text of the annotation. | |
UString | GetMouseDownCaptionText () const |
Returns the button down caption text of the annotation. | |
void | SetMouseDownCaptionText (const UString &ct) |
Sets the button down caption text of the annotation. | |
SDF::Obj | GetStaticIcon () const |
Returns the static icon associated with the annotation. | |
void | SetStaticIcon (SDF::Obj ic) |
Sets the static icon associated with the annotation. | |
SDF::Obj | GetRolloverIcon () const |
Returns the rollover icon associated with the annotation. | |
void | SetRolloverIcon (SDF::Obj ic) |
Sets the rollover icon associated with the annotation. | |
SDF::Obj | GetMouseDownIcon () const |
Returns the Mouse Down icon associated with the annotation. | |
void | SetMouseDownIcon (SDF::Obj ic) |
Sets the Mouse Down icon associated with the annotation. | |
IconCaptionRelation | GetIconCaptionRelation () const |
Returns the Icon and caption relationship of the annotation. | |
void | SetIconCaptionRelation (IconCaptionRelation icr) |
Sets the Icon and caption relationship of the annotation. | |
ScaleCondition | GetScaleCondition () const |
Returns the condition under which the icon should be scaled. | |
void | SetScaleCondition (ScaleCondition sd) |
Sets the condition under which the icon should be scaled. | |
ScaleType | GetScaleType () const |
Returns the Scale Type of the annotation. | |
void | SetScaleType (ScaleType st) |
Sets the Scale Type of the annotation. | |
double | GetHIconLeftOver () const |
Returns the horizontal leftover space of the icon within the annotation. | |
void | SetHIconLeftOver (double hl) |
Sets the horizontal leftover space of the icon within the annotation. | |
double | GetVIconLeftOver () const |
Returns the vertical leftover space of the icon within the annotation. | |
void | SetVIconLeftOver (double vl) |
Sets the vertical leftover space of the icon within the annotation. | |
bool | GetFitFull () const |
Returns the "fit full" flag. | |
void | SetFitFull (bool ff) |
Sets the "fit full" flag. | |
Static Public Member Functions | |
static Widget | Create (SDF::SDFDoc &doc, const Rect &pos, Field field) |
Creates a new widget annotation in the specified document. |
This enum specifies the Highlighting mode of the widget annotation.
An enumeration indicating where to position the text of the annotation’s caption relative to its icon.
e_NoIcon - No icon; caption only e_NoCaption - No caption; icon only e_CBelowI - Caption below the icon e_CAboveI - Caption above the icon e_CRightILeft - Caption to the right of the icon e_CLeftIRight - Caption to the left of the icon e_COverlayI - Caption overlaid directly on the icon Default value: e_NoIcon.
This enum represents the circumstances under which the icon shall be scaled inside the annotation rectangle .
This enum represents the scale type of the annotation.
e_Anamorphic - Scale the icon to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). e_Proportional - Scale the icon to fit the width or height of the annotation rectangle while maintaining the icon’s original aspect ratio. If the required horizontal and vertical scaling factors are different, use the smaller of the two, centering the icon within the annotation rectangle in the other dimension. Default value: e_Proportional.
pdftron::PDF::Annots::Widget::Widget | ( | SDF::Obj | d = 0 |
) |
Creates a widget annotation and initializes it using given Cos/SDF object.
pdftron::PDF::Annots::Widget::Widget | ( | const Annot & | ann | ) | [inline] |
Creates a widget annotation and initializes it using given annotation object.
static Widget pdftron::PDF::Annots::Widget::Create | ( | SDF::SDFDoc & | doc, | |
const Rect & | pos, | |||
Field | field | |||
) | [static] |
Creates a new widget annotation in the specified document.
doc | A document to which the annotation is added. | |
pos | A rectangle specifying the annotation's bounds in default user space units. | |
field | A form field associated with this widget. |
Field pdftron::PDF::Annots::Widget::GetField | ( | ) | const |
HighlightingMode pdftron::PDF::Annots::Widget::GetHighlightingMode | ( | ) | const |
A highlighting mode other than e_push will override any down appearance defined for the annotation. e_invert.
void pdftron::PDF::Annots::Widget::SetHighlightingMode | ( | HighlightingMode | mode = e_invert |
) |
Sets the HighlightingMode for the widget annotation.
mode | - New highlighting mode for the widget. |
Action pdftron::PDF::Annots::Widget::GetAction | ( | ) | const |
Returns the action of the widget annotation.
void pdftron::PDF::Annots::Widget::SetAction | ( | const Action & | action | ) |
Sets the action of the widget annotation (Optional; PDF 1.2 ).
action | An action object representing the action of the widget annotation that should be performed when the annotation is activated. |
SDF::Obj pdftron::PDF::Annots::Widget::GetTriggerAction | ( | ) | const |
Returns the additional actions of the annotation.
void pdftron::PDF::Annots::Widget::SetTriggerAction | ( | SDF::Obj | action | ) |
Assigns additional actions to the annotation (Optional; PDF 1.1 ).
action | An SDF dictionary object representing the actions of the annotation. |
int pdftron::PDF::Annots::Widget::GetRotation | ( | ) | const |
Returns the rotation value of the annotation.
void pdftron::PDF::Annots::Widget::SetRotation | ( | int | rot | ) |
Sets the rotation value of the annotation.
(Optional)
rot | An integer representing the rotation value of the annotation. |
int pdftron::PDF::Annots::Widget::GetBorderColorCompNum | ( | ) | const |
Returns the number indicating border color space of the annotation.
ColorPt pdftron::PDF::Annots::Widget::GetBorderColor | ( | ) | const |
Returns the border color of the annotation.
void pdftron::PDF::Annots::Widget::SetBorderColor | ( | const ColorPt & | c, | |
int | CompNum | |||
) |
Sets the border color of the annotation.
(Optional)
c | A color object that denotes the color of the screen border. | |
CompNum | An integer which value indicates the color space used for the parameter c. |
int pdftron::PDF::Annots::Widget::GetBackgroundColorCompNum | ( | ) | const |
Returns the number indicating background color space of the annotation.
ColorPt pdftron::PDF::Annots::Widget::GetBackgroundColor | ( | ) | const |
Returns the background color of the annotation.
void pdftron::PDF::Annots::Widget::SetBackgroundColor | ( | const ColorPt & | c, | |
int | CompNum | |||
) |
Sets the background color of the annotation.
(Optional)
c | A color point that denotes the color of the screen background. | |
CompNum | An integer which value indicates the color space used for the parameter c. |
UString pdftron::PDF::Annots::Widget::GetStaticCaptionText | ( | ) | const |
Returns static caption text of the annotation.
This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.
void pdftron::PDF::Annots::Widget::SetStaticCaptionText | ( | const UString & | ct | ) |
Sets static caption text of the annotation.
(Optional; button fields only)
ct | A string containing the static caption text of the annotation. |
This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.
UString pdftron::PDF::Annots::Widget::GetRolloverCaptionText | ( | ) | const |
Returns the rollover caption text of the annotation.
void pdftron::PDF::Annots::Widget::SetRolloverCaptionText | ( | const UString & | ct | ) |
Sets the roll over caption text of the annotation.
(Optional; button fields only)
ct | A string containing the roll over caption text of the annotation. |
UString pdftron::PDF::Annots::Widget::GetMouseDownCaptionText | ( | ) | const |
Returns the button down caption text of the annotation.
void pdftron::PDF::Annots::Widget::SetMouseDownCaptionText | ( | const UString & | ct | ) |
Sets the button down caption text of the annotation.
(Optional; button fields only)
ct | A string containing the button down text of the annotation. |
SDF::Obj pdftron::PDF::Annots::Widget::GetStaticIcon | ( | ) | const |
Returns the static icon associated with the annotation.
void pdftron::PDF::Annots::Widget::SetStaticIcon | ( | SDF::Obj | ic | ) |
Sets the static icon associated with the annotation.
(Optional; button fields only)
ic | An SDF object that represents the static icon associated with the annotation. |
SDF::Obj pdftron::PDF::Annots::Widget::GetRolloverIcon | ( | ) | const |
Returns the rollover icon associated with the annotation.
void pdftron::PDF::Annots::Widget::SetRolloverIcon | ( | SDF::Obj | ic | ) |
Sets the rollover icon associated with the annotation.
(Optional; button fields only)
ic | An SDF object that represents the rollover icon associated with the annotation. |
SDF::Obj pdftron::PDF::Annots::Widget::GetMouseDownIcon | ( | ) | const |
Returns the Mouse Down icon associated with the annotation.
void pdftron::PDF::Annots::Widget::SetMouseDownIcon | ( | SDF::Obj | ic | ) |
Sets the Mouse Down icon associated with the annotation.
(Optional; button fields only)
ic | An SDF object that represents the Mouse Down icon associated with the annotation. |
IconCaptionRelation pdftron::PDF::Annots::Widget::GetIconCaptionRelation | ( | ) | const |
Returns the Icon and caption relationship of the annotation.
void pdftron::PDF::Annots::Widget::SetIconCaptionRelation | ( | IconCaptionRelation | icr | ) |
Sets the Icon and caption relationship of the annotation.
(Optional; pushbutton fields only)
icr | A value of the "IconCaptionRelation" enum type. Default value: e_NoIcon. |
ScaleCondition pdftron::PDF::Annots::Widget::GetScaleCondition | ( | ) | const |
Returns the condition under which the icon should be scaled.
void pdftron::PDF::Annots::Widget::SetScaleCondition | ( | ScaleCondition | sd | ) |
Sets the condition under which the icon should be scaled.
(Optional)
sd | A value of the "ScaleCondition" enum type. Default value: e_Always. |
ScaleType pdftron::PDF::Annots::Widget::GetScaleType | ( | ) | const |
Returns the Scale Type of the annotation.
void pdftron::PDF::Annots::Widget::SetScaleType | ( | ScaleType | st | ) |
Sets the Scale Type of the annotation.
(Optional)
st | An entry of the "ScaleType" enum which represents the Scale Type of the annotation. Default value: P. |
double pdftron::PDF::Annots::Widget::GetHIconLeftOver | ( | ) | const |
Returns the horizontal leftover space of the icon within the annotation.
void pdftron::PDF::Annots::Widget::SetHIconLeftOver | ( | double | hl | ) |
Sets the horizontal leftover space of the icon within the annotation.
(Optional)
hl | A number indicating the horizontal leftover space of the icon within the annotation. |
double pdftron::PDF::Annots::Widget::GetVIconLeftOver | ( | ) | const |
Returns the vertical leftover space of the icon within the annotation.
void pdftron::PDF::Annots::Widget::SetVIconLeftOver | ( | double | vl | ) |
Sets the vertical leftover space of the icon within the annotation.
(Optional)
vl | A number indicating the vertical leftover space of the icon within the annotation. |
bool pdftron::PDF::Annots::Widget::GetFitFull | ( | ) | const |
Returns the "fit full" flag.
void pdftron::PDF::Annots::Widget::SetFitFull | ( | bool | ff | ) |
Sets the "fit full" flag.
(Optional)
ff | A boolean value indicating the "fit full" flag value. |