5 #ifndef PDFTRON_H_CPPSelection
6 #define PDFTRON_H_CPPSelection
8 #include <C/Common/TRN_Types.h>
9 #include <C/PDF/TRN_PDFView.h>
48 std::vector<QuadPoint>
GetQuads()
const;
66 int GetQuads(
const double* & quads)
const;
68 #endif // !defined(SWIG)
78 TRN_PDFViewSelection mp_selection;
83 inline Selection::Selection()
85 REX(TRN_PDFViewSelectionCreate(&mp_selection));
88 inline Selection::~Selection()
90 DREX(mp_selection, TRN_PDFViewSelectionDestroy(mp_selection));
93 inline Selection::Selection(
const Selection& s)
95 REX(TRN_PDFViewSelectionCreate(&mp_selection));
96 REX(TRN_PDFViewSelectionAssign(mp_selection,s.mp_selection));
99 inline Selection::Selection(TRN_PDFViewSelection impl) : mp_selection(impl)
104 inline Selection& Selection::operator=(
const Selection& s)
106 REX(TRN_PDFViewSelectionAssign(mp_selection,s.mp_selection));
114 RetInt(TRN_PDFViewSelectionGetPageNum(mp_selection,&result));
126 TRN_PDFViewSelectionGetQuads(mp_selection,(
const double**)&quads,&num);
127 std::vector<QuadPoint> result(num);
129 for(i = 0; i < num; i++) {
142 REX(TRN_PDFViewSelectionGetAsUnicode(mp_selection, unicodeStr.mp_impl));
148 RetCCS(TRN_PDFViewSelectionGetAsHtml(mp_selection, &result));
154 RetInt(TRN_PDFViewSelectionGetQuads(mp_selection,&quads,&result));
159 REX(TRN_PDFViewSelectionGetAsUnicode(mp_selection, out_str.mp_impl));
161 #endif // !defined(SWIG)
167 #endif // PDFTRON_H_CPPSelection
std::vector< QuadPoint > GetQuads() const
#define DREX(impl, destroy_action)
const char * GetAsHtml() const
UString GetAsUnicode() const