#include <Text.h>
Public Member Functions | |
Text (SDF::Obj d=0) | |
Text (const Annot &ann) | |
bool | IsOpen () const |
void | SetOpen (bool isopen) |
Icon | GetIcon () const |
const char * | GetIconName () const |
void | SetIcon (Icon icon=e_Note) |
void | SetIcon (const char *icon) |
UString | GetState () const |
void | SetState (const UString &state="") |
UString | GetStateModel () const |
void | SetStateModel (const UString &sm) |
Point | GetAnchorPosition () const |
void | SetAnchorPosition (const Point &pt) |
Public Member Functions inherited from pdftron::PDF::Annots::Markup | |
Markup (SDF::Obj d=0) | |
Markup (const Annot &ann) | |
UString | GetTitle () |
void | SetTitle (const UString &title) |
void | SetTitle (const char *title) |
Popup | GetPopup () const |
void | SetPopup (const Popup &ppup) |
double | GetOpacity () const |
void | SetOpacity (double op) |
UString | GetSubject () const |
void | SetSubject (const UString &contents) |
Date | GetCreationDates () const |
void | SetCreationDates (const Date &dt) |
BorderEffect | GetBorderEffect () const |
void | SetBorderEffect (BorderEffect effect=e_None) |
double | GetBorderEffectIntensity () const |
void | SetBorderEffectIntensity (double intensity=0) |
ColorPt | GetInteriorColor () const |
int | GetInteriorColorCompNum () const |
void | SetInteriorColor (const ColorPt &c, int CompNum) |
Rect | GetContentRect () const |
void | SetContentRect (const Rect &cr) |
Rect | GetPadding () const |
void | SetPadding (const Rect &rd) |
void | SetPadding (double x) |
void | RotateAppearance (double angle) |
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 Text | Create (SDF::SDFDoc &doc, const Rect &pos, const UString &contents=UString("")) |
static Text | CreateAnnot (SDF::SDFDoc &doc, const Rect &pos, const UString &contents=UString("")) |
static Text | Create (SDF::SDFDoc &doc, const Point &pos, const UString &contents=UString("")) |
static Text | CreateAnnot (SDF::SDFDoc &doc, const Point &pos, const UString &contents=UString("")) |
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) |
A text annotation represents a "sticky note" attached to a point in the PDF document. When closed, the annotation shall appear as an icon; when open, it shall display a pop-up window containing the text of the note in a font and size chosen by the conforming reader. Text annotations do not scale and rotate with the page (i.e. they should behave as if the NoZoom and NoRotate annotation flags).
Icon enumeration defines the type of icon associated with the Text annotation.
pdftron::PDF::Annots::Text::Text | ( | SDF::Obj | d = 0 | ) |
Creates a Text annotation and initializes it using given Cos/SDF object.
d | The Cos/SDF object to initialze the annotation with. |
|
inline |
|
static |
Creates a new Text 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. |
doc | A document to which the annotation is added. |
pos | A rectangle specifying the annotation's bounds in default user space units. |
contents | The text of the annotation, that shall be displayed in its popup window. |
|
static |
Creates a new Text annotation in the specified document.
doc | A document to which the annotation is added. |
pos | A point specifying the annotation's location in default user space units. This determines the location of bottom left corner of the annotation's icon. |
contents | The text of the annotation, that shall be displayed in its popup window. |
|
static |
|
static |
Point pdftron::PDF::Annots::Text::GetAnchorPosition | ( | ) | const |
Returns anchor point position (in relative coordinates) - the point that won't move when the page is zoomed in/out Anchor point position is in relative coordinates [0,1], and default is upper-left corner (0,1)
Icon pdftron::PDF::Annots::Text::GetIcon | ( | ) | const |
Returns the type of the icon associated with the Text annotation.
const char* pdftron::PDF::Annots::Text::GetIconName | ( | ) | const |
Returns the name of the icon associated with the Text annotation.
UString pdftron::PDF::Annots::Text::GetState | ( | ) | const |
UString pdftron::PDF::Annots::Text::GetStateModel | ( | ) | const |
bool pdftron::PDF::Annots::Text::IsOpen | ( | ) | const |
Returns the initial status of the Text annotation.
void pdftron::PDF::Annots::Text::SetAnchorPosition | ( | const Point & | pt | ) |
Sets anchor point position (in coordinates relative to the annotation Rect) - the point that won't move when the page is zoomed in/out and/or if the page is rotated.
pt | Anchor point position in relative coordinates [0,1], where 0,0 is bottom left corner of the annotation, and 1,1 is top right corner. Default: 0,1 |
Sets the type of the icon associated with the Text annotation. (Optional)
icon | A value of the enum "Icon" type. Default value: e_Note. |
void pdftron::PDF::Annots::Text::SetIcon | ( | const char * | icon | ) |
Sets the name of the icon associated with the Text annotation. (Optional)
icon | A string denoting the name of the icon. |
void pdftron::PDF::Annots::Text::SetOpen | ( | bool | isopen | ) |
Sets the initial status of the Text annotation. (Optional)
isopen | A boolean value that specifies whether the annotation shall initially be displayed as opened. Default value: false. |
void pdftron::PDF::Annots::Text::SetState | ( | const UString & | state = "" | ) |
void pdftron::PDF::Annots::Text::SetStateModel | ( | const UString & | sm | ) |