Loading...
Searching...
No Matches
Text.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFAnnotsText
6#define PDFTRON_H_CPPPDFAnnotsText
7
8#include <PDF/Annots/Markup.h>
9
10 namespace pdftron {
11 namespace PDF {
12 namespace Annots {
21 class Text : public Markup
22{
23 public:
30 Text(SDF::Obj d = 0);
31
38 Text(const Annot& ann) : Markup(ann.GetSDFObj()) {}
39
48 //static Text Create(SDF::SDFDoc& doc, const Rect& pos);
49
59 static Text Create(SDF::SDFDoc& doc, const Rect& pos, const UString& contents = UString("") );
60 static Text CreateAnnot(SDF::SDFDoc& doc, const Rect& pos, const UString& contents = UString("") );
61
72 static Text Create(SDF::SDFDoc& doc, const Point& pos, const UString& contents = UString("") );
73 static Text CreateAnnot(SDF::SDFDoc& doc, const Point& pos, const UString& contents = UString("") );
74
75
83 bool IsOpen() const;
84
93 void SetOpen(bool isopen);
94
100 enum Icon
101 {
102 e_Comment,
103 e_Key,
104 e_Help,
105 e_NewParagraph,
106 e_Paragraph,
107 e_Insert,
108 e_Note,
109 e_Unknown
110 };
111
120 Icon GetIcon() const;
121
140 const char* GetIconName() const;
141
151 void SetIcon(Icon icon=e_Note);
152
172 void SetIcon(const char* icon);
173
181 UString GetState() const;
182
190 void SetState(const UString& state="");
191
198 UString GetStateModel() const;
199
206 void SetStateModel(const UString& sm );
207
213 Point GetAnchorPosition() const;
218 void SetAnchorPosition(const Point& pt);
219
220 // @cond PRIVATE_DOC
221 #ifndef SWIGHIDDEN
222 Text(TRN_Annot text);
223 #endif
224 // @endcond
225
226};//class Text
227 };//namespace Annot
228 };//namespace PDF
229};//namespace pdftron
230#include <Impl/Page.inl>
231
232#endif // PDFTRON_H_CPPPDFAnnotsText
Markup.h
pdftron::PDF::Annot::Annot
Annot(SDF::Obj d=0)
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::Markup::Markup
Markup(SDF::Obj d=0)
pdftron::PDF::Annots::Text::Text
Text(const Annot &ann)
Definition Text.h:38
pdftron::PDF::Annots::Text::SetIcon
void SetIcon(Icon icon=e_Note)
pdftron::PDF::Annots::Text::Create
static Text Create(SDF::SDFDoc &doc, const Point &pos, const UString &contents=UString(""))
pdftron::PDF::Annots::Text::SetState
void SetState(const UString &state="")
pdftron::PDF::Annots::Text::SetAnchorPosition
void SetAnchorPosition(const Point &pt)
pdftron::PDF::Annots::Text::SetIcon
void SetIcon(const char *icon)
pdftron::PDF::Annots::Text::GetStateModel
UString GetStateModel() const
pdftron::PDF::Annots::Text::GetState
UString GetState() const
pdftron::PDF::Annots::Text::Text
Text(SDF::Obj d=0)
pdftron::PDF::Annots::Text::CreateAnnot
static Text CreateAnnot(SDF::SDFDoc &doc, const Point &pos, const UString &contents=UString(""))
pdftron::PDF::Annots::Text::GetAnchorPosition
Point GetAnchorPosition() const
pdftron::PDF::Annots::Text::IsOpen
bool IsOpen() const
pdftron::PDF::Annots::Text::CreateAnnot
static Text CreateAnnot(SDF::SDFDoc &doc, const Rect &pos, const UString &contents=UString(""))
pdftron::PDF::Annots::Text::SetStateModel
void SetStateModel(const UString &sm)
pdftron::PDF::Annots::Text::Create
static Text Create(SDF::SDFDoc &doc, const Rect &pos, const UString &contents=UString(""))
pdftron::PDF::Annots::Text::SetOpen
void SetOpen(bool isopen)
pdftron::PDF::Annots::Text::GetIcon
Icon GetIcon() const
pdftron::PDF::Annots::Text::GetIconName
const char * GetIconName() const
pdftron::PDF::Annots::Text::Icon
Icon
Definition Text.h:101
pdftron::PDF::Annots::Text::e_Comment
@ e_Comment
comment icon
Definition Text.h:102
pdftron::PDF::Annots::Text::e_Help
@ e_Help
Help icon.
Definition Text.h:104
pdftron::PDF::Annots::Text::e_NewParagraph
@ e_NewParagraph
New Paragraph icon.
Definition Text.h:105
pdftron::PDF::Annots::Text::e_Paragraph
@ e_Paragraph
Paragraph icon.
Definition Text.h:106
pdftron::PDF::Annots::Text::e_Insert
@ e_Insert
Insert icon.
Definition Text.h:107
pdftron::PDF::Annots::Text::e_Unknown
@ e_Unknown
Unknown, no icon associated or non-standard icon.
Definition Text.h:109
pdftron::PDF::Annots::Text::e_Key
@ e_Key
key icon
Definition Text.h:103
pdftron::PDF::Annots::Text::e_Note
@ e_Note
Note icon.
Definition Text.h:108
pdftron::PDF::Point
Definition Point.h:13
pdftron::PDF::Rect
Definition Rect.h:29
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::SDF::SDFDoc
Definition SDFDoc.h:68
pdftron::UString
Definition UString.h:28
pdftron::PDF::Annots
Definition Caret.h:12
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10