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-2023 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  {
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
SDF::Obj GetSDFObj() const
void SetIcon(Icon icon=e_Note)
void SetStateModel(const UString &sm)
void SetState(const UString &state="")
void SetOpen(bool isopen)
UString GetStateModel() const
static Text CreateAnnot(SDF::SDFDoc &doc, const Rect &pos, const UString &contents=UString(""))
Point GetAnchorPosition() const
Text(const Annot &ann)
Definition: Text.h:38
static Text Create(SDF::SDFDoc &doc, const Rect &pos, const UString &contents=UString(""))
Unknown, no icon associated or non-standard icon.
Definition: Text.h:109
void SetAnchorPosition(const Point &pt)
UString GetState() const
const char * GetIconName() const