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)
79 TRN_PDFViewSelection mp_selection;
85 inline Selection::Selection()
87 REX(TRN_PDFViewSelectionCreate(&mp_selection));
90 inline Selection::~Selection()
92 DREX(mp_selection, TRN_PDFViewSelectionDestroy(mp_selection));
95 inline Selection::Selection(
const Selection& s)
97 REX(TRN_PDFViewSelectionCreate(&mp_selection));
98 REX(TRN_PDFViewSelectionAssign(mp_selection,s.mp_selection));
101 inline Selection::Selection(TRN_PDFViewSelection impl) : mp_selection(impl)
106 inline Selection& Selection::operator=(
const Selection& s)
108 REX(TRN_PDFViewSelectionAssign(mp_selection,s.mp_selection));
116 RetInt(TRN_PDFViewSelectionGetPageNum(mp_selection,&result));
128 TRN_PDFViewSelectionGetQuads(mp_selection,(
const double**)&quads,&num);
129 std::vector<QuadPoint> result(num);
131 for(i = 0; i < num; i++) {
144 REX(TRN_PDFViewSelectionGetAsUnicode(mp_selection, unicodeStr.mp_impl));
150 RetCCS(TRN_PDFViewSelectionGetAsHtml(mp_selection, &result));
156 RetInt(TRN_PDFViewSelectionGetQuads(mp_selection,&quads,&result));
161 REX(TRN_PDFViewSelectionGetAsUnicode(mp_selection, out_str.mp_impl));
163 #endif // !defined(SWIG)
169 #endif // PDFTRON_H_CPPSelection
std::vector< QuadPoint > GetQuads() const
#define DREX(impl, destroy_action)
const char * GetAsHtml() const
UString GetAsUnicode() const