Loading...
Searching...
No Matches
pdftron::PDF::Annots::Popup Class Reference

`#include <Popup.h>`

Inheritance diagram for pdftron::PDF::Annots::Popup:

## Public Member Functions
| Popup (SDF::Obj d=0)
| Popup (const Annot &ann)
Annot | GetParent () const
void | SetParent (const Annot &parent)
bool | IsOpen () const
void | SetOpen (bool is_open)
Public Member Functions inherited from pdftron::PDF::Annot
| Annot (SDF::Obj d=0)
| Annot (const Annot &d)
Annot & | operator= (const Annot &d)
bool | operator== (const Annot &d)
bool | IsValid () const
SDF::Obj | GetSDFObj () const
Type | GetType () const
Rect | GetRect () const
Rect | GetVisibleContentBox () const
bool | IsMarkup () const
void | SetRect (const Rect &pos)
Page | GetPage () const
void | SetPage (const Page &page)
SDF::Obj | GetUniqueID () const
void | SetUniqueID (const char *id, int id_buf_sz=0)
Date | GetDate () const
void | SetDate (const Date &date)
bool | GetFlag (Flag flag) const
void | SetFlag (Flag flag, bool value)
SDF::Obj | GetTriggerAction (Annot::ActionTriggerEvent trigger)
BorderStyle | GetBorderStyle () const
void | SetBorderStyle (const BorderStyle &bs, bool oldStyleOnly=false)
SDF::Obj | GetAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
void | SetAppearance (SDF::Obj app_stream, AnnotationState annot_state=e_normal, const char *app_state=0)
void | RemoveAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
void | Flatten (class Page page)
const char * | GetActiveAppearanceState () const
void | SetActiveAppearanceState (const char *astate)
ColorPt | GetColorAsRGB () const
ColorPt | GetColorAsCMYK () const
ColorPt | GetColorAsGray () const
int | GetColorCompNum () const
void | SetColor (const ColorPt &col, int numcomp=3)
int | GetStructParent () const
void | SetStructParent (const int parkeyval)
SDF::Obj | GetOptionalContent () const
void | SetOptionalContent (SDF::Obj content)
void | SetContents (const UString &contents)
UString | GetContents () const
int | GetRotation () const
void | SetRotation (int angle)
void | RefreshAppearance ()
void | RefreshAppearance (const RefreshOptions &options)
UString | GetCustomData (const UString &key) const
void | SetCustomData (const UString &key, const UString &value)
void | DeleteCustomData (const UString &key)
void | Resize (const Rect &newrect)
ptrdiff_t | GetHandleInternal ()

## Static Public Member Functions
static Popup | Create (SDF::SDFDoc &doc, const Rect &pos)
static Popup | CreateAnnot (SDF::SDFDoc &doc, const Rect &pos)
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)

## Additional Inherited Members
Public Types inherited from pdftron::PDF::Annot
enum | Type { e_Text , e_Link , e_FreeText , e_Line , e_Square , e_Circle , e_Polygon , e_Polyline , e_Highlight , e_Underline , e_Squiggly , e_StrikeOut , e_Stamp , e_Caret , e_Ink , e_Popup , e_FileAttachment , e_Sound , e_Movie , e_Widget , e_Screen , e_PrinterMark , e_TrapNet , e_Watermark , e_3D , e_Redact , e_Projection , e_RichMedia , e_Unknown }
enum | Flag { e_invisible , e_hidden , e_print , e_no_zoom , e_no_rotate , e_no_view , e_read_only , e_locked , e_toggle_no_view , e_locked_contents }
enum | ActionTriggerEvent { e_action_trigger_activate = 0 , e_action_trigger_annot_enter = 1 , e_action_trigger_annot_exit = 2 , e_action_trigger_annot_down = 3 , e_action_trigger_annot_up = 4 , e_action_trigger_annot_focus = 5 , e_action_trigger_annot_blur = 6 , e_action_trigger_annot_page_open = 7 , e_action_trigger_annot_page_close = 8 , e_action_trigger_annot_page_visible = 9 , e_action_trigger_annot_page_invisible = 10 }
enum | AnnotationState { e_normal , e_rollover , e_down }
typedef pdftron::PDF::BorderStyle | BorderStyle

## Detailed Description

A pop-up annotation (PDF 1.3) displays text in a pop-up window for entry and editing. It shall not appear alone but is associated with a markup annotation, its parent annotation, and shall be used for editing the parent's text. It shall have no appearance stream or associated actions of its own and shall be identified by the Popup entry in the parent's annotation dictionary.

Definition at line 20 of file Popup.h.

## Constructor & Destructor Documentation

## ◆ Popup() [1/2]

pdftron::PDF::Annots::Popup::Popup | ( | SDF::Obj | d = 0 | ) |

Creates a Popup annotation and initializes it using given Cos/SDF object.

Parameters

  d | The Cos/SDF object to initialze the annotation with.

Note
  The constructor does not copy any data, but is instead the logical equivalent of a type cast.

## ◆ Popup() [2/2]

pdftron::PDF::Annots::Popup::Popup | ( | const Annot & | ann | ) |
| inline

Creates a Popup annotation and initializes it using given annotation object.

Parameters

  ann | Annot object used to initialize the Popup annotation.

Note
  The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Definition at line 37 of file Popup.h.

## Member Function Documentation

## ◆ Create()

Popup pdftron::PDF::Annots::Popup::Create | ( | SDF::SDFDoc & | doc,
|  | const Rect & | pos )
| static

Creates a new Popup annotation in the specified document.

Parameters

  doc | A document to which the Popup annotation is added.
  pos | A rectangle specifying the Popup annotation's bounds in default user space units.

Returns
  A newly created blank Popup annotation.

## ◆ CreateAnnot()

Popup pdftron::PDF::Annots::Popup::CreateAnnot | ( | SDF::SDFDoc & | doc,
|  | const Rect & | pos )
| static

## ◆ GetParent()

Annot pdftron::PDF::Annots::Popup::GetParent | ( |  | ) | const

Returns the parent annotation of the Popup annotation.

Returns
  An annot object which is the parent annotation of the Popup annotation.

Note
  This annotation object represents the parent annotation with which this pop-up annotation shall be associated.
  If this entry is present, the parent annotation's Contents, M, C, and T entries shall override those of the pop-up annotation itself.

## ◆ IsOpen()

bool pdftron::PDF::Annots::Popup::IsOpen | ( |  | ) | const

Returns the initial opening condition of Popup.

Returns
  A bool indicating whether the Popup is initially open.

Note
  This is a flag specifying whether the pop-up annotation's window shall initially be displayed. Default value: false (closed).

## ◆ SetOpen()

void pdftron::PDF::Annots::Popup::SetOpen | ( | bool | is_open | ) |

Sets the initial opening condition of Popup. (Optional)

Parameters

  is_open | A bool indicating whether the Popup is initially open.

Note
  This is a flag specifying whether the pop-up annotation's window shall initially be displayed. Default value: false (closed).

## ◆ SetParent()

void pdftron::PDF::Annots::Popup::SetParent | ( | const Annot & | parent | ) |

Sets the Parent annotation of the Popup annotation. (Optional)

Parameters

  parent | An annot object which is the parent annotation of the Popup annotation.

Note
  This annotation object represents the parent annotation with which this pop-up annotation shall be associated.
  If this entry is present, the parent annotation's Contents, M, C, and T entries shall override those of the pop-up annotation itself.

The documentation for this class was generated from the following file:

- PDF/Annots/Popup.h