Public Member Functions | |
Widget () | |
Constructor. | |
Widget (const Annot &annot) | |
Constructor, with parent class object. More... | |
~Widget () | |
Destructor. | |
actions::Action | GetAction () |
Get action. More... | |
interform::Control | GetControl () |
Get associated form control. More... | |
interform::Field | GetField () |
Get associated form field. More... | |
HighlightingMode | GetHighlightingMode () |
Get highlighting mode. More... | |
RGB | GetMKBackgroundColor () const |
Get the background color in the MK dictionary. More... | |
RGB | GetMKBorderColor () const |
Get the border color in the MK dictionary. More... | |
WString | GetMKDownCaption () const |
Get the down caption string in the MK dictionary. More... | |
common::Bitmap | GetMKDownIconBitmap () |
Get the down icon bitmap in the MK dictionary. More... | |
MKIconCaptionRelation | GetMKIconCaptionRelation () const |
Get the relation of icon and caption in the MK dictionary. More... | |
IconFit | GetMKIconFit () const |
Get the icon fit information in the MK dictionary. More... | |
WString | GetMKNormalCaption () const |
Get the normal caption string in the MK dictionary. More... | |
common::Bitmap | GetMKNormalIconBitmap () |
Get the normal icon bitmap in the MK dictionary. More... | |
WString | GetMKRolloverCaption () const |
Get the rollover caption string in the MK dictionary. More... | |
common::Bitmap | GetMKRolloverIconBitmap () |
Get the rollover icon bitmap in the MK dictionary. More... | |
common::Rotation | GetMKRotation () const |
Get the rotation value in the MK dictionary. More... | |
bool | HasMKEntry (MKEntry mk_entry) |
Check if a specified entry exists in the MK dictionary. More... | |
void | RemoveAction () |
Remove action. More... | |
void | RemoveMKEntry (MKEntry mk_entry) |
Remove a specified entry from the MK dictionary. More... | |
void | SetAction (const actions::Action &action) |
Set action. More... | |
void | SetHighlightingMode (HighlightingMode mode) |
Set highlighting mode. More... | |
void | SetMKBackgroundColor (RGB color) |
Set the background color in the MK dictionary. More... | |
void | SetMKBorderColor (RGB color) |
Set the border color in the MK dictionary. More... | |
void | SetMKDownCaption (const wchar_t *caption) |
Set the down caption string in the MK dictionary. More... | |
void | SetMKDownIconBitmap (const common::Bitmap &bitmap) |
Set the down icon bitmap in the MK dictionary. More... | |
void | SetMKDownIconImage (const common::Image &image, int frame_index) |
Set an image with specified frame index as down icon in the MK dictionary. More... | |
void | SetMKIconCaptionRelation (MKIconCaptionRelation relation) |
Set the relation of icon and caption in the MK dictionary. More... | |
void | SetMKIconFit (const IconFit &icon_fit) |
Set the icon fit information in the MK dictionary. More... | |
void | SetMKNormalCaption (const wchar_t *caption) |
Set the normal caption string in the MK dictionary. More... | |
void | SetMKNormalIconBitmap (const common::Bitmap &bitmap) |
Set a bitmap as normal icon in the MK dictionary. More... | |
void | SetMKNormalIconImage (const common::Image &image, int frame_index) |
Set an image with specified frame index as normal icon in the MK dictionary. More... | |
void | SetMKRolloverCaption (const wchar_t *caption) |
Set the rollover caption string in the MK dictionary. More... | |
void | SetMKRolloverIconBitmap (const common::Bitmap &bitmap) |
Set the rollover icon bitmap in the MK dictionary. More... | |
void | SetMKRolloverIconImage (const common::Image &image, int frame_index) |
Set an image with specified frame index as rollover icon in the MK dictionary. More... | |
void | SetMKRotation (common::Rotation rotation) |
Set the rotation value in the MK dictionary. More... | |
![]() | |
Annot (const PDFPage &page, objects::PDFDictionary *annot_dict) | |
Constructor, with PDF page and annotation's PDF dictionary. More... | |
Annot (const Annot &annot) | |
Constructor, with another annotation object. More... | |
Annot () | |
Constructor. | |
virtual | ~Annot () |
Destructor. | |
objects::PDFStream * | GetAppearanceStream (AppearanceType type, const char *appearance_state="") const |
Get annotation's appearance stream with specified type and state. More... | |
RGB | GetBorderColor () const |
Get border color. More... | |
BorderInfo | GetBorderInfo () const |
Get border information. More... | |
WString | GetContent () const |
Get content. More... | |
RectI | GetDeviceRect (bool is_transform_icon, const Matrix &matrix) |
Get annotation rectangle in device coordinate system. More... | |
objects::PDFDictionary * | GetDict () const |
Get annotation's dictionary object. More... | |
uint32 | GetFlags () const |
Get annotation flags. More... | |
int | GetIndex () const |
Get the index of current annotation in the page which current annotation belongs to. More... | |
DateTime | GetModifiedDateTime () const |
Get last modified date time. More... | |
objects::PDFDictionary * | GetOptionalContent () const |
Get the PDF dictionary of annotation's optional content. More... | |
PDFPage | GetPage () const |
Get the related PDF page. More... | |
RectF | GetRect () const |
Get rectangle, in PDF coordinate system. More... | |
Type | GetType () const |
Get actual annotation type of current annotation. More... | |
WString | GetUniqueID () const |
Get unique ID. More... | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | IsMarkup () const |
Check if current annotation is a markup annotation. More... | |
bool | Move (const RectF &rect) |
Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More... | |
bool | operator!= (const Annot &other) const |
Not equal operator. More... | |
Annot & | operator= (const Annot &annot) |
Assign operator. More... | |
bool | operator== (const Annot &other) const |
Equal operator. More... | |
bool | RemoveProperty (Property property) |
Remove a specified annotation's property. More... | |
bool | ResetAppearanceStream () |
Reset appearance stream. More... | |
void | SetBorderColor (RGB color) |
Set border color. More... | |
void | SetBorderInfo (const BorderInfo &border) |
Set border information. More... | |
void | SetContent (const WString &content) |
Set content. More... | |
void | SetFlags (uint32 flags) |
Set annotation flags. More... | |
void | SetModifiedDateTime (const DateTime &date_time) |
Set last modified date time. More... | |
void | SetUniqueID (const WString &unique_id) |
Set unique ID. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
A widget annotation is used to represent the appearance of form fields.
Class annots::Widget is derived from class Annot and also offers functions to get/set widget annotation's properties. Functions Widget::GetField and Widget::GetControl can be used to get the associated form field and form control object. If a widget annotation is not associated with any form field or is associated with a signature field, this widget can still get/set properties, but cannot be reset appearance. For these cases, Annot::ResetAppearanceStream (inherited from Widget's parent class) will return false directly.
|
explicit |
Constructor, with parent class object.
[in] | annot | Parent class object. |
actions::Action foxit::pdf::annots::Widget::GetAction | ( | ) |
Get action.
This function cannot be used to get action which is used as additional action. If user wants to get any additional action, please refer to class actions::AdditionalAction for more details.
interform::Control foxit::pdf::annots::Widget::GetControl | ( | ) |
Get associated form control.
interform::Field foxit::pdf::annots::Widget::GetField | ( | ) |
Get associated form field.
HighlightingMode foxit::pdf::annots::Widget::GetHighlightingMode | ( | ) |
Get highlighting mode.
Highlighting mode is the visual effect to be used when the mouse button is pressed or held down inside its active area
RGB foxit::pdf::annots::Widget::GetMKBackgroundColor | ( | ) | const |
Get the background color in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
RGB foxit::pdf::annots::Widget::GetMKBorderColor | ( | ) | const |
Get the border color in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
WString foxit::pdf::annots::Widget::GetMKDownCaption | ( | ) | const |
Get the down caption string in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Down caption (or alternate caption) in MK dictionary is used to displayed when the mouse button is pressed within its active area. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
common::Bitmap foxit::pdf::annots::Widget::GetMKDownIconBitmap | ( | ) |
Get the down icon bitmap in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Down icon (or alternate icon) in MK dictionary is used to displayed when the mouse button is pressed within its active area. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
MKIconCaptionRelation foxit::pdf::annots::Widget::GetMKIconCaptionRelation | ( | ) | const |
Get the relation of icon and caption in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The relation position of caption and icon specifies where to position the text of the widget annotation's caption relative to its icon. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
IconFit foxit::pdf::annots::Widget::GetMKIconFit | ( | ) | const |
Get the icon fit information in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The icon fit information specifies how to display the widget annotation's icon within its annotation rectangle. If present, the icon fit information applies to all of the annotation's icons. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
WString foxit::pdf::annots::Widget::GetMKNormalCaption | ( | ) | const |
Get the normal caption string in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Normal caption in MK dictionary is used to displayed when the widget is not interacting with the user. This is applicable for widget associated with pushbutton field, check box field or radio button field. For other type of fields, this will be useless.
common::Bitmap foxit::pdf::annots::Widget::GetMKNormalIconBitmap | ( | ) |
Get the normal icon bitmap in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Normal icon in MK dictionary is used to displayed when the widget is not interacting with the user. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
WString foxit::pdf::annots::Widget::GetMKRolloverCaption | ( | ) | const |
Get the rollover caption string in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Rollover caption in MK dictionary is used to displayed when the user rolls the cursor into its active area without pressing the mouse button. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
common::Bitmap foxit::pdf::annots::Widget::GetMKRolloverIconBitmap | ( | ) |
Get the rollover icon bitmap in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Rollover icon in MK dictionary is used to displayed when the user rolls the cursor into its active area without pressing the mouse button. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
common::Rotation foxit::pdf::annots::Widget::GetMKRotation | ( | ) | const |
Get the rotation value in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The rotation in MK dictionary specifies the degrees by which the widget annotation is rotated counterclockwise relative to the page.
bool foxit::pdf::annots::Widget::HasMKEntry | ( | MKEntry | mk_entry | ) |
Check if a specified entry exists in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
[in] | mk_entry | An entry in MK dictionary. Please refer to values starting from Annot::e_MKEntryRotation and this should be one of these values. |
void foxit::pdf::annots::Widget::RemoveAction | ( | ) |
Remove action.
This function cannot be used to remove action which is used as additional action. If user wants to remove any additional action, please refer to class actions::AdditionalAction for more details.
void foxit::pdf::annots::Widget::RemoveMKEntry | ( | MKEntry | mk_entry | ) |
Remove a specified entry from the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
[in] | mk_entry | An entry in MK dictionary. Please refer to values starting from Annot::e_MKEntryRotation and this should be one of these values. |
void foxit::pdf::annots::Widget::SetAction | ( | const actions::Action & | action | ) |
Set action.
This function cannot be used to set action which is used as additional action. If user wants to set any additional action, please refer to class actions::AdditionalAction for more details.
[in] | action | New action to be set. It should be valid. Currently only support following types as the new action: actions::Action::e_TypeGoto, actions::Action::e_TypeURI, actions::Action::e_TypeJavaScript, actions::Action::e_TypeNamed, actions::Action::e_TypeGoToR, actions::Action::e_TypeGoToE, actions::Action::e_TypeSubmitForm, actions::Action::e_TypeResetForm, actions::Action::e_TypeHide, actions::Action::e_TypeLaunch, actions::Action::e_TypeImportData, actions::Action::e_TypeRendition. |
void foxit::pdf::annots::Widget::SetHighlightingMode | ( | HighlightingMode | mode | ) |
Set highlighting mode.
Highlighting mode is the visual effect to be used when the mouse button is pressed or held down inside its active area
[in] | mode | New highlighting mode value. Please refer to values starting from Annot::e_HighlightingNone and this should be one of these values. |
void foxit::pdf::annots::Widget::SetMKBackgroundColor | ( | RGB | color | ) |
Set the background color in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
[in] | color | The background color to be set in MK dictionary. Value format: 0xRRGGBB. |
void foxit::pdf::annots::Widget::SetMKBorderColor | ( | RGB | color | ) |
Set the border color in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
[in] | color | The border color to be set in MK dictionary. Value format: 0xRRGGBB. |
void foxit::pdf::annots::Widget::SetMKDownCaption | ( | const wchar_t * | caption | ) |
Set the down caption string in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Down caption (or alternate caption) in MK dictionary is used to displayed when the mouse button is pressed within its active area. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | caption | Down caption string to be set in MK dictionary. It can be an empty string. |
void foxit::pdf::annots::Widget::SetMKDownIconBitmap | ( | const common::Bitmap & | bitmap | ) |
Set the down icon bitmap in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Down icon (or alternate icon) in MK dictionary is used to displayed when the mouse button is pressed within its active area. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | bitmap | A valid bitmap to be set as down icon in MK dictionary. |
void foxit::pdf::annots::Widget::SetMKDownIconImage | ( | const common::Image & | image, |
int | frame_index | ||
) |
Set an image with specified frame index as down icon in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Down icon (or alternate icon) in MK dictionary is used to displayed when the mouse button is pressed within its active area. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | image | An image. One of its frames will be set as down icon in MK dictionary. This image should contain at least one frame and the image type should not be common::Image::e_Unknown. |
[in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function common::Image::GetFrameCount. |
void foxit::pdf::annots::Widget::SetMKIconCaptionRelation | ( | MKIconCaptionRelation | relation | ) |
Set the relation of icon and caption in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The relation position of caption and icon specifies where to position the text of the widget annotation's caption relative to its icon. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | relation | The relation position of caption and icon. Please refer to values starting from Annot::e_MKRelationNoIcon and this should be one of these values. |
void foxit::pdf::annots::Widget::SetMKIconFit | ( | const IconFit & | icon_fit | ) |
Set the icon fit information in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The icon fit information specifies how to display the widget annotation's icon within its annotation rectangle. If present, the icon fit information applies to all of the annotation's icons. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | icon_fit | An icon fit object which represents the icon fit information to be set in MK dictionary. If value of any member in this object is invalid, this function will throw exception foxit::e_ErrParam. Please refer to class IconFit to check the valid value range for each member. |
void foxit::pdf::annots::Widget::SetMKNormalCaption | ( | const wchar_t * | caption | ) |
Set the normal caption string in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Normal caption in MK dictionary is used to displayed when the widget is not interacting with the user. This is applicable for widgets associated with pushbutton field, check box field or radio button field. For other type of fields, this will be useless.
[in] | caption | Normal caption string to be set in MK dictionary. It can be an empty string. |
void foxit::pdf::annots::Widget::SetMKNormalIconBitmap | ( | const common::Bitmap & | bitmap | ) |
Set a bitmap as normal icon in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Normal icon in MK dictionary is used to displayed when the widget is not interacting with the user. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | bitmap | A valid bitmap to be set as normal icon in MK dictionary. |
void foxit::pdf::annots::Widget::SetMKNormalIconImage | ( | const common::Image & | image, |
int | frame_index | ||
) |
Set an image with specified frame index as normal icon in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Normal icon in MK dictionary is used to displayed when the widget is not interacting with the user. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | image | An image. One of its frames will be set as normal icon in MK dictionary. This image should contain at least one frame and the image type should not be common::Image::e_Unknown. |
[in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function common::Image::GetFrameCount. |
void foxit::pdf::annots::Widget::SetMKRolloverCaption | ( | const wchar_t * | caption | ) |
Set the rollover caption string in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Rollover caption in MK dictionary is used to displayed when the user rolls the cursor into its active area without pressing the mouse button. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | caption | Rollover caption string to be set in MK dictionary. It can be an empty string. |
void foxit::pdf::annots::Widget::SetMKRolloverIconBitmap | ( | const common::Bitmap & | bitmap | ) |
Set the rollover icon bitmap in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Rollover icon in MK dictionary is used to displayed when the user rolls the cursor into its active area without pressing the mouse button. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | bitmap | A valid bitmap to be set as rollover icon in MK dictionary. |
void foxit::pdf::annots::Widget::SetMKRolloverIconImage | ( | const common::Image & | image, |
int | frame_index | ||
) |
Set an image with specified frame index as rollover icon in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Rollover icon in MK dictionary is used to displayed when the user rolls the cursor into its active area without pressing the mouse button. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.
[in] | image | An image. One of its frames will be set as rollover icon in MK dictionary. This image should contain at least one frame and the image type should not be common::Image::e_Unknown. |
[in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function common::Image::GetFrameCount. |
void foxit::pdf::annots::Widget::SetMKRotation | ( | common::Rotation | rotation | ) |
Set the rotation value in the MK dictionary.
MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The rotation in MK dictionary specifies the degrees by which the widget annotation is rotated counterclockwise relative to the page.
[in] | rotation | The rotation value to be set in MK dictionary. Please refer to values starting from common::e_Rotation0 and this should be one of these values except common::e_RotationUnknown |