#include <Widget.h>
Static Public Member Functions | |
static Widget | Create (SDF::SDFDoc &doc, const Rect &pos, Field field) |
Static Public Member Functions inherited from pdftron::PDF::Annot | |
static Annot | Create (SDF::SDFDoc &doc, Type type, const Rect &pos) |
static Annot * | CreateInternal (ptrdiff_t impl) |
Interactive forms use widget annotations (PDF 1.2) to represent the appearance of fields and to manage user interactions. As a convenience, when a field has only a single associated widget annotation, the contents of the field dictionary and the annotation dictionary may be merged into a single dictionary containing entries that pertain to both a field and an annotation. NOTE This presents no ambiguity, since the contents of the two kinds of dictionaries do not conflict.
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.
Enumerator | |
---|---|
e_NoIcon | |
e_NoCaption | |
e_CBelowI | |
e_CAboveI | |
e_CRightILeft | |
e_CLeftIRight | |
e_COverlayI |
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.
Enumerator | |
---|---|
e_Anamorphic | |
e_Proportional |
pdftron::PDF::Annots::Widget::Widget | ( | SDF::Obj | d = 0 | ) |
Creates a widget annotation and initializes it using given Cos/SDF object.
d | The Cos/SDF object to initialze the annotation with. |
|
inline |
|
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. |
Action pdftron::PDF::Annots::Widget::GetAction | ( | ) | const |
Returns the action of the widget annotation
ColorPt pdftron::PDF::Annots::Widget::GetBackgroundColor | ( | ) | const |
Returns the background color of the annotation.
int pdftron::PDF::Annots::Widget::GetBackgroundColorCompNum | ( | ) | const |
Returns the number indicating background color space of the annotation.
ColorPt pdftron::PDF::Annots::Widget::GetBorderColor | ( | ) | const |
Returns the border color of the annotation.
int pdftron::PDF::Annots::Widget::GetBorderColorCompNum | ( | ) | const |
Returns the number indicating border color space of the annotation.
Field pdftron::PDF::Annots::Widget::GetField | ( | ) | const |
bool pdftron::PDF::Annots::Widget::GetFitFull | ( | ) | const |
Returns the "fit full" flag.
Font pdftron::PDF::Annots::Widget::GetFont | ( | ) | const |
double pdftron::PDF::Annots::Widget::GetFontSize | ( | ) | const |
double pdftron::PDF::Annots::Widget::GetHIconLeftOver | ( | ) | const |
Returns the horizontal leftover space of the icon within the annotation.
HighlightingMode pdftron::PDF::Annots::Widget::GetHighlightingMode | ( | ) | const |
IconCaptionRelation pdftron::PDF::Annots::Widget::GetIconCaptionRelation | ( | ) | const |
Returns the Icon and caption relationship of the annotation.
UString pdftron::PDF::Annots::Widget::GetMouseDownCaptionText | ( | ) | const |
Returns the button down caption text of the annotation.
SDF::Obj pdftron::PDF::Annots::Widget::GetMouseDownIcon | ( | ) | const |
Returns the Mouse Down icon associated with the annotation.
UString pdftron::PDF::Annots::Widget::GetRolloverCaptionText | ( | ) | const |
Returns the rollover caption text of the annotation.
SDF::Obj pdftron::PDF::Annots::Widget::GetRolloverIcon | ( | ) | const |
Returns the rollover icon associated with the annotation.
ScaleCondition pdftron::PDF::Annots::Widget::GetScaleCondition | ( | ) | const |
Returns the condition under which the icon should be scaled.
ScaleType pdftron::PDF::Annots::Widget::GetScaleType | ( | ) | const |
Returns the Scale Type of the annotation.
UString pdftron::PDF::Annots::Widget::GetStaticCaptionText | ( | ) | const |
Returns static caption text of the annotation.
SDF::Obj pdftron::PDF::Annots::Widget::GetStaticIcon | ( | ) | const |
Returns the static icon associated with the annotation.
ColorPt pdftron::PDF::Annots::Widget::GetTextColor | ( | ) |
Returns the text color of the Widget Annotation.
int pdftron::PDF::Annots::Widget::GetTextColorCompNum | ( | ) |
Returns the number of color components in the text color of the Widget Annotation.
double pdftron::PDF::Annots::Widget::GetVIconLeftOver | ( | ) | const |
Returns the vertical leftover space of the icon within the 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. |
void pdftron::PDF::Annots::Widget::SetBackgroundColor | ( | const ColorPt & | c, |
int | compnum | ||
) |
Sets the background color of the annotation. (Optional)
col | 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. |
void pdftron::PDF::Annots::Widget::SetBorderColor | ( | const ColorPt & | col, |
int | compnum | ||
) |
Sets the border color of the annotation. (Optional)
col | 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. |
void pdftron::PDF::Annots::Widget::SetFitFull | ( | bool | ff | ) |
Sets the "fit full" flag. (Optional)
ff | A boolean value indicating the "fit full" flag value. |
void pdftron::PDF::Annots::Widget::SetFont | ( | const Font & | font | ) |
Specifies a font to be used for text in this Widget.
font | the font to use. |
void pdftron::PDF::Annots::Widget::SetFontSize | ( | double | font_size | ) |
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. |
void pdftron::PDF::Annots::Widget::SetHighlightingMode | ( | HighlightingMode | mode = e_invert | ) |
Sets the HighlightingMode for the widget annotation.
mode | - New highlighting mode for the widget. |
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. |
void pdftron::PDF::Annots::Widget::SetMouseDownCaptionText | ( | const UString & | contents | ) |
Sets the button down caption text of the annotation. (Optional; button fields only)
contents | A string containing the button down text of the annotation. |
void pdftron::PDF::Annots::Widget::SetMouseDownIcon | ( | SDF::Obj | icon | ) |
Sets the Mouse Down icon associated with the annotation. (Optional; button fields only)
icon | An SDF object that represents the Mouse Down icon associated with the annotation. |
void pdftron::PDF::Annots::Widget::SetRolloverCaptionText | ( | const UString & | contents | ) |
Sets the roll over caption text of the annotation. (Optional; button fields only)
contents | A string containing the roll over caption text of the annotation. |
void pdftron::PDF::Annots::Widget::SetRolloverIcon | ( | SDF::Obj | icon | ) |
Sets the rollover icon associated with the annotation. (Optional; button fields only)
icon | An SDF object that represents the rollover icon associated with the annotation. |
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. |
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. |
void pdftron::PDF::Annots::Widget::SetStaticCaptionText | ( | const UString & | contents | ) |
Sets static caption text of the annotation. (Optional; button fields only)
contents | A string containing the static caption text of the annotation. |
void pdftron::PDF::Annots::Widget::SetStaticIcon | ( | SDF::Obj | icon | ) |
Sets the static icon associated with the annotation. (Optional; button fields only)
icon | An SDF object that represents the static icon associated with the annotation. |
void pdftron::PDF::Annots::Widget::SetTextColor | ( | const ColorPt & | color, |
int | col_comp | ||
) |
Sets the text color of the Widget Annotation.
color | ColorPt object representing the color. |
col_comp | An integer indicating a color space value from the ColorSpace::Type enum. That is, 1 corresponding to "e_device_gray", 3 corresponding to "e_device_rgb", and 4 corresponding to "e_device_cmyk". |
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. |