Aurelon Open API 8.1.1
Loading...
Searching...
No Matches
AOI_Text.cpp
1#include "./AOI_Document.h"
2#include "../GText.h"
3
4#include <ACPL/CString.h>
5
6using namespace aur;
7using namespace aur::PDF;
8using namespace aur::ACPL;
9
99{
100 return (AOI_Object_Text*)new Text( document->mDocument );
101}
102
108void AOI_Object_Text::SetText( const aur::ACPL::UString& uniText )
109{
110 PDF::TextPtr t = PDF::TextPtr(this);
111 t->StartEdit();
112 t->SelectAll();
113 t->SetText( uniText );
114 t->EndEdit();
115}
116
127aur::ACPL::UString AOI_Object_Text::GetText( int selStart, int selEnd ) const
128{
129 PDF::TextPtr t = PDF::TextPtr(this);
130 t->StartEdit();
131 t->SetSelectionStart( selStart );
132 t->SetSelectionEnd( selEnd );
133 auto charCode = t->GetText( true );
134 t->EndEdit();
135 return charCode;
136}
137
146void AOI_Object_Text::SetProperties( int selStart, int selEnd, const AOI_TextProperties& properties )
147{
148 PDF::TextPtr t = PDF::TextPtr(this);
149 t->StartEdit();
150 t->SetSelectionStart( selStart );
151 t->SetSelectionEnd( selEnd );
152 t->SetProperties( *(const PropsT*)&properties );
153 t->EndEdit();
154}
155
171void AOI_Object_Text::GetProperties( int selStart, int selEnd, AOI_TextProperties& properties ) const
172{
173 PDF::TextPtr t = PDF::TextPtr(this);
174 t->StartEdit();
175 t->SetSelectionStart( selStart );
176 t->SetSelectionEnd( selEnd );
177 t->GetProperties( *(PropsT*)&properties );
178 t->EndEdit();
179}
180
187{
188 AOI_Mapping map;
189 // hard cast
190 PDF::TextPtr(this)->GetMapping( *(Mapping*)&map );
191 return map;
192}
PDF Document.
3x3 matrix
Definition AOI_Types.h:113
Text object.
Definition AOI_Text.h:38
void GetProperties(int selStart, int selEnd, AOI_TextProperties &properties) const
Definition AOI_Text.cpp:171
void SetText(const aur::ACPL::UString &uniText)
Definition AOI_Text.cpp:108
static AOI_Object_Text * Create(AOI_Document *document)
Definition AOI_Text.cpp:98
void SetProperties(int selStart, int selEnd, const AOI_TextProperties &properties)
Definition AOI_Text.cpp:146
aur::ACPL::UString GetText(int selStart, int selEnd) const
Definition AOI_Text.cpp:127
AOI_Mapping GetMapping() const
Definition AOI_Text.cpp:186
Text specifications.
Definition AOI_Text.h:14