- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::Text::e_Paragraph
Paragraph icon.
Definition: Text.h:106
pdftron::PDF::Annots::Text::SetIcon
void SetIcon(Icon icon=e_Note)
pdftron::PDF::Annots::Text
Definition: Text.h:21
pdftron::PDF::Annots::Text::SetStateModel
void SetStateModel(const UString &sm)
pdftron::PDF::Annots::Text::IsOpen
bool IsOpen() const
pdftron::PDF::Annots::Text::e_Comment
comment icon
Definition: Text.h:102
pdftron::PDF::Annots::Text::e_Insert
Insert icon.
Definition: Text.h:107
pdftron::PDF::Annots::Text::SetState
void SetState(const UString &state="")
pdftron::PDF::Annots::Text::e_Key
key icon
Definition: Text.h:103
pdftron::PDF::Annots::Text::GetIcon
Icon GetIcon() const
pdftron::PDF::Rect
Definition: Rect.h:28
pdftron::PDF::Annots::Text::Icon
Icon
Definition: Text.h:100
pdftron::PDF::Point
Definition: Point.h:12
pdftron::PDF::Annots::Text::SetOpen
void SetOpen(bool isopen)
pdftron::PDF::Annots::Text::e_Note
Note icon.
Definition: Text.h:108
pdftron::PDF::Annots::Text::GetStateModel
UString GetStateModel() const
pdftron::PDF::Annots::Text::e_NewParagraph
New Paragraph icon.
Definition: Text.h:105
pdftron::PDF::Annots::Text::CreateAnnot
static Text CreateAnnot(SDF::SDFDoc &doc, const Rect &pos, const UString &contents=UString(""))
Markup.h
pdftron::PDF::Annots::Text::e_Help
Help icon.
Definition: Text.h:104
pdftron::SDF::SDFDoc
Definition: SDFDoc.h:67
pdftron::PDF::Annots::Text::Text
Text(SDF::Obj d=0)
pdftron::PDF::Annots::Text::GetAnchorPosition
Point GetAnchorPosition() const
pdftron::PDF::Annots::Text::Text
Text(const Annot &ann)
Definition: Text.h:38
pdftron::PDF::Annots::Text::Create
static Text Create(SDF::SDFDoc &doc, const Rect &pos, const UString &contents=UString(""))
pdftron::PDF::Annots::Text::e_Unknown
Unknown, no icon associated or non-standard icon.
Definition: Text.h:109
pdftron::PDF::Annot
Definition: Annot.h:33
pdftron::PDF::Annots::Text::SetAnchorPosition
void SetAnchorPosition(const Point &pt)
pdftron::SDF::Obj
Definition: Obj.h:40
pdftron::PDF::Annots::Markup
Definition: Markup.h:43
pdftron::PDF::Annots::Text::GetState
UString GetState() const
pdftron::PDF::Annots::Text::GetIconName
const char * GetIconName() const
pdftron::UString
Definition: UString.h:27