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-2020 by PDFTron Systems 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 
71  static Text Create(SDF::SDFDoc& doc, const Point& pos, const UString& contents = UString("") );
72 
73 
81  bool IsOpen() const;
82 
91  void SetOpen(bool isopen);
92 
98  enum Icon
99  {
108  };
109 
118  Icon GetIcon() const;
119 
138  const char* GetIconName() const;
139 
149  void SetIcon(Icon icon=e_Note);
150 
170  void SetIcon(const char* icon);
171 
179  UString GetState() const;
180 
188  void SetState(const UString& state="");
189 
196  UString GetStateModel() const;
197 
204  void SetStateModel(const UString& sm );
205 
206  // @cond PRIVATE_DOC
207  #ifndef SWIGHIDDEN
208  Text(TRN_Annot text);
209  #endif
210  // @endcond
211 
212 };//class Text
213  };//namespace Annot
214  };//namespace PDF
215 };//namespace pdftron
216 #include <Impl/Page.inl>
217 
218 #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
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:107
UString GetState() const
const char * GetIconName() const